Skip to content

Commit cab6539

Browse files
committed
Core/Spells: use an alias for ProcFlag field definitions to fix some compiler warnings resulting from field and type name being identical
1 parent 23a608a commit cab6539

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/server/game/Spells/SpellInfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct SpellCastTimesEntry;
4545
struct Condition;
4646

4747
enum ProcFlags: uint32;
48+
using ProcFlagsInit = ProcFlags;
4849

4950
enum SpellTargetSelectionCategories
5051
{
@@ -353,7 +354,7 @@ class TC_GAME_API SpellInfo
353354
EnumFlag<SpellAuraInterruptFlags2> AuraInterruptFlags2 = SpellAuraInterruptFlags2::None;
354355
EnumFlag<SpellAuraInterruptFlags> ChannelInterruptFlags = SpellAuraInterruptFlags::None;
355356
EnumFlag<SpellAuraInterruptFlags2> ChannelInterruptFlags2 = SpellAuraInterruptFlags2::None;
356-
ProcFlags ProcFlags;
357+
ProcFlagsInit ProcFlags;
357358
uint32 ProcChance;
358359
uint32 ProcCharges;
359360
uint32 MaxLevel;

src/server/game/Spells/SpellMgr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
#include "EnumFlag.h"
2727
#include "IteratorPair.h"
2828
#include "SharedDefines.h"
29+
#include "SpellInfo.h"
2930
#include "Util.h"
30-
3131
#include <map>
3232
#include <set>
33-
#include <vector>
3433
#include <unordered_map>
3534
#include <unordered_set>
35+
#include <vector>
3636

3737
class SpellInfo;
3838
class Player;
@@ -271,7 +271,7 @@ struct SpellProcEntry
271271
uint32 SchoolMask = 0; // if nonzero - bitmask for matching proc condition based on spell's school
272272
uint32 SpellFamilyName = 0; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyName
273273
flag96 SpellFamilyMask; // if nonzero - bitmask for matching proc condition based on candidate spell's SpellFamilyFlags
274-
ProcFlags ProcFlags; // if nonzero - owerwrite procFlags field for given Spell.dbc entry, bitmask for matching proc condition, see enum ProcFlags
274+
ProcFlagsInit ProcFlags = PROC_FLAG_NONE; // if nonzero - owerwrite procFlags field for given Spell.dbc entry, bitmask for matching proc condition, see enum ProcFlags
275275
ProcFlagsSpellType SpellTypeMask = PROC_SPELL_TYPE_NONE; // if nonzero - bitmask for matching proc condition based on candidate spell's damage/heal effects, see enum ProcFlagsSpellType
276276
ProcFlagsSpellPhase SpellPhaseMask = PROC_SPELL_PHASE_NONE; // if nonzero - bitmask for matching phase of a spellcast on which proc occurs, see enum ProcFlagsSpellPhase
277277
ProcFlagsHit HitMask = PROC_HIT_NONE; // if nonzero - bitmask for matching proc condition based on hit result, see enum ProcFlagsHit

0 commit comments

Comments
 (0)