Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. int healthPercent = msg->getU8();
  2. Otc::Direction direction = (Otc::Direction)msg->getU8();
  3. Outfit outfit = getOutfit(msg);
  4.  
  5. Light light;
  6. light.intensity = msg->getU8();
  7. light.color = msg->getU8();
  8.  
  9. int speed = msg->getU16();
  10. int skull = msg->getU8();
  11. int shield = msg->getU8();
  12.  
  13. // emblem is sent only when the creature is not known
  14. int8 emblem = -1;
  15. int8 creatureType = -1;
  16. int8 icon = -1;
  17. bool unpass = true;
  18. uint8 mark;
  19.  
  20. if(g_game.getFeature(Otc::GameCreatureEmblems) && !known)
  21. emblem = msg->getU8();
  22.  
  23. if(g_game.getFeature(Otc::GameThingMarks)) {
  24. creatureType = msg->getU8();
  25. }
  26.  
  27. if(g_game.getFeature(Otc::GameCreatureIcons)) {
  28. icon = msg->getU8();
  29. }
  30.  
  31. if(g_game.getFeature(Otc::GameThingMarks)) {
  32. mark = msg->getU8(); // mark
  33. msg->getU16(); // helpers
  34.  
  35. if(creature) {
  36. if(mark == 0xff)
  37. creature->hideStaticSquare();
  38. else
  39. creature->showStaticSquare(Color::from8bit(mark));
  40. }
  41. }
  42.  
  43. if(g_game.getClientVersion() >= 854 || g_game.getFeature(Otc::GameCreatureWalkthrough))
  44. unpass = msg->getU8();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement