mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Initial 3.1.0 commit, can't be compiled
This commit is contained in:
parent
654fa0bb1d
commit
5aad1e0169
4 changed files with 233 additions and 280 deletions
|
|
@ -5948,12 +5948,9 @@ 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);
|
||||
|
||||
percent += rep > 0 ? repMod : -repMod;
|
||||
int32 percent = rep > 0 ? repMod : -repMod;
|
||||
|
||||
if(percent <=0)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue