mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[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:
parent
2c165670b1
commit
a977c068f0
4 changed files with 57 additions and 26 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue