fix(Core/Entities): crash fix cause by a pointer change in #19622 (#19633)

* fix(Core/Entities): crash fix cause by a pointer change in #19622

* fix blank space for codestyle check
This commit is contained in:
Grimdhex
2024-08-15 21:28:50 +02:00
committed by GitHub
parent 7457aef78d
commit 9dc20bc261
8 changed files with 49 additions and 44 deletions

View File

@@ -543,30 +543,6 @@ enum CurrentSpellTypes
#define CURRENT_FIRST_NON_MELEE_SPELL 1
#define CURRENT_MAX_SPELL 4
struct GlobalCooldown
{
explicit GlobalCooldown(uint32 _dur = 0, uint32 _time = 0) : duration(_dur), cast_time(_time) {}
uint32 duration;
uint32 cast_time;
};
typedef std::unordered_map<uint32 /*category*/, GlobalCooldown> GlobalCooldownList;
class GlobalCooldownMgr // Shared by Player and CharmInfo
{
public:
GlobalCooldownMgr() = default;
public:
bool HasGlobalCooldown(SpellInfo const* spellInfo) const;
void AddGlobalCooldown(SpellInfo const* spellInfo, uint32 gcd);
void CancelGlobalCooldown(SpellInfo const* spellInfo);
private:
GlobalCooldownList m_GlobalCooldowns;
};
enum ReactStates : uint8
{
REACT_PASSIVE = 0,