mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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
|
//Calculate total reputation percent player gain with quest/creature level
|
||||||
int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, bool for_quest)
|
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 repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN);
|
||||||
|
|
||||||
int32 percent = rep > 0 ? repMod : -repMod;
|
percent += rep > 0 ? repMod : -repMod;
|
||||||
|
|
||||||
if(percent <=0)
|
if(percent <=0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7513"
|
#define REVISION_NR "7514"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue