19 #ifndef TRINITY_FORMULAS_H
20 #define TRINITY_FORMULAS_H
33 float honor = multiplier * level * 1.55f;
34 sScriptMgr->OnHonorCalculation(honor, level, multiplier);
52 else if (pl_level < 35)
55 for (
int i = 15; i <= pl_level; ++i)
56 if (i % 5 == 0) ++count;
58 level = (pl_level - 7) - (count - 1);
61 level = pl_level - 10;
63 sScriptMgr->OnGrayLevelCalculation(level, pl_level);
71 if (mob_level >= pl_level + 5)
73 else if (mob_level >= pl_level + 3)
75 else if (mob_level >= pl_level - 2)
82 sScriptMgr->OnColorCodeCalculation(color, pl_level, mob_level);
92 else if (pl_level < 10)
94 else if (pl_level < 12)
96 else if (pl_level < 16)
98 else if (pl_level < 20)
100 else if (pl_level < 30)
102 else if (pl_level < 40)
104 else if (pl_level < 45)
106 else if (pl_level < 50)
108 else if (pl_level < 55)
110 else if (pl_level < 60)
115 sScriptMgr->OnZeroDifferenceCalculation(diff, pl_level);
129 if (mob_level >= pl_level)
131 uint8 nLevelDiff = mob_level - pl_level;
135 baseGain =
uint32(
round(BaseExpPlayer->
Data * (1 + 0.05f * nLevelDiff)));
140 if (mob_level > gray_level)
143 baseGain =
uint32(
round(BaseExpMob->
Data * ((1 - ((pl_level - mob_level) /
float(ZD))) * (CoefMob->
Data / CoefPlayer->
Data))));
149 sScriptMgr->OnBaseGainCalculation(baseGain, pl_level, mob_level);
165 if (gain && creature)
187 gain =
uint32(gain * xpMod);
190 sScriptMgr->OnGainCalculation(gain, player, u);
225 sScriptMgr->OnGroupRateCalculation(rate, count, isRaid);
236 else if (rate > 3000)
240 return uint32(1.4326 * ((1511.26 / (1 + 1639.28 /
exp(0.00412 * rate))) + 850.15));
Definition: SharedDefines.h:4682
uint32 GetExpansionForLevel(uint32 level)
Definition: DBCStores.cpp:632
Quat exp(const Quat &q)
Definition: Quat.h:729
int32 expansion
Definition: Creature.h:95
Definition: SharedDefines.h:4679
uint32 GetMaxHealth() const
Definition: Unit.h:1427
uint32 Gain(Player *player, Unit *u, bool isBattleGround=false)
Definition: Formulas.h:153
Map * GetMap() const
Definition: Object.h:543
double round(double f)
Definition: g3dmath.h:214
float ModExperience
Definition: Creature.h:137
Definition: SharedDefines.h:4681
XPColorChar
Definition: SharedDefines.h:4676
float Data
Definition: DBCStructure.h:594
uint32 ConquestRatingCalculator(uint32 rate)
Definition: Formulas.h:232
bool IsDungeon() const
Definition: Map.h:395
uint8 GetGrayLevel(uint8 pl_level)
Definition: Formulas.h:46
Definition: Creature.h:467
uint32 flags_extra
Definition: Creature.h:142
#define sWorld
Definition: World.h:887
XPColorChar GetColorCode(uint8 pl_level, uint8 mob_level)
Definition: Formulas.h:67
uint8 getLevel() const
Definition: Unit.h:1408
uint32 m_PlayerDamageReq
Definition: Creature.h:697
CreatureTemplate const * GetCreatureTemplate() const
Definition: Creature.h:558
Definition: SharedDefines.h:4678
uint32_t uint32
Definition: Define.h:150
Definition: SharedDefines.h:4680
bool IsPet() const
Definition: Unit.h:1403
uint32 BgConquestRatingCalculator(uint32 rate)
Definition: Formulas.h:243
Definition: Creature.h:48
GameTable< GtOCTLevelExperienceEntry > sGtOCTLevelExperienceStore(GtOCTLevelExperiencefmt)
bool IsTotem() const
Definition: Unit.h:1405
bool IsCritter() const
Definition: Unit.h:1580
Creature * ToCreature()
Definition: Object.h:194
float hk_honor_at_level_f(uint8 level, float multiplier=1.0f)
Definition: Formulas.h:31
uint8 GetZeroDifference(uint8 pl_level)
Definition: Formulas.h:86
bool isElite() const
Definition: Creature.cpp:1824
uint32 hk_honor_at_level(uint8 level, float multiplier=1.0f)
Definition: Formulas.h:38
uint8_t uint8
Definition: Define.h:152
#define sScriptMgr
Definition: ScriptMgr.h:837
uint32_t uint32
Definition: g3dmath.h:168
static Vector3int16 ceil(const Vector3 &v)
Definition: Vector3int16.cpp:55
Definition: DBCStructure.h:592
uint32 BaseGain(uint8 pl_level, uint8 mob_level)
Definition: Formulas.h:119
float xp_in_group_rate(uint32 count, bool isRaid)
Definition: Formulas.h:194