[11043] Add additional check for spell 53475, 53487 and 54015

Only reset when current rep is less than the reset value.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
PSZ 2011-01-19 17:09:28 +01:00 committed by NoFantasy
parent 6f2804d513
commit 0f70e9a79c
2 changed files with 5 additions and 3 deletions

View file

@ -1874,8 +1874,10 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
if (!factionEntry)
return;
// set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated)
pPlayer->GetReputationMgr().SetReputation(factionEntry, rep_change);
// Set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated)
// Not when player already has equal or higher rep with this faction
if (pPlayer->GetReputationMgr().GetBaseReputation(factionEntry) < rep_change)
pPlayer->GetReputationMgr().SetReputation(factionEntry, rep_change);
// EFFECT_INDEX_2 most likely update at war state, we already handle this in SetReputation
}