mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
feat(Core/Hooks): Add parameter to detect XP origin for OnGiveXP hook. (#16109)
Added enum parameter to detect where XP originated from.
This commit is contained in:
@@ -1035,7 +1035,7 @@ public:
|
||||
virtual void OnBeforeLootMoney(Player* /*player*/, Loot* /*loot*/) {}
|
||||
|
||||
// Called when a player gains XP (before anything is given)
|
||||
virtual void OnGiveXP(Player* /*player*/, uint32& /*amount*/, Unit* /*victim*/) { }
|
||||
virtual void OnGiveXP(Player* /*player*/, uint32& /*amount*/, Unit* /*victim*/, uint8 /*xpSource*/) { }
|
||||
|
||||
// Called when a player's reputation changes (before it is actually changed)
|
||||
virtual bool OnReputationChange(Player* /*player*/, uint32 /*factionID*/, int32& /*standing*/, bool /*incremental*/) { return true; }
|
||||
@@ -2240,7 +2240,7 @@ public: /* PlayerScript */
|
||||
void OnPlayerTalentsReset(Player* player, bool noCost);
|
||||
void OnPlayerMoneyChanged(Player* player, int32& amount);
|
||||
void OnBeforeLootMoney(Player* player, Loot* loot);
|
||||
void OnGivePlayerXP(Player* player, uint32& amount, Unit* victim);
|
||||
void OnGivePlayerXP(Player* player, uint32& amount, Unit* victim, uint8 xpSource);
|
||||
bool OnPlayerReputationChange(Player* player, uint32 factionID, int32& standing, bool incremental);
|
||||
void OnPlayerReputationRankChange(Player* player, uint32 factionID, ReputationRank newRank, ReputationRank oldRank, bool increased);
|
||||
void OnPlayerLearnSpell(Player* player, uint32 spellID);
|
||||
|
||||
Reference in New Issue
Block a user