feat(Core/Scripting): Add OnPlayerGiveReputation script hook (#21869)

This commit is contained in:
Quartzi 2025-08-27 09:32:02 +02:00 committed by GitHub
parent a8284b71de
commit 0fc05ed4d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 28 additions and 11 deletions

View file

@ -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*/) {}