18#ifndef TRINITY_FORMULAS_H
19#define TRINITY_FORMULAS_H
53 float honor = multiplier * level * 1.55f;
54 sScriptMgr->OnHonorCalculation(honor, level, multiplier);
72 else if (pl_level < 35)
75 for (
int i = 15; i <= pl_level; ++i)
76 if (i % 5 == 0) ++count;
78 level = (pl_level - 7) - (count - 1);
81 level = pl_level - 10;
83 sScriptMgr->OnGrayLevelCalculation(level, pl_level);
91 if (mob_level >= pl_level + 5)
93 else if (mob_level >= pl_level + 3)
95 else if (mob_level >= pl_level - 2)
102 sScriptMgr->OnColorCodeCalculation(color, pl_level, mob_level);
112 else if (pl_level < 10)
114 else if (pl_level < 12)
116 else if (pl_level < 16)
118 else if (pl_level < 20)
120 else if (pl_level < 30)
122 else if (pl_level < 40)
124 else if (pl_level < 45)
126 else if (pl_level < 50)
128 else if (pl_level < 55)
130 else if (pl_level < 60)
135 sScriptMgr->OnZeroDifferenceCalculation(diff, pl_level);
146 if (mob_level >= pl_level)
148 uint8 nLevelDiff = mob_level - pl_level;
152 baseGain =
uint32(round(xpPlayer->
PerKill * (1 + 0.05f * nLevelDiff)));
157 if (mob_level > gray_level)
170 baseGain = std::max(baseGainMin, baseGain);
173 sScriptMgr->OnBaseGainCalculation(baseGain, pl_level, mob_level);
188 if (gain && creature)
192 gain =
uint32(round(gain / 10.0f));
210 gain =
uint32(gain * xpMod);
213 sScriptMgr->OnGainCalculation(gain, player, u);
248 sScriptMgr->OnGroupRateCalculation(rate, count, isRaid);
259 else if (rate > 3000)
263 return uint32(1.4326 * ((1511.26 / (1 + 1639.28 / exp(0.00412 * rate))) + 850.15));
#define CURRENT_EXPANSION
@ EXPANSION_WARLORDS_OF_DRAENOR
@ EXPANSION_THE_BURNING_CRUSADE
@ EXPANSION_MISTS_OF_PANDARIA
@ EXPANSION_WRATH_OF_THE_LICH_KING
CreatureDifficulty const * GetCreatureDifficulty() const
bool CanGiveExperience() const
CreatureTemplate const * GetCreatureTemplate() const
static Creature * ToCreature(Object *o)
uint64 GetMaxHealth() const
uint8 GetLevelForTarget(WorldObject const *) const override
@ CONFIG_MIN_CREATURE_SCALED_XP_RATIO
uint32 ConquestRatingCalculator(uint32 rate)
uint32 BgConquestRatingCalculator(uint32 rate)
float hk_honor_at_level_f(uint8 level, float multiplier=1.0f)
uint32 hk_honor_at_level(uint8 level, float multiplier=1.0f)
XPColorChar GetColorCode(uint8 pl_level, uint8 mob_level)
uint32 Gain(Player *player, Unit *u, bool isBattleGround=false)
float xp_in_group_rate(uint32 count, bool isRaid)
uint8 GetZeroDifference(uint8 pl_level)
uint8 GetGrayLevel(uint8 pl_level)
uint32 BaseGain(uint8 pl_level, uint8 mob_level)
uint32 GetExpansionForLevel(uint32 level)
int32 GetHealthScalingExpansion() const