Guest User

Untitled

a guest
May 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. Index: src/ChannelServer/Pets.cpp
  2. ===================================================================
  3. --- src/ChannelServer/Pets.cpp (revision 1355)
  4. +++ src/ChannelServer/Pets.cpp (working copy)
  5. @@ -204,7 +204,7 @@
  6. if (player->getPets()->getSummoned(i) != 0) {
  7. Pet *pet = player->getPets()->getPet(player->getPets()->getSummoned(i));
  8. if (pet->isSummoned()) {
  9. - PetsPacket::petSummoned(player, pet);
  10. + PetsPacket::petSummoned(player, pet, false, false);
  11. PetsPacket::showPet(player, pet);
  12. }
  13. else {
  14. @@ -212,7 +212,7 @@
  15. pet->startTimer();
  16. }
  17. pet->setSummoned(true);
  18. - PetsPacket::petSummoned(player, pet);
  19. + PetsPacket::petSummoned(player, pet, false, false);
  20. }
  21. }
  22. }
  23. Index: src/ChannelServer/PetsPacket.cpp
  24. ===================================================================
  25. --- src/ChannelServer/PetsPacket.cpp (revision 1355)
  26. +++ src/ChannelServer/PetsPacket.cpp (working copy)
  27. @@ -45,7 +45,7 @@
  28. Maps::maps[player->getMap()]->sendPacket(packet, player);
  29. }
  30.  
  31. -void PetsPacket::petSummoned(Player *player, Pet *pet, bool kick) {
  32. +void PetsPacket::petSummoned(Player *player, Pet *pet, bool kick, bool show) {
  33. PacketCreator packet;
  34. packet.addShort(SEND_PET_SUMMONED);
  35. packet.addInt(player->getId());
  36. @@ -62,7 +62,10 @@
  37. packet.addByte(pet->getStance());
  38. packet.addInt(pet->getFH());
  39. }
  40. - Maps::maps[player->getMap()]->sendPacket(packet);
  41. + if (show)
  42. + Maps::maps[player->getMap()]->sendPacket(packet);
  43. + else
  44. + player->getSession()->send(packet);
  45. }
  46.  
  47. void PetsPacket::showAnimation(Player *player, Pet *pet, int8_t animation, bool success) {
  48. Index: src/ChannelServer/PetsPacket.h
  49. ===================================================================
  50. --- src/ChannelServer/PetsPacket.h (revision 1355)
  51. +++ src/ChannelServer/PetsPacket.h (working copy)
  52. @@ -32,7 +32,7 @@
  53. namespace PetsPacket {
  54. void showChat(Player *player, Pet *pet, const string &message, int8_t act);
  55. void movePet(Player *player, Pet *pet, unsigned char *buf, int32_t buflen);
  56. - void petSummoned(Player *player, Pet *pet, bool kick = false);
  57. + void petSummoned(Player *player, Pet *pet, bool kick = false, bool show = true);
  58. void showAnimation(Player *player, Pet *pet, int8_t animation, bool success = false);
  59. void updatePet(Player *player, Pet *pet);
  60. void levelUp(Player *player, Pet *pet);
Add Comment
Please, Sign In to add comment