aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Reputation/ReputationMgr.cpp
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-03-02 00:10:15 +0100
committerariel- <ariel-@users.noreply.github.com>2017-03-01 20:10:15 -0300
commitfb2aebe46be7439a8f9b99067edb27fd844c1a28 (patch)
treebd89ba39bf1331ff6784d050bd24204b3cfdfb36 /src/server/game/Reputation/ReputationMgr.cpp
parent9b284ab329b55b0c41f47d171573780205a3a81a (diff)
Core/Misc: Always reward all necessary reputations on creature kill (#19106)
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 325c1e9dd36..b0c7538da05 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -285,7 +285,7 @@ void ReputationMgr::Initialize()
}
}
-bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental)
+bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental, bool spillOverOnly)
{
sScriptMgr->OnPlayerReputationChange(_player, factionEntry->ID, standing, incremental);
bool res = false;
@@ -349,7 +349,10 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
FactionStateList::iterator faction = _factions.find(factionEntry->reputationListID);
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);
}