Core/Misc: Always reward all necessary reputations on creature kill (#19106)

This commit is contained in:
xinef1 authored and Aokromes committed 2017-03-03 01:31:22 +01:00
1 parent 0642e5bd82
commit f8b090fd8a
3 files changed
+13 -10

No files matched your search

+5 -2
View File
@@ -286,7 +286,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;
@@ -350,7 +350,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);
}