mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7514] Revert bogus reputation calculation change added with merge from 310.
Reputation must work now. Instead have near to 0 percent values always.
This commit is contained in:
parent
54acc587da
commit
e39a836115
2 changed files with 5 additions and 2 deletions
|
|
@ -6026,9 +6026,12 @@ bool Player::SetOneFactionReputation(FactionEntry const* factionEntry, int32 sta
|
|||
//Calculate total reputation percent player gain with quest/creature level
|
||||
int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, bool for_quest)
|
||||
{
|
||||
// for grey creature kill received 20%, in other case 100.
|
||||
int32 percent = (!for_quest && (creatureOrQuestLevel <= MaNGOS::XP::GetGrayLevel(getLevel()))) ? 20 : 100;
|
||||
|
||||
int32 repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN);
|
||||
|
||||
int32 percent = rep > 0 ? repMod : -repMod;
|
||||
percent += rep > 0 ? repMod : -repMod;
|
||||
|
||||
if(percent <=0)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue