mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 19:13:49 +00:00
feat(Core/Creature): Implement c_t_r & c_t_s (#4359)
This commit is contained in:
@@ -169,7 +169,7 @@ Creature::Creature(bool isWorldObject): Unit(isWorldObject), MovableMapObject(),
|
||||
m_regenTimer = CREATURE_REGEN_INTERVAL;
|
||||
m_valuesCount = UNIT_END;
|
||||
|
||||
for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
for (uint8 i = 0; i < MAX_CREATURE_SPELLS; ++i)
|
||||
m_spells[i] = 0;
|
||||
|
||||
for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
@@ -390,7 +390,7 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData* data)
|
||||
if (!m_wanderDistance && m_defaultMovementType == RANDOM_MOTION_TYPE)
|
||||
m_defaultMovementType = IDLE_MOTION_TYPE;
|
||||
|
||||
for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
for (uint8 i = 0; i < MAX_CREATURE_SPELLS; ++i)
|
||||
m_spells[i] = GetCreatureTemplate()->spells[i];
|
||||
|
||||
return true;
|
||||
@@ -1868,7 +1868,7 @@ SpellInfo const* Creature::reachWithSpellAttack(Unit* victim)
|
||||
if (!victim)
|
||||
return nullptr;
|
||||
|
||||
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
for (uint32 i = 0; i < MAX_CREATURE_SPELLS; ++i)
|
||||
{
|
||||
if (!m_spells[i])
|
||||
continue;
|
||||
@@ -1916,7 +1916,7 @@ SpellInfo const* Creature::reachWithSpellCure(Unit* victim)
|
||||
if (!victim)
|
||||
return nullptr;
|
||||
|
||||
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
for (uint32 i = 0; i < MAX_CREATURE_SPELLS; ++i)
|
||||
{
|
||||
if (!m_spells[i])
|
||||
continue;
|
||||
@@ -2497,10 +2497,10 @@ bool Creature::HasSpellCooldown(uint32 spell_id) const
|
||||
bool Creature::HasSpell(uint32 spellID) const
|
||||
{
|
||||
uint8 i;
|
||||
for (i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
for (i = 0; i < MAX_CREATURE_SPELLS; ++i)
|
||||
if (spellID == m_spells[i])
|
||||
break;
|
||||
return i < CREATURE_MAX_SPELLS; //broke before end of iteration of known spells
|
||||
return i < MAX_CREATURE_SPELLS; //broke before end of iteration of known spells
|
||||
}
|
||||
|
||||
time_t Creature::GetRespawnTimeEx() const
|
||||
|
||||
Reference in New Issue
Block a user