Advertisement
Emulation

Untitled

Oct 11th, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. // Called when a player kills another player
  2. virtual void OnPVPKill(Player* /*killer*/, Player* /*killed*/) { }
  3.  
  4. // Called when a player kills a creature
  5. virtual void OnCreatureKill(Player* /*killer*/, Creature* /*killed*/) { }
  6.  
  7. // Called when a player is killed by a creature
  8. virtual void OnPlayerKilledByCreature(Creature* /*killer*/, Player* /*killed*/) { }
  9.  
  10. // Called when a player's level changes (after the level is applied)
  11. virtual void OnLevelChanged(Player* /*player*/, uint8 /*oldLevel*/) { }
  12.  
  13. // Called when a player's free talent points change (right before the change is applied)
  14. virtual void OnFreeTalentPointsChanged(Player* /*player*/, uint32 /*points*/) { }
  15.  
  16. // Called when a player's talent points are reset (right before the reset is done)
  17. virtual void OnTalentsReset(Player* /*player*/, bool /*noCost*/) { }
  18.  
  19. // Called when a player's money is modified (before the modification is done)
  20. virtual void OnMoneyChanged(Player* /*player*/, int32& /*amount*/) { }
  21.  
  22. // Called when a player gains XP (before anything is given)
  23. virtual void OnGiveXP(Player* /*player*/, uint32& /*amount*/, Unit* /*victim*/) { }
  24.  
  25. // Called when a player's reputation changes (before it is actually changed)
  26. virtual void OnReputationChange(Player* /*player*/, uint32 /*factionId*/, int32& /*standing*/, bool /*incremental*/) { }
  27.  
  28. // Called when a duel is requested
  29. virtual void OnDuelRequest(Player* /*target*/, Player* /*challenger*/) { }
  30.  
  31. // Called when a duel starts (after 3s countdown)
  32. virtual void OnDuelStart(Player* /*player1*/, Player* /*player2*/) { }
  33.  
  34. // Called when a duel ends
  35. virtual void OnDuelEnd(Player* /*winner*/, Player* /*loser*/, DuelCompleteType /*type*/) { }
  36.  
  37. // The following methods are called when a player sends a chat message.
  38. virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/) { }
  39.  
  40. virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Player* /*receiver*/) { }
  41.  
  42. virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Group* /*group*/) { }
  43.  
  44. virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Guild* /*guild*/) { }
  45.  
  46. virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Channel* /*channel*/) { }
  47.  
  48. // Both of the below are called on emote opcodes.
  49. virtual void OnEmote(Player* /*player*/, uint32 /*emote*/) { }
  50.  
  51. virtual void OnTextEmote(Player* /*player*/, uint32 /*textEmote*/, uint32 /*emoteNum*/, uint64 /*guid*/) { }
  52.  
  53. // Called in Spell::Cast.
  54. virtual void OnSpellCast(Player* /*player*/, Spell* /*spell*/, bool /*skipCheck*/) { }
  55.  
  56. // Called when a player logs in.
  57. virtual void OnLogin(Player* /*player*/) { }
  58.  
  59. // Called when a player logs out.
  60. virtual void OnLogout(Player* /*player*/) { }
  61.  
  62. // Called when a player is created.
  63. virtual void OnCreate(Player* /*player*/) { }
  64.  
  65. // Called when a player is deleted.
  66. virtual void OnDelete(uint64 /*guid*/) { }
  67.  
  68. // Called when a player is about to be saved.
  69. virtual void OnSave(Player* /*player*/) { }
  70.  
  71. // Called when a player is bound to an instance
  72. virtual void OnBindToInstance(Player* /*player*/, Difficulty /*difficulty*/, uint32 /*mapId*/, bool /*permanent*/) { }
  73.  
  74. // Called when a player switches to a new zone
  75. virtual void OnUpdateZone(Player* /*player*/, uint32 /*newZone*/, uint32 /*newArea*/) { }
  76.  
  77. // Called when a player changes to a new map (after moving to new map)
  78. virtual void OnMapChanged(Player* /*player*/) { }
  79. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement