diff options
author | xinef1 <w.szyszko2@gmail.com> | 2017-03-02 00:10:15 +0100 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2020-04-27 12:25:52 +0200 |
commit | e36497aef57899f18e0d55c0640bfd96e2251a8e (patch) | |
tree | e7ec302ed4bb1bab1b68d4c3608c9ba0c2cdbdcf /src/server/game/Reputation/ReputationMgr.cpp | |
parent | 76dde4e3e98e5894f9c91798c9df47eaa985c795 (diff) |
Core/Misc: Always reward all necessary reputations on creature kill (#19106)
(cherry picked from commit fb2aebe46be7439a8f9b99067edb27fd844c1a28)
Diffstat (limited to 'src/server/game/Reputation/ReputationMgr.cpp')
-rw-r--r-- | src/server/game/Reputation/ReputationMgr.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index 1c362984ecc..b017947d56c 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -267,7 +267,7 @@ void ReputationMgr::Initialize() } } -bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental, bool noSpillover) +bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental, bool spillOverOnly, bool noSpillover) { sScriptMgr->OnPlayerReputationChange(_player, factionEntry->ID, standing, incremental); bool res = false; @@ -334,7 +334,10 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi FactionStateList::iterator faction = _factions.find(factionEntry->ReputationIndex); if (faction != _factions.end()) { - res = SetOneFactionReputation(factionEntry, standing, incremental); + // if we update spillover only, do not update main reputation (rank exceeds creature reward rate) + if (!spillOverOnly) + res = SetOneFactionReputation(factionEntry, standing, incremental); + // only this faction gets reported to client, even if it has no own visible standing SendState(&faction->second); } |