[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:
VladimirMangos 2009-03-22 05:28:00 +03:00
parent 54acc587da
commit e39a836115
2 changed files with 5 additions and 2 deletions

View file

@ -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;