Core/Misc: replace more macros with constexpr
This commit is contained in:
1 parent
ddc9795045
commit
5410539f05
4 files changed
+19
-20
No files matched your search
@@ -329,12 +329,12 @@ struct TC_GAME_API CreatureMovementData
|
|||||||
std::string ToString() const;
|
std::string ToString() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint32 const CREATURE_NOPATH_EVADE_TIME = 5 * IN_MILLISECONDS;
|
constexpr uint32 const CREATURE_NOPATH_EVADE_TIME = 5 * IN_MILLISECONDS;
|
||||||
|
|
||||||
static uint8 const MAX_KILL_CREDIT = 2;
|
constexpr uint8 const MAX_KILL_CREDIT = 2;
|
||||||
static uint32 const MAX_CREATURE_MODELS = 4;
|
constexpr uint32 const MAX_CREATURE_MODELS = 4;
|
||||||
static uint32 const MAX_CREATURE_QUEST_ITEMS = 6;
|
constexpr uint32 const MAX_CREATURE_QUEST_ITEMS = 6;
|
||||||
static uint32 const MAX_CREATURE_SPELLS = 8;
|
constexpr uint32 const MAX_CREATURE_SPELLS = 8;
|
||||||
|
|
||||||
struct CreatureModel
|
struct CreatureModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,9 +73,8 @@ enum SpellValueMod : uint8;
|
|||||||
enum TriggerCastFlags : uint32;
|
enum TriggerCastFlags : uint32;
|
||||||
enum WeaponAttackType : uint8;
|
enum WeaponAttackType : uint8;
|
||||||
|
|
||||||
#define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILLISECONDS)
|
constexpr float MAX_SPELL_RANGE_TOLERANCE = 3.0f;
|
||||||
#define MAX_SPELL_RANGE_TOLERANCE 3.0f
|
constexpr float TRAJECTORY_MISSILE_SIZE = 3.0f;
|
||||||
#define TRAJECTORY_MISSILE_SIZE 3.0f
|
|
||||||
|
|
||||||
enum SpellCastFlags
|
enum SpellCastFlags
|
||||||
{
|
{
|
||||||
@@ -277,7 +276,7 @@ enum SpellEffectHandleMode
|
|||||||
|
|
||||||
typedef std::vector<std::pair<uint32, ObjectGuid>> DispelList;
|
typedef std::vector<std::pair<uint32, ObjectGuid>> DispelList;
|
||||||
|
|
||||||
static const uint32 SPELL_INTERRUPT_NONPLAYER = 32747;
|
constexpr uint32 SPELL_INTERRUPT_NONPLAYER = 32747;
|
||||||
|
|
||||||
class TC_GAME_API Spell
|
class TC_GAME_API Spell
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ enum class SpellModOp : uint8
|
|||||||
PowerCostOnMiss = 30
|
PowerCostOnMiss = 30
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_SPELLMOD 32
|
constexpr uint8 MAX_SPELLMOD = 32;
|
||||||
|
|
||||||
enum SpellValueMod : uint8
|
enum SpellValueMod : uint8
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ enum SpellFamilyFlag
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define SPELL_LINKED_MAX_SPELLS 200000
|
constexpr uint32 SPELL_LINKED_MAX_SPELLS = 200000;
|
||||||
|
|
||||||
enum SpellLinkedType
|
enum SpellLinkedType
|
||||||
{
|
{
|
||||||
@@ -194,14 +194,14 @@ enum ProcFlags
|
|||||||
REQ_SPELL_PHASE_PROC_FLAG_MASK = SPELL_PROC_FLAG_MASK & DONE_HIT_PROC_FLAG_MASK
|
REQ_SPELL_PHASE_PROC_FLAG_MASK = SPELL_PROC_FLAG_MASK & DONE_HIT_PROC_FLAG_MASK
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MELEE_BASED_TRIGGER_MASK (PROC_FLAG_DEAL_MELEE_SWING | \
|
constexpr uint32 MELEE_BASED_TRIGGER_MASK = PROC_FLAG_DEAL_MELEE_SWING |
|
||||||
PROC_FLAG_TAKE_MELEE_SWING | \
|
PROC_FLAG_TAKE_MELEE_SWING |
|
||||||
PROC_FLAG_DEAL_MELEE_ABILITY | \
|
PROC_FLAG_DEAL_MELEE_ABILITY |
|
||||||
PROC_FLAG_TAKE_MELEE_ABILITY | \
|
PROC_FLAG_TAKE_MELEE_ABILITY |
|
||||||
PROC_FLAG_DEAL_RANGED_ATTACK | \
|
PROC_FLAG_DEAL_RANGED_ATTACK |
|
||||||
PROC_FLAG_TAKE_RANGED_ATTACK | \
|
PROC_FLAG_TAKE_RANGED_ATTACK |
|
||||||
PROC_FLAG_DEAL_RANGED_ABILITY | \
|
PROC_FLAG_DEAL_RANGED_ABILITY |
|
||||||
PROC_FLAG_TAKE_RANGED_ABILITY)
|
PROC_FLAG_TAKE_RANGED_ABILITY;
|
||||||
|
|
||||||
enum ProcFlagsSpellType
|
enum ProcFlagsSpellType
|
||||||
{
|
{
|
||||||
@@ -312,7 +312,7 @@ namespace std
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SPELL_GROUP_DB_RANGE_MIN 1000
|
constexpr uint32 SPELL_GROUP_DB_RANGE_MIN = 1000;
|
||||||
|
|
||||||
// spell_id, group_id
|
// spell_id, group_id
|
||||||
typedef std::unordered_multimap<uint32, SpellGroup> SpellSpellGroupMap;
|
typedef std::unordered_multimap<uint32, SpellGroup> SpellSpellGroupMap;
|
||||||
|
|||||||
Reference in new issue
Block a user