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

(cherry picked from commit fb2aebe46b)
This commit is contained in:
xinef1
2017-03-02 00:10:15 +01:00
committed by funjoker
parent 76dde4e3e9
commit e36497aef5
3 changed files with 15 additions and 12 deletions

View File

@@ -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);
}