mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
Core/Hooks: Add new Player hooks (#1481)
* Fix hook OnReputationChange * Add hook OnReputationRankChange * Add hook OnLearnSpell * Add hook OnForgotSpell
This commit is contained in:
committed by
Kargatum
parent
f68fef798d
commit
23d78ce6bc
@@ -271,7 +271,6 @@ void ReputationMgr::Initialize()
|
||||
|
||||
bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental, bool spillOverOnly)
|
||||
{
|
||||
sScriptMgr->OnPlayerReputationChange(_player, factionEntry->ID, standing, incremental);
|
||||
bool res = false;
|
||||
// if spillover definition exists in DB, override DBC
|
||||
if (const RepSpilloverTemplate* repTemplate = sObjectMgr->GetRepSpilloverTemplate(factionEntry->ID))
|
||||
@@ -376,6 +375,11 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in
|
||||
if (new_rank > old_rank)
|
||||
_sendFactionIncreased = true;
|
||||
|
||||
sScriptMgr->OnPlayerReputationChange(_player, factionEntry->ID, standing, incremental);
|
||||
|
||||
if (new_rank != old_rank)
|
||||
sScriptMgr->OnPlayerReputationRankChange(_player, factionEntry->ID, new_rank, old_rank, _sendFactionIncreased);
|
||||
|
||||
UpdateRankCounters(old_rank, new_rank);
|
||||
|
||||
_player->ReputationChanged(factionEntry);
|
||||
|
||||
Reference in New Issue
Block a user