TrinityCore
Loading...
Searching...
No Matches
StatSystem.cpp File Reference
#include "Unit.h"
#include "Creature.h"
#include "Item.h"
#include "Pet.h"
#include "Player.h"
#include "SharedDefines.h"
#include "SpellAuras.h"
#include "SpellAuraEffects.h"
#include "SpellMgr.h"
#include "World.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]
 
float const miss_cap [MAX_CLASSES]
 
float const parry_cap [MAX_CLASSES]
 
float const dodge_cap [MAX_CLASSES]
 
static std::pair< float, Optional< Rates > > const powerRegenInfo [MAX_POWERS]
 

Macro Definition Documentation

◆ ENTRY_BLOODWORM

#define ENTRY_BLOODWORM   28017

Definition at line 1233 of file StatSystem.cpp.

◆ ENTRY_FELGUARD

#define ENTRY_FELGUARD   17252

Definition at line 1228 of file StatSystem.cpp.

◆ ENTRY_FELHUNTER

#define ENTRY_FELHUNTER   417

Definition at line 1227 of file StatSystem.cpp.

◆ ENTRY_FIRE_ELEMENTAL

#define ENTRY_FIRE_ELEMENTAL   15438

Definition at line 1231 of file StatSystem.cpp.

◆ ENTRY_GHOUL

#define ENTRY_GHOUL   26125

Definition at line 1232 of file StatSystem.cpp.

◆ ENTRY_IMP

#define ENTRY_IMP   416

Definition at line 1224 of file StatSystem.cpp.

◆ ENTRY_SUCCUBUS

#define ENTRY_SUCCUBUS   1863

Definition at line 1226 of file StatSystem.cpp.

◆ ENTRY_TREANT

#define ENTRY_TREANT   1964

Definition at line 1230 of file StatSystem.cpp.

◆ ENTRY_VOIDWALKER

#define ENTRY_VOIDWALKER   1860

Definition at line 1225 of file StatSystem.cpp.

◆ ENTRY_WATER_ELEMENTAL

#define ENTRY_WATER_ELEMENTAL   510

Definition at line 1229 of file StatSystem.cpp.

Function Documentation

◆ _ModifyUInt32()

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

Definition at line 30 of file StatSystem.cpp.

+ Here is the caller graph for this function:

◆ CalculateDiminishingReturns()

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

Definition at line 702 of file StatSystem.cpp.

+ Here is the caller graph for this function:

Variable Documentation

◆ dodge_cap

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

Definition at line 792 of file StatSystem.cpp.

◆ 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.0f,
0.9720f
}

Definition at line 686 of file StatSystem.cpp.

◆ miss_cap

float const miss_cap[MAX_CLASSES]
Initial value:
=
{
16.00f,
16.00f,
16.00f,
16.00f,
16.00f,
16.00f,
16.00f,
16.00f,
16.00f,
0.0f,
16.00f
}

Definition at line 724 of file StatSystem.cpp.

◆ parry_cap

float const parry_cap[MAX_CLASSES]
Initial value:
=
{
47.003525f,
47.003525f,
145.560408f,
145.560408f,
0.0f,
47.003525f,
145.560408f,
0.0f,
0.0f,
0.0f,
0.0f
}

Definition at line 750 of file StatSystem.cpp.

◆ powerRegenInfo

std::pair<float, Optional<Rates> > const powerRegenInfo[MAX_POWERS]
static
Initial value:
=
{
{ 0.f, RATE_POWER_MANA },
{ -12.5f, RATE_POWER_RAGE_LOSS },
{ 0.f, std::nullopt },
{ 10.f, RATE_POWER_ENERGY },
{ 0.f, std::nullopt },
{ 0.f, std::nullopt },
}
@ RATE_POWER_RAGE_LOSS
Definition World.h:413
@ RATE_POWER_RUNICPOWER_LOSS
Definition World.h:415
@ RATE_POWER_ENERGY
Definition World.h:417
@ RATE_POWER_MANA
Definition World.h:411

Definition at line 922 of file StatSystem.cpp.