[10327] Implement reputation rates and aura effects for Spell::EffectReputation().

Also apply rates after percentage aura modifiers, so auras always
give expected percentage of final value independant of "hidden" rates.
This commit is contained in:
Lynx3d 2010-08-07 18:12:45 +02:00
parent 2c165670b1
commit a977c068f0
4 changed files with 57 additions and 26 deletions

View file

@ -7143,7 +7143,6 @@ void Spell::EffectReputation(SpellEffectIndex eff_idx)
Player *_player = (Player*)unitTarget;
int32 rep_change = m_currentBasePoints[eff_idx];
uint32 faction_id = m_spellInfo->EffectMiscValue[eff_idx];
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
@ -7151,6 +7150,8 @@ void Spell::EffectReputation(SpellEffectIndex eff_idx)
if(!factionEntry)
return;
rep_change = _player->CalculateReputationGain(REPUTATION_SOURCE_SPELL, rep_change, faction_id);
_player->GetReputationMgr().ModifyReputation(factionEntry, rep_change);
}