fix(Core/Reputations): Faction rep gained by killing mobs is now prop… (#9737)

* fix(Core/Reputations): Faction rep gained by killing mobs is now properly rounded up.

Do not increase reputation rank if exceeds max rank cap.
Fixes #8718
This commit is contained in:
UltraNix
2022-02-05 11:37:00 +01:00
committed by GitHub
parent 7b041946e1
commit 0b02ba87fc
11 changed files with 91 additions and 42 deletions

View File

@@ -4879,7 +4879,7 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
return;
}
int32 repChange = damage;
float repChange = static_cast<float>(damage);
uint32 factionId = m_spellInfo->Effects[effIndex].MiscValue;
@@ -4888,7 +4888,6 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
return;
repChange = player->CalculateReputationGain(REPUTATION_SOURCE_SPELL, 0, repChange, factionId);
player->GetReputationMgr().ModifyReputation(factionEntry, repChange);
}