mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 00:36:07 +00:00
feat(Core/Scripting): Add OnPlayerGiveReputation script hook (#21869)
This commit is contained in:
@@ -139,6 +139,11 @@ void ScriptMgr::OnPlayerReputationRankChange(Player* player, uint32 factionID, R
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_REPUTATION_RANK_CHANGE, script->OnPlayerReputationRankChange(player, factionID, newRank, oldRank, increased));
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerGiveReputation(Player* player, int32 factionID, float& amount, ReputationSource repSource)
|
||||
{
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_GIVE_REPUTATION, script->OnPlayerGiveReputation(player, factionID, amount, repSource));
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerLearnSpell(Player* player, uint32 spellID)
|
||||
{
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_LEARN_SPELL, script->OnPlayerLearnSpell(player, spellID));
|
||||
|
||||
@@ -210,6 +210,7 @@ enum PlayerHook
|
||||
PLAYERHOOK_CAN_RESURRECT,
|
||||
PLAYERHOOK_ON_CAN_GIVE_LEVEL,
|
||||
PLAYERHOOK_ON_SEND_LIST_INVENTORY,
|
||||
PLAYERHOOK_ON_GIVE_REPUTATION,
|
||||
PLAYERHOOK_END
|
||||
};
|
||||
|
||||
@@ -283,6 +284,9 @@ public:
|
||||
// Called when a player's reputation rank changes (before it is actually changed)
|
||||
virtual void OnPlayerReputationRankChange(Player* /*player*/, uint32 /*factionID*/, ReputationRank /*newRank*/, ReputationRank /*olRank*/, bool /*increased*/) { }
|
||||
|
||||
// Called when a player gains Reputation (before anything is given)
|
||||
virtual void OnPlayerGiveReputation(Player* /*player*/, int32 /*factionID*/, float& /*amount*/, ReputationSource /*repSource*/) { }
|
||||
|
||||
// Called when a player learned new spell
|
||||
virtual void OnPlayerLearnSpell(Player* /*player*/, uint32 /*spellID*/) {}
|
||||
|
||||
|
||||
@@ -313,6 +313,7 @@ public: /* PlayerScript */
|
||||
void OnPlayerGiveXP(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 OnPlayerGiveReputation(Player* player, int32 factionID, float& amount, ReputationSource repSource);
|
||||
void OnPlayerLearnSpell(Player* player, uint32 spellID);
|
||||
void OnPlayerForgotSpell(Player* player, uint32 spellID);
|
||||
void OnPlayerDuelRequest(Player* target, Player* challenger);
|
||||
|
||||
Reference in New Issue
Block a user