aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Reputation/ReputationMgr.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-05-01 15:41:32 +0200
committerGitHub <noreply@github.com>2020-05-01 15:41:32 +0200
commit57a5969c2672b36160fea1b7c38c424de562a57b (patch)
treeee52f8ddaa8d37297142e59029df461d3000ce31 /src/server/game/Reputation/ReputationMgr.cpp
parentfbd74eb5d8b5aa3a6874ee99044054e097b5ef21 (diff)
parent05ba662d5daaa3428cc01cdaa3794bf5a073ef17 (diff)
Merge pull request #24500 from funjoker/cherry-picks
Diffstat (limited to 'src/server/game/Reputation/ReputationMgr.cpp')
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp7
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);
}