TrinityCore
Loading...
Searching...
No Matches
StatSystem.cpp File Reference
#include "Unit.h"
#include "DB2Stores.h"
#include "Item.h"
#include "Player.h"
#include "Pet.h"
#include "GameTables.h"
#include "GameTime.h"
#include "ObjectMgr.h"
#include "SharedDefines.h"
#include "SpellAuras.h"
#include "SpellAuraEffects.h"
#include "World.h"
#include <G3D/g3dmath.h>
#include <numeric>
+ Include dependency graph for StatSystem.cpp:

Go to the source code of this file.

Macros

#define ENTRY_IMP   416
 
#define ENTRY_VOIDWALKER   1860
 
#define ENTRY_SUCCUBUS   1863
 
#define ENTRY_FELHUNTER   417
 
#define ENTRY_FELGUARD   17252
 
#define ENTRY_WATER_ELEMENTAL   510
 
#define ENTRY_TREANT   1964
 
#define ENTRY_FIRE_ELEMENTAL   15438
 
#define ENTRY_GHOUL   26125
 
#define ENTRY_BLOODWORM   28017
 

Functions

bool _ModifyUInt32 (bool apply, uint32 &baseValue, int32 &amount)
 
float CalculateDiminishingReturns (float const (&capArray)[MAX_CLASSES], uint8 playerClass, float nonDiminishValue, float diminishValue)
 

Variables

float const m_diminishing_k [MAX_CLASSES]
 
constexpr float parry_cap [MAX_CLASSES]
 
constexpr float dodge_cap [MAX_CLASSES]
 
static constexpr std::array< Optional< Rates >, MAX_POWERS > PowerRegenInfo
 

Macro Definition Documentation

◆ ENTRY_BLOODWORM

#define ENTRY_BLOODWORM   28017

Definition at line 1160 of file StatSystem.cpp.

◆ ENTRY_FELGUARD

#define ENTRY_FELGUARD   17252

Definition at line 1155 of file StatSystem.cpp.

◆ ENTRY_FELHUNTER

#define ENTRY_FELHUNTER   417

Definition at line 1154 of file StatSystem.cpp.

◆ ENTRY_FIRE_ELEMENTAL

#define ENTRY_FIRE_ELEMENTAL   15438

Definition at line 1158 of file StatSystem.cpp.

◆ ENTRY_GHOUL

#define ENTRY_GHOUL   26125

Definition at line 1159 of file StatSystem.cpp.

◆ ENTRY_IMP

#define ENTRY_IMP   416

Definition at line 1151 of file StatSystem.cpp.

◆ ENTRY_SUCCUBUS

#define ENTRY_SUCCUBUS   1863

Definition at line 1153 of file StatSystem.cpp.

◆ ENTRY_TREANT

#define ENTRY_TREANT   1964

Definition at line 1157 of file StatSystem.cpp.

◆ ENTRY_VOIDWALKER

#define ENTRY_VOIDWALKER   1860

Definition at line 1152 of file StatSystem.cpp.

◆ ENTRY_WATER_ELEMENTAL

#define ENTRY_WATER_ELEMENTAL   510

Definition at line 1156 of file StatSystem.cpp.

Function Documentation

◆ _ModifyUInt32()

bool _ModifyUInt32 ( bool  apply,
uint32 &  baseValue,
int32 &  amount 
)
inline

◆ CalculateDiminishingReturns()

float CalculateDiminishingReturns ( float const (&)  capArray[MAX_CLASSES],
uint8  playerClass,
float  nonDiminishValue,
float  diminishValue 
)

Definition at line 616 of file StatSystem.cpp.

References m_diminishing_k.

Referenced by Player::UpdateDodgePercentage(), and Player::UpdateParryPercentage().

Variable Documentation

◆ dodge_cap

constexpr float dodge_cap[MAX_CLASSES]
constexpr
Initial value:
=
{
65.631440f,
65.631440f,
145.560408f,
145.560408f,
150.375940f,
65.631440f,
145.560408f,
150.375940f,
150.375940f,
145.560408f,
116.890707f,
145.560408f,
145.560408f,
0.0f,
0.0f,
}

Definition at line 680 of file StatSystem.cpp.

Referenced by Player::UpdateDodgePercentage().

◆ m_diminishing_k

float const m_diminishing_k[MAX_CLASSES]
Initial value:
=
{
0.9560f,
0.9560f,
0.9880f,
0.9880f,
0.9830f,
0.9560f,
0.9880f,
0.9830f,
0.9830f,
0.9830f,
0.9720f,
0.9830f,
0.9880f,
1.0f,
1.0f,
}

Definition at line 596 of file StatSystem.cpp.

Referenced by CalculateDiminishingReturns().

◆ parry_cap

constexpr float parry_cap[MAX_CLASSES]
constexpr
Initial value:
=
{
65.631440f,
65.631440f,
145.560408f,
145.560408f,
0.0f,
65.631440f,
145.560408f,
0.0f,
0.0f,
90.6425f,
0.0f,
65.631440f,
0.0f,
0.0f,
0.0f,
}

Definition at line 638 of file StatSystem.cpp.

Referenced by Player::UpdateParryPercentage().

◆ PowerRegenInfo

constexpr std::array<Optional<Rates>, MAX_POWERS> PowerRegenInfo
staticconstexpr
Initial value:
=
{
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
std::nullopt,
}
@ RATE_POWER_CHI
Definition World.h:465
@ RATE_POWER_RUNIC_POWER_LOSS
Definition World.h:460
@ RATE_POWER_RAGE_LOSS
Definition World.h:455
@ RATE_POWER_ENERGY
Definition World.h:457
@ RATE_POWER_MANA
Definition World.h:453
@ RATE_POWER_MAELSTROM
Definition World.h:464
@ RATE_POWER_INSANITY
Definition World.h:466
@ RATE_POWER_FURY
Definition World.h:468
@ RATE_POWER_FOCUS
Definition World.h:456
@ RATE_POWER_ARCANE_CHARGES
Definition World.h:467
@ RATE_POWER_HOLY_POWER
Definition World.h:463
@ RATE_POWER_LUNAR_POWER
Definition World.h:462
@ RATE_POWER_ESSENCE
Definition World.h:470
@ RATE_POWER_SOUL_SHARDS
Definition World.h:461
@ RATE_POWER_PAIN
Definition World.h:469
@ RATE_POWER_COMBO_POINTS_LOSS
Definition World.h:458

Definition at line 817 of file StatSystem.cpp.

Referenced by Player::UpdatePowerRegen().