mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-06 04:23:47 +00:00
feat(Core/Creature): Implement c_t_r & c_t_s (#4359)
This commit is contained in:
@@ -38,7 +38,7 @@ void AggressorAI::UpdateAI(uint32 /*diff*/)
|
||||
|
||||
void CombatAI::InitializeAI()
|
||||
{
|
||||
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
for (uint32 i = 0; i < MAX_CREATURE_SPELLS; ++i)
|
||||
if (me->m_spells[i] && sSpellMgr->GetSpellInfo(me->m_spells[i]))
|
||||
spells.push_back(me->m_spells[i]);
|
||||
|
||||
|
||||
@@ -260,15 +260,15 @@ SpellInfo const* ScriptedAI::SelectSpell(Unit* target, uint32 school, uint32 mec
|
||||
return nullptr;
|
||||
|
||||
//Using the extended script system we first create a list of viable spells
|
||||
SpellInfo const* apSpell[CREATURE_MAX_SPELLS];
|
||||
memset(apSpell, 0, CREATURE_MAX_SPELLS * sizeof(SpellInfo*));
|
||||
SpellInfo const* apSpell[MAX_CREATURE_SPELLS];
|
||||
memset(apSpell, 0, MAX_CREATURE_SPELLS * sizeof(SpellInfo*));
|
||||
|
||||
uint32 spellCount = 0;
|
||||
|
||||
SpellInfo const* tempSpell = nullptr;
|
||||
|
||||
//Check if each spell is viable(set it to null if not)
|
||||
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; i++)
|
||||
for (uint32 i = 0; i < MAX_CREATURE_SPELLS; i++)
|
||||
{
|
||||
tempSpell = sSpellMgr->GetSpellInfo(me->m_spells[i]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user