18#ifndef TRINITY_FORMULAS_H
19#define TRINITY_FORMULAS_H
57 float honor = multiplier * level * 1.55f;
58 sScriptMgr->OnHonorCalculation(honor, level, multiplier);
76 else if (pl_level < 35)
79 for (
int i = 15; i <= pl_level; ++i)
80 if (i % 5 == 0) ++count;
82 level = (pl_level - 7) - (count - 1);
85 level = pl_level - 10;
87 sScriptMgr->OnGrayLevelCalculation(level, pl_level);
95 if (mob_level >= pl_level + 5)
97 else if (mob_level >= pl_level + 3)
99 else if (mob_level >= pl_level - 2)
106 sScriptMgr->OnColorCodeCalculation(color, pl_level, mob_level);
116 else if (pl_level < 10)
118 else if (pl_level < 12)
120 else if (pl_level < 16)
122 else if (pl_level < 20)
124 else if (pl_level < 30)
126 else if (pl_level < 40)
128 else if (pl_level < 45)
130 else if (pl_level < 50)
132 else if (pl_level < 55)
134 else if (pl_level < 60)
139 sScriptMgr->OnZeroDifferenceCalculation(diff, pl_level);
150 if (mob_level >= pl_level)
152 uint8 nLevelDiff = mob_level - pl_level;
156 baseGain =
uint32(round(xpPlayer->
PerKill * (1 + 0.05f * nLevelDiff)));
161 if (mob_level > gray_level)
174 baseGain = std::max(baseGainMin, baseGain);
177 sScriptMgr->OnBaseGainCalculation(baseGain, pl_level, mob_level);
192 if (gain && creature)
196 gain =
uint32(round(gain / 10.0f));
214 gain =
uint32(gain * xpMod);
217 sScriptMgr->OnGainCalculation(gain, player, u);
252 sScriptMgr->OnGroupRateCalculation(rate, count, isRaid);
263 else if (rate > 3000)
267 return uint32(1.4326 * ((1511.26 / (1 + 1639.28 / exp(0.00412 * rate))) + 850.15));
#define CURRENT_EXPANSION
@ EXPANSION_WARLORDS_OF_DRAENOR
@ EXPANSION_THE_WAR_WITHIN
@ EXPANSION_MISTS_OF_PANDARIA
@ EXPANSION_BATTLE_FOR_AZEROTH
CreatureDifficulty const * GetCreatureDifficulty() const
bool CanGiveExperience() const
CreatureTemplate const * GetCreatureTemplate() const
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)
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