Cleanup and reorganization of Unit and SpellEntry headers. (#312)
* Move some unit and spell defines to dedicated header. * Reorder functions in unit header. * Clean up until spell category. * Finish cleaning up spell functions. * Cleanup combat system methods. * Done cleaning up unit header. * Reduce not needed includes.
This commit is contained in:
@@ -140,7 +140,7 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff) override
|
||||
{
|
||||
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
|
||||
if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim())
|
||||
return;
|
||||
|
||||
if (Razor_Phase_1 == 1)
|
||||
@@ -179,7 +179,7 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
//Cleave_Timer
|
||||
if (Cleave_Timer < diff)
|
||||
{
|
||||
DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE);
|
||||
DoCastSpellIfCan(m_creature->GetVictim(), SPELL_CLEAVE);
|
||||
Cleave_Timer = urand(7000, 10000);
|
||||
}
|
||||
else Cleave_Timer -= diff;
|
||||
@@ -188,7 +188,7 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
//WarStomp_Timer
|
||||
if (WarStomp_Timer < diff)
|
||||
{
|
||||
DoCastSpellIfCan(m_creature->getVictim(), SPELL_WARSTOMP);
|
||||
DoCastSpellIfCan(m_creature->GetVictim(), SPELL_WARSTOMP);
|
||||
WarStomp_Timer = urand(15000, 25000);
|
||||
}
|
||||
else WarStomp_Timer -= diff;
|
||||
@@ -197,7 +197,7 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
//FireballVolley_Timer
|
||||
if (FireballVolley_Timer < diff)
|
||||
{
|
||||
DoCastSpellIfCan(m_creature->getVictim(), SPELL_FIREBALLVOLLEY);
|
||||
DoCastSpellIfCan(m_creature->GetVictim(), SPELL_FIREBALLVOLLEY);
|
||||
FireballVolley_Timer = urand(12000, 15000);
|
||||
}
|
||||
else FireballVolley_Timer -= diff;
|
||||
@@ -205,14 +205,14 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
//Conflagration_Timer
|
||||
if (Conflagration_Timer < diff)
|
||||
{
|
||||
DoCastSpellIfCan(m_creature->getVictim(), SPELL_CONFLAGRATION);
|
||||
DoCastSpellIfCan(m_creature->GetVictim(), SPELL_CONFLAGRATION);
|
||||
|
||||
Conflagration_Timer = 12000;
|
||||
}
|
||||
else Conflagration_Timer -= diff;
|
||||
|
||||
// Aura Check. If the gamer is affected by confliguration we attack a random gamer.
|
||||
if (m_creature->getVictim()->HasAura(SPELL_CONFLAGRATION, EFFECT_INDEX_0))
|
||||
if (m_creature->GetVictim()->HasAura(SPELL_CONFLAGRATION, EFFECT_INDEX_0))
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1);
|
||||
@@ -327,7 +327,7 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
if (target && Spawned)
|
||||
{
|
||||
Spawned->AI()->AttackStart(target);
|
||||
Spawned->setFaction(103);
|
||||
Spawned->SetFactionTemplateId(103);
|
||||
}
|
||||
|
||||
++SpawnedAdds;
|
||||
@@ -341,7 +341,7 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
if (target && Spawned)
|
||||
{
|
||||
Spawned->AI()->AttackStart(target);
|
||||
Spawned->setFaction(103);
|
||||
Spawned->SetFactionTemplateId(103);
|
||||
}
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
if (target && Spawned)
|
||||
{
|
||||
Spawned->AI()->AttackStart(target);
|
||||
Spawned->setFaction(103);
|
||||
Spawned->SetFactionTemplateId(103);
|
||||
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ struct Zero_boss_razorgoreAI : public ScriptedAI
|
||||
if (target && Spawned)
|
||||
{
|
||||
Spawned->AI()->AttackStart(target);
|
||||
Spawned->setFaction(103);
|
||||
Spawned->SetFactionTemplateId(103);
|
||||
}
|
||||
Despawn_Timer = Despawn_Timer - 15000;
|
||||
AddSpawnTimer = 15000;
|
||||
@@ -416,7 +416,7 @@ struct Mob_Grethok_The_ControllerAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff) override
|
||||
{
|
||||
|
||||
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
|
||||
if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim())
|
||||
return;
|
||||
|
||||
// Greater Polymorph
|
||||
|
||||
Reference in New Issue
Block a user