Core/Misc: Properly sanitize ReputationSpillover data

Fix an issue added in 024b57bb74 that didn't properly skip ReputationSpillover rows with invalid data.
Fix also a static analysis issue reported by Coverity.

(cherry picked from commit 95b1204798)

Conflicts:
	src/server/game/Globals/ObjectMgr.cpp
This commit is contained in:
jackpoz
2015-01-31 22:59:21 +01:00
committed by Nayd
parent 7870ca8fdc
commit 4c0476bfd7
3 changed files with 16 additions and 27 deletions

View File

@@ -297,7 +297,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
{
// bonuses are already given, so just modify standing by rate
int32 spilloverRep = int32(standing * repTemplate->faction_rate[i]);
SetOneFactionReputation(sFactionStore.LookupEntry(repTemplate->faction[i]), spilloverRep, incremental);
SetOneFactionReputation(sFactionStore.AssertEntry(repTemplate->faction[i]), spilloverRep, incremental);
}
}
}