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.
This commit is contained in:
jackpoz
2015-01-31 22:59:21 +01:00
parent a7ca78b2fe
commit 95b1204798
3 changed files with 16 additions and 33 deletions

View File

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