AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
SpellProcTestEntry Struct Reference

Test data entry from spell_proc table with DBC comparison data. More...

#include "SpellProcTestData.h"

Public Member Functions

SpellProcEntry ToSpellProcEntry () const
 Convert to SpellProcEntry for testing.
 
bool AddsValueBeyondDBC () const
 Check if this entry adds value beyond DBC defaults.
 
bool HasDBCData () const
 Check if DBC values are available for this entry.
 

Public Attributes

int32_t SpellId
 
uint32_t SchoolMask
 
uint32_t SpellFamilyName
 
uint32_t SpellFamilyMask0
 
uint32_t SpellFamilyMask1
 
uint32_t SpellFamilyMask2
 
uint32_t ProcFlags
 
uint32_t SpellTypeMask
 
uint32_t SpellPhaseMask
 
uint32_t HitMask
 
uint32_t AttributesMask
 
uint32_t Cooldown
 
float Chance
 
float ProcsPerMinute
 
uint8_t Charges
 
uint8_t DisableEffectsMask
 
uint32_t DBC_ProcFlags
 
uint32_t DBC_ProcChance
 
uint32_t DBC_ProcCharges
 

Detailed Description

Test data entry from spell_proc table with DBC comparison data.

Member Function Documentation

◆ AddsValueBeyondDBC()

bool SpellProcTestEntry::AddsValueBeyondDBC ( ) const
inline

Check if this entry adds value beyond DBC defaults.

Returns true if the spell_proc entry provides functionality not available in Spell.dbc alone.

73 {
74 // New fields not in DBC (always add value)
75 if (ProcsPerMinute > 0) return true;
76 if (Cooldown > 0) return true;
77 if (SpellTypeMask != 0) return true;
78 if (SpellPhaseMask != 0) return true;
79 if (HitMask != 0) return true;
80 if (DisableEffectsMask != 0) return true;
81 if (AttributesMask != 0) return true;
82 if (SchoolMask != 0) return true;
83 if (SpellFamilyMask0 != 0 || SpellFamilyMask1 != 0 || SpellFamilyMask2 != 0) return true;
84
85 // Override fields (add value if different from DBC)
86 if (ProcFlags != 0 && ProcFlags != DBC_ProcFlags) return true;
87 if (Chance != 0 && static_cast<uint32_t>(Chance) != DBC_ProcChance) return true;
88 if (Charges != 0 && Charges != DBC_ProcCharges) return true;
89
90 return false;
91 }
ProcFlags
Definition SpellMgr.h:107
uint32_t SpellFamilyMask1
Definition SpellProcTestData.h:24
float ProcsPerMinute
Definition SpellProcTestData.h:33
uint8_t Charges
Definition SpellProcTestData.h:34
uint8_t DisableEffectsMask
Definition SpellProcTestData.h:35
uint32_t AttributesMask
Definition SpellProcTestData.h:30
uint32_t DBC_ProcCharges
Definition SpellProcTestData.h:40
uint32_t DBC_ProcChance
Definition SpellProcTestData.h:39
uint32_t SpellFamilyMask2
Definition SpellProcTestData.h:25
uint32_t SpellTypeMask
Definition SpellProcTestData.h:27
uint32_t Cooldown
Definition SpellProcTestData.h:31
uint32_t SpellFamilyMask0
Definition SpellProcTestData.h:23
float Chance
Definition SpellProcTestData.h:32
uint32_t HitMask
Definition SpellProcTestData.h:29
uint32_t SpellPhaseMask
Definition SpellProcTestData.h:28
uint32_t SchoolMask
Definition SpellProcTestData.h:21
uint32_t DBC_ProcFlags
Definition SpellProcTestData.h:38

References AttributesMask, Chance, Charges, Cooldown, DBC_ProcChance, DBC_ProcCharges, DBC_ProcFlags, DisableEffectsMask, HitMask, ProcsPerMinute, SchoolMask, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, SpellPhaseMask, and SpellTypeMask.

◆ HasDBCData()

bool SpellProcTestEntry::HasDBCData ( ) const
inline

Check if DBC values are available for this entry.

97 {
98 return DBC_ProcFlags != 0 || DBC_ProcChance != 0 || DBC_ProcCharges != 0;
99 }

References DBC_ProcChance, DBC_ProcCharges, and DBC_ProcFlags.

◆ ToSpellProcEntry()

SpellProcEntry SpellProcTestEntry::ToSpellProcEntry ( ) const
inline

Convert to SpellProcEntry for testing.

46 {
47 SpellProcEntry entry = {};
48 entry.SchoolMask = SchoolMask;
53 entry.ProcFlags = ProcFlags;
56 entry.HitMask = HitMask;
59 entry.Chance = Chance;
61 entry.Charges = Charges;
63 return entry;
64 }
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:27
Definition SpellMgr.h:286
uint32 SpellFamilyName
Definition SpellMgr.h:288
float ProcsPerMinute
Definition SpellMgr.h:296
Milliseconds Cooldown
Definition SpellMgr.h:298
uint32 Charges
Definition SpellMgr.h:299
uint32 AttributesMask
Definition SpellMgr.h:294
flag96 SpellFamilyMask
Definition SpellMgr.h:289
uint32 HitMask
Definition SpellMgr.h:293
uint32 SpellTypeMask
Definition SpellMgr.h:291
uint32 ProcFlags
Definition SpellMgr.h:290
uint32 SpellPhaseMask
Definition SpellMgr.h:292
uint32 SchoolMask
Definition SpellMgr.h:287
uint32 DisableEffectsMask
Definition SpellMgr.h:295
float Chance
Definition SpellMgr.h:297
uint32_t SpellFamilyName
Definition SpellProcTestData.h:22
uint32_t ProcFlags
Definition SpellProcTestData.h:26

References SpellProcEntry::AttributesMask, AttributesMask, SpellProcEntry::Chance, Chance, SpellProcEntry::Charges, Charges, SpellProcEntry::Cooldown, Cooldown, SpellProcEntry::DisableEffectsMask, DisableEffectsMask, SpellProcEntry::HitMask, HitMask, SpellProcEntry::ProcFlags, ProcFlags, SpellProcEntry::ProcsPerMinute, ProcsPerMinute, SpellProcEntry::SchoolMask, SchoolMask, SpellProcEntry::SpellFamilyMask, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, SpellProcEntry::SpellFamilyName, SpellFamilyName, SpellProcEntry::SpellPhaseMask, SpellPhaseMask, SpellProcEntry::SpellTypeMask, and SpellTypeMask.

Referenced by SpellProcFullCoverageTest::SetUp().

Member Data Documentation

◆ AttributesMask

uint32_t SpellProcTestEntry::AttributesMask

◆ Chance

float SpellProcTestEntry::Chance

◆ Charges

uint8_t SpellProcTestEntry::Charges

◆ Cooldown

uint32_t SpellProcTestEntry::Cooldown

◆ DBC_ProcChance

uint32_t SpellProcTestEntry::DBC_ProcChance

Referenced by AddsValueBeyondDBC(), and HasDBCData().

◆ DBC_ProcCharges

uint32_t SpellProcTestEntry::DBC_ProcCharges

Referenced by AddsValueBeyondDBC(), and HasDBCData().

◆ DBC_ProcFlags

uint32_t SpellProcTestEntry::DBC_ProcFlags

Referenced by AddsValueBeyondDBC(), and HasDBCData().

◆ DisableEffectsMask

uint8_t SpellProcTestEntry::DisableEffectsMask

◆ HitMask

uint32_t SpellProcTestEntry::HitMask

◆ ProcFlags

uint32_t SpellProcTestEntry::ProcFlags

Referenced by ToSpellProcEntry().

◆ ProcsPerMinute

float SpellProcTestEntry::ProcsPerMinute

◆ SchoolMask

uint32_t SpellProcTestEntry::SchoolMask

◆ SpellFamilyMask0

uint32_t SpellProcTestEntry::SpellFamilyMask0

◆ SpellFamilyMask1

uint32_t SpellProcTestEntry::SpellFamilyMask1

◆ SpellFamilyMask2

uint32_t SpellProcTestEntry::SpellFamilyMask2

◆ SpellFamilyName

uint32_t SpellProcTestEntry::SpellFamilyName

◆ SpellId

int32_t SpellProcTestEntry::SpellId

◆ SpellPhaseMask

uint32_t SpellProcTestEntry::SpellPhaseMask

◆ SpellTypeMask

uint32_t SpellProcTestEntry::SpellTypeMask

The documentation for this struct was generated from the following file: