aboutsummaryrefslogtreecommitdiff
path: root/src/scripts/outland
diff options
context:
space:
mode:
authorRat <none@none>2010-04-14 23:07:41 +0200
committerRat <none@none>2010-04-14 23:07:41 +0200
commit6bcb297de4d5231373a3e2bf2b40e527b91cdf46 (patch)
treea5379b14ceb2ac9e7273143b334bfc693e2ef042 /src/scripts/outland
parentcc262e1cde544eb7cf643df79fa00c9f34af4785 (diff)
*code cleanup
*totally destroyed m_creature, use "me" for future coding --HG-- branch : trunk
Diffstat (limited to 'src/scripts/outland')
-rw-r--r--src/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp58
-rw-r--r--src/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp28
-rw-r--r--src/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp64
-rw-r--r--src/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp14
-rw-r--r--src/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp34
-rw-r--r--src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp36
-rw-r--r--src/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp26
-rw-r--r--src/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp14
-rw-r--r--src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp52
-rw-r--r--src/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp44
-rw-r--r--src/scripts/outland/black_temple/boss_bloodboil.cpp66
-rw-r--r--src/scripts/outland/black_temple/boss_illidan.cpp480
-rw-r--r--src/scripts/outland/black_temple/boss_mother_shahraz.cpp30
-rw-r--r--src/scripts/outland/black_temple/boss_reliquary_of_souls.cpp156
-rw-r--r--src/scripts/outland/black_temple/boss_shade_of_akama.cpp164
-rw-r--r--src/scripts/outland/black_temple/boss_supremus.cpp48
-rw-r--r--src/scripts/outland/black_temple/boss_teron_gorefiend.cpp92
-rw-r--r--src/scripts/outland/black_temple/boss_warlord_najentus.cpp30
-rw-r--r--src/scripts/outland/black_temple/illidari_council.cpp112
-rw-r--r--src/scripts/outland/blades_edge_mountains.cpp42
-rw-r--r--src/scripts/outland/boss_doomlord_kazzak.cpp22
-rw-r--r--src/scripts/outland/boss_doomwalker.cpp26
-rw-r--r--src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp116
-rw-r--r--src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp60
-rw-r--r--src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp136
-rw-r--r--src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp198
-rw-r--r--src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp90
-rw-r--r--src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp42
-rw-r--r--src/scripts/outland/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp8
-rw-r--r--src/scripts/outland/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp36
-rw-r--r--src/scripts/outland/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp32
-rw-r--r--src/scripts/outland/coilfang_resevoir/underbog/boss_hungarfen.cpp16
-rw-r--r--src/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp14
-rw-r--r--src/scripts/outland/gruuls_lair/boss_gruul.cpp34
-rw-r--r--src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp124
-rw-r--r--src/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp10
-rw-r--r--src/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp58
-rw-r--r--src/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp10
-rw-r--r--src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp28
-rw-r--r--src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp88
-rw-r--r--src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp30
-rw-r--r--src/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp110
-rw-r--r--src/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp42
-rw-r--r--src/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp42
-rw-r--r--src/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp46
-rw-r--r--src/scripts/outland/hellfire_peninsula.cpp50
-rw-r--r--src/scripts/outland/nagrand.cpp106
-rw-r--r--src/scripts/outland/netherstorm.cpp164
-rw-r--r--src/scripts/outland/shadowmoon_valley.cpp216
-rw-r--r--src/scripts/outland/shattrath_city.cpp96
-rw-r--r--src/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp114
-rw-r--r--src/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp46
-rw-r--r--src/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp40
-rw-r--r--src/scripts/outland/tempest_keep/botanica/boss_laj.cpp96
-rw-r--r--src/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp34
-rw-r--r--src/scripts/outland/tempest_keep/the_eye/boss_alar.cpp140
-rw-r--r--src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp96
-rw-r--r--src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp348
-rw-r--r--src/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp30
-rw-r--r--src/scripts/outland/tempest_keep/the_eye/the_eye.cpp8
-rw-r--r--src/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp16
-rw-r--r--src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp38
-rw-r--r--src/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp34
-rw-r--r--src/scripts/outland/terokkar_forest.cpp80
-rw-r--r--src/scripts/outland/zangarmarsh.cpp18
65 files changed, 2389 insertions, 2389 deletions
diff --git a/src/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/src/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
index aaeb92d3ba9..e46d14fb3f9 100644
--- a/src/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
+++ b/src/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
@@ -69,39 +69,39 @@ struct mob_stolen_soulAI : public ScriptedAI
switch (myClass)
{
case CLASS_WARRIOR:
- DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE);
+ DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
Class_Timer = 6000;
break;
case CLASS_PALADIN:
- DoCast(m_creature->getVictim(), SPELL_HAMMER_OF_JUSTICE);
+ DoCast(me->getVictim(), SPELL_HAMMER_OF_JUSTICE);
Class_Timer = 6000;
break;
case CLASS_HUNTER:
- DoCast(m_creature->getVictim(), SPELL_FREEZING_TRAP);
+ DoCast(me->getVictim(), SPELL_FREEZING_TRAP);
Class_Timer = 20000;
break;
case CLASS_ROGUE:
- DoCast(m_creature->getVictim(), SPELL_HEMORRHAGE);
+ DoCast(me->getVictim(), SPELL_HEMORRHAGE);
Class_Timer = 10000;
break;
case CLASS_PRIEST:
- DoCast(m_creature->getVictim(), SPELL_MIND_FLAY);
+ DoCast(me->getVictim(), SPELL_MIND_FLAY);
Class_Timer = 5000;
break;
case CLASS_SHAMAN:
- DoCast(m_creature->getVictim(), SPELL_FROSTSHOCK);
+ DoCast(me->getVictim(), SPELL_FROSTSHOCK);
Class_Timer = 8000;
break;
case CLASS_MAGE:
- DoCast(m_creature->getVictim(), SPELL_FIREBALL);
+ DoCast(me->getVictim(), SPELL_FIREBALL);
Class_Timer = 5000;
break;
case CLASS_WARLOCK:
- DoCast(m_creature->getVictim(), SPELL_CURSE_OF_AGONY);
+ DoCast(me->getVictim(), SPELL_CURSE_OF_AGONY);
Class_Timer = 20000;
break;
case CLASS_DRUID:
- DoCast(m_creature->getVictim(), SPELL_MOONFIRE);
+ DoCast(me->getVictim(), SPELL_MOONFIRE);
Class_Timer = 10000;
break;
}
@@ -174,9 +174,9 @@ struct boss_exarch_maladaarAI : public ScriptedAI
void MoveInLineOfSight(Unit *who)
{
- if (!HasTaunted && m_creature->IsWithinDistInMap(who, 150.0))
+ if (!HasTaunted && me->IsWithinDistInMap(who, 150.0))
{
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
HasTaunted = true;
}
@@ -185,7 +185,7 @@ struct boss_exarch_maladaarAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
}
void JustSummoned(Creature *summoned)
@@ -195,9 +195,9 @@ struct boss_exarch_maladaarAI : public ScriptedAI
//SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in Trinity for this spell.
summoned->CastSpell(summoned,SPELL_STOLEN_SOUL_VISUAL,false);
summoned->SetDisplayId(soulmodel);
- summoned->setFaction(m_creature->getFaction());
+ summoned->setFaction(me->getFaction());
- if (Unit *pTarget = Unit::GetUnit(*m_creature,soulholder))
+ if (Unit *pTarget = Unit::GetUnit(*me,soulholder))
{
CAST_AI(mob_stolen_soulAI, summoned->AI())->SetMyClass(soulclass);
@@ -211,14 +211,14 @@ struct boss_exarch_maladaarAI : public ScriptedAI
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
//When Exarch Maladar is defeated D'ore appear.
- m_creature->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000);
+ me->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000);
}
void UpdateAI(const uint32 diff)
@@ -226,14 +226,14 @@ struct boss_exarch_maladaarAI : public ScriptedAI
if (!UpdateVictim())
return;
- if (!Avatar_summoned && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 25))
+ if (!Avatar_summoned && ((me->GetHealth()*100) / me->GetMaxHealth() < 25))
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
- DoScriptText(SAY_SUMMON, m_creature);
+ DoScriptText(SAY_SUMMON, me);
- DoCast(m_creature, SPELL_SUMMON_AVATAR);
+ DoCast(me, SPELL_SUMMON_AVATAR);
Avatar_summoned = true;
StolenSoul_Timer = 15000 + rand()% 15000;
}
@@ -244,21 +244,21 @@ struct boss_exarch_maladaarAI : public ScriptedAI
{
if (pTarget->GetTypeId() == TYPEID_PLAYER)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
uint32 i = urand(1,2);
if (i == 1)
- DoScriptText(SAY_ROAR, m_creature);
+ DoScriptText(SAY_ROAR, me);
else
- DoScriptText(SAY_SOUL_CLEAVE, m_creature);
+ DoScriptText(SAY_SOUL_CLEAVE, me);
soulmodel = pTarget->GetDisplayId();
soulholder = pTarget->GetGUID();
soulclass = pTarget->getClass();
DoCast(pTarget, SPELL_STOLEN_SOUL);
- m_creature->SummonCreature(ENTRY_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
+ me->SummonCreature(ENTRY_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
StolenSoul_Timer = 20000 + rand()% 10000;
} else StolenSoul_Timer = 1000;
@@ -275,7 +275,7 @@ struct boss_exarch_maladaarAI : public ScriptedAI
if (Fear_timer <= diff)
{
- DoCast(m_creature, SPELL_SOUL_SCREAM);
+ DoCast(me, SPELL_SOUL_SCREAM);
Fear_timer = 15000 + rand()% 15000;
} else Fear_timer -= diff;
@@ -313,7 +313,7 @@ struct mob_avatar_of_martyredAI : public ScriptedAI
if (Mortal_Strike_timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_AV_MORTAL_STRIKE);
+ DoCast(me->getVictim(), SPELL_AV_MORTAL_STRIKE);
Mortal_Strike_timer = 10000 + rand()%20 * 1000;
} else Mortal_Strike_timer -= diff;
diff --git a/src/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp b/src/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
index 29808075fce..38cc2d63375 100644
--- a/src/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
@@ -68,11 +68,11 @@ struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
if (summoned && summoned->GetEntry() == ENTRY_FOCUS_FIRE)
{
summoned->CastSpell(summoned,SPELL_FOCUS_FIRE_VISUAL,false);
- summoned->setFaction(m_creature->getFaction());
- summoned->SetLevel(m_creature->getLevel());
+ summoned->setFaction(me->getFaction());
+ summoned->SetLevel(me->getLevel());
summoned->addUnitState(UNIT_STAT_ROOT);
- if (Unit *pFocusedTarget = Unit::GetUnit(*m_creature, FocusedTargetGUID))
+ if (Unit *pFocusedTarget = Unit::GetUnit(*me, FocusedTargetGUID))
summoned->AI()->AttackStart(pFocusedTarget);
}
}
@@ -83,20 +83,20 @@ struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
if (Inhibitmagic_Timer <= diff)
{
float dist;
- Map* pMap = m_creature->GetMap();
+ Map* pMap = me->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* i_pl = i->getSource())
- if (i_pl->isAlive() && (dist = i_pl->IsWithinDist(m_creature, 45)))
+ if (i_pl->isAlive() && (dist = i_pl->IsWithinDist(me, 45)))
{
i_pl->RemoveAurasDueToSpell(SPELL_INHIBITMAGIC);
- m_creature->AddAura(SPELL_INHIBITMAGIC, i_pl);
+ me->AddAura(SPELL_INHIBITMAGIC, i_pl);
if (dist < 35)
- m_creature->AddAura(SPELL_INHIBITMAGIC, i_pl);
+ me->AddAura(SPELL_INHIBITMAGIC, i_pl);
if (dist < 25)
- m_creature->AddAura(SPELL_INHIBITMAGIC, i_pl);
+ me->AddAura(SPELL_INHIBITMAGIC, i_pl);
if (dist < 15)
- m_creature->AddAura(SPELL_INHIBITMAGIC, i_pl);
+ me->AddAura(SPELL_INHIBITMAGIC, i_pl);
}
Inhibitmagic_Timer = 3000+(rand()%1000);
} else Inhibitmagic_Timer -= diff;
@@ -108,7 +108,7 @@ struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
//Attractmagic_Timer
if (Attractmagic_Timer <= diff)
{
- DoCast(m_creature, SPELL_ATTRACTMAGIC);
+ DoCast(me, SPELL_ATTRACTMAGIC);
Attractmagic_Timer = 30000;
Carnivorousbite_Timer = 1500;
} else Attractmagic_Timer -= diff;
@@ -116,7 +116,7 @@ struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
//Carnivorousbite_Timer
if (Carnivorousbite_Timer <= diff)
{
- DoCast(m_creature, SPELL_CARNIVOROUSBITE);
+ DoCast(me, SPELL_CARNIVOROUSBITE);
Carnivorousbite_Timer = 10000;
} else Carnivorousbite_Timer -= diff;
@@ -128,7 +128,7 @@ struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->isAlive())
{
FocusedTargetGUID = pTarget->GetGUID();
- m_creature->SummonCreature(ENTRY_FOCUS_FIRE,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,5500);
+ me->SummonCreature(ENTRY_FOCUS_FIRE,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,5500);
// TODO: Find better way to handle emote
// Emote
@@ -136,7 +136,7 @@ struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
emote->append(pTarget->GetName());
emote->append("!");
const char* text = emote->c_str();
- m_creature->MonsterTextEmote(text, 0, true);
+ me->MonsterTextEmote(text, 0, true);
delete emote;
}
FocusFire_Timer = 15000+(rand()%5000);
@@ -178,7 +178,7 @@ struct mob_focus_fireAI : public ScriptedAI
//FieryBlast_Timer
if (fiery2 && FieryBlast_Timer <= diff)
{
- DoCast(m_creature, SPELL_FIERY_BLAST);
+ DoCast(me, SPELL_FIERY_BLAST);
if (fiery1) fiery1 = false;
else if (fiery2) fiery2 = false;
diff --git a/src/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/src/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
index 56826ce0a5f..5350494fda7 100644
--- a/src/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
+++ b/src/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
@@ -80,11 +80,11 @@ struct boss_nexusprince_shaffarAI : public ScriptedAI
float dist = 8.0f;
float posX, posY, posZ, angle;
- m_creature->GetHomePosition(posX, posY, posZ, angle);
+ me->GetHomePosition(posX, posY, posZ, angle);
- m_creature->SummonCreature(NPC_BEACON, posX - dist, posY - dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
- m_creature->SummonCreature(NPC_BEACON, posX - dist, posY + dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
- m_creature->SummonCreature(NPC_BEACON, posX + dist, posY, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
+ me->SummonCreature(NPC_BEACON, posX - dist, posY - dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
+ me->SummonCreature(NPC_BEACON, posX - dist, posY + dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
+ me->SummonCreature(NPC_BEACON, posX + dist, posY, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
}
void EnterEvadeMode()
@@ -95,16 +95,16 @@ struct boss_nexusprince_shaffarAI : public ScriptedAI
void MoveInLineOfSight(Unit *who)
{
- if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 100.0f))
+ if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
{
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
HasTaunted = true;
}
}
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
DoZoneInCombat();
summons.DoZoneInCombat();
@@ -130,12 +130,12 @@ struct boss_nexusprince_shaffarAI : public ScriptedAI
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEAD, m_creature);
+ DoScriptText(SAY_DEAD, me);
summons.DespawnAll();
}
@@ -146,23 +146,23 @@ struct boss_nexusprince_shaffarAI : public ScriptedAI
if (FrostNova_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
- DoCast(m_creature, SPELL_FROSTNOVA);
+ DoCast(me, SPELL_FROSTNOVA);
FrostNova_Timer = 17500 + rand()%7500;
CanBlink = true;
} else FrostNova_Timer -= diff;
if (Frostbolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_FROSTBOLT);
+ DoCast(me->getVictim(), SPELL_FROSTBOLT);
Frostbolt_Timer = 4500 + rand()%1500;
} else Frostbolt_Timer -= diff;
if (FireBall_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_FIREBALL);
+ DoCast(me->getVictim(), SPELL_FIREBALL);
FireBall_Timer = 4500 + rand()%1500;
} else FireBall_Timer -= diff;
@@ -170,15 +170,15 @@ struct boss_nexusprince_shaffarAI : public ScriptedAI
{
if (Blink_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
//expire movement, will prevent from running right back to victim after cast
//(but should MoveChase be used again at a certain time or should he not move?)
- if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
- m_creature->GetMotionMaster()->MovementExpired();
+ if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
+ me->GetMotionMaster()->MovementExpired();
- DoCast(m_creature, SPELL_BLINK);
+ DoCast(me, SPELL_BLINK);
Blink_Timer = 1000 + rand()%1500;
CanBlink = false;
} else Blink_Timer -= diff;
@@ -186,13 +186,13 @@ struct boss_nexusprince_shaffarAI : public ScriptedAI
if (Beacon_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
if (!urand(0,3))
- DoScriptText(SAY_SUMMON, m_creature);
+ DoScriptText(SAY_SUMMON, me);
- DoCast(m_creature, SPELL_ETHEREAL_BEACON, true);
+ DoCast(me, SPELL_ETHEREAL_BEACON, true);
Beacon_Timer = 10000;
} else Beacon_Timer -= diff;
@@ -224,7 +224,7 @@ struct mob_ethereal_beaconAI : public ScriptedAI
void KillSelf()
{
- m_creature->Kill(m_creature);
+ me->Kill(me);
}
void Reset()
@@ -249,7 +249,7 @@ struct mob_ethereal_beaconAI : public ScriptedAI
void JustSummoned(Creature *summoned)
{
- summoned->AI()->AttackStart(m_creature->getVictim());
+ summoned->AI()->AttackStart(me->getVictim());
}
void UpdateAI(const uint32 diff)
@@ -270,17 +270,17 @@ struct mob_ethereal_beaconAI : public ScriptedAI
if (ArcaneBolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_BOLT);
+ DoCast(me->getVictim(), SPELL_ARCANE_BOLT);
ArcaneBolt_Timer = 2000 + rand()%2500;
} else ArcaneBolt_Timer -= diff;
if (Apprentice_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
- DoCast(m_creature, SPELL_ETHEREAL_APPRENTICE, true);
- m_creature->ForcedDespawn();
+ DoCast(me, SPELL_ETHEREAL_APPRENTICE, true);
+ me->ForcedDespawn();
return;
} else Apprentice_Timer -= diff;
}
@@ -320,10 +320,10 @@ struct mob_ethereal_apprenticeAI : public ScriptedAI
{
if (isFireboltTurn)
{
- DoCast(m_creature->getVictim(), SPELL_ETHEREAL_APPRENTICE_FIREBOLT, true);
+ DoCast(me->getVictim(), SPELL_ETHEREAL_APPRENTICE_FIREBOLT, true);
isFireboltTurn = false;
}else{
- DoCast(m_creature->getVictim(), SPELL_ETHEREAL_APPRENTICE_FROSTBOLT, true);
+ DoCast(me->getVictim(), SPELL_ETHEREAL_APPRENTICE_FROSTBOLT, true);
isFireboltTurn = true;
}
Cast_Timer = 3000;
diff --git a/src/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/src/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp
index 4ef812deaab..ad841b56cd4 100644
--- a/src/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp
+++ b/src/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp
@@ -58,17 +58,17 @@ struct boss_pandemoniusAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), m_creature);
+ DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
}
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
}
void UpdateAI(const uint32 diff)
@@ -96,12 +96,12 @@ struct boss_pandemoniusAI : public ScriptedAI
{
if (DarkShell_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
- DoScriptText(EMOTE_DARK_SHELL, m_creature);
+ DoScriptText(EMOTE_DARK_SHELL, me);
- DoCast(m_creature, SPELL_DARK_SHELL);
+ DoCast(me, SPELL_DARK_SHELL);
DarkShell_Timer = 20000;
} else DarkShell_Timer -= diff;
}
diff --git a/src/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/src/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp
index badcd649635..ff0240c309c 100644
--- a/src/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp
+++ b/src/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp
@@ -82,12 +82,12 @@ struct boss_darkweaver_sythAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void KilledUnit(Unit* victim)
@@ -95,7 +95,7 @@ struct boss_darkweaver_sythAI : public ScriptedAI
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void JustSummoned(Creature *summoned)
@@ -106,15 +106,15 @@ struct boss_darkweaver_sythAI : public ScriptedAI
void SythSummoning()
{
- DoScriptText(SAY_SUMMON, m_creature);
+ DoScriptText(SAY_SUMMON, me);
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(false);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(false);
- DoCast(m_creature, SPELL_SUMMON_SYTH_ARCANE, true); //front
- DoCast(m_creature, SPELL_SUMMON_SYTH_FIRE, true); //back
- DoCast(m_creature, SPELL_SUMMON_SYTH_FROST, true); //left
- DoCast(m_creature, SPELL_SUMMON_SYTH_SHADOW, true); //right
+ DoCast(me, SPELL_SUMMON_SYTH_ARCANE, true); //front
+ DoCast(me, SPELL_SUMMON_SYTH_FIRE, true); //back
+ DoCast(me, SPELL_SUMMON_SYTH_FROST, true); //left
+ DoCast(me, SPELL_SUMMON_SYTH_SHADOW, true); //right
}
void UpdateAI(const uint32 diff)
@@ -122,19 +122,19 @@ struct boss_darkweaver_sythAI : public ScriptedAI
if (!UpdateVictim())
return;
- if (((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 90) && !summon90)
+ if (((me->GetHealth()*100) / me->GetMaxHealth() < 90) && !summon90)
{
SythSummoning();
summon90 = true;
}
- if (((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 50) && !summon50)
+ if (((me->GetHealth()*100) / me->GetMaxHealth() < 50) && !summon50)
{
SythSummoning();
summon50 = true;
}
- if (((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 10) && !summon10)
+ if (((me->GetHealth()*100) / me->GetMaxHealth() < 10) && !summon10)
{
SythSummoning();
summon10 = true;
@@ -202,7 +202,7 @@ struct mob_syth_fireAI : public ScriptedAI
void Reset()
{
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
flameshock_timer = 2500;
flamebuffet_timer = 5000;
}
@@ -250,7 +250,7 @@ struct mob_syth_arcaneAI : public ScriptedAI
void Reset()
{
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
arcaneshock_timer = 2500;
arcanebuffet_timer = 5000;
}
@@ -298,7 +298,7 @@ struct mob_syth_frostAI : public ScriptedAI
void Reset()
{
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
frostshock_timer = 2500;
frostbuffet_timer = 5000;
}
@@ -346,7 +346,7 @@ struct mob_syth_shadowAI : public ScriptedAI
void Reset()
{
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
shadowshock_timer = 2500;
shadowbuffet_timer = 5000;
}
diff --git a/src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp b/src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
index 1fa55df8837..a81a58df8d8 100644
--- a/src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
+++ b/src/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
@@ -81,19 +81,19 @@ struct boss_talon_king_ikissAI : public ScriptedAI
void MoveInLineOfSight(Unit *who)
{
- if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessiblePlaceFor(m_creature))
+ if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
{
- if (!Intro && m_creature->IsWithinDistInMap(who, 100))
+ if (!Intro && me->IsWithinDistInMap(who, 100))
{
Intro = true;
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
}
- if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
+ if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
return;
- float attackRadius = m_creature->GetAttackDistance(who);
- if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
+ float attackRadius = me->GetAttackDistance(who);
+ if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
{
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
@@ -103,12 +103,12 @@ struct boss_talon_king_ikissAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(DATA_IKISSDOOREVENT, DONE);
@@ -116,7 +116,7 @@ struct boss_talon_king_ikissAI : public ScriptedAI
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void UpdateAI(const uint32 diff)
@@ -126,14 +126,14 @@ struct boss_talon_king_ikissAI : public ScriptedAI
if (Blink)
{
- DoCast(m_creature, SPELL_ARCANE_EXPLOSION);
- DoCast(m_creature, SPELL_ARCANE_BUBBLE, true);
+ DoCast(me, SPELL_ARCANE_EXPLOSION);
+ DoCast(me, SPELL_ARCANE_BUBBLE, true);
Blink = false;
}
if (ArcaneVolley_Timer <= diff)
{
- DoCast(m_creature, SPELL_ARCANE_VOLLEY);
+ DoCast(me, SPELL_ARCANE_VOLLEY);
ArcaneVolley_Timer = 7000+rand()%5000;
} else ArcaneVolley_Timer -= diff;
@@ -153,9 +153,9 @@ struct boss_talon_king_ikissAI : public ScriptedAI
} else Sheep_Timer -= diff;
//may not be correct time to cast
- if (!ManaShield && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20))
+ if (!ManaShield && ((me->GetHealth()*100) / me->GetMaxHealth() < 20))
{
- DoCast(m_creature, SPELL_MANA_SHIELD);
+ DoCast(me, SPELL_MANA_SHIELD);
ManaShield = true;
}
@@ -163,19 +163,19 @@ struct boss_talon_king_ikissAI : public ScriptedAI
{
if (Slow_Timer <= diff)
{
- DoCast(m_creature, H_SPELL_SLOW);
+ DoCast(me, H_SPELL_SLOW);
Slow_Timer = 15000+rand()%25000;
} else Slow_Timer -= diff;
}
if (Blink_Timer <= diff)
{
- DoScriptText(EMOTE_ARCANE_EXP, m_creature);
+ DoScriptText(EMOTE_ARCANE_EXP, me);
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(false);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(false);
//Spell doesn't work, but we use for visual effect at least
DoCast(pTarget, SPELL_BLINK);
diff --git a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp
index 5227a2c4d49..45017a4f3a2 100644
--- a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp
+++ b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp
@@ -69,10 +69,10 @@ struct boss_ambassador_hellmawAI : public npc_escortAI
IsBanished = true;
Enraged = false;
- if (m_pInstance && m_creature->isAlive())
+ if (m_pInstance && me->isAlive())
{
if (m_pInstance->GetData(TYPE_OVERSEER) != DONE)
- DoCast(m_creature, SPELL_BANISH, true);
+ DoCast(me, SPELL_BANISH, true);
}
}
@@ -84,7 +84,7 @@ struct boss_ambassador_hellmawAI : public npc_escortAI
void MoveInLineOfSight(Unit* pWho)
{
- if (m_creature->HasAura(SPELL_BANISH))
+ if (me->HasAura(SPELL_BANISH))
return;
npc_escortAI::MoveInLineOfSight(pWho);
@@ -96,8 +96,8 @@ struct boss_ambassador_hellmawAI : public npc_escortAI
void DoIntro()
{
- if (m_creature->HasAura(SPELL_BANISH))
- m_creature->RemoveAurasDueToSpell(SPELL_BANISH);
+ if (me->HasAura(SPELL_BANISH))
+ me->RemoveAurasDueToSpell(SPELL_BANISH);
IsBanished = false;
Intro = true;
@@ -106,7 +106,7 @@ struct boss_ambassador_hellmawAI : public npc_escortAI
{
if (m_pInstance->GetData(TYPE_HELLMAW) != FAIL)
{
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
Start(true, false, 0, NULL, false, true);
}
@@ -116,17 +116,17 @@ struct boss_ambassador_hellmawAI : public npc_escortAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), me);
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (m_pInstance)
m_pInstance->SetData(TYPE_HELLMAW, DONE);
@@ -161,7 +161,7 @@ struct boss_ambassador_hellmawAI : public npc_escortAI
if (!UpdateVictim())
return;
- if (m_creature->HasAura(SPELL_BANISH, 0))
+ if (me->HasAura(SPELL_BANISH, 0))
{
EnterEvadeMode();
return;
@@ -169,13 +169,13 @@ struct boss_ambassador_hellmawAI : public npc_escortAI
if (CorrosiveAcid_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_CORROSIVE_ACID);
+ DoCast(me->getVictim(), SPELL_CORROSIVE_ACID);
CorrosiveAcid_Timer = 15000 + rand()%10000;
} else CorrosiveAcid_Timer -= diff;
if (Fear_Timer <= diff)
{
- DoCast(m_creature, SPELL_FEAR);
+ DoCast(me, SPELL_FEAR);
Fear_Timer = 20000 + rand()%15000;
} else Fear_Timer -= diff;
@@ -183,7 +183,7 @@ struct boss_ambassador_hellmawAI : public npc_escortAI
{
if (!Enraged && Enrage_Timer <= diff)
{
- DoCast(m_creature, SPELL_ENRAGE);
+ DoCast(me, SPELL_ENRAGE);
Enraged = true;
} else Enrage_Timer -= diff;
}
diff --git a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
index d7c04a35c9c..f725c0f2a38 100644
--- a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
@@ -81,12 +81,12 @@ struct boss_blackheart_the_inciterAI : public ScriptedAI
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, DONE);
@@ -94,7 +94,7 @@ struct boss_blackheart_the_inciterAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), me);
if (pInstance)
pInstance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, IN_PROGRESS);
@@ -119,12 +119,12 @@ struct boss_blackheart_the_inciterAI : public ScriptedAI
if (InciteChaos_Timer <= diff)
{
- DoCast(m_creature, SPELL_INCITE_CHAOS);
+ DoCast(me, SPELL_INCITE_CHAOS);
- std::list<HostileReference *> t_list = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- Unit *pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
+ Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
pTarget->CastSpell(pTarget,SPELL_INCITE_CHAOS_B,true);
}
@@ -146,7 +146,7 @@ struct boss_blackheart_the_inciterAI : public ScriptedAI
//Knockback_Timer
if (Knockback_Timer <= diff)
{
- DoCast(m_creature, SPELL_WAR_STOMP);
+ DoCast(me, SPELL_WAR_STOMP);
Knockback_Timer = 18000 + rand()%6000;
} else Knockback_Timer -= diff;
diff --git a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
index 98f2f3ffe96..2af5ff130cd 100644
--- a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
@@ -83,12 +83,12 @@ struct mob_voidtravelerAI : public ScriptedAI
{
if (!VorpilGUID)
{
- m_creature->Kill(m_creature);
+ me->Kill(me);
return;
}
if (move <= diff)
{
- Creature *Vorpil = Unit::GetCreature(*m_creature, VorpilGUID);
+ Creature *Vorpil = Unit::GetCreature(*me, VorpilGUID);
if (!Vorpil)
{
VorpilGUID = 0;
@@ -97,23 +97,23 @@ struct mob_voidtravelerAI : public ScriptedAI
if (sacrificed)
{
- m_creature->AddAura(DUNGEON_MODE(SPELL_EMPOWERING_SHADOWS, H_SPELL_EMPOWERING_SHADOWS), Vorpil);
+ me->AddAura(DUNGEON_MODE(SPELL_EMPOWERING_SHADOWS, H_SPELL_EMPOWERING_SHADOWS), Vorpil);
Vorpil->SetHealth(Vorpil->GetHealth() + Vorpil->GetMaxHealth()/25);
- DoCast(m_creature, SPELL_SHADOW_NOVA, true);
- m_creature->Kill(m_creature);
+ DoCast(me, SPELL_SHADOW_NOVA, true);
+ me->Kill(me);
return;
}
- m_creature->GetMotionMaster()->MoveFollow(Vorpil,0,0);
- if (m_creature->IsWithinDist(Vorpil, 3))
+ me->GetMotionMaster()->MoveFollow(Vorpil,0,0);
+ if (me->IsWithinDist(Vorpil, 3))
{
- DoCast(m_creature, SPELL_SACRIFICE, false);
+ DoCast(me, SPELL_SACRIFICE, false);
sacrificed = true;
move = 500;
return;
}
if (!Vorpil->isInCombat() || Vorpil->isDead())
{
- m_creature->Kill(m_creature);
+ me->Kill(me);
return;
}
move = 1000;
@@ -163,7 +163,7 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
for (uint8 i = 0; i < 5; ++i)
{
Creature *Portal = NULL;
- Portal = m_creature->SummonCreature(MOB_VOID_PORTAL,VoidPortalCoords[i][0],VoidPortalCoords[i][1],VoidPortalCoords[i][2],0,TEMPSUMMON_CORPSE_DESPAWN,3000000);
+ Portal = me->SummonCreature(MOB_VOID_PORTAL,VoidPortalCoords[i][0],VoidPortalCoords[i][1],VoidPortalCoords[i][2],0,TEMPSUMMON_CORPSE_DESPAWN,3000000);
if (Portal)
{
PortalsGuid[i] = Portal->GetGUID();
@@ -181,7 +181,7 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
{
for (uint8 i = 0; i < 5; ++i)
{
- Unit *Portal = Unit::GetUnit((*m_creature), PortalsGuid[i]);
+ Unit *Portal = Unit::GetUnit((*me), PortalsGuid[i]);
if (Portal && Portal->isAlive())
Portal->DealDamage(Portal, Portal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
PortalsGuid[i] = 0;
@@ -193,10 +193,10 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
void spawnVoidTraveler()
{
int pos = urand(0,4);
- m_creature->SummonCreature(MOB_VOID_TRAVELER,VoidPortalCoords[pos][0],VoidPortalCoords[pos][1],VoidPortalCoords[pos][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,5000);
+ me->SummonCreature(MOB_VOID_TRAVELER,VoidPortalCoords[pos][0],VoidPortalCoords[pos][1],VoidPortalCoords[pos][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,5000);
if (!HelpYell)
{
- DoScriptText(SAY_HELP, m_creature);
+ DoScriptText(SAY_HELP, me);
HelpYell = true;
}
}
@@ -204,17 +204,17 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
void JustSummoned(Creature *summoned)
{
if (summoned && summoned->GetEntry() == MOB_VOID_TRAVELER)
- CAST_AI(mob_voidtravelerAI, summoned->AI())->VorpilGUID = m_creature->GetGUID();
+ CAST_AI(mob_voidtravelerAI, summoned->AI())->VorpilGUID = me->GetGUID();
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
destroyPortals();
if (pInstance)
@@ -223,7 +223,7 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), me);
summonPortals();
if (pInstance)
@@ -234,9 +234,9 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
{
ScriptedAI::MoveInLineOfSight(who);
- if (!Intro && m_creature->IsWithinLOSInMap(who)&& m_creature->IsWithinDistInMap(who, 100) && m_creature->IsHostileTo(who))
+ if (!Intro && me->IsWithinLOSInMap(who)&& me->IsWithinDistInMap(who, 100) && me->IsHostileTo(who))
{
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
Intro = true;
}
}
@@ -248,7 +248,7 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
if (ShadowBoltVolley_Timer <= diff)
{
- DoCast(m_creature, SPELL_SHADOWBOLT_VOLLEY);
+ DoCast(me, SPELL_SHADOWBOLT_VOLLEY);
ShadowBoltVolley_Timer = 15000 + rand()%15000;
} else ShadowBoltVolley_Timer -= diff;
@@ -264,17 +264,17 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
if (DrawShadows_Timer <= diff)
{
- Map* pMap = m_creature->GetMap();
+ Map* pMap = me->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* i_pl = i->getSource())
if (i_pl->isAlive() && !i_pl->HasAura(SPELL_BANISH))
- i_pl->TeleportTo(m_creature->GetMapId(), VorpilPosition[0],VorpilPosition[1],VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
+ i_pl->TeleportTo(me->GetMapId(), VorpilPosition[0],VorpilPosition[1],VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
- m_creature->GetMap()->CreatureRelocation(m_creature, VorpilPosition[0],VorpilPosition[1],VorpilPosition[2],0.0f);
- DoCast(m_creature, SPELL_DRAW_SHADOWS, true);
+ me->GetMap()->CreatureRelocation(me, VorpilPosition[0],VorpilPosition[1],VorpilPosition[2],0.0f);
+ DoCast(me, SPELL_DRAW_SHADOWS, true);
- DoCast(m_creature, SPELL_RAIN_OF_FIRE);
+ DoCast(me, SPELL_RAIN_OF_FIRE);
ShadowBoltVolley_Timer = 6000;
DrawShadows_Timer = 30000;
@@ -285,7 +285,7 @@ struct boss_grandmaster_vorpilAI : public ScriptedAI
spawnVoidTraveler();
summonTraveler_Timer = 10000;
//enrage at 20%
- if ((m_creature->GetHealth()*5) < m_creature->GetMaxHealth())
+ if ((me->GetHealth()*5) < me->GetMaxHealth())
summonTraveler_Timer = 5000;
} else summonTraveler_Timer -=diff;
diff --git a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp
index 61c4c6dce64..ef35e9f01c5 100644
--- a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp
+++ b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp
@@ -60,21 +60,21 @@ struct boss_murmurAI : public ScriptedAI
SonicBoom = false;
//database should have `RegenHealth`=0 to prevent regen
- uint32 hp = (m_creature->GetMaxHealth()*40)/100;
- if (hp) m_creature->SetHealth(hp);
- m_creature->ResetPlayerDamageReq();
+ uint32 hp = (me->GetMaxHealth()*40)/100;
+ if (hp) me->SetHealth(hp);
+ me->ResetPlayerDamageReq();
}
void SonicBoomEffect()
{
- std::list<HostileReference *> t_list = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- Unit *pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
+ Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
{
//Not do anything without aura, spell can be resisted!
- if (pTarget->HasAura(SPELL_SONIC_BOOM_CAST) && m_creature->IsWithinDistInMap(pTarget, 34.0f))
+ if (pTarget->HasAura(SPELL_SONIC_BOOM_CAST) && me->IsWithinDistInMap(pTarget, 34.0f))
{
//This will be wrong calculation. Also, comments suggest it must deal damage
pTarget->SetHealth(uint32(pTarget->GetMaxHealth() - pTarget->GetMaxHealth() * 0.8));
@@ -89,19 +89,19 @@ struct boss_murmurAI : public ScriptedAI
void SpellHitTarget(Unit *pTarget, const SpellEntry *spell)
{
if (pTarget && pTarget->isAlive() && spell && spell->Id == SPELL_SONIC_BOOM_EFFECT)
- m_creature->DealDamage(pTarget,(pTarget->GetHealth()*90)/100,NULL,SPELL_DIRECT_DAMAGE,SPELL_SCHOOL_MASK_NATURE,spell);
+ me->DealDamage(pTarget,(pTarget->GetHealth()*90)/100,NULL,SPELL_DIRECT_DAMAGE,SPELL_SCHOOL_MASK_NATURE,spell);
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target or casting
- if (!UpdateVictim() || m_creature->IsNonMeleeSpellCasted(false))
+ if (!UpdateVictim() || me->IsNonMeleeSpellCasted(false))
return;
// Sonic Boom
if (SonicBoom)
{
- DoCast(m_creature, SPELL_SONIC_BOOM_EFFECT, true);
+ DoCast(me, SPELL_SONIC_BOOM_EFFECT, true);
SonicBoomEffect();
SonicBoom = false;
@@ -109,8 +109,8 @@ struct boss_murmurAI : public ScriptedAI
}
if (SonicBoom_Timer <= diff)
{
- DoScriptText(EMOTE_SONIC_BOOM, m_creature);
- DoCast(m_creature, SPELL_SONIC_BOOM_CAST);
+ DoScriptText(EMOTE_SONIC_BOOM, me);
+ DoCast(me, SPELL_SONIC_BOOM_CAST);
SonicBoom_Timer = 30000;
SonicBoom = true;
return;
@@ -125,11 +125,11 @@ struct boss_murmurAI : public ScriptedAI
} else MurmursTouch_Timer -= diff;
// Resonance
- if (!SonicBoom && !(m_creature->IsWithinMeleeRange(m_creature->getVictim())))
+ if (!SonicBoom && !(me->IsWithinMeleeRange(me->getVictim())))
{
if (Resonance_Timer <= diff)
{
- DoCast(m_creature, SPELL_RESONANCE);
+ DoCast(me, SPELL_RESONANCE);
Resonance_Timer = 5000;
} else Resonance_Timer -= diff;
}
@@ -152,10 +152,10 @@ struct boss_murmurAI : public ScriptedAI
// Thundering Storm
if (ThunderingStorm_Timer <= diff)
{
- std::list<HostileReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
for (std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
- if (Unit *pTarget = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
- if (pTarget->isAlive() && !m_creature->IsWithinDist(pTarget, 35, false))
+ if (Unit *pTarget = Unit::GetUnit((*me),(*i)->getUnitGuid()))
+ if (pTarget->isAlive() && !me->IsWithinDist(pTarget, 35, false))
DoCast(pTarget, SPELL_THUNDERING_STORM, true);
ThunderingStorm_Timer = 15000;
} else ThunderingStorm_Timer -= diff;
@@ -171,16 +171,16 @@ struct boss_murmurAI : public ScriptedAI
}
// Select nearest most aggro target if top aggro too far
- if (!m_creature->isAttackReady())
+ if (!me->isAttackReady())
return;
- if (!m_creature->IsWithinMeleeRange(m_creature->getVictim()))
+ if (!me->IsWithinMeleeRange(me->getVictim()))
{
- std::list<HostileReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
for (std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
- if (Unit *pTarget = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
- if (pTarget->isAlive() && m_creature->IsWithinMeleeRange(pTarget))
+ if (Unit *pTarget = Unit::GetUnit((*me),(*i)->getUnitGuid()))
+ if (pTarget->isAlive() && me->IsWithinMeleeRange(pTarget))
{
- m_creature->TauntApply(pTarget);
+ me->TauntApply(pTarget);
break;
}
}
diff --git a/src/scripts/outland/black_temple/boss_bloodboil.cpp b/src/scripts/outland/black_temple/boss_bloodboil.cpp
index da598ed0ea2..835f0b5dd29 100644
--- a/src/scripts/outland/black_temple/boss_bloodboil.cpp
+++ b/src/scripts/outland/black_temple/boss_bloodboil.cpp
@@ -101,21 +101,21 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
Phase1 = true;
- m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
}
void EnterCombat(Unit *who)
{
DoZoneInCombat();
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
if (pInstance)
pInstance->SetData(DATA_GURTOGGBLOODBOILEVENT, IN_PROGRESS);
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
void JustDied(Unit *victim)
@@ -123,14 +123,14 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_GURTOGGBLOODBOILEVENT, DONE);
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
// Note: This seems like a very complicated fix. The fix needs to be handled by the core, as implementation of limited-target AoE spells are still not limited.
void CastBloodboil()
{
// Get the Threat List
- std::list<HostileReference *> m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference *> m_threatlist = me->getThreatManager().getThreatList();
if (!m_threatlist.size()) // He doesn't have anyone in his threatlist, useless to continue
return;
@@ -139,14 +139,14 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
std::list<HostileReference *>::const_iterator itr = m_threatlist.begin();
for (; itr!= m_threatlist.end(); ++itr) //store the threat list in a different container
{
- Unit *pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
+ Unit *pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
//only on alive players
if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
targets.push_back(pTarget);
}
//Sort the list of players
- targets.sort(ObjectDistanceOrderReversed(m_creature));
+ targets.sort(ObjectDistanceOrderReversed(me));
//Resize so we only get top 5
targets.resize(5);
@@ -174,13 +174,13 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
void RevertThreatOnTarget(uint64 guid)
{
Unit* pUnit = NULL;
- pUnit = Unit::GetUnit((*m_creature), guid);
+ pUnit = Unit::GetUnit((*me), guid);
if (pUnit)
{
if (DoGetThreat(pUnit))
DoModifyThreatPercent(pUnit, -100);
if (TargetThreat)
- m_creature->AddThreat(pUnit, TargetThreat);
+ me->AddThreat(pUnit, TargetThreat);
}
}
@@ -191,22 +191,22 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
if (ArcingSmashTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCING_SMASH);
+ DoCast(me->getVictim(), SPELL_ARCING_SMASH);
ArcingSmashTimer = 10000;
} else ArcingSmashTimer -= diff;
if (FelAcidTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_FEL_ACID);
+ DoCast(me->getVictim(), SPELL_FEL_ACID);
FelAcidTimer = 25000;
} else FelAcidTimer -= diff;
- if (!m_creature->HasAura(SPELL_BERSERK))
+ if (!me->HasAura(SPELL_BERSERK))
{
if (EnrageTimer <= diff)
{
- DoCast(m_creature, SPELL_BERSERK);
- DoScriptText(RAND(SAY_ENRAGE1,SAY_ENRAGE2), m_creature);
+ DoCast(me, SPELL_BERSERK);
+ DoScriptText(RAND(SAY_ENRAGE1,SAY_ENRAGE2), me);
} else EnrageTimer -= diff;
}
@@ -214,23 +214,23 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
{
if (BewilderingStrikeTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_BEWILDERING_STRIKE);
- float mt_threat = DoGetThreat(m_creature->getVictim());
+ DoCast(me->getVictim(), SPELL_BEWILDERING_STRIKE);
+ float mt_threat = DoGetThreat(me->getVictim());
if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 1))
- m_creature->AddThreat(pTarget, mt_threat);
+ me->AddThreat(pTarget, mt_threat);
BewilderingStrikeTimer = 20000;
} else BewilderingStrikeTimer -= diff;
if (EjectTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_EJECT1);
- DoModifyThreatPercent(m_creature->getVictim(), -40);
+ DoCast(me->getVictim(), SPELL_EJECT1);
+ DoModifyThreatPercent(me->getVictim(), -40);
EjectTimer = 15000;
} else EjectTimer -= diff;
if (AcidicWoundTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ACIDIC_WOUND);
+ DoCast(me->getVictim(), SPELL_ACIDIC_WOUND);
AcidicWoundTimer = 10000;
} else AcidicWoundTimer -= diff;
@@ -239,7 +239,7 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
if (BloodboilCount < 5) // Only cast it five times.
{
//CastBloodboil(); // Causes issues on windows, so is commented out.
- DoCast(m_creature->getVictim(), SPELL_BLOODBOIL);
+ DoCast(me->getVictim(), SPELL_BLOODBOIL);
++BloodboilCount;
BloodboilTimer = 10000*BloodboilCount;
}
@@ -250,13 +250,13 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
{
if (AcidGeyserTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ACID_GEYSER);
+ DoCast(me->getVictim(), SPELL_ACID_GEYSER);
AcidGeyserTimer = 30000;
} else AcidGeyserTimer -= diff;
if (EjectTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_EJECT2);
+ DoCast(me->getVictim(), SPELL_EJECT2);
EjectTimer = 15000;
} else EjectTimer -= diff;
}
@@ -272,14 +272,14 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
TargetThreat = DoGetThreat(pTarget);
TargetGUID = pTarget->GetGUID();
- pTarget->CastSpell(m_creature, SPELL_TAUNT_GURTOGG, true);
+ pTarget->CastSpell(me, SPELL_TAUNT_GURTOGG, true);
if (DoGetThreat(pTarget))
DoModifyThreatPercent(pTarget, -100);
- m_creature->AddThreat(pTarget, 50000000.0f);
- m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
+ me->AddThreat(pTarget, 50000000.0f);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
// If VMaps are disabled, this spell can call the whole instance
- DoCast(m_creature, SPELL_INSIGNIFIGANCE, true);
+ DoCast(me, SPELL_INSIGNIFIGANCE, true);
DoCast(pTarget, SPELL_FEL_RAGE_TARGET, true);
DoCast(pTarget, SPELL_FEL_RAGE_2, true);
/* These spells do not work, comment them out for now.
@@ -287,9 +287,9 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
DoCast(pTarget, SPELL_FEL_RAGE_3, true);*/
//Cast this without triggered so that it appears in combat logs and shows visual.
- DoCast(m_creature, SPELL_FEL_RAGE_SELF);
+ DoCast(me, SPELL_FEL_RAGE_SELF);
- DoScriptText(RAND(SAY_SPECIAL1,SAY_SPECIAL2), m_creature);
+ DoScriptText(RAND(SAY_SPECIAL1,SAY_SPECIAL2), me);
AcidGeyserTimer = 1000;
PhaseChangeTimer = 30000;
@@ -307,8 +307,8 @@ struct boss_gurtogg_bloodboilAI : public ScriptedAI
FelAcidTimer += 2000;
EjectTimer += 2000;
PhaseChangeTimer = 60000;
- m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
}
} else PhaseChangeTimer -= diff;
diff --git a/src/scripts/outland/black_temple/boss_illidan.cpp b/src/scripts/outland/black_temple/boss_illidan.cpp
index 8ee901f41dc..4a61253496b 100644
--- a/src/scripts/outland/black_temple/boss_illidan.cpp
+++ b/src/scripts/outland/black_temple/boss_illidan.cpp
@@ -25,8 +25,8 @@ EndScriptData */
#include "black_temple.h"
#define GETGO(obj, guid) GameObject* obj = pInstance->instance->GetGameObject(guid)
-#define GETUNIT(unit, guid) Unit* unit = Unit::GetUnit(*m_creature, guid)
-#define GETCRE(cre, guid) Creature* cre = Unit::GetCreature(*m_creature, guid)
+#define GETUNIT(unit, guid) Unit* unit = Unit::GetUnit(*me, guid)
+#define GETCRE(cre, guid) Creature* cre = Unit::GetCreature(*me, guid)
#define HPPCT(unit) unit->GetHealth()*100 / unit->GetMaxHealth()
/************* Quotes and Sounds ***********************/
@@ -365,10 +365,10 @@ static Animation DemonTransformation[]=
/************************************** Illidan's AI ***************************************/
struct boss_illidan_stormrageAI : public ScriptedAI
{
- boss_illidan_stormrageAI(Creature* c) : ScriptedAI(c), Summons(m_creature)
+ boss_illidan_stormrageAI(Creature* c) : ScriptedAI(c), Summons(me)
{
pInstance = c->GetInstanceData();
- DoCast(m_creature, SPELL_DUAL_WIELD, true);
+ DoCast(me, SPELL_DUAL_WIELD, true);
SpellEntry *TempSpell = GET_SPELL(SPELL_SHADOWFIEND_PASSIVE);
if (TempSpell)
@@ -408,7 +408,7 @@ struct boss_illidan_stormrageAI : public ScriptedAI
if (!FlameGUID[0] && !FlameGUID[1] && Phase != PHASE_ILLIDAN_NULL)
{
- m_creature->InterruptNonMeleeSpells(true);
+ me->InterruptNonMeleeSpells(true);
EnterPhase(PHASE_FLIGHT_SEQUENCE);
}
}
@@ -419,10 +419,10 @@ struct boss_illidan_stormrageAI : public ScriptedAI
{
if (FlightCount == 7) //change hover point
{
- if (m_creature->getVictim())
+ if (me->getVictim())
{
- m_creature->SetInFront(m_creature->getVictim());
- m_creature->StopMoving();
+ me->SetInFront(me->getVictim());
+ me->StopMoving();
}
EnterPhase(PHASE_FLIGHT);
}
@@ -432,7 +432,7 @@ struct boss_illidan_stormrageAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- m_creature->setActive(true);
+ me->setActive(true);
DoZoneInCombat();
}
@@ -451,7 +451,7 @@ struct boss_illidan_stormrageAI : public ScriptedAI
void JustDied(Unit *killer)
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
if (!pInstance)
return;
@@ -464,44 +464,44 @@ struct boss_illidan_stormrageAI : public ScriptedAI
void KilledUnit(Unit *victim)
{
- if (victim == m_creature) return;
+ if (victim == me) return;
// TODO: Find better way to handle emote
switch (urand(0,1))
{
case 0:
- m_creature->MonsterYell(SAY_KILL1, LANG_UNIVERSAL, victim->GetGUID());
- DoPlaySoundToSet(m_creature, SOUND_KILL1);
+ me->MonsterYell(SAY_KILL1, LANG_UNIVERSAL, victim->GetGUID());
+ DoPlaySoundToSet(me, SOUND_KILL1);
break;
case 1:
- m_creature->MonsterYell(SAY_KILL2, LANG_UNIVERSAL, victim->GetGUID());
- DoPlaySoundToSet(m_creature, SOUND_KILL2);
+ me->MonsterYell(SAY_KILL2, LANG_UNIVERSAL, victim->GetGUID());
+ DoPlaySoundToSet(me, SOUND_KILL2);
break;
}
}
void DamageTaken(Unit *done_by, uint32 &damage)
{
- if (damage >= m_creature->GetHealth() && done_by != m_creature)
+ if (damage >= me->GetHealth() && done_by != me)
damage = 0;
if (done_by->GetGUID() == MaievGUID)
- done_by->AddThreat(m_creature, -(3*(float)damage)/4); // do not let maiev tank him
+ done_by->AddThreat(me, -(3*(float)damage)/4); // do not let maiev tank him
}
void SpellHit(Unit *caster, const SpellEntry *spell)
{
if (spell->Id == SPELL_GLAIVE_RETURNS) // Re-equip our warblades!
{
- if (!m_creature->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID))
+ if (!me->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID))
SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
else
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE);
- m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
+ me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
}
}
void DeleteFromThreatList(uint64 TargetGUID)
{
- for (std::list<HostileReference*>::const_iterator itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr)
+ for (std::list<HostileReference*>::const_iterator itr = me->getThreatManager().getThreatList().begin(); itr != me->getThreatManager().getThreatList().end(); ++itr)
{
if ((*itr)->getUnitGuid() == TargetGUID)
{
@@ -517,11 +517,11 @@ struct boss_illidan_stormrageAI : public ScriptedAI
Creature* pCreature = NULL;
if (Conversation[count].pCreature == ILLIDAN_STORMRAGE)
- pCreature = m_creature;
+ pCreature = me;
else if (Conversation[count].pCreature == AKAMA)
- pCreature = (Unit::GetCreature((*m_creature), AkamaGUID));
+ pCreature = (Unit::GetCreature((*me), AkamaGUID));
else if (Conversation[count].pCreature == MAIEV_SHADOWSONG)
- pCreature = (Unit::GetCreature((*m_creature), MaievGUID));
+ pCreature = (Unit::GetCreature((*me), MaievGUID));
if (pCreature)
{
@@ -544,27 +544,27 @@ struct boss_illidan_stormrageAI : public ScriptedAI
switch(FlightCount)
{
case 1://lift off
- m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
- m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
- m_creature->StopMoving();
- m_creature->MonsterYell(SAY_TAKEOFF, LANG_UNIVERSAL, 0);
- DoPlaySoundToSet(m_creature, SOUND_TAKEOFF);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
+ me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
+ me->StopMoving();
+ me->MonsterYell(SAY_TAKEOFF, LANG_UNIVERSAL, 0);
+ DoPlaySoundToSet(me, SOUND_TAKEOFF);
Timer[EVENT_FLIGHT_SEQUENCE] = 3000;
break;
case 2://move to center
- m_creature->GetMotionMaster()->MovePoint(0, CENTER_X + 5, CENTER_Y, CENTER_Z); //+5, for SPELL_THROW_GLAIVE bug
+ me->GetMotionMaster()->MovePoint(0, CENTER_X + 5, CENTER_Y, CENTER_Z); //+5, for SPELL_THROW_GLAIVE bug
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break;
case 3://throw one glaive
{
uint8 i=1;
- Creature* Glaive = m_creature->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Glaive)
{
GlaiveGUID[i] = Glaive->GetGUID();
Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Glaive->SetDisplayId(11686);
- Glaive->setFaction(m_creature->getFaction());
+ Glaive->setFaction(me->getFaction());
DoCast(Glaive, SPELL_THROW_GLAIVE2);
}
}
@@ -574,13 +574,13 @@ struct boss_illidan_stormrageAI : public ScriptedAI
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
{
uint8 i=0;
- Creature* Glaive = m_creature->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Glaive)
{
GlaiveGUID[i] = Glaive->GetGUID();
Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Glaive->SetDisplayId(11686);
- Glaive->setFaction(m_creature->getFaction());
+ Glaive->setFaction(me->getFaction());
DoCast(Glaive, SPELL_THROW_GLAIVE, true);
}
}
@@ -591,11 +591,11 @@ struct boss_illidan_stormrageAI : public ScriptedAI
Timer[EVENT_FLIGHT_SEQUENCE] = 3000;
break;
case 6://fly to hover point
- m_creature->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z);
+ me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z);
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break;
case 7://return to center
- m_creature->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z);
+ me->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z);
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break;
case 8://glaive return
@@ -603,10 +603,10 @@ struct boss_illidan_stormrageAI : public ScriptedAI
{
if (GlaiveGUID[i])
{
- Unit* Glaive = Unit::GetUnit((*m_creature), GlaiveGUID[i]);
+ Unit* Glaive = Unit::GetUnit((*me), GlaiveGUID[i]);
if (Glaive)
{
- Glaive->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, false); // Make it look like the Glaive flies back up to us
+ Glaive->CastSpell(me, SPELL_GLAIVE_RETURNS, false); // Make it look like the Glaive flies back up to us
Glaive->SetDisplayId(11686); // disappear but not die for now
}
}
@@ -614,9 +614,9 @@ struct boss_illidan_stormrageAI : public ScriptedAI
Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
break;
case 9://land
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- m_creature->StopMoving();
- m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->StopMoving();
+ me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
for (uint8 i = 0; i < 2; ++i)
{
if (GlaiveGUID[i])
@@ -633,8 +633,8 @@ struct boss_illidan_stormrageAI : public ScriptedAI
break;
case 10://attack
DoResetThreat();
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
+ me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
EnterPhase(PHASE_NORMAL_2);
break;
default:
@@ -646,19 +646,19 @@ struct boss_illidan_stormrageAI : public ScriptedAI
void HandleTransformSequence()
{
if (DemonTransformation[TransformCount].unaura)
- m_creature->RemoveAurasDueToSpell(DemonTransformation[TransformCount].unaura);
+ me->RemoveAurasDueToSpell(DemonTransformation[TransformCount].unaura);
if (DemonTransformation[TransformCount].aura)
- DoCast(m_creature, DemonTransformation[TransformCount].aura, true);
+ DoCast(me, DemonTransformation[TransformCount].aura, true);
if (DemonTransformation[TransformCount].displayid)
- m_creature->SetDisplayId(DemonTransformation[TransformCount].displayid); // It's morphin time!
+ me->SetDisplayId(DemonTransformation[TransformCount].displayid); // It's morphin time!
if (DemonTransformation[TransformCount].equip)
{
// Requip warglaives if needed
SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE);
- m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
+ me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
}
else
{
@@ -711,17 +711,17 @@ struct boss_illidan_stormrageAI : public ScriptedAI
switch(Phase)
{
case PHASE_NORMAL:
- if (HPPCT(m_creature) < 65)
+ if (HPPCT(me) < 65)
EnterPhase(PHASE_FLIGHT_SEQUENCE);
break;
case PHASE_NORMAL_2:
- if (HPPCT(m_creature) < 30)
+ if (HPPCT(me) < 30)
EnterPhase(PHASE_TALK_SEQUENCE);
break;
case PHASE_NORMAL_MAIEV:
- if (HPPCT(m_creature) < 1)
+ if (HPPCT(me) < 1)
EnterPhase(PHASE_TALK_SEQUENCE);
break;
@@ -741,18 +741,18 @@ struct boss_illidan_stormrageAI : public ScriptedAI
break;
}
- if (m_creature->IsNonMeleeSpellCasted(false))
+ if (me->IsNonMeleeSpellCasted(false))
return;
- if (Phase == PHASE_NORMAL || Phase == PHASE_NORMAL_2 || Phase == PHASE_NORMAL_MAIEV && !m_creature->HasAura(SPELL_CAGED))
+ if (Phase == PHASE_NORMAL || Phase == PHASE_NORMAL_2 || Phase == PHASE_NORMAL_MAIEV && !me->HasAura(SPELL_CAGED))
{
switch(Event)
{
//PHASE_NORMAL
case EVENT_BERSERK:
- m_creature->MonsterYell(SAY_ENRAGE, LANG_UNIVERSAL, 0);
- DoPlaySoundToSet(m_creature, SOUND_ENRAGE);
- DoCast(m_creature, SPELL_BERSERK, true);
+ me->MonsterYell(SAY_ENRAGE, LANG_UNIVERSAL, 0);
+ DoPlaySoundToSet(me, SOUND_ENRAGE);
+ DoCast(me, SPELL_BERSERK, true);
Timer[EVENT_BERSERK] = 5000;//The buff actually lasts forever.
break;
@@ -762,21 +762,21 @@ struct boss_illidan_stormrageAI : public ScriptedAI
char* yell = RandomTaunts[random].text;
uint32 soundid = RandomTaunts[random].sound;
if (yell)
- m_creature->MonsterYell(yell, LANG_UNIVERSAL, 0);
+ me->MonsterYell(yell, LANG_UNIVERSAL, 0);
if (soundid)
- DoPlaySoundToSet(m_creature, soundid);
+ DoPlaySoundToSet(me, soundid);
}
Timer[EVENT_TAUNT] = 25000 + rand()%10000;
break;
case EVENT_SHEAR:
// no longer exists in 3.0.2
- //DoCast(m_creature->getVictim(), SPELL_SHEAR);
+ //DoCast(me->getVictim(), SPELL_SHEAR);
Timer[EVENT_SHEAR] = 25000 + (rand()%16 * 1000);
break;
case EVENT_FLAME_CRASH:
- DoCast(m_creature->getVictim(), SPELL_FLAME_CRASH);
+ DoCast(me->getVictim(), SPELL_FLAME_CRASH);
Timer[EVENT_FLAME_CRASH] = 30000 + rand()%10000;
break;
@@ -793,7 +793,7 @@ struct boss_illidan_stormrageAI : public ScriptedAI
break;
case EVENT_DRAW_SOUL:
- DoCast(m_creature->getVictim(), SPELL_DRAW_SOUL);
+ DoCast(me->getVictim(), SPELL_DRAW_SOUL);
Timer[EVENT_DRAW_SOUL] = 50000 + rand()%10000;
break;
@@ -809,7 +809,7 @@ struct boss_illidan_stormrageAI : public ScriptedAI
//PHASE_NORMAL_MAIEV
case EVENT_ENRAGE:
- DoCast(m_creature, SPELL_ENRAGE);
+ DoCast(me, SPELL_ENRAGE);
Timer[EVENT_ENRAGE] = 0;
break;
@@ -844,7 +844,7 @@ struct boss_illidan_stormrageAI : public ScriptedAI
HoverPoint += (rand()%3 + 1);
if (HoverPoint > 3)
HoverPoint -= 4;
- m_creature->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z);
+ me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z);
break;
default:
@@ -857,21 +857,21 @@ struct boss_illidan_stormrageAI : public ScriptedAI
switch(Event)
{
case EVENT_SHADOW_BLAST:
- m_creature->GetMotionMaster()->Clear(false);
- if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 50)||!m_creature->IsWithinLOSInMap(m_creature->getVictim()))
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), 30);
+ me->GetMotionMaster()->Clear(false);
+ if (!me->IsWithinDistInMap(me->getVictim(), 50)||!me->IsWithinLOSInMap(me->getVictim()))
+ me->GetMotionMaster()->MoveChase(me->getVictim(), 30);
else
- m_creature->GetMotionMaster()->MoveIdle();
- DoCast(m_creature->getVictim(), SPELL_SHADOW_BLAST);
+ me->GetMotionMaster()->MoveIdle();
+ DoCast(me->getVictim(), SPELL_SHADOW_BLAST);
Timer[EVENT_SHADOW_BLAST] = 4000;
break;
case EVENT_SHADOWDEMON:
- DoCast(m_creature, SPELL_SUMMON_SHADOWDEMON);
+ DoCast(me, SPELL_SUMMON_SHADOWDEMON);
Timer[EVENT_SHADOWDEMON] = 0;
Timer[EVENT_FLAME_BURST] += 10000;
break;
case EVENT_FLAME_BURST:
- DoCast(m_creature, SPELL_FLAME_BURST);
+ DoCast(me, SPELL_FLAME_BURST);
Timer[EVENT_FLAME_BURST] = 15000;
break;
case EVENT_TRANSFORM_DEMON:
@@ -906,12 +906,12 @@ struct flame_of_azzinothAI : public ScriptedAI
void ChargeCheck()
{
Unit *pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0, 200, false);
- if (pTarget && (!m_creature->IsWithinCombatRange(pTarget, FLAME_CHARGE_DISTANCE)))
+ if (pTarget && (!me->IsWithinCombatRange(pTarget, FLAME_CHARGE_DISTANCE)))
{
- m_creature->AddThreat(pTarget, 5000000.0f);
+ me->AddThreat(pTarget, 5000000.0f);
AttackStart(pTarget);
DoCast(pTarget, SPELL_CHARGE);
- m_creature->MonsterTextEmote(EMOTE_SETS_GAZE_ON, pTarget->GetGUID());
+ me->MonsterTextEmote(EMOTE_SETS_GAZE_ON, pTarget->GetGUID());
}
}
@@ -919,22 +919,22 @@ struct flame_of_azzinothAI : public ScriptedAI
{
if (GETUNIT(Glaive, GlaiveGUID))
{
- if (!m_creature->IsWithinDistInMap(Glaive, FLAME_ENRAGE_DISTANCE))
+ if (!me->IsWithinDistInMap(Glaive, FLAME_ENRAGE_DISTANCE))
{
Glaive->InterruptNonMeleeSpells(true);
- DoCast(m_creature, SPELL_FLAME_ENRAGE, true);
+ DoCast(me, SPELL_FLAME_ENRAGE, true);
DoResetThreat();
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget && pTarget->isAlive())
{
- m_creature->AddThreat(m_creature->getVictim(), 5000000.0f);
- AttackStart(m_creature->getVictim());
+ me->AddThreat(me->getVictim(), 5000000.0f);
+ AttackStart(me->getVictim());
}
}
- else if (!m_creature->HasAura(SPELL_AZZINOTH_CHANNEL))
+ else if (!me->HasAura(SPELL_AZZINOTH_CHANNEL))
{
- Glaive->CastSpell(m_creature, SPELL_AZZINOTH_CHANNEL, false);
- m_creature->RemoveAurasDueToSpell(SPELL_FLAME_ENRAGE);
+ Glaive->CastSpell(me, SPELL_AZZINOTH_CHANNEL, false);
+ me->RemoveAurasDueToSpell(SPELL_FLAME_ENRAGE);
}
}
}
@@ -948,8 +948,8 @@ struct flame_of_azzinothAI : public ScriptedAI
if (FlameBlastTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_BLAZE_SUMMON, true); //appear at victim
- DoCast(m_creature->getVictim(), SPELL_FLAME_BLAST);
+ DoCast(me->getVictim(), SPELL_BLAZE_SUMMON, true); //appear at victim
+ DoCast(me->getVictim(), SPELL_FLAME_BLAST);
FlameBlastTimer = 15000; //10000 is official-like?
DoZoneInCombat(); //in case someone is revived
} else FlameBlastTimer -= diff;
@@ -1039,18 +1039,18 @@ struct npc_akama_illidanAI : public ScriptedAI
KillAllElites();
- m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has strange values..
- m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- m_creature->setActive(false);
- m_creature->SetVisibility(VISIBILITY_OFF);
+ me->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has strange values..
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->setActive(false);
+ me->SetVisibility(VISIBILITY_OFF);
}
// Do not call reset in Akama's evade mode, as this will stop him from summoning minions after he kills the first bit
void EnterEvadeMode()
{
- m_creature->RemoveAllAuras();
- m_creature->DeleteThreatList();
- m_creature->CombatStop(true);
+ me->RemoveAllAuras();
+ me->DeleteThreatList();
+ me->CombatStop(true);
}
void EnterCombat(Unit *who) {}
@@ -1064,17 +1064,17 @@ struct npc_akama_illidanAI : public ScriptedAI
void DamageTaken(Unit *done_by, uint32 &damage)
{
- if (damage > m_creature->GetHealth() || done_by->GetGUID() != IllidanGUID)
+ if (damage > me->GetHealth() || done_by->GetGUID() != IllidanGUID)
damage = 0;
}
void KillAllElites()
{
- std::list<HostileReference*>& threatList = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& threatList = me->getThreatManager().getThreatList();
std::vector<Unit*> eliteList;
for (std::list<HostileReference*>::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
+ Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid());
if (pUnit && pUnit->GetEntry() == ILLIDARI_ELITE)
eliteList.push_back(pUnit);
}
@@ -1094,19 +1094,19 @@ struct npc_akama_illidanAI : public ScriptedAI
if (GETCRE(Illidan, IllidanGUID))
{
Illidan->RemoveAurasDueToSpell(SPELL_KNEEL);
- m_creature->SetInFront(Illidan);
- Illidan->SetInFront(m_creature);
- m_creature->GetMotionMaster()->MoveIdle();
+ me->SetInFront(Illidan);
+ Illidan->SetInFront(me);
+ me->GetMotionMaster()->MoveIdle();
Illidan->GetMotionMaster()->MoveIdle();
- CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->AkamaGUID = m_creature->GetGUID();
+ CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->AkamaGUID = me->GetGUID();
CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->EnterPhase(PHASE_TALK_SEQUENCE);
}
}
void BeginChannel()
{
- m_creature->setActive(true);
- m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->setActive(true);
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
if (!JustCreated)
return;
float x, y, z;
@@ -1115,7 +1115,7 @@ struct npc_akama_illidanAI : public ScriptedAI
else
return;//if door not spawned, don't crash server
- if (Creature* Channel = m_creature->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
+ if (Creature* Channel = me->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
{
ChannelGUID = Channel->GetGUID();
Channel->SetDisplayId(11686); // Invisible but spell visuals can still be seen.
@@ -1123,7 +1123,7 @@ struct npc_akama_illidanAI : public ScriptedAI
}
for (uint8 i = 0; i < 2; ++i)
- if (Creature* Spirit = m_creature->SummonCreature(i ? SPIRIT_OF_OLUM : SPIRIT_OF_UDALO, SpiritSpawns[i].x, SpiritSpawns[i].y, SpiritSpawns[i].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
+ if (Creature* Spirit = me->SummonCreature(i ? SPIRIT_OF_OLUM : SPIRIT_OF_UDALO, SpiritSpawns[i].x, SpiritSpawns[i].y, SpiritSpawns[i].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
{
Spirit->SetVisibility(VISIBILITY_OFF);
SpiritGUID[i] = Spirit->GetGUID();
@@ -1132,9 +1132,9 @@ struct npc_akama_illidanAI : public ScriptedAI
void BeginWalk()
{
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- m_creature->SetSpeed(MOVE_RUN, 1.0f);
- m_creature->GetMotionMaster()->MovePoint(0, AkamaWP[WalkCount].x, AkamaWP[WalkCount].y, AkamaWP[WalkCount].z);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ me->SetSpeed(MOVE_RUN, 1.0f);
+ me->GetMotionMaster()->MovePoint(0, AkamaWP[WalkCount].x, AkamaWP[WalkCount].y, AkamaWP[WalkCount].z);
}
void EnterPhase(PhaseAkama NextPhase)
@@ -1154,9 +1154,9 @@ struct npc_akama_illidanAI : public ScriptedAI
else if (Phase == PHASE_TALK)
{
if (GETCRE(Illidan, IllidanGUID))
- CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(m_creature->GetGUID());
+ CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(me->GetGUID());
EnterEvadeMode();
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
++WalkCount;
}
JustCreated = false;
@@ -1178,17 +1178,17 @@ struct npc_akama_illidanAI : public ScriptedAI
case PHASE_FIGHT_ILLIDAN:
if (GETUNIT(Illidan, IllidanGUID))
{
- m_creature->AddThreat(Illidan, 10000000.0f);
- m_creature->GetMotionMaster()->MoveChase(Illidan);
+ me->AddThreat(Illidan, 10000000.0f);
+ me->GetMotionMaster()->MoveChase(Illidan);
}
Timer = 30000; //chain lightning
break;
case PHASE_FIGHT_MINIONS:
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Timer = 10000 + rand()%6000;//summon minion
break;
case PHASE_RETURN:
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
KillAllElites();
WalkCount = 0;
BeginWalk();
@@ -1215,8 +1215,8 @@ struct npc_akama_illidanAI : public ScriptedAI
Timer = 8000;
break;
case 1:
- m_creature->MonsterYell(SAY_AKAMA_LEAVE, LANG_UNIVERSAL, 0);
- DoPlaySoundToSet(m_creature, SOUND_AKAMA_LEAVE);
+ me->MonsterYell(SAY_AKAMA_LEAVE, LANG_UNIVERSAL, 0);
+ DoPlaySoundToSet(me, SOUND_AKAMA_LEAVE);
Timer = 3000;
break;
case 2:
@@ -1231,9 +1231,9 @@ struct npc_akama_illidanAI : public ScriptedAI
Unit* Channel, *Spirit[2];
if (ChannelCount <= 5)
{
- Channel = Unit::GetUnit((*m_creature), ChannelGUID);
- Spirit[0] = Unit::GetUnit((*m_creature), SpiritGUID[0]);
- Spirit[1] = Unit::GetUnit((*m_creature), SpiritGUID[1]);
+ Channel = Unit::GetUnit((*me), ChannelGUID);
+ Spirit[0] = Unit::GetUnit((*me), SpiritGUID[0]);
+ Spirit[1] = Unit::GetUnit((*me), SpiritGUID[1]);
if (!Channel || !Spirit[0] || !Spirit[1])
return;
}
@@ -1241,7 +1241,7 @@ struct npc_akama_illidanAI : public ScriptedAI
switch(ChannelCount)
{
case 0: // channel failed
- m_creature->InterruptNonMeleeSpells(true);
+ me->InterruptNonMeleeSpells(true);
Timer = 2000;
break;
case 1: // spirit appear
@@ -1256,7 +1256,7 @@ struct npc_akama_illidanAI : public ScriptedAI
Timer = 5000;
break;
case 3: //open the gate
- m_creature->InterruptNonMeleeSpells(true);
+ me->InterruptNonMeleeSpells(true);
Spirit[0]->InterruptNonMeleeSpells(true);
Spirit[1]->InterruptNonMeleeSpells(true);
if (pInstance)
@@ -1264,12 +1264,12 @@ struct npc_akama_illidanAI : public ScriptedAI
Timer = 2000;
break;
case 4:
- m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
Timer = 2000;
break;
case 5:
- m_creature->MonsterYell(SAY_AKAMA_BEWARE, LANG_UNIVERSAL, 0);
- DoPlaySoundToSet(m_creature, SOUND_AKAMA_BEWARE);
+ me->MonsterYell(SAY_AKAMA_BEWARE, LANG_UNIVERSAL, 0);
+ DoPlaySoundToSet(me, SOUND_AKAMA_BEWARE);
Channel->setDeathState(JUST_DIED);
Spirit[0]->SetVisibility(VISIBILITY_OFF);
Spirit[1]->SetVisibility(VISIBILITY_OFF);
@@ -1308,18 +1308,18 @@ struct npc_akama_illidanAI : public ScriptedAI
{
Timer = 0;
++WalkCount;
- m_creature->GetMotionMaster()->MovePoint(WalkCount, AkamaWP[WalkCount].x, AkamaWP[WalkCount].y, AkamaWP[WalkCount].z);
+ me->GetMotionMaster()->MovePoint(WalkCount, AkamaWP[WalkCount].x, AkamaWP[WalkCount].y, AkamaWP[WalkCount].z);
}
}
void UpdateAI(const uint32 diff)
{
- if (m_creature->GetVisibility() == VISIBILITY_OFF)
+ if (me->GetVisibility() == VISIBILITY_OFF)
{
if (Check_Timer <= diff)
{
if (pInstance && pInstance->GetData(DATA_ILLIDARICOUNCILEVENT) == DONE)
- m_creature->SetVisibility(VISIBILITY_ON);
+ me->SetVisibility(VISIBILITY_ON);
Check_Timer = 5000;
} else Check_Timer -= diff;
@@ -1357,7 +1357,7 @@ struct npc_akama_illidanAI : public ScriptedAI
EnterPhase(PHASE_TALK);
else
{
- DoCast(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING);
+ DoCast(me->getVictim(), SPELL_CHAIN_LIGHTNING);
Timer = 30000;
}
}
@@ -1365,15 +1365,15 @@ struct npc_akama_illidanAI : public ScriptedAI
case PHASE_FIGHT_MINIONS:
{
float x, y, z;
- m_creature->GetPosition(x, y, z);
- Creature* Elite = m_creature->SummonCreature(ILLIDARI_ELITE, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
- //Creature* Elite = m_creature->SummonCreature(ILLIDARI_ELITE, x, y, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
+ me->GetPosition(x, y, z);
+ Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
+ //Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x, y, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
if (Elite)
{
- Elite->AI()->AttackStart(m_creature);
- Elite->AddThreat(m_creature, 1000000.0f);
+ Elite->AI()->AttackStart(me);
+ Elite->AddThreat(me, 1000000.0f);
AttackStart(Elite);
- m_creature->AddThreat(Elite, 1000000.0f);
+ me->AddThreat(Elite, 1000000.0f);
}
Timer = 10000 + rand()%6000;
GETUNIT(Illidan, IllidanGUID);
@@ -1389,8 +1389,8 @@ struct npc_akama_illidanAI : public ScriptedAI
if (!UpdateVictim())
return;
- if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 20)
- DoCast(m_creature, SPELL_HEALING_POTION);
+ if (me->GetHealth()*100 / me->GetMaxHealth() < 20)
+ DoCast(me, SPELL_HEALING_POTION);
DoMeleeAttackIfReady();
}
@@ -1416,7 +1416,7 @@ struct boss_maievAI : public ScriptedAI
Timer[EVENT_MAIEV_TAUNT] = 22000 + rand()%21 * 1000;
Timer[EVENT_MAIEV_SHADOW_STRIKE] = 30000;
SetEquipmentSlots(false, 44850, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, 45738);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, 45738);
}
void EnterCombat(Unit *who) {}
@@ -1431,9 +1431,9 @@ struct boss_maievAI : public ScriptedAI
else
{
GETUNIT(Illidan, IllidanGUID);
- if (Illidan && Illidan->getVictim() == m_creature)
- damage = m_creature->GetMaxHealth()/10;
- if (damage >= m_creature->GetHealth())
+ if (Illidan && Illidan->getVictim() == me)
+ damage = me->GetMaxHealth()/10;
+ if (damage >= me->GetHealth())
damage = 0;
}
}
@@ -1448,7 +1448,7 @@ struct boss_maievAI : public ScriptedAI
else if (Phase == PHASE_DEMON || Phase == PHASE_TRANSFORM_SEQUENCE)
{
GETUNIT(Illidan, IllidanGUID);
- if (Illidan && m_creature->IsWithinDistInMap(Illidan, 25))
+ if (Illidan && me->IsWithinDistInMap(Illidan, 25))
BlinkToPlayer();//Do not let dread aura hurt her.
AttackStartNoMove(who);
}
@@ -1469,14 +1469,14 @@ struct boss_maievAI : public ScriptedAI
case PHASE_TALK_SEQUENCE:
if (Timer[EVENT_MAIEV_STEALTH])
{
- m_creature->SetHealth(m_creature->GetMaxHealth());
- m_creature->SetVisibility(VISIBILITY_ON);
+ me->SetHealth(me->GetMaxHealth());
+ me->SetVisibility(VISIBILITY_ON);
Timer[EVENT_MAIEV_STEALTH] = 0;
}
- m_creature->InterruptNonMeleeSpells(false);
- m_creature->GetMotionMaster()->Clear(false);
- m_creature->AttackStop();
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID);
+ me->InterruptNonMeleeSpells(false);
+ me->GetMotionMaster()->Clear(false);
+ me->AttackStop();
+ me->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID);
MaxTimer = 0;
break;
case PHASE_TRANSFORM_SEQUENCE:
@@ -1501,11 +1501,11 @@ struct boss_maievAI : public ScriptedAI
void BlinkTo(float x, float y, float z)
{
- m_creature->AttackStop();
- m_creature->InterruptNonMeleeSpells(false);
- m_creature->GetMotionMaster()->Clear(false);
+ me->AttackStop();
+ me->InterruptNonMeleeSpells(false);
+ me->GetMotionMaster()->Clear(false);
DoTeleportTo(x, y, z);
- DoCast(m_creature, SPELL_TELEPORT_VISUAL, true);
+ DoCast(me, SPELL_TELEPORT_VISUAL, true);
}
void BlinkToPlayer()
@@ -1514,7 +1514,7 @@ struct boss_maievAI : public ScriptedAI
{
Unit *pTarget = CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->SelectUnit(SELECT_TARGET_RANDOM, 0);
- if (!pTarget || !m_creature->IsWithinDistInMap(pTarget, 80) || Illidan->IsWithinDistInMap(pTarget, 20))
+ if (!pTarget || !me->IsWithinDistInMap(pTarget, 80) || Illidan->IsWithinDistInMap(pTarget, 20))
{
uint8 pos = rand()%4;
BlinkTo(HoverPosition[pos].x, HoverPosition[pos].y, HoverPosition[pos].z);
@@ -1547,9 +1547,9 @@ struct boss_maievAI : public ScriptedAI
{
case EVENT_MAIEV_STEALTH:
{
- m_creature->SetHealth(m_creature->GetMaxHealth());
- m_creature->SetVisibility(VISIBILITY_ON);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetHealth(me->GetMaxHealth());
+ me->SetVisibility(VISIBILITY_ON);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Timer[EVENT_MAIEV_STEALTH] = 0;
BlinkToPlayer();
EnterPhase(Phase);
@@ -1560,27 +1560,27 @@ struct boss_maievAI : public ScriptedAI
uint32 random = rand()%4;
char* text = MaievTaunts[random].text;
uint32 sound = MaievTaunts[random].sound;
- m_creature->MonsterYell(text, LANG_UNIVERSAL, 0);
- DoPlaySoundToSet(m_creature, sound);
+ me->MonsterYell(text, LANG_UNIVERSAL, 0);
+ DoPlaySoundToSet(me, sound);
Timer[EVENT_MAIEV_TAUNT] = 22000 + rand()%21 * 1000;
}
break;
case EVENT_MAIEV_SHADOW_STRIKE:
- DoCast(m_creature->getVictim(), SPELL_SHADOW_STRIKE);
+ DoCast(me->getVictim(), SPELL_SHADOW_STRIKE);
Timer[EVENT_MAIEV_SHADOW_STRIKE] = 60000;
break;
case EVENT_MAIEV_TRAP:
if (Phase == PHASE_NORMAL_MAIEV)
{
BlinkToPlayer();
- DoCast(m_creature, SPELL_CAGE_TRAP_SUMMON);
+ DoCast(me, SPELL_CAGE_TRAP_SUMMON);
Timer[EVENT_MAIEV_TRAP] = 22000;
}
else
{
- if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 40))
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), 30);
- DoCast(m_creature->getVictim(), SPELL_THROW_DAGGER);
+ if (!me->IsWithinDistInMap(me->getVictim(), 40))
+ me->GetMotionMaster()->MoveChase(me->getVictim(), 30);
+ DoCast(me->getVictim(), SPELL_THROW_DAGGER);
Timer[EVENT_MAIEV_THROW_DAGGER] = 2000;
}
break;
@@ -1588,13 +1588,13 @@ struct boss_maievAI : public ScriptedAI
break;
}
- if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50)
+ if (me->GetHealth()*100 / me->GetMaxHealth() < 50)
{
- m_creature->SetVisibility(VISIBILITY_OFF);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetVisibility(VISIBILITY_OFF);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (GETCRE(Illidan, IllidanGUID))
- CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(m_creature->GetGUID());
- m_creature->AttackStop();
+ CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(me->GetGUID());
+ me->AttackStop();
Timer[EVENT_MAIEV_STEALTH] = 60000; //reappear after 1 minute
MaxTimer = 1;
}
@@ -1641,7 +1641,7 @@ struct cage_trap_triggerAI : public ScriptedAI
DespawnTimer = 0;
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void EnterCombat(Unit *who){}
@@ -1655,7 +1655,7 @@ struct cage_trap_triggerAI : public ScriptedAI
{
if (who->GetEntry() == ILLIDAN_STORMRAGE) // Check if who is Illidan
{
- if (!IllidanGUID && m_creature->IsWithinDistInMap(who, 3) && (!who->HasAura(SPELL_CAGED)))
+ if (!IllidanGUID && me->IsWithinDistInMap(who, 3) && (!who->HasAura(SPELL_CAGED)))
{
IllidanGUID = who->GetGUID();
who->CastSpell(who, SPELL_CAGED, true);
@@ -1673,12 +1673,12 @@ struct cage_trap_triggerAI : public ScriptedAI
{
if (DespawnTimer)
if (DespawnTimer <= diff)
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
else DespawnTimer -= diff;
//if (IllidanGUID && !SummonedBeams)
//{
- // if (Unit* Illidan = Unit::GetUnit(*m_creature, IllidanGUID)
+ // if (Unit* Illidan = Unit::GetUnit(*me, IllidanGUID)
// {
// //TODO: Find proper spells and properly apply 'caged' Illidan effect
// }
@@ -1709,12 +1709,12 @@ struct shadow_demonAI : public ScriptedAI
void Reset()
{
TargetGUID = 0;
- DoCast(m_creature, SPELL_SHADOW_DEMON_PASSIVE, true);
+ DoCast(me, SPELL_SHADOW_DEMON_PASSIVE, true);
}
void JustDied(Unit *killer)
{
- if (Unit *pTarget = Unit::GetUnit((*m_creature), TargetGUID))
+ if (Unit *pTarget = Unit::GetUnit((*me), TargetGUID))
pTarget->RemoveAurasDueToSpell(SPELL_PARALYZE);
}
@@ -1722,18 +1722,18 @@ struct shadow_demonAI : public ScriptedAI
{
if (!UpdateVictim()) return;
- if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) return; // Only cast the below on players.
+ if (me->getVictim()->GetTypeId() != TYPEID_PLAYER) return; // Only cast the below on players.
- if (!m_creature->getVictim()->HasAura(SPELL_PARALYZE))
+ if (!me->getVictim()->HasAura(SPELL_PARALYZE))
{
- TargetGUID = m_creature->getVictim()->GetGUID();
- m_creature->AddThreat(m_creature->getVictim(), 10000000.0f);
- DoCast(m_creature->getVictim(), SPELL_PURPLE_BEAM, true);
- DoCast(m_creature->getVictim(), SPELL_PARALYZE, true);
+ TargetGUID = me->getVictim()->GetGUID();
+ me->AddThreat(me->getVictim(), 10000000.0f);
+ DoCast(me->getVictim(), SPELL_PURPLE_BEAM, true);
+ DoCast(me->getVictim(), SPELL_PARALYZE, true);
}
// Kill our target if we're very close.
- if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 3))
- DoCast(m_creature->getVictim(), SPELL_CONSUME_SOUL);
+ if (me->IsWithinDistInMap(me->getVictim(), 3))
+ DoCast(me->getVictim(), SPELL_CONSUME_SOUL);
}
};
@@ -1757,37 +1757,37 @@ struct mob_parasitic_shadowfiendAI : public ScriptedAI
IllidanGUID = 0;
CheckTimer = 5000;
- DoCast(m_creature, SPELL_SHADOWFIEND_PASSIVE, true);
+ DoCast(me, SPELL_SHADOWFIEND_PASSIVE, true);
}
void EnterCombat(Unit* who) { DoZoneInCombat(); }
void DoMeleeAttackIfReady()
{
- if (m_creature->isAttackReady() && m_creature->IsWithinMeleeRange(m_creature->getVictim()))
+ if (me->isAttackReady() && me->IsWithinMeleeRange(me->getVictim()))
{
- if (!m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND)
- && !m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND2))
+ if (!me->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND)
+ && !me->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND2))
{
- if (Creature* illidan = Unit::GetCreature((*m_creature),IllidanGUID))//summon only in 1. phase
+ if (Creature* illidan = Unit::GetCreature((*me),IllidanGUID))//summon only in 1. phase
if (CAST_AI(boss_illidan_stormrageAI, illidan->AI())->Phase == PHASE_NORMAL)
- m_creature->CastSpell(m_creature->getVictim(), SPELL_PARASITIC_SHADOWFIEND2, true, 0, 0, IllidanGUID); //do not stack
+ me->CastSpell(me->getVictim(), SPELL_PARASITIC_SHADOWFIEND2, true, 0, 0, IllidanGUID); //do not stack
}
- m_creature->AttackerStateUpdate(m_creature->getVictim());
- m_creature->resetAttackTimer();
+ me->AttackerStateUpdate(me->getVictim());
+ me->resetAttackTimer();
}
}
void UpdateAI(const uint32 diff)
{
- if (!m_creature->getVictim())
+ if (!me->getVictim())
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true))
AttackStart(pTarget);
else
{
- m_creature->SetVisibility(VISIBILITY_OFF);
- m_creature->setDeathState(JUST_DIED);
+ me->SetVisibility(VISIBILITY_OFF);
+ me->setDeathState(JUST_DIED);
return;
}
}
@@ -1797,8 +1797,8 @@ struct mob_parasitic_shadowfiendAI : public ScriptedAI
GETUNIT(Illidan, IllidanGUID);
if (!Illidan || CAST_CRE(Illidan)->IsInEvadeMode())
{
- m_creature->SetVisibility(VISIBILITY_OFF);
- m_creature->setDeathState(JUST_DIED);
+ me->SetVisibility(VISIBILITY_OFF);
+ me->setDeathState(JUST_DIED);
return;
} else CheckTimer = 5000;
} else CheckTimer -= diff;
@@ -1855,13 +1855,13 @@ void boss_illidan_stormrageAI::Reset()
FlightCount = 0;
TransformCount = 0;
- m_creature->SetDisplayId(21135);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetDisplayId(21135);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- m_creature->setActive(false);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->setActive(false);
Summons.DespawnAll();
}
@@ -1898,7 +1898,7 @@ void boss_illidan_stormrageAI::JustSummoned(Creature* summon)
summon->SetVisibility(VISIBILITY_OFF); // Leave her invisible until she has to talk
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
MaievGUID = summon->GetGUID();
- CAST_AI(boss_maievAI, summon->AI())->GetIllidanGUID(m_creature->GetGUID());
+ CAST_AI(boss_maievAI, summon->AI())->GetIllidanGUID(me->GetGUID());
summon->AI()->DoAction(PHASE_TALK_SEQUENCE);
}
break;
@@ -1917,19 +1917,19 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
switch(TalkCount)
{
case 0:
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
break;
case 8:
// Equip our warglaives!
SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE);
- m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
break;
case 9:
if (GETCRE(Akama, AkamaGUID))
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
- m_creature->AddThreat(Akama, 100.0f);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
+ me->AddThreat(Akama, 100.0f);
CAST_AI(npc_akama_illidanAI, Akama->AI())->EnterPhase(PHASE_FIGHT_ILLIDAN);
EnterPhase(PHASE_NORMAL);
}
@@ -1942,39 +1942,39 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
{
Maiev->SetVisibility(VISIBILITY_ON); // Maiev is now visible
Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); // onoz she looks like she teleported!
- Maiev->SetInFront(m_creature); // Have her face us
- m_creature->SetInFront(Maiev); // Face her, so it's not rude =P
+ Maiev->SetInFront(me); // Have her face us
+ me->SetInFront(Maiev); // Face her, so it's not rude =P
Maiev->GetMotionMaster()->MoveIdle();
- m_creature->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->MoveIdle();
}
break;
case 14:
if (GETCRE(Maiev, MaievGUID))
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
Maiev->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
- Maiev->AddThreat(m_creature, 10000000.0f); // Have Maiev add a lot of threat on us so that players don't pull her off if they damage her via AOE
- Maiev->AI()->AttackStart(m_creature); // Force Maiev to attack us.
+ Maiev->AddThreat(me, 10000000.0f); // Have Maiev add a lot of threat on us so that players don't pull her off if they damage her via AOE
+ Maiev->AI()->AttackStart(me); // Force Maiev to attack us.
EnterPhase(PHASE_NORMAL_MAIEV);
}
break;
case 15:
- DoCast(m_creature, SPELL_DEATH); // Animate his kneeling + stun him
+ DoCast(me, SPELL_DEATH); // Animate his kneeling + stun him
Summons.DespawnAll();
break;
case 17:
if (GETUNIT(Akama, AkamaGUID))
{
- if (!m_creature->IsWithinDistInMap(Akama, 15))
+ if (!me->IsWithinDistInMap(Akama, 15))
{
float x, y, z;
- m_creature->GetPosition(x, y, z);
+ me->GetPosition(x, y, z);
x += 10; y += 10;
Akama->GetMotionMaster()->Clear(false);
//Akama->GetMotionMaster()->MoveIdle();
- Akama->GetMap()->CreatureRelocation(m_creature, x, y, z, 0.0f);
+ Akama->GetMap()->CreatureRelocation(me, x, y, z, 0.0f);
Akama->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_NONE, 0);//Illidan must not die until Akama arrives.
- Akama->GetMotionMaster()->MoveChase(m_creature);
+ Akama->GetMotionMaster()->MoveChase(me);
}
}
break;
@@ -1983,11 +1983,11 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
{
Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true);
Maiev->setDeathState(JUST_DIED);
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD);
+ me->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD);
}
break;
case 21: // Kill ourself.
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
break;
default:
break;
@@ -1999,10 +1999,10 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
void boss_illidan_stormrageAI::CastEyeBlast()
{
- m_creature->InterruptNonMeleeSpells(false);
+ me->InterruptNonMeleeSpells(false);
- m_creature->MonsterYell(SAY_EYE_BLAST, LANG_UNIVERSAL, 0);
- DoPlaySoundToSet(m_creature, SOUND_EYE_BLAST);
+ me->MonsterYell(SAY_EYE_BLAST, LANG_UNIVERSAL, 0);
+ DoPlaySoundToSet(me, SOUND_EYE_BLAST);
float distx, disty, dist[2];
for (uint8 i = 0; i < 2; ++i)
@@ -2023,7 +2023,7 @@ void boss_illidan_stormrageAI::CastEyeBlast()
final.x = 2 * final.x - initial.x;
final.y = 2 * final.y - initial.y;
- Creature* Trigger = m_creature->SummonCreature(23069, initial.x, initial.y, initial.z, 0, TEMPSUMMON_TIMED_DESPAWN, 13000);
+ Creature* Trigger = me->SummonCreature(23069, initial.x, initial.y, initial.z, 0, TEMPSUMMON_TIMED_DESPAWN, 13000);
if (!Trigger) return;
Trigger->SetSpeed(MOVE_WALK, 3);
@@ -2031,23 +2031,23 @@ void boss_illidan_stormrageAI::CastEyeBlast()
Trigger->GetMotionMaster()->MovePoint(0, final.x, final.y, final.z);
//Trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Trigger->GetGUID());
+ me->SetUInt64Value(UNIT_FIELD_TARGET, Trigger->GetGUID());
DoCast(Trigger, SPELL_EYE_BLAST);
}
void boss_illidan_stormrageAI::SummonFlamesOfAzzinoth()
{
- m_creature->MonsterYell(SAY_SUMMONFLAMES, LANG_UNIVERSAL, 0);
- DoPlaySoundToSet(m_creature, SOUND_SUMMONFLAMES);
+ me->MonsterYell(SAY_SUMMONFLAMES, LANG_UNIVERSAL, 0);
+ DoPlaySoundToSet(me, SOUND_SUMMONFLAMES);
for (uint8 i = 0; i < 2; ++i)
{
if (GETUNIT(Glaive, GlaiveGUID[i]))
{
- Creature* Flame = m_creature->SummonCreature(FLAME_OF_AZZINOTH, GlaivePosition[i+2].x, GlaivePosition[i+2].y, GlaivePosition[i+2].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
+ Creature* Flame = me->SummonCreature(FLAME_OF_AZZINOTH, GlaivePosition[i+2].x, GlaivePosition[i+2].y, GlaivePosition[i+2].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
if (Flame)
{
- Flame->setFaction(m_creature->getFaction()); // Just in case the database has it as a different faction
+ Flame->setFaction(me->getFaction()); // Just in case the database has it as a different faction
Flame->SetMeleeDamageSchool(SPELL_SCHOOL_FIRE);
FlameGUID[i] = Flame->GetGUID(); // Record GUID in order to check if they're dead later on to move to the next phase
CAST_AI(flame_of_azzinothAI, Flame->AI())->SetGlaiveGUID(GlaiveGUID[i]);
@@ -2059,12 +2059,12 @@ void boss_illidan_stormrageAI::SummonFlamesOfAzzinoth()
void boss_illidan_stormrageAI::SummonMaiev()
{
- DoCast(m_creature, SPELL_SHADOW_PRISON, true);
- DoCast(m_creature, 40403, true);
+ DoCast(me, SPELL_SHADOW_PRISON, true);
+ DoCast(me, 40403, true);
if (!MaievGUID) // If Maiev cannot be summoned, reset the encounter and post some errors to the console.
{
EnterEvadeMode();
- m_creature->MonsterTextEmote(EMOTE_UNABLE_TO_SUMMON, 0);
+ me->MonsterTextEmote(EMOTE_UNABLE_TO_SUMMON, 0);
error_log("SD2 ERROR: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)");
}
}
@@ -2077,7 +2077,7 @@ void boss_illidan_stormrageAI::EnterPhase(PhaseIllidan NextPhase)
case PHASE_NORMAL:
case PHASE_NORMAL_2:
case PHASE_NORMAL_MAIEV:
- AttackStart(m_creature->getVictim());
+ AttackStart(me->getVictim());
Timer[EVENT_TAUNT] = 32000;
Timer[EVENT_SHEAR] = 10000 + rand()%15 * 1000;
Timer[EVENT_FLAME_CRASH] = 20000;
@@ -2104,26 +2104,26 @@ void boss_illidan_stormrageAI::EnterPhase(PhaseIllidan NextPhase)
Timer[EVENT_FLAME_BURST] = 10000;
Timer[EVENT_SHADOWDEMON] = 30000;
Timer[EVENT_TRANSFORM_DEMON] = 60000;
- AttackStart(m_creature->getVictim());
+ AttackStart(me->getVictim());
break;
case PHASE_TALK_SEQUENCE:
Timer[EVENT_TALK_SEQUENCE] = 100;
- m_creature->RemoveAllAuras();
- m_creature->InterruptNonMeleeSpells(false);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
- m_creature->GetMotionMaster()->Clear(false);
- m_creature->AttackStop();
+ me->RemoveAllAuras();
+ me->InterruptNonMeleeSpells(false);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
+ me->GetMotionMaster()->Clear(false);
+ me->AttackStop();
break;
case PHASE_FLIGHT_SEQUENCE:
if (Phase == PHASE_NORMAL) //lift off
{
FlightCount = 1;
Timer[EVENT_FLIGHT_SEQUENCE] = 1;
- m_creature->RemoveAllAuras();
- m_creature->InterruptNonMeleeSpells(false);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->GetMotionMaster()->Clear(false);
- m_creature->AttackStop();
+ me->RemoveAllAuras();
+ me->InterruptNonMeleeSpells(false);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->GetMotionMaster()->Clear(false);
+ me->AttackStop();
}
else //land
Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
@@ -2135,11 +2135,11 @@ void boss_illidan_stormrageAI::EnterPhase(PhaseIllidan NextPhase)
{
TransformCount = 0;
Timer[EVENT_TRANSFORM_SEQUENCE] = 500;
- m_creature->MonsterYell(SAY_MORPH, LANG_UNIVERSAL, 0);
- DoPlaySoundToSet(m_creature, SOUND_MORPH);
+ me->MonsterYell(SAY_MORPH, LANG_UNIVERSAL, 0);
+ DoPlaySoundToSet(me, SOUND_MORPH);
}
- m_creature->GetMotionMaster()->Clear();
- m_creature->AttackStop();
+ me->GetMotionMaster()->Clear();
+ me->AttackStop();
break;
default:
break;
diff --git a/src/scripts/outland/black_temple/boss_mother_shahraz.cpp b/src/scripts/outland/black_temple/boss_mother_shahraz.cpp
index b8596e1bf62..5a0fcc0c1da 100644
--- a/src/scripts/outland/black_temple/boss_mother_shahraz.cpp
+++ b/src/scripts/outland/black_temple/boss_mother_shahraz.cpp
@@ -129,12 +129,12 @@ struct boss_shahrazAI : public ScriptedAI
pInstance->SetData(DATA_MOTHERSHAHRAZEVENT, IN_PROGRESS);
DoZoneInCombat();
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
void JustDied(Unit *victim)
@@ -142,7 +142,7 @@ struct boss_shahrazAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_MOTHERSHAHRAZEVENT, DONE);
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void TeleportPlayers()
@@ -168,11 +168,11 @@ struct boss_shahrazAI : public ScriptedAI
if (!UpdateVictim())
return;
- if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !Enraged)
+ if (((me->GetHealth()*100 / me->GetMaxHealth()) < 10) && !Enraged)
{
Enraged = true;
- DoCast(m_creature, SPELL_ENRAGE, true);
- DoScriptText(SAY_ENRAGE, m_creature);
+ DoCast(me, SPELL_ENRAGE, true);
+ DoScriptText(SAY_ENRAGE, me);
}
//Randomly cast one beam.
@@ -212,7 +212,7 @@ struct boss_shahrazAI : public ScriptedAI
{
uint32 random = rand()%6;
if (PrismaticAuras[random])
- DoCast(m_creature, PrismaticAuras[random]);
+ DoCast(me, PrismaticAuras[random]);
PrismaticShieldTimer = 15000;
} else PrismaticShieldTimer -= diff;
@@ -223,7 +223,7 @@ struct boss_shahrazAI : public ScriptedAI
TeleportPlayers();
- DoScriptText(RAND(SAY_SPELL2,SAY_SPELL3), m_creature);
+ DoScriptText(RAND(SAY_SPELL2,SAY_SPELL3), me);
FatalAttractionExplodeTimer = 2000;
FatalAttractionTimer = 40000 + rand()%31 * 1000;
} else FatalAttractionTimer -= diff;
@@ -238,7 +238,7 @@ struct boss_shahrazAI : public ScriptedAI
Unit* pUnit = NULL;
if (TargetGUID[i])
{
- pUnit = Unit::GetUnit((*m_creature), TargetGUID[i]);
+ pUnit = Unit::GetUnit((*me), TargetGUID[i]);
if (pUnit)
pUnit->CastSpell(pUnit, SPELL_ATTRACTION, true);
TargetGUID[i] = 0;
@@ -257,28 +257,28 @@ struct boss_shahrazAI : public ScriptedAI
if (ShriekTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SILENCING_SHRIEK);
+ DoCast(me->getVictim(), SPELL_SILENCING_SHRIEK);
ShriekTimer = 25000+rand()%10 * 1000;
} else ShriekTimer -= diff;
if (SaberTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SABER_LASH);
+ DoCast(me->getVictim(), SPELL_SABER_LASH);
SaberTimer = 25000+rand()%10 * 1000;
} else SaberTimer -= diff;
//Enrage
- if (!m_creature->HasAura(SPELL_BERSERK))
+ if (!me->HasAura(SPELL_BERSERK))
if (EnrageTimer <= diff)
{
- DoCast(m_creature, SPELL_BERSERK);
- DoScriptText(SAY_ENRAGE, m_creature);
+ DoCast(me, SPELL_BERSERK);
+ DoScriptText(SAY_ENRAGE, me);
} else EnrageTimer -= diff;
//Random taunts
if (RandomYellTimer <= diff)
{
- DoScriptText(RAND(SAY_TAUNT1,SAY_TAUNT2,SAY_TAUNT3), m_creature);
+ DoScriptText(RAND(SAY_TAUNT1,SAY_TAUNT2,SAY_TAUNT3), me);
RandomYellTimer = 60000 + rand()%91 * 1000;
} else RandomYellTimer -= diff;
diff --git a/src/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/src/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
index 6d23761aa52..7f7e5df19fa 100644
--- a/src/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
+++ b/src/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
@@ -109,7 +109,7 @@ struct npc_enslaved_soulAI : public ScriptedAI
void EnterCombat(Unit* who)
{
- DoCast(m_creature, ENSLAVED_SOUL_PASSIVE, true);
+ DoCast(me, ENSLAVED_SOUL_PASSIVE, true);
DoZoneInCombat();
}
@@ -142,7 +142,7 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
if (EssenceGUID)
{
- if (Creature* Essence = Unit::GetCreature(*m_creature, EssenceGUID))
+ if (Creature* Essence = Unit::GetCreature(*me, EssenceGUID))
{
Essence->ForcedDespawn();
}
@@ -151,14 +151,14 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
Phase = 0;
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
+ me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
}
void EnterCombat(Unit* who)
{
- m_creature->AddThreat(who, 10000.0f);
+ me->AddThreat(who, 10000.0f);
DoZoneInCombat();
if (pInstance)
pInstance->SetData(DATA_RELIQUARYOFSOULSEVENT, IN_PROGRESS);
@@ -173,11 +173,11 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
uint32 random = rand()%6;
float x = Coords[random].x;
float y = Coords[random].y;
- Creature* Soul = m_creature->SummonCreature(CREATURE_ENSLAVED_SOUL, x, y, m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Creature* Soul = me->SummonCreature(CREATURE_ENSLAVED_SOUL, x, y, me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0);
if (!Soul) return false;
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
- CAST_AI(npc_enslaved_soulAI, Soul->AI())->ReliquaryGUID = m_creature->GetGUID();
+ CAST_AI(npc_enslaved_soulAI, Soul->AI())->ReliquaryGUID = me->GetGUID();
Soul->AI()->AttackStart(pTarget);
} else EnterEvadeMode();
return true;
@@ -192,12 +192,12 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
std::list<HostileReference*>::const_iterator itr = m_threatlist.begin();
for (; itr != m_threatlist.end(); ++itr)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
+ Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid());
if (pUnit)
{
DoModifyThreatPercent(pUnit, -100);
float threat = pTarget->getThreatManager().getThreat(pUnit);
- m_creature->AddThreat(pUnit, threat); // This makes it so that the unit has the same amount of threat in Reliquary's threatlist as in the target creature's (One of the Essences).
+ me->AddThreat(pUnit, threat); // This makes it so that the unit has the same amount of threat in Reliquary's threatlist as in the target creature's (One of the Essences).
}
}
}
@@ -213,7 +213,7 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
if (!Phase)
return;
- if (m_creature->getThreatManager().getThreatList().empty()) // Reset if event is begun and we don't have a threatlist
+ if (me->getThreatManager().getThreatList().empty()) // Reset if event is begun and we don't have a threatlist
{
EnterEvadeMode();
return;
@@ -222,7 +222,7 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
Creature* Essence;
if (EssenceGUID)
{
- Essence = Unit::GetCreature(*m_creature, EssenceGUID);
+ Essence = Unit::GetCreature(*me, EssenceGUID);
if (!Essence)
{
EnterEvadeMode();
@@ -235,24 +235,24 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
switch(Counter)
{
case 0:
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); // I R ANNNGRRRY!
- DoStartNoMovement(m_creature);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); // I R ANNNGRRRY!
+ DoStartNoMovement(me);
Timer = 3000;
break;
case 1:
Timer = 2800;
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_SUBMERGE); // Release the cube
- DoCast(m_creature, SPELL_SUBMERGE);
- DoStartNoMovement(m_creature);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_SUBMERGE); // Release the cube
+ DoCast(me, SPELL_SUBMERGE);
+ DoStartNoMovement(me);
break;
case 2:
Timer = 5000;
if (Creature* Summon = DoSpawnCreature(23417+Phase, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0))
{
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); // Ribs: open
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); // Ribs: open
Summon->AI()->AttackStart(SelectUnit(SELECT_TARGET_TOPAGGRO, 0));
EssenceGUID = Summon->GetGUID();
- DoStartNoMovement(m_creature);
+ DoStartNoMovement(me);
} else EnterEvadeMode();
break;
case 3:
@@ -260,7 +260,7 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
if (Phase == 3)
{
if (!Essence->isAlive())
- DoCast(m_creature, 7, true);
+ DoCast(me, 7, true);
else return;
}
else
@@ -270,24 +270,24 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
MergeThreatList(Essence);
Essence->RemoveAllAuras();
Essence->DeleteThreatList();
- Essence->GetMotionMaster()->MoveFollow(m_creature,0.0f,0.0f);
+ Essence->GetMotionMaster()->MoveFollow(me,0.0f,0.0f);
} else return;
}
break;
case 4:
Timer = 1500;
- if (Essence->IsWithinDistInMap(m_creature, 10))
+ if (Essence->IsWithinDistInMap(me, 10))
{
Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); //rotate and disappear
Timer = 2000;
- m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE);
+ me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
}
else
{
MergeThreatList(Essence);
Essence->RemoveAllAuras();
Essence->DeleteThreatList();
- Essence->GetMotionMaster()->MoveFollow(m_creature, 0, 0);
+ Essence->GetMotionMaster()->MoveFollow(me, 0, 0);
return;
}
break;
@@ -301,7 +301,7 @@ struct boss_reliquary_of_soulsAI : public ScriptedAI
DoScriptText(DESI_SAY_AFTER, Essence);
}
Essence->ForcedDespawn();
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE,0);
EssenceGUID = 0;
SoulCount = 0;
SoulDeathCount = 0;
@@ -357,60 +357,60 @@ struct boss_essence_of_sufferingAI : public ScriptedAI
void DamageTaken(Unit *done_by, uint32 &damage)
{
- if (damage >= m_creature->GetHealth())
+ if (damage >= me->GetHealth())
{
damage = 0;
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->Yell(SUFF_SAY_RECAP,LANG_UNIVERSAL,0);
- DoScriptText(SUFF_SAY_RECAP, m_creature);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->Yell(SUFF_SAY_RECAP,LANG_UNIVERSAL,0);
+ DoScriptText(SUFF_SAY_RECAP, me);
}
}
void EnterCombat(Unit *who)
{
- if (!m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
+ if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
{
- DoScriptText(SUFF_SAY_FREED, m_creature);
+ DoScriptText(SUFF_SAY_FREED, me);
DoZoneInCombat();
- DoCast(m_creature, AURA_OF_SUFFERING, true); // linked aura need core support
- DoCast(m_creature, ESSENCE_OF_SUFFERING_PASSIVE, true);
- DoCast(m_creature, ESSENCE_OF_SUFFERING_PASSIVE2, true);
+ DoCast(me, AURA_OF_SUFFERING, true); // linked aura need core support
+ DoCast(me, ESSENCE_OF_SUFFERING_PASSIVE, true);
+ DoCast(me, ESSENCE_OF_SUFFERING_PASSIVE2, true);
}
else return;
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SUFF_SAY_SLAY1,SUFF_SAY_SLAY2,SUFF_SAY_SLAY3), m_creature);
+ DoScriptText(RAND(SUFF_SAY_SLAY1,SUFF_SAY_SLAY2,SUFF_SAY_SLAY3), me);
}
void CastFixate()
{
- std::list<HostileReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
if (m_threatlist.empty())
return; // No point continuing if empty threatlist.
std::list<Unit*> targets;
std::list<HostileReference*>::const_iterator itr = m_threatlist.begin();
for (; itr != m_threatlist.end(); ++itr)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
+ Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid());
if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) // Only alive players
targets.push_back(pUnit);
}
if (targets.empty())
return; // No targets added for some reason. No point continuing.
- targets.sort(ObjectDistanceOrder(m_creature)); // Sort players by distance.
+ targets.sort(ObjectDistanceOrder(me)); // Sort players by distance.
targets.resize(1); // Only need closest target.
Unit *pTarget = targets.front(); // Get the first target.
if (pTarget)
- pTarget->CastSpell(m_creature, SPELL_FIXATE_TAUNT, true);
+ pTarget->CastSpell(me, SPELL_FIXATE_TAUNT, true);
DoResetThreat();
- m_creature->AddThreat(pTarget,1000000);
+ me->AddThreat(pTarget,1000000);
}
void UpdateAI(const uint32 diff)
{
- if (m_creature->isInCombat())
+ if (me->isInCombat())
{
//Supposed to be cast on nearest target
if (FixateTimer <= diff)
@@ -419,7 +419,7 @@ struct boss_essence_of_sufferingAI : public ScriptedAI
FixateTimer = 5000;
if (!(rand()%16))
{
- DoScriptText(SUFF_SAY_AGGRO, m_creature);
+ DoScriptText(SUFF_SAY_AGGRO, me);
}
} else FixateTimer -= diff;
}
@@ -430,9 +430,9 @@ struct boss_essence_of_sufferingAI : public ScriptedAI
if (EnrageTimer <= diff)
{
- DoCast(m_creature, SPELL_ENRAGE);
+ DoCast(me, SPELL_ENRAGE);
EnrageTimer = 60000;
- DoScriptText(SUFF_EMOTE_ENRAGE, m_creature);
+ DoScriptText(SUFF_EMOTE_ENRAGE, me);
} else EnrageTimer -= diff;
if (SoulDrainTimer <= diff)
@@ -458,47 +458,47 @@ struct boss_essence_of_desireAI : public ScriptedAI
RuneShieldTimer = 60000;
DeadenTimer = 30000;
SoulShockTimer = 5000;
- m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_CONFUSE, true);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_CONFUSE, true);
}
void DamageTaken(Unit *done_by, uint32 &damage)
{
- if (done_by == m_creature)
+ if (done_by == me)
return;
- if (damage >= m_creature->GetHealth())
+ if (damage >= me->GetHealth())
{
damage = 0;
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoScriptText(SUFF_SAY_RECAP, m_creature);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ DoScriptText(SUFF_SAY_RECAP, me);
}
else
{
int32 bp0 = damage / 2;
- m_creature->CastCustomSpell(done_by, AURA_OF_DESIRE_DAMAGE, &bp0, NULL, NULL, true);
+ me->CastCustomSpell(done_by, AURA_OF_DESIRE_DAMAGE, &bp0, NULL, NULL, true);
}
}
void SpellHit(Unit *caster, const SpellEntry *spell)
{
- if (m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL))
+ if (me->GetCurrentSpell(CURRENT_GENERIC_SPELL))
for (uint8 i = 0; i < 3; ++i)
if (spell->Effect[i] == SPELL_EFFECT_INTERRUPT_CAST)
- if (m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_SOUL_SHOCK
- || m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_DEADEN)
- m_creature->InterruptSpell(CURRENT_GENERIC_SPELL, false);
+ if (me->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_SOUL_SHOCK
+ || me->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_DEADEN)
+ me->InterruptSpell(CURRENT_GENERIC_SPELL, false);
}
void EnterCombat(Unit *who)
{
- DoScriptText(DESI_SAY_FREED, m_creature);
+ DoScriptText(DESI_SAY_FREED, me);
DoZoneInCombat();
- DoCast(m_creature, AURA_OF_DESIRE, true);
+ DoCast(me, AURA_OF_DESIRE, true);
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(DESI_SAY_SLAY1,DESI_SAY_SLAY2,DESI_SAY_SLAY3), m_creature);
+ DoScriptText(RAND(DESI_SAY_SLAY1,DESI_SAY_SLAY2,DESI_SAY_SLAY3), me);
}
void UpdateAI(const uint32 diff)
@@ -508,8 +508,8 @@ struct boss_essence_of_desireAI : public ScriptedAI
if (RuneShieldTimer <= diff)
{
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature, SPELL_RUNE_SHIELD, true);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me, SPELL_RUNE_SHIELD, true);
SoulShockTimer += 2000;
DeadenTimer += 2000;
RuneShieldTimer = 60000;
@@ -517,18 +517,18 @@ struct boss_essence_of_desireAI : public ScriptedAI
if (SoulShockTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SOUL_SHOCK);
+ DoCast(me->getVictim(), SPELL_SOUL_SHOCK);
SoulShockTimer = 5000;
} else SoulShockTimer -= diff;
if (DeadenTimer <= diff)
{
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature->getVictim(), SPELL_DEADEN);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me->getVictim(), SPELL_DEADEN);
DeadenTimer = 25000 + rand()%10000;
if (!(rand()%2))
{
- DoScriptText(DESI_SAY_SPEC, m_creature);
+ DoScriptText(DESI_SAY_SPEC, me);
}
} else DeadenTimer -= diff;
@@ -565,20 +565,20 @@ struct boss_essence_of_angerAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(ANGER_SAY_FREED,ANGER_SAY_FREED2), m_creature);
+ DoScriptText(RAND(ANGER_SAY_FREED,ANGER_SAY_FREED2), me);
DoZoneInCombat();
- DoCast(m_creature, AURA_OF_ANGER, true);
+ DoCast(me, AURA_OF_ANGER, true);
}
void JustDied(Unit *victim)
{
- DoScriptText(ANGER_SAY_DEATH, m_creature);
+ DoScriptText(ANGER_SAY_DEATH, me);
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(ANGER_SAY_SLAY1,ANGER_SAY_SLAY2), m_creature);
+ DoScriptText(RAND(ANGER_SAY_SLAY1,ANGER_SAY_SLAY2), me);
}
void UpdateAI(const uint32 diff)
@@ -589,36 +589,36 @@ struct boss_essence_of_angerAI : public ScriptedAI
if (!CheckedAggro)
{
- AggroTargetGUID = m_creature->getVictim()->GetGUID();
+ AggroTargetGUID = me->getVictim()->GetGUID();
CheckedAggro = true;
}
if (CheckTankTimer <= diff)
{
- if (m_creature->getVictim()->GetGUID() != AggroTargetGUID)
+ if (me->getVictim()->GetGUID() != AggroTargetGUID)
{
- DoScriptText(ANGER_SAY_BEFORE, m_creature);
- DoCast(m_creature, SPELL_SELF_SEETHE, true);
- AggroTargetGUID = m_creature->getVictim()->GetGUID();
+ DoScriptText(ANGER_SAY_BEFORE, me);
+ DoCast(me, SPELL_SELF_SEETHE, true);
+ AggroTargetGUID = me->getVictim()->GetGUID();
}
CheckTankTimer = 2000;
} else CheckTankTimer -= diff;
if (SoulScreamTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SOUL_SCREAM);
+ DoCast(me->getVictim(), SPELL_SOUL_SCREAM);
SoulScreamTimer = 9000 + rand()%2000;
if (!(rand()%3))
{
- DoScriptText(ANGER_SAY_SPEC, m_creature);
+ DoScriptText(ANGER_SAY_SPEC, me);
}
} else SoulScreamTimer -= diff;
if (SpiteTimer <= diff)
{
- DoCast(m_creature, SPELL_SPITE_TARGET);
+ DoCast(me, SPELL_SPITE_TARGET);
SpiteTimer = 30000;
- DoScriptText(ANGER_SAY_SPEC, m_creature);
+ DoScriptText(ANGER_SAY_SPEC, me);
} else SpiteTimer -= diff;
DoMeleeAttackIfReady();
@@ -628,10 +628,10 @@ struct boss_essence_of_angerAI : public ScriptedAI
void npc_enslaved_soulAI::JustDied(Unit *killer)
{
if (ReliquaryGUID)
- if (Creature *Reliquary = (Unit::GetCreature((*m_creature), ReliquaryGUID)))
+ if (Creature *Reliquary = (Unit::GetCreature((*me), ReliquaryGUID)))
++(CAST_AI(boss_reliquary_of_soulsAI, Reliquary->AI())->SoulDeathCount);
- DoCast(m_creature, SPELL_SOUL_RELEASE, true);
+ DoCast(me, SPELL_SOUL_RELEASE, true);
}
CreatureAI* GetAI_boss_reliquary_of_souls(Creature* pCreature)
diff --git a/src/scripts/outland/black_temple/boss_shade_of_akama.cpp b/src/scripts/outland/black_temple/boss_shade_of_akama.cpp
index 7c1e5406d69..beb06b23c6f 100644
--- a/src/scripts/outland/black_temple/boss_shade_of_akama.cpp
+++ b/src/scripts/outland/black_temple/boss_shade_of_akama.cpp
@@ -144,13 +144,13 @@ struct mob_ashtongue_sorcererAI : public ScriptedAI
if (CheckTimer <= diff)
{
- Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
- if (Shade && Shade->isAlive() && m_creature->isAlive())
+ Creature* Shade = Unit::GetCreature((*me), ShadeGUID);
+ if (Shade && Shade->isAlive() && me->isAlive())
{
- if (m_creature->IsWithinDist(Shade, 20,false))
+ if (me->IsWithinDist(Shade, 20,false))
{
- m_creature->GetMotionMaster()->Clear(false);
- m_creature->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->MoveIdle();
DoCast(Shade, SPELL_SHADE_SOUL_CHANNEL, true);
DoCast(Shade, SPELL_SHADE_SOUL_CHANNEL_2, true);
@@ -164,13 +164,13 @@ struct mob_ashtongue_sorcererAI : public ScriptedAI
struct boss_shade_of_akamaAI : public ScriptedAI
{
- boss_shade_of_akamaAI(Creature* c) : ScriptedAI(c), summons(m_creature)
+ boss_shade_of_akamaAI(Creature* c) : ScriptedAI(c), summons(me)
{
pInstance = c->GetInstanceData();
AkamaGUID = pInstance ? pInstance->GetData64(DATA_AKAMA_SHADE) : 0;
- m_creature->setActive(true);//if view distance is too low
- m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
+ me->setActive(true);//if view distance is too low
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
}
ScriptedInstance* pInstance;
@@ -204,7 +204,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
Sorcerers.clear();
summons.DespawnAll();//despawn all adds
- if (Creature* Akama = Unit::GetCreature(*m_creature, AkamaGUID))
+ if (Creature* Akama = Unit::GetCreature(*me, AkamaGUID))
{
Akama->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);//turn gossip on so players can restart the event
if (Akama->isDead())
@@ -224,12 +224,12 @@ struct boss_shade_of_akamaAI : public ScriptedAI
IsBanished = true;
HasKilledAkama = false;
- m_creature->SetVisibility(VISIBILITY_ON);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- //m_creature->GetMotionMaster()->Clear();
- //m_creature->GetMotionMaster()->MoveIdle();
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
+ me->SetVisibility(VISIBILITY_ON);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ //me->GetMotionMaster()->Clear();
+ //me->GetMotionMaster()->MoveIdle();
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
if (pInstance)
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, NOT_STARTED);
@@ -261,7 +261,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
{
for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
{
- Creature* Channeler = (Unit::GetCreature(*m_creature, *itr));
+ Creature* Channeler = (Unit::GetCreature(*me, *itr));
if (Channeler)
{
if (Channeler->isDead())
@@ -270,8 +270,8 @@ struct boss_shade_of_akamaAI : public ScriptedAI
Channeler->Respawn();
}
- Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL, true);
- Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL_2, true);
+ Channeler->CastSpell(me, SPELL_SHADE_SOUL_CHANNEL, true);
+ Channeler->CastSpell(me, SPELL_SHADE_SOUL_CHANNEL_2, true);
Channeler->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
GridSearcherSucceeded = true;
}
@@ -284,7 +284,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
{
if (!who || IsBanished) return;
- if (who->isTargetableForAttack() && who != m_creature)
+ if (who->isTargetableForAttack() && who != me)
DoStartMovement(who);
}
@@ -295,7 +295,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
debug_log("TSCR: Increasing Death Count for Shade of Akama encounter");
++DeathCount;
- m_creature->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2);
+ me->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2);
if (guid)
{
if (Sorcerers.empty())
@@ -312,13 +312,13 @@ struct boss_shade_of_akamaAI : public ScriptedAI
// max of 6 sorcerers can be summoned
if ((rand()%3 == 0) && (DeathCount > 0) && (SorcererCount < 7))
{
- Creature* Sorcerer = m_creature->SummonCreature(CREATURE_SORCERER, X, Y, Z_SPAWN, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
+ Creature* Sorcerer = me->SummonCreature(CREATURE_SORCERER, X, Y, Z_SPAWN, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
if (Sorcerer)
{
- CAST_AI(mob_ashtongue_sorcererAI, Sorcerer->AI())->ShadeGUID = m_creature->GetGUID();
+ CAST_AI(mob_ashtongue_sorcererAI, Sorcerer->AI())->ShadeGUID = me->GetGUID();
Sorcerer->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- Sorcerer->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
- Sorcerer->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
+ Sorcerer->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
+ Sorcerer->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
Sorcerers.push_back(Sorcerer->GetGUID());
--DeathCount;
++SorcererCount;
@@ -328,7 +328,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
{
for (uint8 i = 0; i < 3; ++i)
{
- Creature* Spawn = m_creature->SummonCreature(spawnEntries[i], X, Y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
+ Creature* Spawn = me->SummonCreature(spawnEntries[i], X, Y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
if (Spawn)
{
Spawn->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
@@ -343,13 +343,13 @@ struct boss_shade_of_akamaAI : public ScriptedAI
void FindChannelers()
{
std::list<Creature*> ChannelerList;
- m_creature->GetCreatureListWithEntryInGrid(ChannelerList,CREATURE_CHANNELER,50.0f);
+ me->GetCreatureListWithEntryInGrid(ChannelerList,CREATURE_CHANNELER,50.0f);
if (!ChannelerList.empty())
{
for (std::list<Creature*>::const_iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr)
{
- CAST_AI(mob_ashtongue_channelerAI, (*itr)->AI())->ShadeGUID = m_creature->GetGUID();
+ CAST_AI(mob_ashtongue_channelerAI, (*itr)->AI())->ShadeGUID = me->GetGUID();
Channelers.push_back((*itr)->GetGUID());
debug_log("TSCR: Shade of Akama Grid Search found channeler %u. Adding to list", (*itr)->GetGUID());
}
@@ -366,7 +366,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
}
for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
- if (Creature* Channeler = (Unit::GetCreature(*m_creature, *itr)))
+ if (Creature* Channeler = (Unit::GetCreature(*me, *itr)))
Channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -374,13 +374,13 @@ struct boss_shade_of_akamaAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if (!m_creature->isInCombat())
+ if (!me->isInCombat())
return;
if (IsBanished)
{
// Akama is set in the threatlist so when we reset, we make sure that he is not included in our check
- if (m_creature->getThreatManager().getThreatList().size() < 2)
+ if (me->getThreatManager().getThreatList().size() < 2)
{
EnterEvadeMode();
return;
@@ -389,14 +389,14 @@ struct boss_shade_of_akamaAI : public ScriptedAI
if (DefenderTimer <= diff)
{
uint32 ran = rand()%2;
- Creature* Defender = m_creature->SummonCreature(CREATURE_DEFENDER, SpawnLocations[ran].x, SpawnLocations[ran].y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
+ Creature* Defender = me->SummonCreature(CREATURE_DEFENDER, SpawnLocations[ran].x, SpawnLocations[ran].y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
if (Defender)
{
Defender->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
bool move = true;
if (AkamaGUID)
{
- if (Creature* Akama = Unit::GetCreature(*m_creature, AkamaGUID))
+ if (Creature* Akama = Unit::GetCreature(*me, AkamaGUID))
{
float x, y, z;
Akama->GetPosition(x,y,z);
@@ -421,21 +421,21 @@ struct boss_shade_of_akamaAI : public ScriptedAI
{
if (AkamaGUID)
{
- Creature* Akama = Unit::GetCreature((*m_creature), AkamaGUID);
+ Creature* Akama = Unit::GetCreature((*me), AkamaGUID);
if (Akama && Akama->isAlive())
{
IsBanished = false;
- m_creature->GetMotionMaster()->Clear(false);
- m_creature->GetMotionMaster()->MoveChase(Akama);
+ me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->MoveChase(Akama);
Akama->GetMotionMaster()->Clear();
// Shade should move to Akama, not the other way around
Akama->GetMotionMaster()->MoveIdle();
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// Crazy amount of threat
- m_creature->AddThreat(Akama, 10000000.0f);
- Akama->AddThreat(m_creature, 10000000.0f);
- m_creature->Attack(Akama, true);
- Akama->Attack(m_creature, true);
+ me->AddThreat(Akama, 10000000.0f);
+ Akama->AddThreat(me, 10000000.0f);
+ me->Attack(Akama, true);
+ Akama->Attack(me, true);
}
}
}
@@ -446,11 +446,11 @@ struct boss_shade_of_akamaAI : public ScriptedAI
{
if (AkamaGUID)
{
- Creature* Akama = Unit::GetCreature((*m_creature), AkamaGUID);
+ Creature* Akama = Unit::GetCreature((*me), AkamaGUID);
if (Akama && Akama->isAlive())
{
//10 % less health every few seconds.
- m_creature->DealDamage(Akama, Akama->GetMaxHealth()/10, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(Akama, Akama->GetMaxHealth()/10, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
ReduceHealthTimer = 12000;
}
}
@@ -461,12 +461,12 @@ struct boss_shade_of_akamaAI : public ScriptedAI
if (!HasKilledAkamaAndReseting)//do not let players kill Shade if Akama is dead and Shade is waiting for ResetTimer!! event would bug
{
HasKilledAkamaAndReseting = true;
- m_creature->RemoveAllAuras();
- m_creature->DeleteThreatList();
- m_creature->CombatStop();
- //m_creature->SetHealth(m_creature->GetMaxHealth());
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->GetMotionMaster()->MoveTargetedHome();
+ me->RemoveAllAuras();
+ me->DeleteThreatList();
+ me->CombatStop();
+ //me->SetHealth(me->GetMaxHealth());
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->GetMotionMaster()->MoveTargetedHome();
}
if (ResetTimer <= diff)
{
@@ -482,7 +482,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
void mob_ashtongue_channelerAI::JustDied(Unit* killer)
{
- Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
+ Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
if (Shade && Shade->isAlive())
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount();
else error_log("SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama.");
@@ -490,21 +490,21 @@ void mob_ashtongue_channelerAI::JustDied(Unit* killer)
void mob_ashtongue_sorcererAI::JustDied(Unit* killer)
{
- Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
+ Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
if (Shade && Shade->isAlive())
- CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount(m_creature->GetGUID());
+ CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount(me->GetGUID());
else error_log("SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama.");
}
struct npc_akamaAI : public ScriptedAI
{
- npc_akamaAI(Creature* c) : ScriptedAI(c), summons(m_creature)
+ npc_akamaAI(Creature* c) : ScriptedAI(c), summons(me)
{
ShadeHasDied = false;
StartCombat = false;
pInstance = c->GetInstanceData();
ShadeGUID = pInstance ? pInstance->GetData64(DATA_SHADEOFAKAMA) : NOT_STARTED;
- m_creature->setActive(true);
+ me->setActive(true);
EventBegun = false;
CastSoulRetrieveTimer = 0;
SoulRetrieveTimer = 0;
@@ -546,8 +546,8 @@ struct npc_akamaAI : public ScriptedAI
if (!EventBegun)
{
- m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has very very strange values
- m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has very very strange values
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
summons.DespawnAll();
}
@@ -574,18 +574,18 @@ struct npc_akamaAI : public ScriptedAI
if (!ShadeGUID)
return;
- Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
+ Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
if (Shade)
{
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, IN_PROGRESS);
// Prevent players from trying to restart event
- m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- CAST_AI(boss_shade_of_akamaAI, Shade->AI())->SetAkamaGUID(m_creature->GetGUID());
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ CAST_AI(boss_shade_of_akamaAI, Shade->AI())->SetAkamaGUID(me->GetGUID());
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->SetSelectableChannelers();
- Shade->AddThreat(m_creature, 1000000.0f);
- m_creature->CombatStart(Shade);
+ Shade->AddThreat(me, 1000000.0f);
+ me->CombatStart(Shade);
Shade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
- Shade->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
+ Shade->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
if (pl) Shade->AddThreat(pl, 1.0f);
DoZoneInCombat(Shade);
EventBegun = true;
@@ -602,9 +602,9 @@ struct npc_akamaAI : public ScriptedAI
case 0: ++WayPointId; break;
case 1:
- if (Creature* Shade = Unit::GetCreature(*m_creature, ShadeGUID))
+ if (Creature* Shade = Unit::GetCreature(*me, ShadeGUID))
{
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, ShadeGUID);
+ me->SetUInt64Value(UNIT_FIELD_TARGET, ShadeGUID);
DoCast(Shade, SPELL_AKAMA_SOUL_RETRIEVE);
EndingTalkCount = 0;
SoulRetrieveTimer = 16000;
@@ -615,7 +615,7 @@ struct npc_akamaAI : public ScriptedAI
void JustDied(Unit* killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
EventBegun = false;
ShadeHasDied = false;
StartCombat = false;
@@ -627,7 +627,7 @@ struct npc_akamaAI : public ScriptedAI
BrokenSummonIndex = 0;
BrokenList.clear();
HasYelledOnce = false;
- Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
+ Creature* Shade = Unit::GetCreature((*me), ShadeGUID);
if (Shade && Shade->isAlive())
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->HasKilledAkama = true;
summons.DespawnAll();
@@ -638,15 +638,15 @@ struct npc_akamaAI : public ScriptedAI
if (!EventBegun)
return;
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 15 && !HasYelledOnce)
+ if ((me->GetHealth()*100 / me->GetMaxHealth()) < 15 && !HasYelledOnce)
{
- DoScriptText(SAY_LOW_HEALTH, m_creature);
+ DoScriptText(SAY_LOW_HEALTH, me);
HasYelledOnce = true;
}
if (ShadeGUID && !StartCombat)
{
- Creature* Shade = (Unit::GetCreature((*m_creature), ShadeGUID));
+ Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
if (Shade && Shade->isAlive())
{
if (CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IsBanished)
@@ -659,7 +659,7 @@ struct npc_akamaAI : public ScriptedAI
}
else
{
- m_creature->InterruptNonMeleeSpells(false);
+ me->InterruptNonMeleeSpells(false);
StartCombat = true;
}
}
@@ -669,7 +669,7 @@ struct npc_akamaAI : public ScriptedAI
{
if (pInstance)
pInstance->SetData(DATA_SHADEOFAKAMAEVENT, DONE);
- m_creature->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[1].x, AkamaWP[1].y, AkamaWP[1].z);
+ me->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[1].x, AkamaWP[1].y, AkamaWP[1].z);
++WayPointId;
}
@@ -679,13 +679,13 @@ struct npc_akamaAI : public ScriptedAI
{
if (ShadeGUID)
{
- Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
+ Creature* Shade = Unit::GetCreature((*me), ShadeGUID);
if (Shade && !Shade->isAlive())
{
ShadeHasDied = true;
WayPointId = 0;
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- m_creature->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[0].x, AkamaWP[0].y, AkamaWP[0].z);
+ me->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ me->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[0].x, AkamaWP[0].y, AkamaWP[0].z);
}
if (Shade && Shade->isAlive())
{
@@ -707,7 +707,7 @@ struct npc_akamaAI : public ScriptedAI
float y = BrokenCoords[BrokenSummonIndex].y + (1*5);
float z = BrokenCoords[BrokenSummonIndex].z;
float o = BrokenCoords[BrokenSummonIndex].o;
- Creature* Broken = m_creature->SummonCreature(CREATURE_BROKEN, x, y, z, o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000);
+ Creature* Broken = me->SummonCreature(CREATURE_BROKEN, x, y, z, o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000);
if (Broken)
{
float wx = BrokenWP[BrokenSummonIndex].x + (i*5);
@@ -729,13 +729,13 @@ struct npc_akamaAI : public ScriptedAI
switch(EndingTalkCount)
{
case 0:
- m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
++EndingTalkCount;
SoulRetrieveTimer = 2000;
SummonBrokenTimer = 1;
break;
case 1:
- DoScriptText(SAY_FREE, m_creature);
+ DoScriptText(SAY_FREE, me);
++EndingTalkCount;
SoulRetrieveTimer = 25000;
break;
@@ -744,7 +744,7 @@ struct npc_akamaAI : public ScriptedAI
{
bool Yelled = false;
for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
- if (Creature* pUnit = Unit::GetCreature(*m_creature, *itr))
+ if (Creature* pUnit = Unit::GetCreature(*me, *itr))
{
if (!Yelled)
{
@@ -761,7 +761,7 @@ struct npc_akamaAI : public ScriptedAI
if (!BrokenList.empty())
{
for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
- if (Creature* pUnit = Unit::GetCreature(*m_creature, *itr))
+ if (Creature* pUnit = Unit::GetCreature(*me, *itr))
// This is the incorrect spell, but can't seem to find the right one.
pUnit->CastSpell(pUnit, 39656, true);
}
@@ -772,7 +772,7 @@ struct npc_akamaAI : public ScriptedAI
if (!BrokenList.empty())
{
for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
- if (Creature* pUnit = Unit::GetCreature((*m_creature), *itr))
+ if (Creature* pUnit = Unit::GetCreature((*me), *itr))
pUnit->MonsterYell(SAY_BROKEN_FREE_02, LANG_UNIVERSAL, 0);
}
SoulRetrieveTimer = 0;
@@ -785,7 +785,7 @@ struct npc_akamaAI : public ScriptedAI
if (DestructivePoisonTimer <= diff)
{
- Creature* Shade = Unit::GetCreature((*m_creature), ShadeGUID);
+ Creature* Shade = Unit::GetCreature((*me), ShadeGUID);
if (Shade && Shade->isAlive())
DoCast(Shade, SPELL_DESTRUCTIVE_POISON);
DestructivePoisonTimer = 15000;
@@ -793,7 +793,7 @@ struct npc_akamaAI : public ScriptedAI
if (LightningBoltTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT);
+ DoCast(me->getVictim(), SPELL_LIGHTNING_BOLT);
LightningBoltTimer = 10000;
} else LightningBoltTimer -= diff;
diff --git a/src/scripts/outland/black_temple/boss_supremus.cpp b/src/scripts/outland/black_temple/boss_supremus.cpp
index 23423b7a581..0722992f252 100644
--- a/src/scripts/outland/black_temple/boss_supremus.cpp
+++ b/src/scripts/outland/black_temple/boss_supremus.cpp
@@ -25,7 +25,7 @@ EndScriptData */
#include "black_temple.h"
#define EMOTE_NEW_TARGET -1564010
-#define EMOTE_PUNCH_GROUND -1564011 //DoScriptText(EMOTE_PUNCH_GROUND, m_creature);
+#define EMOTE_PUNCH_GROUND -1564011 //DoScriptText(EMOTE_PUNCH_GROUND, me);
#define EMOTE_GROUND_CRACK -1564012
//Spells
@@ -67,7 +67,7 @@ struct molten_flameAI : public NullCreatureAI
struct boss_supremusAI : public ScriptedAI
{
- boss_supremusAI(Creature *c) : ScriptedAI(c), summons(m_creature)
+ boss_supremusAI(Creature *c) : ScriptedAI(c), summons(me)
{
pInstance = c->GetInstanceData();
}
@@ -81,7 +81,7 @@ struct boss_supremusAI : public ScriptedAI
{
if (pInstance)
{
- if (m_creature->isAlive())
+ if (me->isAlive())
{
pInstance->SetData(DATA_SUPREMUSEVENT, NOT_STARTED);
//ToggleDoors(true);
@@ -112,18 +112,18 @@ struct boss_supremusAI : public ScriptedAI
phase = PHASE_STRIKE;
summons.DoAction(EVENT_VOLCANO, 0);
events.ScheduleEvent(EVENT_HATEFUL_STRIKE, 5000, GCD_CAST, PHASE_STRIKE);
- m_creature->SetSpeed(MOVE_RUN, 1.2f);
- m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
+ me->SetSpeed(MOVE_RUN, 1.2f);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, false);
}
else
{
phase = PHASE_CHASE;
events.ScheduleEvent(EVENT_VOLCANO, 5000, GCD_CAST, PHASE_CHASE);
events.ScheduleEvent(EVENT_SWITCH_TARGET, 10000, 0, PHASE_CHASE);
- m_creature->SetSpeed(MOVE_RUN, 0.9f);
- m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
+ me->SetSpeed(MOVE_RUN, 0.9f);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
}
DoResetThreat();
DoZoneInCombat();
@@ -149,12 +149,12 @@ struct boss_supremusAI : public ScriptedAI
uint32 health = 0;
Unit *pTarget = NULL;
- std::list<HostileReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
std::list<HostileReference*>::const_iterator i = m_threatlist.begin();
for (i = m_threatlist.begin(); i!= m_threatlist.end(); ++i)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
- if (pUnit && m_creature->IsWithinMeleeRange(pUnit))
+ Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid());
+ if (pUnit && me->IsWithinMeleeRange(pUnit))
{
if (pUnit->GetHealth() > health)
{
@@ -179,10 +179,10 @@ struct boss_supremusAI : public ScriptedAI
switch(eventId)
{
case EVENT_BERSERK:
- DoCast(m_creature, SPELL_BERSERK, true);
+ DoCast(me, SPELL_BERSERK, true);
break;
case EVENT_FLAME:
- DoCast(m_creature, SPELL_MOLTEN_PUNCH);
+ DoCast(me, SPELL_MOLTEN_PUNCH);
events.DelayEvents(1500, GCD_CAST);
events.ScheduleEvent(EVENT_FLAME, 20000, GCD_CAST);
break;
@@ -196,20 +196,20 @@ struct boss_supremusAI : public ScriptedAI
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
{
DoResetThreat();
- m_creature->AddThreat(pTarget, 5000000.0f);
- DoScriptText(EMOTE_NEW_TARGET, m_creature);
+ me->AddThreat(pTarget, 5000000.0f);
+ DoScriptText(EMOTE_NEW_TARGET, me);
}
events.ScheduleEvent(EVENT_SWITCH_TARGET, 10000, 0, PHASE_CHASE);
break;
case EVENT_VOLCANO:
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true);
- if (!pTarget) pTarget = m_creature->getVictim();
+ if (!pTarget) pTarget = me->getVictim();
if (pTarget)
{
//DoCast(pTarget, SPELL_VOLCANIC_SUMMON);//movement bugged
- m_creature->SummonCreature(CREATURE_VOLCANO,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,30000);
- DoScriptText(EMOTE_GROUND_CRACK, m_creature);
+ me->SummonCreature(CREATURE_VOLCANO,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,30000);
+ DoScriptText(EMOTE_GROUND_CRACK, me);
events.DelayEvents(1500, GCD_CAST);
}
events.ScheduleEvent(EVENT_VOLCANO, 10000, GCD_CAST, PHASE_CHASE);
@@ -231,9 +231,9 @@ struct npc_volcanoAI : public Scripted_NoMovementAI
void Reset()
{
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- //DoCast(m_creature, SPELL_VOLCANIC_ERUPTION);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ //DoCast(me, SPELL_VOLCANIC_ERUPTION);
me->SetReactState(REACT_PASSIVE);
wait = 3000;
}
@@ -245,14 +245,14 @@ struct npc_volcanoAI : public Scripted_NoMovementAI
void DoAction(const uint32 info)
{
- m_creature->RemoveAura(SPELL_VOLCANIC_ERUPTION);
+ me->RemoveAura(SPELL_VOLCANIC_ERUPTION);
}
void UpdateAI(const uint32 diff)
{
if (wait <= diff)//wait 3secs before casting
{
- DoCast(m_creature, SPELL_VOLCANIC_ERUPTION);
+ DoCast(me, SPELL_VOLCANIC_ERUPTION);
wait = 60000;
}
else wait -= diff;
diff --git a/src/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/src/scripts/outland/black_temple/boss_teron_gorefiend.cpp
index 7be98d4b986..1fe2a2084c5 100644
--- a/src/scripts/outland/black_temple/boss_teron_gorefiend.cpp
+++ b/src/scripts/outland/black_temple/boss_teron_gorefiend.cpp
@@ -70,8 +70,8 @@ struct mob_doom_blossomAI : public ScriptedAI
void Despawn()
{
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->RemoveCorpse();
}
void UpdateAI(const uint32 diff)
@@ -82,7 +82,7 @@ struct mob_doom_blossomAI : public ScriptedAI
{
DoZoneInCombat();
- Creature* Teron = (Unit::GetCreature((*m_creature), TeronGUID));
+ Creature* Teron = (Unit::GetCreature((*me), TeronGUID));
if ((Teron) && (!Teron->isAlive() || Teron->IsInEvadeMode()))
Despawn();
}
@@ -92,7 +92,7 @@ struct mob_doom_blossomAI : public ScriptedAI
CheckTeronTimer = 5000;
} else CheckTeronTimer -= diff;
- if (ShadowBoltTimer < diff && m_creature->isInCombat())
+ if (ShadowBoltTimer < diff && me->isInCombat())
{
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_SHADOWBOLT);
ShadowBoltTimer = 10000;
@@ -142,23 +142,23 @@ struct mob_shadowy_constructAI : public ScriptedAI
void CheckPlayers()
{
- std::list<HostileReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
if (m_threatlist.empty())
return; // No threat list. Don't continue.
std::list<HostileReference*>::const_iterator itr = m_threatlist.begin();
std::list<Unit*> targets;
for (; itr != m_threatlist.end(); ++itr)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
+ Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid());
if (pUnit && pUnit->isAlive())
targets.push_back(pUnit);
}
- targets.sort(ObjectDistanceOrder(m_creature));
+ targets.sort(ObjectDistanceOrder(me));
Unit *pTarget = targets.front();
- if (pTarget && m_creature->IsWithinDistInMap(pTarget, m_creature->GetAttackDistance(pTarget)))
+ if (pTarget && me->IsWithinDistInMap(pTarget, me->GetAttackDistance(pTarget)))
{
DoCast(pTarget, SPELL_ATROPHY);
- m_creature->AI()->AttackStart(pTarget);
+ me->AI()->AttackStart(pTarget);
}
}
@@ -172,9 +172,9 @@ struct mob_shadowy_constructAI : public ScriptedAI
if (CheckTeronTimer <= diff)
{
- Creature* Teron = (Unit::GetCreature((*m_creature), TeronGUID));
+ Creature* Teron = (Unit::GetCreature((*me), TeronGUID));
if (!Teron || !Teron->isAlive() || Teron->IsInEvadeMode())
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
CheckTeronTimer = 5000;
} else CheckTeronTimer -= diff;
@@ -217,9 +217,9 @@ struct boss_teron_gorefiendAI : public ScriptedAI
SummonShadowsTimer = 60000;
RandomYellTimer = 50000;
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// Start off unattackable so that the intro is done properly
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
AggroTimer = 20000;
AggroTargetGUID = 0;
@@ -231,17 +231,17 @@ struct boss_teron_gorefiendAI : public ScriptedAI
void MoveInLineOfSight(Unit* pWho)
{
- if (!Intro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isTargetableForAttack() && m_creature->IsHostileTo(pWho) && pWho->isInAccessiblePlaceFor(m_creature))
+ if (!Intro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isTargetableForAttack() && me->IsHostileTo(pWho) && pWho->isInAccessiblePlaceFor(me))
{
- if (m_creature->IsWithinDistInMap(pWho, VISIBLE_RANGE) && m_creature->IsWithinLOSInMap(pWho))
+ if (me->IsWithinDistInMap(pWho, VISIBLE_RANGE) && me->IsWithinLOSInMap(pWho))
{
if (pInstance)
pInstance->SetData(DATA_TERONGOREFIENDEVENT, IN_PROGRESS);
- m_creature->GetMotionMaster()->Clear(false);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoScriptText(SAY_INTRO, m_creature);
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
+ me->GetMotionMaster()->Clear(false);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ DoScriptText(SAY_INTRO, me);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
AggroTargetGUID = pWho->GetGUID();
Intro = true;
}
@@ -252,7 +252,7 @@ struct boss_teron_gorefiendAI : public ScriptedAI
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
void JustDied(Unit *victim)
@@ -260,7 +260,7 @@ struct boss_teron_gorefiendAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_TERONGOREFIENDEVENT, DONE);
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
float CalculateRandomLocation(float Loc, uint32 radius)
@@ -282,11 +282,11 @@ struct boss_teron_gorefiendAI : public ScriptedAI
{
if (!Blossom) return;
- std::list<HostileReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
std::list<HostileReference*>::const_iterator i = m_threatlist.begin();
for (i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
+ Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid());
if (pUnit && pUnit->isAlive())
{
float threat = DoGetThreat(pUnit);
@@ -306,12 +306,12 @@ struct boss_teron_gorefiendAI : public ScriptedAI
Unit* Ghost = NULL;
if (GhostGUID)
- Ghost = Unit::GetUnit((*m_creature), GhostGUID);
+ Ghost = Unit::GetUnit((*me), GhostGUID);
if (Ghost && Ghost->isAlive() && Ghost->HasAura(SPELL_SHADOW_OF_DEATH))
{
/*float x,y,z;
Ghost->GetPosition(x,y,z);
- Creature* control = m_creature->SummonCreature(CREATURE_GHOST, x, y, z, 0, TEMPSUMMON_TIMED_DESAWN, 30000);
+ Creature* control = me->SummonCreature(CREATURE_GHOST, x, y, z, 0, TEMPSUMMON_TIMED_DESAWN, 30000);
if (control)
{
CAST_PLR(Ghost)->Possess(control);
@@ -323,7 +323,7 @@ struct boss_teron_gorefiendAI : public ScriptedAI
Creature* Construct = NULL;
float X = CalculateRandomLocation(Ghost->GetPositionX(), 10);
float Y = CalculateRandomLocation(Ghost->GetPositionY(), 10);
- Construct = m_creature->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, Y, Ghost->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
+ Construct = me->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, Y, Ghost->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
if (Construct)
{
Construct->CastSpell(Construct, SPELL_PASSIVE_SHADOWFORM, true);
@@ -331,7 +331,7 @@ struct boss_teron_gorefiendAI : public ScriptedAI
CAST_AI(mob_shadowy_constructAI, Construct->AI())->GhostGUID = GhostGUID;
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
if (!pTarget) // someone's trying to solo.
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
if (pTarget)
Construct->GetMotionMaster()->MoveChase(pTarget);
@@ -346,14 +346,14 @@ struct boss_teron_gorefiendAI : public ScriptedAI
{
if (AggroTimer <= diff)
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- DoScriptText(SAY_AGGRO, m_creature);
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ DoScriptText(SAY_AGGRO, me);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
Done = true;
if (AggroTargetGUID)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), AggroTargetGUID);
+ Unit* pUnit = Unit::GetUnit((*me), AggroTargetGUID);
if (pUnit)
AttackStart(pUnit);
@@ -377,13 +377,13 @@ struct boss_teron_gorefiendAI : public ScriptedAI
for (uint8 i = 0; i < 2; ++i)
{
Creature* Shadow = NULL;
- float X = CalculateRandomLocation(m_creature->GetPositionX(), 10);
- Shadow = m_creature->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0);
+ float X = CalculateRandomLocation(me->GetPositionX(), 10);
+ Shadow = me->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0);
if (Shadow)
{
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
if (!pTarget)
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
if (pTarget)
Shadow->AI()->AttackStart(pTarget);
@@ -399,14 +399,14 @@ struct boss_teron_gorefiendAI : public ScriptedAI
float X = CalculateRandomLocation(pTarget->GetPositionX(), 20);
float Y = CalculateRandomLocation(pTarget->GetPositionY(), 20);
float Z = pTarget->GetPositionZ();
- Z = m_creature->GetMap()->GetVmapHeight(X, Y, Z);
- Creature* DoomBlossom = m_creature->SummonCreature(CREATURE_DOOM_BLOSSOM, X, Y, Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000);
+ Z = me->GetMap()->GetVmapHeight(X, Y, Z);
+ Creature* DoomBlossom = me->SummonCreature(CREATURE_DOOM_BLOSSOM, X, Y, Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000);
if (DoomBlossom)
{
DoomBlossom->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoomBlossom->setFaction(m_creature->getFaction());
+ DoomBlossom->setFaction(me->getFaction());
DoomBlossom->AddThreat(pTarget, 1.0f);
- CAST_AI(mob_doom_blossomAI, DoomBlossom->AI())->SetTeronGUID(m_creature->GetGUID());
+ CAST_AI(mob_doom_blossomAI, DoomBlossom->AI())->SetTeronGUID(me->GetGUID());
pTarget->CombatStart(DoomBlossom);
SetThreatList(DoomBlossom);
SummonDoomBlossomTimer = 35000;
@@ -418,11 +418,11 @@ struct boss_teron_gorefiendAI : public ScriptedAI
{
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
if (!pTarget)
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
if (pTarget)
{
- DoScriptText(RAND(SAY_SPECIAL1,SAY_SPECIAL2), m_creature);
+ DoScriptText(RAND(SAY_SPECIAL1,SAY_SPECIAL2), me);
DoCast(pTarget, SPELL_INCINERATE);
IncinerateTimer = 20000 + rand()%31 * 1000;
}
@@ -442,7 +442,7 @@ struct boss_teron_gorefiendAI : public ScriptedAI
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
if (!pTarget)
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER)
{
@@ -455,16 +455,16 @@ struct boss_teron_gorefiendAI : public ScriptedAI
if (RandomYellTimer <= diff)
{
- DoScriptText(RAND(SAY_SPELL1,SAY_SPELL2), m_creature);
+ DoScriptText(RAND(SAY_SPELL1,SAY_SPELL2), me);
RandomYellTimer = 50000 + rand()%51 * 1000;
} else RandomYellTimer -= diff;
- if (!m_creature->HasAura(SPELL_BERSERK))
+ if (!me->HasAura(SPELL_BERSERK))
{
if (EnrageTimer <= diff)
{
- DoCast(m_creature, SPELL_BERSERK);
- DoScriptText(SAY_ENRAGE, m_creature);
+ DoCast(me, SPELL_BERSERK);
+ DoScriptText(SAY_ENRAGE, me);
} else EnrageTimer -= diff;
}
diff --git a/src/scripts/outland/black_temple/boss_warlord_najentus.cpp b/src/scripts/outland/black_temple/boss_warlord_najentus.cpp
index 838bbef5d75..b33b766e2a1 100644
--- a/src/scripts/outland/black_temple/boss_warlord_najentus.cpp
+++ b/src/scripts/outland/black_temple/boss_warlord_najentus.cpp
@@ -82,7 +82,7 @@ struct boss_najentusAI : public ScriptedAI
void KilledUnit(Unit *victim)
{
- DoScriptText(rand()%2 ? SAY_SLAY1 : SAY_SLAY2, m_creature);
+ DoScriptText(rand()%2 ? SAY_SLAY1 : SAY_SLAY2, me);
events.DelayEvents(5000, GCD_YELL);
}
@@ -91,15 +91,15 @@ struct boss_najentusAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, DONE);
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void SpellHit(Unit *caster, const SpellEntry *spell)
{
- if (spell->Id == SPELL_HURL_SPINE && m_creature->HasAura(SPELL_TIDAL_SHIELD))
+ if (spell->Id == SPELL_HURL_SPINE && me->HasAura(SPELL_TIDAL_SHIELD))
{
- m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD);
- DoCast(m_creature, SPELL_TIDAL_BURST, true);
+ me->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD);
+ DoCast(me, SPELL_TIDAL_BURST, true);
ResetTimer();
}
}
@@ -109,7 +109,7 @@ struct boss_najentusAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, IN_PROGRESS);
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
DoZoneInCombat();
events.ScheduleEvent(EVENT_BERSERK, 480000, GCD_CAST);
events.ScheduleEvent(EVENT_YELL, 45000 + (rand()%76)*1000, GCD_YELL);
@@ -119,7 +119,7 @@ struct boss_najentusAI : public ScriptedAI
bool RemoveImpalingSpine()
{
if (!SpineTargetGUID) return false;
- Unit *pTarget = Unit::GetUnit(*m_creature, SpineTargetGUID);
+ Unit *pTarget = Unit::GetUnit(*me, SpineTargetGUID);
if (pTarget && pTarget->HasAura(SPELL_IMPALING_SPINE))
pTarget->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
SpineTargetGUID=0;
@@ -145,25 +145,25 @@ struct boss_najentusAI : public ScriptedAI
switch(eventId)
{
case EVENT_SHIELD:
- DoCast(m_creature, SPELL_TIDAL_SHIELD, true);
+ DoCast(me, SPELL_TIDAL_SHIELD, true);
ResetTimer(45000);
break;
case EVENT_BERSERK:
- DoScriptText(SAY_ENRAGE2, m_creature);
- DoCast(m_creature, SPELL_BERSERK, true);
+ DoScriptText(SAY_ENRAGE2, me);
+ DoCast(me, SPELL_BERSERK, true);
events.DelayEvents(15000, GCD_YELL);
break;
case EVENT_SPINE:
{
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
- if (!pTarget) pTarget = m_creature->getVictim();
+ if (!pTarget) pTarget = me->getVictim();
if (pTarget)
{
DoCast(pTarget, SPELL_IMPALING_SPINE, true);
SpineTargetGUID = pTarget->GetGUID();
//must let target summon, otherwise you cannot click the spine
- pTarget->SummonGameObject(GOBJECT_SPINE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), m_creature->GetOrientation(), 0, 0, 0, 0, 30);
- DoScriptText(rand()%2 ? SAY_NEEDLE1 : SAY_NEEDLE2, m_creature);
+ pTarget->SummonGameObject(GOBJECT_SPINE, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 30);
+ DoScriptText(rand()%2 ? SAY_NEEDLE1 : SAY_NEEDLE2, me);
events.DelayEvents(1500, GCD_CAST);
events.DelayEvents(15000, GCD_YELL);
}
@@ -172,7 +172,7 @@ struct boss_najentusAI : public ScriptedAI
}
case EVENT_NEEDLE:
{
- //DoCast(m_creature, SPELL_NEEDLE_SPINE, true);
+ //DoCast(me, SPELL_NEEDLE_SPINE, true);
std::list<Unit*> pTargets;
SelectTargetList(pTargets, 3, SELECT_TARGET_RANDOM, 80, true);
for (std::list<Unit*>::const_iterator i = pTargets.begin(); i != pTargets.end(); ++i)
@@ -182,7 +182,7 @@ struct boss_najentusAI : public ScriptedAI
return;
}
case EVENT_YELL:
- DoScriptText(RAND(SAY_SPECIAL1, SAY_SPECIAL2), m_creature);
+ DoScriptText(RAND(SAY_SPECIAL1, SAY_SPECIAL2), me);
events.ScheduleEvent(EVENT_YELL, urand(25000,100000), GCD_YELL);
events.DelayEvents(15000, GCD_YELL);
break;
diff --git a/src/scripts/outland/black_temple/illidari_council.cpp b/src/scripts/outland/black_temple/illidari_council.cpp
index 078f065cb31..faa18048e3e 100644
--- a/src/scripts/outland/black_temple/illidari_council.cpp
+++ b/src/scripts/outland/black_temple/illidari_council.cpp
@@ -137,7 +137,7 @@ struct mob_blood_elf_council_voice_triggerAI : public ScriptedAI
// finds and stores the GUIDs for each Council member using instance data system.
void LoadCouncilGUIDs()
{
- if (ScriptedInstance* pInstance = m_creature->GetInstanceData())
+ if (ScriptedInstance* pInstance = me->GetInstanceData())
{
Council[0] = pInstance->GetData64(DATA_GATHIOSTHESHATTERER);
Council[1] = pInstance->GetData64(DATA_VERASDARKSHADOW);
@@ -163,7 +163,7 @@ struct mob_blood_elf_council_voice_triggerAI : public ScriptedAI
{
if (AggroYellTimer <= diff)
{
- if (Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter]))
+ if (Unit* pMember = Unit::GetUnit(*me, Council[YellCounter]))
{
DoScriptText(CouncilAggro[YellCounter].entry, pMember);
AggroYellTimer = CouncilAggro[YellCounter].timer;
@@ -178,7 +178,7 @@ struct mob_blood_elf_council_voice_triggerAI : public ScriptedAI
{
if (EnrageTimer <= diff)
{
- if (Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter]))
+ if (Unit* pMember = Unit::GetUnit(*me, Council[YellCounter]))
{
pMember->CastSpell(pMember, SPELL_BERSERK, true);
DoScriptText(CouncilEnrage[YellCounter].entry, pMember);
@@ -220,7 +220,7 @@ struct mob_illidari_councilAI : public ScriptedAI
Creature* pMember = NULL;
for (uint8 i = 0; i < 4; ++i)
{
- if (pMember = (Unit::GetCreature((*m_creature), Council[i])))
+ if (pMember = (Unit::GetCreature((*me), Council[i])))
{
if (!pMember->isAlive())
{
@@ -234,15 +234,15 @@ struct mob_illidari_councilAI : public ScriptedAI
if (pInstance)
{
pInstance->SetData(DATA_ILLIDARICOUNCILEVENT, NOT_STARTED);
- if (Creature* VoiceTrigger = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))))
+ if (Creature* VoiceTrigger = (Unit::GetCreature(*me, pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))))
VoiceTrigger->AI()->EnterEvadeMode();
}
EventBegun = false;
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetDisplayId(11686);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetDisplayId(11686);
}
void EnterCombat(Unit *who) {}
@@ -262,7 +262,7 @@ struct mob_illidari_councilAI : public ScriptedAI
Council[3] = pInstance->GetData64(DATA_VERASDARKSHADOW);
// Start the event for the Voice Trigger
- if (Creature* VoiceTrigger = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))))
+ if (Creature* VoiceTrigger = (Unit::GetCreature(*me, pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))))
{
CAST_AI(mob_blood_elf_council_voice_triggerAI, VoiceTrigger->AI())->LoadCouncilGUIDs();
CAST_AI(mob_blood_elf_council_voice_triggerAI, VoiceTrigger->AI())->EventStarted = true;
@@ -273,7 +273,7 @@ struct mob_illidari_councilAI : public ScriptedAI
Unit* Member = NULL;
if (Council[i])
{
- Member = Unit::GetUnit((*m_creature), Council[i]);
+ Member = Unit::GetUnit((*me), Council[i]);
if (Member && Member->isAlive())
CAST_CRE(Member)->AI()->AttackStart(pTarget);
}
@@ -297,16 +297,16 @@ struct mob_illidari_councilAI : public ScriptedAI
{
if (pInstance)
{
- if (Creature* VoiceTrigger = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))))
+ if (Creature* VoiceTrigger = (Unit::GetCreature(*me, pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))))
VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
pInstance->SetData(DATA_ILLIDARICOUNCILEVENT, DONE);
- //m_creature->SummonCreature(AKAMAID,746.466980f,304.394989f,311.90208f,6.272870f,TEMPSUMMON_DEAD_DESPAWN,0);
+ //me->SummonCreature(AKAMAID,746.466980f,304.394989f,311.90208f,6.272870f,TEMPSUMMON_DEAD_DESPAWN,0);
}
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
return;
}
- Creature* pMember = (Unit::GetCreature(*m_creature, Council[DeathCount]));
+ Creature* pMember = (Unit::GetCreature(*me, Council[DeathCount]));
if (pMember && pMember->isAlive())
pMember->DealDamage(pMember, pMember->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
++DeathCount;
@@ -323,7 +323,7 @@ struct mob_illidari_councilAI : public ScriptedAI
{
if (Council[i])
{
- if (Creature* Member = (Unit::GetCreature((*m_creature), Council[i])))
+ if (Creature* Member = (Unit::GetCreature((*me), Council[i])))
{
// This is the evade/death check.
if (Member->isAlive() && !Member->getVictim())
@@ -368,7 +368,7 @@ struct boss_illidari_councilAI : public ScriptedAI
{
if (pInstance)
{
- Creature* Controller = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ILLIDARICOUNCIL)));
+ Creature* Controller = (Unit::GetCreature(*me, pInstance->GetData64(DATA_ILLIDARICOUNCIL)));
if (Controller)
CAST_AI(mob_illidari_councilAI, Controller->AI())->StartEvent(who);
}
@@ -391,8 +391,8 @@ struct boss_illidari_councilAI : public ScriptedAI
{
for (uint8 i = 0; i < 4; ++i)
{
- if (Unit* pUnit = Unit::GetUnit(*m_creature, Council[i]))
- if (pUnit != m_creature && pUnit->getVictim())
+ if (Unit* pUnit = Unit::GetUnit(*me, Council[i]))
+ if (pUnit != me && pUnit->getVictim())
{
AttackStart(pUnit->getVictim());
return;
@@ -403,14 +403,14 @@ struct boss_illidari_councilAI : public ScriptedAI
void DamageTaken(Unit* done_by, uint32 &damage)
{
- if (done_by == m_creature)
+ if (done_by == me)
return;
damage /= 4;
for (uint8 i = 0; i < 4; ++i)
{
- if (Creature* pUnit = Unit::GetCreature(*m_creature, Council[i]))
- if (pUnit != m_creature && damage < pUnit->GetHealth())
+ if (Creature* pUnit = Unit::GetCreature(*me, Council[i]))
+ if (pUnit != me && damage < pUnit->GetHealth())
{
pUnit->SetHealth(pUnit->GetHealth() - damage);
pUnit->LowerPlayerDamageReq(damage);
@@ -456,24 +456,24 @@ struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
void KilledUnit(Unit *victim)
{
- DoScriptText(SAY_GATH_SLAY, m_creature);
+ DoScriptText(SAY_GATH_SLAY, me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_GATH_DEATH, m_creature);
+ DoScriptText(SAY_GATH_DEATH, me);
}
Unit* SelectCouncilMember()
{
- Unit* pUnit = m_creature;
+ Unit* pUnit = me;
uint32 member = 0; // He chooses Lady Malande most often
if (rand()%10 == 0) // But there is a chance he picks someone else.
member = urand(1, 3);
if (member != 2) // No need to create another pointer to us using Unit::GetUnit
- pUnit = Unit::GetUnit((*m_creature), Council[member]);
+ pUnit = Unit::GetUnit((*me), Council[member]);
return pUnit;
}
@@ -487,9 +487,9 @@ struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
}
for (uint8 i = 0; i < 4; ++i)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), Council[i]);
+ Unit* pUnit = Unit::GetUnit((*me), Council[i]);
if (pUnit)
- pUnit->CastSpell(pUnit, spellid, true, 0, 0, m_creature->GetGUID());
+ pUnit->CastSpell(pUnit, spellid, true, 0, 0, me->GetGUID());
}
}
@@ -513,7 +513,7 @@ struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
if (ConsecrationTimer <= diff)
{
- DoCast(m_creature, SPELL_CONSECRATION);
+ DoCast(me, SPELL_CONSECRATION);
ConsecrationTimer = 40000;
} else ConsecrationTimer -= diff;
@@ -522,7 +522,7 @@ struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
// is in ~10-40 yd range
- if (m_creature->IsInRange(pTarget, 10.0f, 40.0f, false))
+ if (me->IsInRange(pTarget, 10.0f, 40.0f, false))
{
DoCast(pTarget, SPELL_HAMMER_OF_JUSTICE);
HammerOfJusticeTimer = 20000;
@@ -534,8 +534,8 @@ struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
{
switch (urand(0,1))
{
- case 0: DoCast(m_creature, SPELL_SEAL_OF_COMMAND); break;
- case 1: DoCast(m_creature, SPELL_SEAL_OF_BLOOD); break;
+ case 0: DoCast(me, SPELL_SEAL_OF_COMMAND); break;
+ case 1: DoCast(me, SPELL_SEAL_OF_BLOOD); break;
}
SealTimer = 40000;
} else SealTimer -= diff;
@@ -573,12 +573,12 @@ struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI
void KilledUnit(Unit *victim)
{
- DoScriptText(SAY_ZERE_SLAY, m_creature);
+ DoScriptText(SAY_ZERE_SLAY, me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_ZERE_DEATH, m_creature);
+ DoScriptText(SAY_ZERE_DEATH, me);
}
void UpdateAI(const uint32 diff)
@@ -598,7 +598,7 @@ struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI
if (DampenMagicTimer <= diff)
{
- DoCast(m_creature, SPELL_DAMPEN_MAGIC);
+ DoCast(me, SPELL_DAMPEN_MAGIC);
Cooldown = 1000;
DampenMagicTimer = 67200; // almost 1,12 minutes
ArcaneBoltTimer += 1000; // Give the Mage some time to spellsteal Dampen.
@@ -606,14 +606,14 @@ struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI
if (ArcaneExplosionTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION);
+ DoCast(me->getVictim(), SPELL_ARCANE_EXPLOSION);
Cooldown = 1000;
ArcaneExplosionTimer = 14000;
} else ArcaneExplosionTimer -= diff;
if (ArcaneBoltTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_BOLT);
+ DoCast(me->getVictim(), SPELL_ARCANE_BOLT);
ArcaneBoltTimer = 3000;
Cooldown = 2000;
} else ArcaneBoltTimer -= diff;
@@ -661,12 +661,12 @@ struct boss_lady_malandeAI : public boss_illidari_councilAI
void KilledUnit(Unit *victim)
{
- DoScriptText(SAY_MALA_SLAY, m_creature);
+ DoScriptText(SAY_MALA_SLAY, me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_MALA_DEATH, m_creature);
+ DoScriptText(SAY_MALA_DEATH, me);
}
void UpdateAI(const uint32 diff)
@@ -685,7 +685,7 @@ struct boss_lady_malandeAI : public boss_illidari_councilAI
if (CircleOfHealingTimer <= diff)
{
- DoCast(m_creature, SPELL_CIRCLE_OF_HEALING);
+ DoCast(me, SPELL_CIRCLE_OF_HEALING);
CircleOfHealingTimer = 60000;
} else CircleOfHealingTimer -= diff;
@@ -700,7 +700,7 @@ struct boss_lady_malandeAI : public boss_illidari_councilAI
if (ReflectiveShieldTimer <= diff)
{
- DoCast(m_creature, SPELL_REFLECTIVE_SHIELD);
+ DoCast(me, SPELL_REFLECTIVE_SHIELD);
ReflectiveShieldTimer = 65000;
} else ReflectiveShieldTimer -= diff;
@@ -729,18 +729,18 @@ struct boss_veras_darkshadowAI : public boss_illidari_councilAI
AppearEnvenomTimer = 150000;
HasVanished = false;
- m_creature->SetVisibility(VISIBILITY_ON);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetVisibility(VISIBILITY_ON);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void KilledUnit(Unit *victim)
{
- DoScriptText(SAY_VERA_SLAY, m_creature);
+ DoScriptText(SAY_VERA_SLAY, me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_VERA_DEATH, m_creature);
+ DoScriptText(SAY_VERA_DEATH, me);
}
void UpdateAI(const uint32 diff)
@@ -752,13 +752,13 @@ struct boss_veras_darkshadowAI : public boss_illidari_councilAI
{
if (DeadlyPoisonTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON);
+ DoCast(me->getVictim(), SPELL_DEADLY_POISON);
DeadlyPoisonTimer = 15000 + rand()%31 * 1000;
} else DeadlyPoisonTimer -= diff;
if (AppearEnvenomTimer <= diff) // Cast Envenom. This is cast 4 seconds after Vanish is over
{
- DoCast(m_creature->getVictim(), SPELL_ENVENOM);
+ DoCast(me->getVictim(), SPELL_ENVENOM);
AppearEnvenomTimer = 90000;
} else AppearEnvenomTimer -= diff;
@@ -769,12 +769,12 @@ struct boss_veras_darkshadowAI : public boss_illidari_councilAI
VanishTimer = 30000;
AppearEnvenomTimer= 28000;
HasVanished = true;
- m_creature->SetVisibility(VISIBILITY_OFF);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetVisibility(VISIBILITY_OFF);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoResetThreat();
// Chase a unit. Check before DoMeleeAttackIfReady prevents from attacking
- m_creature->AddThreat(pTarget, 500000.0f);
- m_creature->GetMotionMaster()->MoveChase(pTarget);
+ me->AddThreat(pTarget, 500000.0f);
+ me->GetMotionMaster()->MoveChase(pTarget);
}
} else VanishTimer -= diff;
@@ -784,11 +784,11 @@ struct boss_veras_darkshadowAI : public boss_illidari_councilAI
{
if (VanishTimer <= diff) // Become attackable and poison current target
{
- Unit *pTarget = m_creature->getVictim();
+ Unit *pTarget = me->getVictim();
DoCast(pTarget, SPELL_DEADLY_POISON);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoResetThreat();
- m_creature->AddThreat(pTarget, 3000.0f); // Make Veras attack his target for a while, he will cast Envenom 4 seconds after.
+ me->AddThreat(pTarget, 3000.0f); // Make Veras attack his target for a while, he will cast Envenom 4 seconds after.
DeadlyPoisonTimer += 6000;
VanishTimer = 90000;
AppearEnvenomTimer = 4000;
@@ -797,9 +797,9 @@ struct boss_veras_darkshadowAI : public boss_illidari_councilAI
if (AppearEnvenomTimer <= diff) // Appear 2 seconds before becoming attackable (Shifting out of vanish)
{
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
- m_creature->SetVisibility(VISIBILITY_ON);
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveChase(me->getVictim());
+ me->SetVisibility(VISIBILITY_ON);
AppearEnvenomTimer = 6000;
} else AppearEnvenomTimer -= diff;
}
diff --git a/src/scripts/outland/blades_edge_mountains.cpp b/src/scripts/outland/blades_edge_mountains.cpp
index 1b83336622f..219095b2a07 100644
--- a/src/scripts/outland/blades_edge_mountains.cpp
+++ b/src/scripts/outland/blades_edge_mountains.cpp
@@ -117,7 +117,7 @@ struct mobs_nether_drakeAI : public ScriptedAI
void MoveInLineOfSight(Unit *who)
{
- if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
@@ -131,9 +131,9 @@ struct mobs_nether_drakeAI : public ScriptedAI
if (id == 0)
{
- m_creature->setDeathState(JUST_DIED);
- m_creature->RemoveCorpse();
- m_creature->SetHealth(0);
+ me->setDeathState(JUST_DIED);
+ me->RemoveCorpse();
+ me->SetHealth(0);
}
}
@@ -144,23 +144,23 @@ struct mobs_nether_drakeAI : public ScriptedAI
const uint32 entry_list[4] = {ENTRY_PROTO, ENTRY_ADOLE, ENTRY_MATUR, ENTRY_NIHIL};
int cid = rand()%(4-1);
- if (entry_list[cid] == m_creature->GetEntry())
+ if (entry_list[cid] == me->GetEntry())
++cid;
//we are nihil, so say before transform
- if (m_creature->GetEntry() == ENTRY_NIHIL)
+ if (me->GetEntry() == ENTRY_NIHIL)
{
- DoScriptText(SAY_NIHIL_INTERRUPT, m_creature);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ DoScriptText(SAY_NIHIL_INTERRUPT, me);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
IsNihil = false;
}
- if (m_creature->UpdateEntry(entry_list[cid]))
+ if (me->UpdateEntry(entry_list[cid]))
{
if (entry_list[cid] == ENTRY_NIHIL)
{
EnterEvadeMode();
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
IsNihil = true;
}else
AttackStart(caster);
@@ -177,25 +177,25 @@ struct mobs_nether_drakeAI : public ScriptedAI
switch(NihilSpeech_Phase)
{
case 0:
- DoScriptText(SAY_NIHIL_1, m_creature);
+ DoScriptText(SAY_NIHIL_1, me);
++NihilSpeech_Phase;
break;
case 1:
- DoScriptText(SAY_NIHIL_2, m_creature);
+ DoScriptText(SAY_NIHIL_2, me);
++NihilSpeech_Phase;
break;
case 2:
- DoScriptText(SAY_NIHIL_3, m_creature);
+ DoScriptText(SAY_NIHIL_3, me);
++NihilSpeech_Phase;
break;
case 3:
- DoScriptText(SAY_NIHIL_4, m_creature);
+ DoScriptText(SAY_NIHIL_4, me);
++NihilSpeech_Phase;
break;
case 4:
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
//take off to location above
- m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ()+50.0f);
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX()+50.0f, me->GetPositionY(), me->GetPositionZ()+50.0f);
++NihilSpeech_Phase;
break;
}
@@ -211,13 +211,13 @@ struct mobs_nether_drakeAI : public ScriptedAI
if (IntangiblePresence_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_INTANGIBLE_PRESENCE);
+ DoCast(me->getVictim(), SPELL_INTANGIBLE_PRESENCE);
IntangiblePresence_Timer = 15000+rand()%15000;
} else IntangiblePresence_Timer -= diff;
if (ManaBurn_Timer <= diff)
{
- Unit *pTarget = m_creature->getVictim();
+ Unit *pTarget = me->getVictim();
if (pTarget && pTarget->getPowerType() == POWER_MANA)
DoCast(pTarget, SPELL_MANA_BURN);
ManaBurn_Timer = 8000+rand()%8000;
@@ -225,7 +225,7 @@ struct mobs_nether_drakeAI : public ScriptedAI
if (ArcaneBlast_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_BLAST);
+ DoCast(me->getVictim(), SPELL_ARCANE_BLAST);
ArcaneBlast_Timer = 2500+rand()%5000;
} else ArcaneBlast_Timer -= diff;
@@ -260,9 +260,9 @@ struct npc_daranelleAI : public ScriptedAI
{
if (who->GetTypeId() == TYPEID_PLAYER)
{
- if (who->HasAura(SPELL_LASHHAN_CHANNEL) && m_creature->IsWithinDistInMap(who, 10.0f))
+ if (who->HasAura(SPELL_LASHHAN_CHANNEL) && me->IsWithinDistInMap(who, 10.0f))
{
- DoScriptText(SAY_SPELL_INFLUENCE, m_creature, who);
+ DoScriptText(SAY_SPELL_INFLUENCE, me, who);
//TODO: Move the below to updateAI and run if this statement == true
DoCast(who, 37028, true);
}
diff --git a/src/scripts/outland/boss_doomlord_kazzak.cpp b/src/scripts/outland/boss_doomlord_kazzak.cpp
index b5aa660a5c5..8d364b1ec1d 100644
--- a/src/scripts/outland/boss_doomlord_kazzak.cpp
+++ b/src/scripts/outland/boss_doomlord_kazzak.cpp
@@ -70,12 +70,12 @@ struct boss_doomlordkazzakAI : public ScriptedAI
void JustRespawned()
{
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
}
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2), m_creature);
+ DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2), me);
}
void KilledUnit(Unit* victim)
@@ -84,14 +84,14 @@ struct boss_doomlordkazzakAI : public ScriptedAI
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
- DoCast(m_creature, SPELL_CAPTURESOUL);
+ DoCast(me, SPELL_CAPTURESOUL);
- DoScriptText(RAND(SAY_KILL1,SAY_KILL2,SAY_KILL3), m_creature);
+ DoScriptText(RAND(SAY_KILL1,SAY_KILL2,SAY_KILL3), me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void UpdateAI(const uint32 diff)
@@ -103,28 +103,28 @@ struct boss_doomlordkazzakAI : public ScriptedAI
//ShadowVolley_Timer
if (ShadowVolley_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SHADOWVOLLEY);
+ DoCast(me->getVictim(), SPELL_SHADOWVOLLEY);
ShadowVolley_Timer = 4000 + rand()%2000;
} else ShadowVolley_Timer -= diff;
//Cleave_Timer
if (Cleave_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_CLEAVE);
+ DoCast(me->getVictim(), SPELL_CLEAVE);
Cleave_Timer = 8000 + rand()%4000;
} else Cleave_Timer -= diff;
//ThunderClap_Timer
if (ThunderClap_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_THUNDERCLAP);
+ DoCast(me->getVictim(), SPELL_THUNDERCLAP);
ThunderClap_Timer = 10000 + rand()%4000;
} else ThunderClap_Timer -= diff;
//VoidBolt_Timer
if (VoidBolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_VOIDBOLT);
+ DoCast(me->getVictim(), SPELL_VOIDBOLT);
VoidBolt_Timer = 15000 + rand()%3000;
} else VoidBolt_Timer -= diff;
@@ -142,8 +142,8 @@ struct boss_doomlordkazzakAI : public ScriptedAI
//Enrage_Timer
if (Enrage_Timer <= diff)
{
- DoScriptText(EMOTE_FRENZY, m_creature);
- DoCast(m_creature, SPELL_ENRAGE);
+ DoScriptText(EMOTE_FRENZY, me);
+ DoCast(me, SPELL_ENRAGE);
Enrage_Timer = 30000;
} else Enrage_Timer -= diff;
diff --git a/src/scripts/outland/boss_doomwalker.cpp b/src/scripts/outland/boss_doomwalker.cpp
index c1b6241802e..0591a3dee90 100644
--- a/src/scripts/outland/boss_doomwalker.cpp
+++ b/src/scripts/outland/boss_doomwalker.cpp
@@ -71,22 +71,22 @@ struct boss_doomwalkerAI : public ScriptedAI
if (rand()%5)
return;
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
}
void MoveInLineOfSight(Unit *who)
{
- if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who))
+ if (who && who->GetTypeId() == TYPEID_PLAYER && me->IsHostileTo(who))
{
if (who->HasAura(SPELL_MARK_DEATH,0))
{
@@ -101,11 +101,11 @@ struct boss_doomwalkerAI : public ScriptedAI
return;
//Spell Enrage, when hp <= 20% gain enrage
- if (((m_creature->GetHealth()*100)/ m_creature->GetMaxHealth()) <= 20)
+ if (((me->GetHealth()*100)/ me->GetMaxHealth()) <= 20)
{
if (Enrage_Timer <= diff)
{
- DoCast(m_creature, SPELL_ENRAGE);
+ DoCast(me, SPELL_ENRAGE);
Enrage_Timer = 6000;
InEnrage = true;
} else Enrage_Timer -= diff;
@@ -114,9 +114,9 @@ struct boss_doomwalkerAI : public ScriptedAI
//Spell Overrun
if (Overrun_Timer <= diff)
{
- DoScriptText(RAND(SAY_OVERRUN_1,SAY_OVERRUN_2), m_creature);
+ DoScriptText(RAND(SAY_OVERRUN_1,SAY_OVERRUN_2), me);
- DoCast(m_creature->getVictim(), SPELL_OVERRUN);
+ DoCast(me->getVictim(), SPELL_OVERRUN);
Overrun_Timer = 25000 + rand()%15000;
} else Overrun_Timer -= diff;
@@ -126,13 +126,13 @@ struct boss_doomwalkerAI : public ScriptedAI
if (rand()%2)
return;
- DoScriptText(RAND(SAY_EARTHQUAKE_1,SAY_EARTHQUAKE_2), m_creature);
+ DoScriptText(RAND(SAY_EARTHQUAKE_1,SAY_EARTHQUAKE_2), me);
//remove enrage before casting earthquake because enrage + earthquake = 16000dmg over 8sec and all dead
if (InEnrage)
- m_creature->RemoveAura(SPELL_ENRAGE);
+ me->RemoveAura(SPELL_ENRAGE);
- DoCast(m_creature, SPELL_EARTHQUAKE);
+ DoCast(me, SPELL_EARTHQUAKE);
Quake_Timer = 30000 + rand()%25000;
} else Quake_Timer -= diff;
@@ -143,7 +143,7 @@ struct boss_doomwalkerAI : public ScriptedAI
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
if (!pTarget)
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
if (pTarget)
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
@@ -154,7 +154,7 @@ struct boss_doomwalkerAI : public ScriptedAI
//Spell Sunder Armor
if (Armor_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SUNDER_ARMOR);
+ DoCast(me->getVictim(), SPELL_SUNDER_ARMOR);
Armor_Timer = 10000 + rand()%15000;
} else Armor_Timer -= diff;
diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
index e992d6258f8..1733b174dcc 100644
--- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
+++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
@@ -132,7 +132,7 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
if (RAdvisors[i])
{
- pAdvisor = (Unit::GetCreature((*m_creature), RAdvisors[i]));
+ pAdvisor = (Unit::GetCreature((*me), RAdvisors[i]));
if (pAdvisor && !pAdvisor->isAlive())
{
pAdvisor->Respawn();
@@ -147,20 +147,20 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
void EventSharkkisDeath()
{
- DoScriptText(SAY_GAIN_ABILITY1, m_creature);
- DoCast(m_creature, SPELL_POWER_OF_SHARKKIS);
+ DoScriptText(SAY_GAIN_ABILITY1, me);
+ DoCast(me, SPELL_POWER_OF_SHARKKIS);
}
void EventTidalvessDeath()
{
- DoScriptText(SAY_GAIN_ABILITY2, m_creature);
- DoCast(m_creature, SPELL_POWER_OF_TIDALVESS);
+ DoScriptText(SAY_GAIN_ABILITY2, me);
+ DoCast(me, SPELL_POWER_OF_TIDALVESS);
}
void EventCaribdisDeath()
{
- DoScriptText(SAY_GAIN_ABILITY3, m_creature);
- DoCast(m_creature, SPELL_POWER_OF_CARIBDIS);
+ DoScriptText(SAY_GAIN_ABILITY3, me);
+ DoCast(me, SPELL_POWER_OF_CARIBDIS);
}
void GetAdvisors()
@@ -180,7 +180,7 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
GetAdvisors();
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
DoZoneInCombat();
pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
@@ -189,18 +189,18 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
}
void JustDied(Unit *killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, DONE);
//support for quest 10944
- m_creature->SummonCreature(SEER_OLUM, OLUM_X, OLUM_Y, OLUM_Z, OLUM_O, TEMPSUMMON_TIMED_DESPAWN, 3600000);
+ me->SummonCreature(SEER_OLUM, OLUM_X, OLUM_Y, OLUM_Z, OLUM_O, TEMPSUMMON_TIMED_DESPAWN, 3600000);
}
void EnterCombat(Unit *who)
@@ -211,9 +211,9 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
if (pTarget)
{
@@ -241,7 +241,7 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
//if there aren't other units, cast on the tank
if (!pTarget)
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
if (pTarget)
DoCast(pTarget, SPELL_CATACLYSMIC_BOLT);
@@ -251,19 +251,19 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
//SearNova_Timer
if (SearNova_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SEAR_NOVA);
+ DoCast(me->getVictim(), SPELL_SEAR_NOVA);
SearNova_Timer = 20000+rand()%40000;
} else SearNova_Timer -= diff;
//Enrage_Timer
if (Enrage_Timer <= diff)
{
- DoCast(m_creature, SPELL_ENRAGE);
+ DoCast(me, SPELL_ENRAGE);
Enrage_Timer = 90000;
} else Enrage_Timer -= diff;
//Blessing of Tides Trigger
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 75 && !BlessingOfTides)
+ if ((me->GetHealth()*100 / me->GetMaxHealth()) <= 75 && !BlessingOfTides)
{
BlessingOfTides = true;
bool continueTriggering;
@@ -271,7 +271,7 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
for (uint8 i = 0; i < 4; ++i)
if (Advisors[i])
{
- Advisor = (Unit::GetCreature(*m_creature, Advisors[i]));
+ Advisor = (Unit::GetCreature(*me, Advisors[i]));
if (Advisor)
{
if (Advisor->isAlive())
@@ -283,9 +283,9 @@ struct boss_fathomlord_karathressAI : public ScriptedAI
}
if (continueTriggering)
{
- DoCast(m_creature, SPELL_BLESSING_OF_THE_TIDES);
- m_creature->MonsterYell(SAY_GAIN_BLESSING_OF_TIDES, LANG_UNIVERSAL, NULL);
- DoPlaySoundToSet(m_creature, SOUND_GAIN_BLESSING_OF_TIDES);
+ DoCast(me, SPELL_BLESSING_OF_THE_TIDES);
+ me->MonsterYell(SAY_GAIN_BLESSING_OF_TIDES, LANG_UNIVERSAL, NULL);
+ DoPlaySoundToSet(me, SOUND_GAIN_BLESSING_OF_TIDES);
}
}
@@ -321,7 +321,7 @@ struct boss_fathomguard_sharkkisAI : public ScriptedAI
pet = false;
- Creature *Pet = Unit::GetCreature(*m_creature, SummonedPet);
+ Creature *Pet = Unit::GetCreature(*me, SummonedPet);
if (Pet && Pet->isAlive())
{
Pet->DealDamage(Pet, Pet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
@@ -338,7 +338,7 @@ struct boss_fathomguard_sharkkisAI : public ScriptedAI
if (pInstance)
{
Creature *Karathress = NULL;
- Karathress = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
+ Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
if (Karathress)
CAST_AI(boss_fathomlord_karathressAI, Karathress->AI())->EventSharkkisDeath();
@@ -358,9 +358,9 @@ struct boss_fathomguard_sharkkisAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
if (pTarget)
{
@@ -382,22 +382,22 @@ struct boss_fathomguard_sharkkisAI : public ScriptedAI
//LeechingThrow_Timer
if (LeechingThrow_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_LEECHING_THROW);
+ DoCast(me->getVictim(), SPELL_LEECHING_THROW);
LeechingThrow_Timer = 20000;
} else LeechingThrow_Timer -= diff;
//Multishot_Timer
if (Multishot_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_MULTISHOT);
+ DoCast(me->getVictim(), SPELL_MULTISHOT);
Multishot_Timer = 20000;
} else Multishot_Timer -= diff;
//TheBeastWithin_Timer
if (TheBeastWithin_Timer <= diff)
{
- DoCast(m_creature, SPELL_THE_BEAST_WITHIN);
- Creature *Pet = Unit::GetCreature(*m_creature, SummonedPet);
+ DoCast(me, SPELL_THE_BEAST_WITHIN);
+ Creature *Pet = Unit::GetCreature(*me, SummonedPet);
if (Pet && Pet->isAlive())
{
Pet->CastSpell(Pet, SPELL_PET_ENRAGE, true);
@@ -422,7 +422,7 @@ struct boss_fathomguard_sharkkisAI : public ScriptedAI
pet_id = CREATURE_FATHOM_SPOREBAT;
break;
}
- //DoCast(m_creature, spell_id, true);
+ //DoCast(me, spell_id, true);
Creature *Pet = DoSpawnCreature(pet_id,0,0,0,0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
if (Pet && pTarget)
@@ -467,10 +467,10 @@ struct boss_fathomguard_tidalvessAI : public ScriptedAI
if (pInstance)
{
Creature *Karathress = NULL;
- Karathress = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
+ Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
if (Karathress)
- if (!m_creature->isAlive() && Karathress)
+ if (!me->isAlive() && Karathress)
CAST_AI(boss_fathomlord_karathressAI, Karathress->AI())->EventTidalvessDeath();
}
}
@@ -482,15 +482,15 @@ struct boss_fathomguard_tidalvessAI : public ScriptedAI
pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
pInstance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
}
- DoCast(m_creature, SPELL_WINDFURY_WEAPON);
+ DoCast(me, SPELL_WINDFURY_WEAPON);
}
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
if (pTarget)
{
@@ -509,26 +509,26 @@ struct boss_fathomguard_tidalvessAI : public ScriptedAI
return;
}
- if (!m_creature->HasAura(SPELL_WINDFURY_WEAPON))
+ if (!me->HasAura(SPELL_WINDFURY_WEAPON))
{
- DoCast(m_creature, SPELL_WINDFURY_WEAPON);
+ DoCast(me, SPELL_WINDFURY_WEAPON);
}
//FrostShock_Timer
if (FrostShock_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_FROST_SHOCK);
+ DoCast(me->getVictim(), SPELL_FROST_SHOCK);
FrostShock_Timer = 25000+rand()%5000;
} else FrostShock_Timer -= diff;
//Spitfire_Timer
if (Spitfire_Timer <= diff)
{
- DoCast(m_creature, SPELL_SPITFIRE_TOTEM);
- Unit *SpitfireTotem = Unit::GetUnit(*m_creature, CREATURE_SPITFIRE_TOTEM);
+ DoCast(me, SPELL_SPITFIRE_TOTEM);
+ Unit *SpitfireTotem = Unit::GetUnit(*me, CREATURE_SPITFIRE_TOTEM);
if (SpitfireTotem)
{
- CAST_CRE(SpitfireTotem)->AI()->AttackStart(m_creature->getVictim());
+ CAST_CRE(SpitfireTotem)->AI()->AttackStart(me->getVictim());
}
Spitfire_Timer = 60000;
} else Spitfire_Timer -= diff;
@@ -536,14 +536,14 @@ struct boss_fathomguard_tidalvessAI : public ScriptedAI
//PoisonCleansing_Timer
if (PoisonCleansing_Timer <= diff)
{
- DoCast(m_creature, SPELL_POISON_CLEANSING_TOTEM);
+ DoCast(me, SPELL_POISON_CLEANSING_TOTEM);
PoisonCleansing_Timer = 30000;
} else PoisonCleansing_Timer -= diff;
//Earthbind_Timer
if (Earthbind_Timer <= diff)
{
- DoCast(m_creature, SPELL_EARTHBIND_TOTEM);
+ DoCast(me, SPELL_EARTHBIND_TOTEM);
Earthbind_Timer = 45000;
} else Earthbind_Timer -= diff;
@@ -582,10 +582,10 @@ struct boss_fathomguard_caribdisAI : public ScriptedAI
if (pInstance)
{
Creature *Karathress = NULL;
- Karathress = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
+ Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
if (Karathress)
- if (!m_creature->isAlive() && Karathress)
+ if (!me->isAlive() && Karathress)
CAST_AI(boss_fathomlord_karathressAI, Karathress->AI())->EventCaribdisDeath();
}
}
@@ -602,9 +602,9 @@ struct boss_fathomguard_caribdisAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
if (pTarget)
{
@@ -626,30 +626,30 @@ struct boss_fathomguard_caribdisAI : public ScriptedAI
//WaterBoltVolley_Timer
if (WaterBoltVolley_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_WATER_BOLT_VOLLEY);
+ DoCast(me->getVictim(), SPELL_WATER_BOLT_VOLLEY);
WaterBoltVolley_Timer = 30000;
} else WaterBoltVolley_Timer -= diff;
//TidalSurge_Timer
if (TidalSurge_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_TIDAL_SURGE);
+ DoCast(me->getVictim(), SPELL_TIDAL_SURGE);
// Hacky way to do it - won't trigger elseways
- m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_TIDAL_SURGE_FREEZE, true);
+ me->getVictim()->CastSpell(me->getVictim(), SPELL_TIDAL_SURGE_FREEZE, true);
TidalSurge_Timer = 15000+rand()%5000;
} else TidalSurge_Timer -= diff;
//Cyclone_Timer
if (Cyclone_Timer <= diff)
{
- //DoCast(m_creature, SPELL_SUMMON_CYCLONE); // Doesn't work
+ //DoCast(me, SPELL_SUMMON_CYCLONE); // Doesn't work
Cyclone_Timer = 30000+rand()%10000;
- Creature *Cyclone = m_creature->SummonCreature(CREATURE_CYCLONE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
+ Creature *Cyclone = me->SummonCreature(CREATURE_CYCLONE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
if (Cyclone)
{
CAST_CRE(Cyclone)->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f);
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- Cyclone->setFaction(m_creature->getFaction());
+ Cyclone->setFaction(me->getFaction());
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)
@@ -686,19 +686,19 @@ struct boss_fathomguard_caribdisAI : public ScriptedAI
switch(rand()%4)
{
case 0:
- pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS));
+ pUnit = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESS));
break;
case 1:
- pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_SHARKKIS));
+ pUnit = Unit::GetUnit((*me), pInstance->GetData64(DATA_SHARKKIS));
break;
case 2:
- pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_TIDALVESS));
+ pUnit = Unit::GetUnit((*me), pInstance->GetData64(DATA_TIDALVESS));
break;
case 3:
- pUnit = m_creature;
+ pUnit = me;
break;
}
- } else pUnit = m_creature;
+ } else pUnit = me;
return pUnit;
}
diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
index 3190eaf7b51..737e18a2366 100644
--- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
+++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
@@ -76,7 +76,7 @@ EndScriptData */
struct boss_hydross_the_unstableAI : public ScriptedAI
{
- boss_hydross_the_unstableAI(Creature *c) : ScriptedAI(c), Summons(m_creature)
+ boss_hydross_the_unstableAI(Creature *c) : ScriptedAI(c), Summons(me)
{
pInstance = c->GetInstanceData();
}
@@ -111,11 +111,11 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
EnrageTimer = 600000;
CorruptedForm = false;
- m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
+ me->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
- m_creature->SetDisplayId(MODEL_CLEAN);
+ me->SetDisplayId(MODEL_CLEAN);
if (pInstance)
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
@@ -125,18 +125,18 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
void SummonBeams()
{
- Creature* beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-258.333,-356.34,22.0499,5.90835,TEMPSUMMON_CORPSE_DESPAWN,0);
+ Creature* beamer = me->SummonCreature(ENTRY_BEAM_DUMMY,-258.333,-356.34,22.0499,5.90835,TEMPSUMMON_CORPSE_DESPAWN,0);
if (beamer)
{
- beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
+ beamer->CastSpell(me,SPELL_BLUE_BEAM,true);
beamer->SetDisplayId(11686); //invisible
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
beams[0]=beamer->GetGUID();
}
- beamer = beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-219.918,-371.308,22.0042,2.73072,TEMPSUMMON_CORPSE_DESPAWN,0);
+ beamer = beamer = me->SummonCreature(ENTRY_BEAM_DUMMY,-219.918,-371.308,22.0042,2.73072,TEMPSUMMON_CORPSE_DESPAWN,0);
if (beamer)
{
- beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
+ beamer->CastSpell(me,SPELL_BLUE_BEAM,true);
beamer->SetDisplayId(11686); //invisible
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
beams[1]=beamer->GetGUID();
@@ -146,7 +146,7 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
{
for (uint8 i=0; i<2; ++i)
{
- Creature* mob = Unit::GetCreature(*m_creature,beams[i]);
+ Creature* mob = Unit::GetCreature(*me,beams[i]);
if (mob)
{
mob->setDeathState(DEAD);
@@ -156,7 +156,7 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
}
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
if (pInstance)
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
@@ -166,11 +166,11 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
{
if (CorruptedForm)
{
- DoScriptText(RAND(SAY_CORRUPT_SLAY1,SAY_CORRUPT_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_CORRUPT_SLAY1,SAY_CORRUPT_SLAY2), me);
}
else
{
- DoScriptText(RAND(SAY_CLEAN_SLAY1,SAY_CLEAN_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_CLEAN_SLAY1,SAY_CLEAN_SLAY2), me);
}
}
@@ -198,9 +198,9 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
void JustDied(Unit *victim)
{
if (CorruptedForm)
- DoScriptText(SAY_CORRUPT_DEATH, m_creature);
+ DoScriptText(SAY_CORRUPT_DEATH, me);
else
- DoScriptText(SAY_CLEAN_DEATH, m_creature);
+ DoScriptText(SAY_CLEAN_DEATH, me);
if (pInstance)
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE);
@@ -238,7 +238,7 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
case 5: mark_spell = SPELL_MARK_OF_CORRUPTION6; break;
}
- DoCast(m_creature->getVictim(), mark_spell);
+ DoCast(me->getVictim(), mark_spell);
if (MarkOfCorruption_Count < 5)
++MarkOfCorruption_Count;
@@ -260,14 +260,14 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
//PosCheck_Timer
if (PosCheck_Timer <= diff)
{
- if (m_creature->IsWithinDist2d(HYDROSS_X, HYDROSS_Y, SWITCH_RADIUS))
+ if (me->IsWithinDist2d(HYDROSS_X, HYDROSS_Y, SWITCH_RADIUS))
{
// switch to clean form
- m_creature->SetDisplayId(MODEL_CLEAN);
+ me->SetDisplayId(MODEL_CLEAN);
CorruptedForm = false;
MarkOfHydross_Count = 0;
- DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature);
+ DoScriptText(SAY_SWITCH_TO_CLEAN, me);
DoResetThreat();
SummonBeams();
@@ -277,9 +277,9 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
+ me->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
}
PosCheck_Timer = 2500;
@@ -305,7 +305,7 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
case 5: mark_spell = SPELL_MARK_OF_HYDROSS6; break;
}
- DoCast(m_creature->getVictim(), mark_spell);
+ DoCast(me->getVictim(), mark_spell);
if (MarkOfHydross_Count < 5)
++MarkOfHydross_Count;
@@ -327,14 +327,14 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
//PosCheck_Timer
if (PosCheck_Timer <= diff)
{
- if (!m_creature->IsWithinDist2d(HYDROSS_X, HYDROSS_Y, SWITCH_RADIUS))
+ if (!me->IsWithinDist2d(HYDROSS_X, HYDROSS_Y, SWITCH_RADIUS))
{
// switch to corrupted form
- m_creature->SetDisplayId(MODEL_CORRUPT);
+ me->SetDisplayId(MODEL_CORRUPT);
MarkOfCorruption_Count = 0;
CorruptedForm = true;
- DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature);
+ DoScriptText(SAY_SWITCH_TO_CORRUPT, me);
DoResetThreat();
DeSummonBeams();
@@ -344,9 +344,9 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
+ me->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
}
PosCheck_Timer = 2500;
@@ -356,7 +356,7 @@ struct boss_hydross_the_unstableAI : public ScriptedAI
//EnrageTimer
if (EnrageTimer <= diff)
{
- DoCast(m_creature, SPELL_ENRAGE);
+ DoCast(me, SPELL_ENRAGE);
EnrageTimer = 60000;
} else EnrageTimer -= diff;
diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
index cd7823cd006..2e66414afa4 100644
--- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
+++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
@@ -192,7 +192,7 @@ struct boss_lady_vashjAI : public ScriptedAI
Unit *remo;
for (uint8 i = 0; i < 4; ++i)
{
- remo = Unit::GetUnit(*m_creature, ShieldGeneratorChannel[i]);
+ remo = Unit::GetUnit(*me, ShieldGeneratorChannel[i]);
if (remo)
remo->setDeathState(JUST_DIED);
}
@@ -204,7 +204,7 @@ struct boss_lady_vashjAI : public ScriptedAI
ShieldGeneratorChannel[2] = 0;
ShieldGeneratorChannel[3] = 0;
- m_creature->SetCorpseDelay(1000*60*60);
+ me->SetCorpseDelay(1000*60*60);
}
//Called when a tainted elemental dies
@@ -216,12 +216,12 @@ struct boss_lady_vashjAI : public ScriptedAI
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(DATA_LADYVASHJEVENT, DONE);
@@ -229,7 +229,7 @@ struct boss_lady_vashjAI : public ScriptedAI
void StartEvent()
{
- DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3,SAY_AGGRO4), m_creature);
+ DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3,SAY_AGGRO4), me);
Phase = 1;
@@ -242,7 +242,7 @@ struct boss_lady_vashjAI : public ScriptedAI
if (pInstance)
{
//remove old tainted cores to prevent cheating in phase 2
- Map* pMap = m_creature->GetMap();
+ Map* pMap = me->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
@@ -263,22 +263,22 @@ struct boss_lady_vashjAI : public ScriptedAI
if (!Intro)
{
Intro = true;
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
}
if (!CanAttack)
return;
- if (!who || m_creature->getVictim())
+ if (!who || me->getVictim())
return;
- if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
+ if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(me) && me->IsHostileTo(who))
{
- float attackRadius = m_creature->GetAttackDistance(who);
- if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who))
+ float attackRadius = me->GetAttackDistance(who);
+ if (me->IsWithinDistInMap(who, attackRadius) && me->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && me->IsWithinLOSInMap(who))
{
//if (who->HasStealthAura())
// who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
- if (!m_creature->isInCombat())//AttackStart() sets UNIT_FLAG_IN_COMBAT, so this msut be before attacking
+ if (!me->isInCombat())//AttackStart() sets UNIT_FLAG_IN_COMBAT, so this msut be before attacking
StartEvent();
if (Phase != 2)
@@ -294,17 +294,17 @@ struct boss_lady_vashjAI : public ScriptedAI
case 0:
//Shoot
//Used in Phases 1 and 3 after Entangle or while having nobody in melee range. A shot that hits her target for 4097-5543 Physical damage.
- DoCast(m_creature->getVictim(), SPELL_SHOOT);
+ DoCast(me->getVictim(), SPELL_SHOOT);
break;
case 1:
//Multishot
//Used in Phases 1 and 3 after Entangle or while having nobody in melee range. A shot that hits 1 person and 4 people around him for 6475-7525 physical damage.
- DoCast(m_creature->getVictim(), SPELL_MULTI_SHOT);
+ DoCast(me->getVictim(), SPELL_MULTI_SHOT);
break;
}
if (rand()%3)
{
- DoScriptText(RAND(SAY_BOWSHOT1,SAY_BOWSHOT2), m_creature);
+ DoScriptText(RAND(SAY_BOWSHOT1,SAY_BOWSHOT2), me);
}
}
@@ -315,7 +315,7 @@ struct boss_lady_vashjAI : public ScriptedAI
if (AggroTimer <= diff)
{
CanAttack = true;
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
AggroTimer=19000;
}else
{
@@ -324,7 +324,7 @@ struct boss_lady_vashjAI : public ScriptedAI
}
}
//to prevent abuses during phase 2
- if (Phase == 2 && !m_creature->getVictim() && m_creature->isInCombat())
+ if (Phase == 2 && !me->getVictim() && me->isInCombat())
{
EnterEvadeMode();
return;
@@ -340,8 +340,8 @@ struct boss_lady_vashjAI : public ScriptedAI
{
//Shock Burst
//Randomly used in Phases 1 and 3 on Vashj's target, it's a Shock spell doing 8325-9675 nature damage and stunning the target for 5 seconds, during which she will not attack her target but switch to the next person on the aggro list.
- DoCast(m_creature->getVictim(), SPELL_SHOCK_BLAST);
- m_creature->TauntApply(m_creature->getVictim());
+ DoCast(me->getVictim(), SPELL_SHOCK_BLAST);
+ me->TauntApply(me->getVictim());
ShockBlast_Timer = 1000+rand()%14000; //random cooldown
} else ShockBlast_Timer -= diff;
@@ -368,7 +368,7 @@ struct boss_lady_vashjAI : public ScriptedAI
{
//Entangle
//Used in Phases 1 and 3, it casts Entangling Roots on everybody in a 15 yard radius of Vashj, immobilzing them for 10 seconds and dealing 500 damage every 2 seconds. It's not a magic effect so it cannot be dispelled, but is removed by various buffs such as Cloak of Shadows or Blessing of Freedom.
- DoCast(m_creature->getVictim(), SPELL_ENTANGLE);
+ DoCast(me->getVictim(), SPELL_ENTANGLE);
Entangle = true;
Entangle_Timer = 10000;
}
@@ -384,22 +384,22 @@ struct boss_lady_vashjAI : public ScriptedAI
if (Phase == 1)
{
//Start phase 2
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 70)
+ if ((me->GetHealth()*100 / me->GetMaxHealth()) < 70)
{
//Phase 2 begins when Vashj hits 70%. She will run to the middle of her platform and surround herself in a shield making her invulerable.
Phase = 2;
- m_creature->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->Clear();
DoTeleportTo(MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
Creature *pCreature;
for (uint8 i = 0; i < 4; ++i)
{
- pCreature = m_creature->SummonCreature(SHIED_GENERATOR_CHANNEL, ShieldGeneratorChannelPos[i][0], ShieldGeneratorChannelPos[i][1], ShieldGeneratorChannelPos[i][2], ShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
+ pCreature = me->SummonCreature(SHIED_GENERATOR_CHANNEL, ShieldGeneratorChannelPos[i][0], ShieldGeneratorChannelPos[i][1], ShieldGeneratorChannelPos[i][2], ShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
if (pCreature)
ShieldGeneratorChannel[i] = pCreature->GetGUID();
}
- DoScriptText(SAY_PHASE2, m_creature);
+ DoScriptText(SAY_PHASE2, me);
}
}
//Phase 3
@@ -409,7 +409,7 @@ struct boss_lady_vashjAI : public ScriptedAI
if (SummonSporebat_Timer <= diff)
{
Creature *Sporebat = NULL;
- Sporebat = m_creature->SummonCreature(TOXIC_SPOREBAT, SPOREBAT_X, SPOREBAT_Y, SPOREBAT_Z, SPOREBAT_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Sporebat = me->SummonCreature(TOXIC_SPOREBAT, SPOREBAT_X, SPOREBAT_Y, SPOREBAT_Z, SPOREBAT_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Sporebat)
{
@@ -439,12 +439,12 @@ struct boss_lady_vashjAI : public ScriptedAI
{
bool InMeleeRange = false;
Unit *pTarget;
- std::list<HostileReference *> t_list = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
+ pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
//if in melee range
- if (pTarget && pTarget->IsWithinDistInMap(m_creature, 5))
+ if (pTarget && pTarget->IsWithinDistInMap(me, 5))
{
InMeleeRange = true;
break;
@@ -470,7 +470,7 @@ struct boss_lady_vashjAI : public ScriptedAI
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
DoCast(pTarget, SPELL_FORKED_LIGHTNING);
@@ -481,7 +481,7 @@ struct boss_lady_vashjAI : public ScriptedAI
if (EnchantedElemental_Timer <= diff)
{
Creature *Elemental;
- Elemental = m_creature->SummonCreature(ENCHANTED_ELEMENTAL, ElementPos[EnchantedElemental_Pos][0], ElementPos[EnchantedElemental_Pos][1], ElementPos[EnchantedElemental_Pos][2], ElementPos[EnchantedElemental_Pos][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Elemental = me->SummonCreature(ENCHANTED_ELEMENTAL, ElementPos[EnchantedElemental_Pos][0], ElementPos[EnchantedElemental_Pos][1], ElementPos[EnchantedElemental_Pos][2], ElementPos[EnchantedElemental_Pos][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
if (EnchantedElemental_Pos == 7)
EnchantedElemental_Pos = 0;
@@ -496,7 +496,7 @@ struct boss_lady_vashjAI : public ScriptedAI
{
Creature *Tain_Elemental;
uint32 pos = rand()%8;
- Tain_Elemental = m_creature->SummonCreature(TAINTED_ELEMENTAL, ElementPos[pos][0], ElementPos[pos][1], ElementPos[pos][2], ElementPos[pos][3], TEMPSUMMON_DEAD_DESPAWN, 0);
+ Tain_Elemental = me->SummonCreature(TAINTED_ELEMENTAL, ElementPos[pos][0], ElementPos[pos][1], ElementPos[pos][2], ElementPos[pos][3], TEMPSUMMON_DEAD_DESPAWN, 0);
TaintedElemental_Timer = 120000;
} else TaintedElemental_Timer -= diff;
@@ -506,15 +506,15 @@ struct boss_lady_vashjAI : public ScriptedAI
{
uint32 pos = rand()%3;
Creature* CoilfangElite = NULL;
- CoilfangElite = m_creature->SummonCreature(COILFANG_ELITE, CoilfangElitePos[pos][0], CoilfangElitePos[pos][1], CoilfangElitePos[pos][2], CoilfangElitePos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
+ CoilfangElite = me->SummonCreature(COILFANG_ELITE, CoilfangElitePos[pos][0], CoilfangElitePos[pos][1], CoilfangElitePos[pos][2], CoilfangElitePos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
if (CoilfangElite)
{
Unit *pTarget = NULL;
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)
CoilfangElite->AI()->AttackStart(pTarget);
- else if (m_creature->getVictim())
- CoilfangElite->AI()->AttackStart(m_creature->getVictim());
+ else if (me->getVictim())
+ CoilfangElite->AI()->AttackStart(me->getVictim());
}
CoilfangElite_Timer = 45000+rand()%5000;
} else CoilfangElite_Timer -= diff;
@@ -524,15 +524,15 @@ struct boss_lady_vashjAI : public ScriptedAI
{
uint32 pos = rand()%3;
Creature* CoilfangStrider = NULL;
- CoilfangStrider = m_creature->SummonCreature(COILFANG_STRIDER, CoilfangStriderPos[pos][0], CoilfangStriderPos[pos][1], CoilfangStriderPos[pos][2], CoilfangStriderPos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
+ CoilfangStrider = me->SummonCreature(COILFANG_STRIDER, CoilfangStriderPos[pos][0], CoilfangStriderPos[pos][1], CoilfangStriderPos[pos][2], CoilfangStriderPos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
if (CoilfangStrider)
{
Unit *pTarget = NULL;
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)
CoilfangStrider->AI()->AttackStart(pTarget);
- else if (m_creature->getVictim())
- CoilfangStrider->AI()->AttackStart(m_creature->getVictim());
+ else if (me->getVictim())
+ CoilfangStrider->AI()->AttackStart(me->getVictim());
}
CoilfangStrider_Timer = 60000+rand()%10000;
} else CoilfangStrider_Timer -= diff;
@@ -544,16 +544,16 @@ struct boss_lady_vashjAI : public ScriptedAI
if (pInstance && pInstance->GetData(DATA_CANSTARTPHASE3))
{
//set life 50%
- m_creature->SetHealth(m_creature->GetMaxHealth()/2);
+ me->SetHealth(me->GetMaxHealth()/2);
- m_creature->RemoveAurasDueToSpell(SPELL_MAGIC_BARRIER);
+ me->RemoveAurasDueToSpell(SPELL_MAGIC_BARRIER);
- DoScriptText(SAY_PHASE3, m_creature);
+ DoScriptText(SAY_PHASE3, me);
Phase = 3;
//return to the tank
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
+ me->GetMotionMaster()->MoveChase(me->getVictim());
}
Check_Timer = 1000;
} else Check_Timer -= diff;
@@ -579,8 +579,8 @@ struct mob_enchanted_elementalAI : public ScriptedAI
void Reset()
{
- m_creature->SetSpeed(MOVE_WALK,0.6);//walk
- m_creature->SetSpeed(MOVE_RUN,0.6);//run
+ me->SetSpeed(MOVE_WALK,0.6);//walk
+ me->SetSpeed(MOVE_RUN,0.6);//run
move = 0;
phase = 1;
@@ -596,7 +596,7 @@ struct mob_enchanted_elementalAI : public ScriptedAI
}
else
{
- if (m_creature->GetDistance(ElementWPPos[i][0],ElementWPPos[i][1],ElementWPPos[i][2]) < m_creature->GetDistance(x,y,z))
+ if (me->GetDistance(ElementWPPos[i][0],ElementWPPos[i][1],ElementWPPos[i][2]) < me->GetDistance(x,y,z))
{
x = ElementWPPos[i][0];
y = ElementWPPos[i][1];
@@ -622,28 +622,28 @@ struct mob_enchanted_elementalAI : public ScriptedAI
if (move <= diff)
{
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ me->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
if (phase == 1)
- m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
- if (phase == 1 && m_creature->IsWithinDist3d(x,y,z, 0.1))
+ me->GetMotionMaster()->MovePoint(0, x, y, z);
+ if (phase == 1 && me->IsWithinDist3d(x,y,z, 0.1))
phase = 2;
if (phase == 2)
{
- m_creature->GetMotionMaster()->MovePoint(0, MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
+ me->GetMotionMaster()->MovePoint(0, MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
phase = 3;
}
if (phase == 3)
{
- m_creature->GetMotionMaster()->MovePoint(0, MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
- if (m_creature->IsWithinDist3d(MIDDLE_X, MIDDLE_Y, MIDDLE_Z, 3))
- DoCast(m_creature, SPELL_SURGE);
+ me->GetMotionMaster()->MovePoint(0, MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
+ if (me->IsWithinDist3d(MIDDLE_X, MIDDLE_Y, MIDDLE_Z, 3))
+ DoCast(me, SPELL_SURGE);
}
- if (Creature *Vashj = Unit::GetCreature(*m_creature, VashjGUID))
+ if (Creature *Vashj = Unit::GetCreature(*me, VashjGUID))
{
if (!Vashj->isInCombat() || CAST_AI(boss_lady_vashjAI, Vashj->AI())->Phase != 2 || Vashj->isDead())
{
//call Unsummon()
- m_creature->Kill(m_creature);
+ me->Kill(me);
}
}
move = 1000;
@@ -676,7 +676,7 @@ struct mob_tainted_elementalAI : public ScriptedAI
if (pInstance)
{
Creature *Vashj = NULL;
- Vashj = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_LADYVASHJ)));
+ Vashj = (Unit::GetCreature((*me), pInstance->GetData64(DATA_LADYVASHJ)));
if (Vashj)
CAST_AI(boss_lady_vashjAI, Vashj->AI())->EventTaintedElementalDeath();
@@ -685,7 +685,7 @@ struct mob_tainted_elementalAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- m_creature->AddThreat(who, 0.1f);
+ me->AddThreat(who, 0.1f);
}
void UpdateAI(const uint32 diff)
@@ -696,7 +696,7 @@ struct mob_tainted_elementalAI : public ScriptedAI
Unit *pTarget = NULL;
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
- if (pTarget && pTarget->IsWithinDistInMap(m_creature, 30))
+ if (pTarget && pTarget->IsWithinDistInMap(me, 30))
DoCast(pTarget, SPELL_POISON_BOLT);
PoisonBolt_Timer = 5000+rand()%5000;
@@ -706,7 +706,7 @@ struct mob_tainted_elementalAI : public ScriptedAI
if (Despawn_Timer <= diff)
{
//call Unsummon()
- m_creature->setDeathState(DEAD);
+ me->setDeathState(DEAD);
//to prevent crashes
Despawn_Timer = 1000;
@@ -733,8 +733,8 @@ struct mob_toxic_sporebatAI : public ScriptedAI
void Reset()
{
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- m_creature->setFaction(14);
+ me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->setFaction(14);
movement_timer = 0;
ToxicSpore_Timer = 5000;
bolt_timer = 5500;
@@ -766,7 +766,7 @@ struct mob_toxic_sporebatAI : public ScriptedAI
if (movement_timer <= diff)
{
uint32 rndpos = rand()%8;
- m_creature->GetMotionMaster()->MovePoint(1,SporebatWPPos[rndpos][0], SporebatWPPos[rndpos][1], SporebatWPPos[rndpos][2]);
+ me->GetMotionMaster()->MovePoint(1,SporebatWPPos[rndpos][0], SporebatWPPos[rndpos][1], SporebatWPPos[rndpos][2]);
movement_timer = 6000;
} else movement_timer -= diff;
@@ -777,7 +777,7 @@ struct mob_toxic_sporebatAI : public ScriptedAI
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)
{
- Creature* trig = m_creature->SummonCreature(TOXIC_SPORES_TRIGGER,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,30000);
+ Creature* trig = me->SummonCreature(TOXIC_SPORES_TRIGGER,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,30000);
if (trig)
{
trig->setFaction(14);
@@ -795,13 +795,13 @@ struct mob_toxic_sporebatAI : public ScriptedAI
{
//check if vashj is death
Unit *Vashj = NULL;
- Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
+ Vashj = Unit::GetUnit((*me), pInstance->GetData64(DATA_LADYVASHJ));
if (!Vashj || (Vashj && !Vashj->isAlive()) || (Vashj && CAST_AI(boss_lady_vashjAI, CAST_CRE(Vashj)->AI())->Phase != 3))
{
//remove
- m_creature->setDeathState(DEAD);
- m_creature->RemoveCorpse();
- m_creature->setFaction(35);
+ me->setDeathState(DEAD);
+ me->RemoveCorpse();
+ me->setFaction(35);
}
}
@@ -862,9 +862,9 @@ struct mob_shield_generator_channelAI : public ScriptedAI
{
Check_Timer = 0;
Casted = false;
- m_creature->SetDisplayId(11686); //invisible
+ me->SetDisplayId(11686); //invisible
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void EnterCombat(Unit *who) { return; }
@@ -879,7 +879,7 @@ struct mob_shield_generator_channelAI : public ScriptedAI
if (Check_Timer <= diff)
{
Unit *Vashj = NULL;
- Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
+ Vashj = Unit::GetUnit((*me), pInstance->GetData64(DATA_LADYVASHJ));
if (Vashj && Vashj->isAlive())
{
diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
index cd8d12a097e..48554d5de53 100644
--- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
+++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
@@ -84,14 +84,14 @@ struct mob_inner_demonAI : public ScriptedAI
}
void JustDied(Unit *victim)
{
- Unit* pUnit = Unit::GetUnit((*m_creature),victimGUID);
+ Unit* pUnit = Unit::GetUnit((*me),victimGUID);
if (pUnit && pUnit->HasAura(SPELL_INSIDIOUS_WHISPER))
pUnit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER);
}
void DamageTaken(Unit *done_by, uint32 &damage)
{
- if (done_by->GetGUID() != victimGUID && done_by->GetGUID() != m_creature->GetGUID())
+ if (done_by->GetGUID() != victimGUID && done_by->GetGUID() != me->GetGUID())
{
damage = 0;
DoModifyThreatPercent(done_by, -100);
@@ -109,33 +109,33 @@ struct mob_inner_demonAI : public ScriptedAI
if (!UpdateVictim())
return;
- if (m_creature->getVictim()->GetGUID() != victimGUID)
+ if (me->getVictim()->GetGUID() != victimGUID)
{
- DoModifyThreatPercent(m_creature->getVictim(), -100);
- Unit* owner = Unit::GetUnit((*m_creature),victimGUID);
+ DoModifyThreatPercent(me->getVictim(), -100);
+ Unit* owner = Unit::GetUnit((*me),victimGUID);
if (owner && owner->isAlive())
{
- m_creature->AddThreat(owner,999999);
+ me->AddThreat(owner,999999);
AttackStart(owner);
} else if (owner && owner->isDead())
{
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
return;
}
}
if (Link_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SOUL_LINK, true);
+ DoCast(me->getVictim(), SPELL_SOUL_LINK, true);
Link_Timer = 1000;
} else Link_Timer -= diff;
- if (!m_creature->HasAura(AURA_DEMONIC_ALIGNMENT))
- DoCast(m_creature, AURA_DEMONIC_ALIGNMENT, true);
+ if (!me->HasAura(AURA_DEMONIC_ALIGNMENT))
+ DoCast(me, AURA_DEMONIC_ALIGNMENT, true);
if (ShadowBolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SHADOWBOLT, false);
+ DoCast(me->getVictim(), SPELL_SHADOWBOLT, false);
ShadowBolt_Timer = 10000;
} else ShadowBolt_Timer -= diff;
@@ -187,19 +187,19 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
SwitchToHuman_Timer = 60000;
Berserk_Timer = 600000;
InnerDemons_Timer = 30000;
- m_creature->SetCanDualWield(true);
+ me->SetCanDualWield(true);
DealDamage = true;
DemonForm = false;
IsFinalForm = false;
NeedThreatReset = false;
EnrageUsed = false;
InnerDemon_Count = 0;
- m_creature->SetSpeed(MOVE_RUN, 2.0f, true);
- m_creature->SetDisplayId(MODEL_NIGHTELF);
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
- DoCast(m_creature, SPELL_DUAL_WIELD, true);
- m_creature->SetCorpseDelay(1000*60*60);
+ me->SetSpeed(MOVE_RUN, 2.0f, true);
+ me->SetDisplayId(MODEL_NIGHTELF);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
+ DoCast(me, SPELL_DUAL_WIELD, true);
+ me->SetCorpseDelay(1000*60*60);
if (pInstance)
pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, NOT_STARTED);
}
@@ -208,7 +208,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
{
for (uint8 i = 0; i < 3; ++i)
{
- if (Creature *add = Unit::GetCreature(*m_creature,SpellBinderGUID[i]))
+ if (Creature *add = Unit::GetCreature(*me,SpellBinderGUID[i]))
add->DisappearAndDie();
float nx = x;
@@ -217,7 +217,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
if (i == 0) {nx += 10; ny -= 5; o=2.5f;}
if (i == 1) {nx -= 8; ny -= 7; o=0.9f;}
if (i == 2) {nx -= 3; ny += 9; o=5.0f;}
- Creature* binder = m_creature->SummonCreature(MOB_SPELLBINDER,nx,ny,z,o,TEMPSUMMON_DEAD_DESPAWN,0);
+ Creature* binder = me->SummonCreature(MOB_SPELLBINDER,nx,ny,z,o,TEMPSUMMON_DEAD_DESPAWN,0);
if (binder)
SpellBinderGUID[i] = binder->GetGUID();
@@ -225,19 +225,19 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
}
void MoveInLineOfSight(Unit *who)
{
- if (m_creature->HasAura(AURA_BANISH))
+ if (me->HasAura(AURA_BANISH))
return;
- if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessiblePlaceFor(m_creature))
+ if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
{
- if (m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
+ if (me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
return;
- float attackRadius = m_creature->GetAttackDistance(who);
- if (m_creature->IsWithinDistInMap(who, attackRadius))
+ float attackRadius = me->GetAttackDistance(who);
+ if (me->IsWithinDistInMap(who, attackRadius))
{
// Check first that object is in an angle in front of this one before LoS check
- if (m_creature->HasInArc(M_PI/2.0f, who) && m_creature->IsWithinLOSInMap(who))
+ if (me->HasInArc(M_PI/2.0f, who) && me->IsWithinLOSInMap(who))
{
AttackStart(who);
}
@@ -247,7 +247,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
void StartEvent()
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
if (pInstance)
pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, IN_PROGRESS);
}
@@ -257,48 +257,48 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
uint8 AliveChannelers = 0;
for (uint8 i = 0; i < 3; ++i)
{
- Unit *add = Unit::GetUnit(*m_creature,SpellBinderGUID[i]);
+ Unit *add = Unit::GetUnit(*me,SpellBinderGUID[i]);
if (add && add->isAlive())
++AliveChannelers;
}
// channelers == 0 remove banish aura
- if (AliveChannelers == 0 && m_creature->HasAura(AURA_BANISH))
+ if (AliveChannelers == 0 && me->HasAura(AURA_BANISH))
{
// removing banish aura
- m_creature->RemoveAurasDueToSpell(AURA_BANISH);
+ me->RemoveAurasDueToSpell(AURA_BANISH);
// Leotheras is getting immune again
- m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, true);
+ me->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, true);
// changing model to bloodelf
- m_creature->SetDisplayId(MODEL_NIGHTELF);
+ me->SetDisplayId(MODEL_NIGHTELF);
// and reseting equipment
- m_creature->LoadEquipment(m_creature->GetEquipmentId());
+ me->LoadEquipment(me->GetEquipmentId());
if (pInstance && pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
{
Unit *victim = NULL;
- victim = Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
+ victim = Unit::GetUnit(*me, pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
if (victim)
- m_creature->getThreatManager().addThreat(victim, 1);
+ me->getThreatManager().addThreat(victim, 1);
StartEvent();
}
}
- else if (AliveChannelers != 0 && !m_creature->HasAura(AURA_BANISH))
+ else if (AliveChannelers != 0 && !me->HasAura(AURA_BANISH))
{
// channelers != 0 apply banish aura
// removing Leotheras banish immune to apply AURA_BANISH
- m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, false);
- DoCast(m_creature, AURA_BANISH);
+ me->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, false);
+ DoCast(me, AURA_BANISH);
// changing model
- m_creature->SetDisplayId(MODEL_DEMON);
+ me->SetDisplayId(MODEL_DEMON);
// and removing weapons
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
}
}
@@ -310,7 +310,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
if (InnderDemon[i])
{
//delete creature
- Creature* pCreature = Unit::GetCreature((*m_creature), InnderDemon[i]);
+ Creature* pCreature = Unit::GetCreature((*me), InnderDemon[i]);
if (pCreature && pCreature->isAlive())
{
pCreature->ForcedDespawn();
@@ -328,7 +328,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
{
if (InnderDemon[i] > 0)
{
- Creature* pUnit = Unit::GetCreature((*m_creature), InnderDemon[i]);
+ Creature* pUnit = Unit::GetCreature((*me), InnderDemon[i]);
if (pUnit && pUnit->isAlive())
{
Unit* pUnit_pTarget = Unit::GetUnit(*pUnit, CAST_AI(mob_inner_demonAI, pUnit->AI())->victimGUID);
@@ -349,22 +349,22 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
if (DemonForm)
{
- DoScriptText(RAND(SAY_DEMON_SLAY1,SAY_DEMON_SLAY2,SAY_DEMON_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_DEMON_SLAY1,SAY_DEMON_SLAY2,SAY_DEMON_SLAY3), me);
}
else
{
- DoScriptText(RAND(SAY_NIGHTELF_SLAY1,SAY_NIGHTELF_SLAY2,SAY_NIGHTELF_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_NIGHTELF_SLAY1,SAY_NIGHTELF_SLAY2,SAY_NIGHTELF_SLAY3), me);
}
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
//despawn copy
if (Demon)
{
- if (Creature* pDemon = Unit::GetCreature(*m_creature, Demon))
+ if (Creature* pDemon = Unit::GetCreature(*me, Demon))
pDemon->ForcedDespawn();
}
if (pInstance)
@@ -373,16 +373,16 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- if (m_creature->HasAura(AURA_BANISH))
+ if (me->HasAura(AURA_BANISH))
return;
- m_creature->LoadEquipment(m_creature->GetEquipmentId());
+ me->LoadEquipment(me->GetEquipmentId());
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
- if (m_creature->HasAura(AURA_BANISH) || !UpdateVictim())
+ if (me->HasAura(AURA_BANISH) || !UpdateVictim())
{
if (BanishTimer <= diff)
{
@@ -391,21 +391,21 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
} else BanishTimer -= diff;
return;
}
- if (m_creature->HasAura(SPELL_WHIRLWIND))
+ if (me->HasAura(SPELL_WHIRLWIND))
if (Whirlwind_Timer <= diff)
{
Unit *newTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (newTarget)
{
DoResetThreat();
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MovePoint(0,newTarget->GetPositionX(),newTarget->GetPositionY(),newTarget->GetPositionZ());
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MovePoint(0,newTarget->GetPositionX(),newTarget->GetPositionY(),newTarget->GetPositionZ());
}
Whirlwind_Timer = 2000;
} else Whirlwind_Timer -= diff;
// reseting after changing forms and after ending whirlwind
- if (NeedThreatReset && !m_creature->HasAura(SPELL_WHIRLWIND))
+ if (NeedThreatReset && !me->HasAura(SPELL_WHIRLWIND))
{
// when changing forms seting timers (or when ending whirlwind - to avoid adding new variable i use Whirlwind_Timer to countdown 2s while whirlwinding)
if (DemonForm)
@@ -415,26 +415,26 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
NeedThreatReset = false;
DoResetThreat();
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveChase(me->getVictim());
}
//Enrage_Timer (10 min)
if (Berserk_Timer < diff && !EnrageUsed)
{
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature, SPELL_BERSERK);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me, SPELL_BERSERK);
EnrageUsed = true;
} else Berserk_Timer -= diff;
if (!DemonForm)
{
//Whirldind Timer
- if (!m_creature->HasAura(SPELL_WHIRLWIND))
+ if (!me->HasAura(SPELL_WHIRLWIND))
{
if (Whirlwind_Timer <= diff)
{
- DoCast(m_creature, SPELL_WHIRLWIND);
+ DoCast(me, SPELL_WHIRLWIND);
// while whirlwinding this variable is used to countdown target's change
Whirlwind_Timer = 2000;
NeedThreatReset = true;
@@ -446,11 +446,11 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
if (SwitchToDemon_Timer <= diff)
{
//switch to demon form
- m_creature->RemoveAurasDueToSpell(SPELL_WHIRLWIND,0);
- m_creature->SetDisplayId(MODEL_DEMON);
- DoScriptText(SAY_SWITCH_TO_DEMON, m_creature);
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
+ me->RemoveAurasDueToSpell(SPELL_WHIRLWIND,0);
+ me->SetDisplayId(MODEL_DEMON);
+ DoScriptText(SAY_SWITCH_TO_DEMON, me);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
DemonForm = true;
NeedThreatReset = true;
SwitchToDemon_Timer = 45000;
@@ -460,30 +460,30 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
else
{
//ChaosBlast_Timer
- if (!m_creature->getVictim())
+ if (!me->getVictim())
return;
- if (m_creature->IsWithinDist(m_creature->getVictim(), 30))
- m_creature->StopMoving();
+ if (me->IsWithinDist(me->getVictim(), 30))
+ me->StopMoving();
if (ChaosBlast_Timer <= diff)
{
// will cast only when in range of spell
- if (m_creature->IsWithinDist(m_creature->getVictim(), 30))
+ if (me->IsWithinDist(me->getVictim(), 30))
{
- //DoCast(m_creature->getVictim(), SPELL_CHAOS_BLAST, true);
+ //DoCast(me->getVictim(), SPELL_CHAOS_BLAST, true);
int damage = 100;
- m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_CHAOS_BLAST, &damage, NULL, NULL, false, NULL, NULL, m_creature->GetGUID());
+ me->CastCustomSpell(me->getVictim(), SPELL_CHAOS_BLAST, &damage, NULL, NULL, false, NULL, NULL, me->GetGUID());
}
ChaosBlast_Timer = 3000;
} else ChaosBlast_Timer -= diff;
//Summon Inner Demon
if (InnerDemons_Timer <= diff)
{
- std::list<HostileReference *>& ThreatList = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference *>& ThreatList = me->getThreatManager().getThreatList();
std::vector<Unit *> TargetList;
for (std::list<HostileReference *>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr)
{
- Unit *tempTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
- if (tempTarget && tempTarget->GetTypeId() == TYPEID_PLAYER && tempTarget->GetGUID() != m_creature->getVictim()->GetGUID() && TargetList.size()<5)
+ Unit *tempTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
+ if (tempTarget && tempTarget->GetTypeId() == TYPEID_PLAYER && tempTarget->GetGUID() != me->getVictim()->GetGUID() && TargetList.size()<5)
TargetList.push_back(tempTarget);
}
SpellEntry *spell = GET_SPELL(SPELL_INSIDIOUS_WHISPER);
@@ -491,7 +491,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
{
if ((*itr) && (*itr)->isAlive())
{
- Creature * demon = m_creature->SummonCreature(INNER_DEMON_ID, (*itr)->GetPositionX()+10, (*itr)->GetPositionY()+10, (*itr)->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
+ Creature * demon = me->SummonCreature(INNER_DEMON_ID, (*itr)->GetPositionX()+10, (*itr)->GetPositionY()+10, (*itr)->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
if (demon)
{
demon->AI()->AttackStart((*itr));
@@ -510,7 +510,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
}
}
}
- DoScriptText(SAY_INNER_DEMONS, m_creature);
+ DoScriptText(SAY_INNER_DEMONS, me);
InnerDemons_Timer = 999999;
} else InnerDemons_Timer -= diff;
@@ -519,8 +519,8 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
if (SwitchToHuman_Timer <= diff)
{
//switch to nightelf form
- m_creature->SetDisplayId(MODEL_NIGHTELF);
- m_creature->LoadEquipment(m_creature->GetEquipmentId());
+ me->SetDisplayId(MODEL_NIGHTELF);
+ me->LoadEquipment(me->GetEquipmentId());
CastConsumingMadness();
DespawnDemon();
@@ -532,7 +532,7 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
} else SwitchToHuman_Timer -= diff;
}
- if (!IsFinalForm && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 15)
+ if (!IsFinalForm && (me->GetHealth()*100 / me->GetMaxHealth()) < 15)
{
//at this point he divides himself in two parts
CastConsumingMadness();
@@ -542,16 +542,16 @@ struct boss_leotheras_the_blindAI : public ScriptedAI
if (Copy)
{
Demon = Copy->GetGUID();
- if (m_creature->getVictim())
- Copy->AI()->AttackStart(m_creature->getVictim());
+ if (me->getVictim())
+ Copy->AI()->AttackStart(me->getVictim());
}
//set nightelf final form
IsFinalForm = true;
DemonForm = false;
- DoScriptText(SAY_FINAL_FORM, m_creature);
- m_creature->SetDisplayId(MODEL_NIGHTELF);
- m_creature->LoadEquipment(m_creature->GetEquipmentId());
+ DoScriptText(SAY_FINAL_FORM, me);
+ me->SetDisplayId(MODEL_NIGHTELF);
+ me->LoadEquipment(me->GetEquipmentId());
}
}
};
@@ -572,7 +572,7 @@ struct boss_leotheras_the_blind_demonformAI : public ScriptedAI
void StartEvent()
{
- DoScriptText(SAY_FREE, m_creature);
+ DoScriptText(SAY_FREE, me);
}
void KilledUnit(Unit *victim)
@@ -580,13 +580,13 @@ struct boss_leotheras_the_blind_demonformAI : public ScriptedAI
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
- DoScriptText(RAND(SAY_DEMON_SLAY1,SAY_DEMON_SLAY2,SAY_DEMON_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_DEMON_SLAY1,SAY_DEMON_SLAY2,SAY_DEMON_SLAY3), me);
}
void JustDied(Unit *victim)
{
//invisibility (blizzlike, at the end of the fight he doesn't die, he disappears)
- DoCast(m_creature, 8149, true);
+ DoCast(me, 8149, true);
}
void EnterCombat(Unit *who)
@@ -600,17 +600,17 @@ struct boss_leotheras_the_blind_demonformAI : public ScriptedAI
if (!UpdateVictim())
return;
//ChaosBlast_Timer
- if (m_creature->IsWithinDist(m_creature->getVictim(), 30))
- m_creature->StopMoving();
+ if (me->IsWithinDist(me->getVictim(), 30))
+ me->StopMoving();
if (ChaosBlast_Timer <= diff)
{
// will cast only when in range od spell
- if (m_creature->IsWithinDist(m_creature->getVictim(), 30))
+ if (me->IsWithinDist(me->getVictim(), 30))
{
- //DoCast(m_creature->getVictim(), SPELL_CHAOS_BLAST, true);
+ //DoCast(me->getVictim(), SPELL_CHAOS_BLAST, true);
int damage = 100;
- m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_CHAOS_BLAST, &damage, NULL, NULL, false, NULL, NULL, m_creature->GetGUID());
+ me->CastCustomSpell(me->getVictim(), SPELL_CHAOS_BLAST, &damage, NULL, NULL, false, NULL, NULL, me->GetGUID());
ChaosBlast_Timer = 3000;
}
} else ChaosBlast_Timer -= diff;
@@ -644,7 +644,7 @@ struct mob_greyheart_spellbinderAI : public ScriptedAI
if (pInstance)
{
pInstance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0);
- Creature *leotheras = Unit::GetCreature(*m_creature, leotherasGUID);
+ Creature *leotheras = Unit::GetCreature(*me, leotherasGUID);
if (leotheras && leotheras->isAlive())
CAST_AI(boss_leotheras_the_blindAI, leotheras->AI())->CheckChannelers(false);
}
@@ -652,7 +652,7 @@ struct mob_greyheart_spellbinderAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- m_creature->InterruptNonMeleeSpells(false);
+ me->InterruptNonMeleeSpells(false);
if (pInstance)
pInstance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, who->GetGUID());
}
@@ -665,11 +665,11 @@ struct mob_greyheart_spellbinderAI : public ScriptedAI
void CastChanneling()
{
- if (!m_creature->isInCombat() && !m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
+ if (!me->isInCombat() && !me->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
{
if (leotherasGUID)
{
- Creature *leotheras = Unit::GetCreature(*m_creature, leotherasGUID);
+ Creature *leotheras = Unit::GetCreature(*me, leotherasGUID);
if (leotheras && leotheras->isAlive())
DoCast(leotheras, BANISH_BEAM);
}
@@ -683,10 +683,10 @@ struct mob_greyheart_spellbinderAI : public ScriptedAI
if (!leotherasGUID)
leotherasGUID = pInstance->GetData64(DATA_LEOTHERAS);
- if (!m_creature->isInCombat() && pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
+ if (!me->isInCombat() && pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
{
Unit *victim = NULL;
- victim = Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
+ victim = Unit::GetUnit(*me, pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
if (victim)
AttackStart(victim);
}
@@ -716,7 +716,7 @@ struct mob_greyheart_spellbinderAI : public ScriptedAI
if (Earthshock_Timer <= diff)
{
- Map* pMap = m_creature->GetMap();
+ Map* pMap = me->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
{
diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
index 9e783d4c1eb..4d661bb2812 100644
--- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
+++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
@@ -66,7 +66,7 @@ float AddPos[9][3] =
struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
{
- boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature)
+ boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(me)
{
pInstance = c->GetInstanceData();
SpellEntry *TempSpell = GET_SPELL(SPELL_SPOUT_ANIM);
@@ -104,7 +104,7 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
}
void Reset()
{
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_LEVITATING);
+ me->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_LEVITATING);
SpoutAnimTimer = 1000;
RotTimer = 0;
WaterboltTimer = 15000;//give time to get in range when fight starts
@@ -128,10 +128,10 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
pInstance->SetData(DATA_THELURKERBELOWEVENT, NOT_STARTED);
pInstance->SetData(DATA_STRANGE_POOL, NOT_STARTED);
}
- DoCast(m_creature, SPELL_SUBMERGE);//submerge anim
- m_creature->SetVisibility(VISIBILITY_OFF);//we start invis under water, submerged
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ DoCast(me, SPELL_SUBMERGE);//submerge anim
+ me->SetVisibility(VISIBILITY_OFF);//we start invis under water, submerged
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
}
void JustDied(Unit* Killer)
@@ -153,10 +153,10 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
{
if (!CanStartEvent)//boss is invisible, don't attack
return;
- if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)))
+ if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)))
{
- float attackRadius = m_creature->GetAttackDistance(who);
- if (m_creature->IsWithinDistInMap(who, attackRadius))
+ float attackRadius = me->GetAttackDistance(who);
+ if (me->IsWithinDistInMap(who, attackRadius))
{
AttackStart(who);
}
@@ -177,15 +177,15 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
{
if (Submerged)
{
- m_creature->SetVisibility(VISIBILITY_ON);
+ me->SetVisibility(VISIBILITY_ON);
Submerged = false;
WaitTimer2 = 500;
}
if (!Submerged && WaitTimer2 <= diff)//wait 500ms before emerge anim
{
- m_creature->RemoveAllAuras();
- m_creature->RemoveFlag(UNIT_NPC_EMOTESTATE,EMOTE_STATE_SUBMERGED);
- DoCast(m_creature, SPELL_EMERGE, false);
+ me->RemoveAllAuras();
+ me->RemoveFlag(UNIT_NPC_EMOTESTATE,EMOTE_STATE_SUBMERGED);
+ DoCast(me, SPELL_EMERGE, false);
WaitTimer2 = 60000;//never reached
WaitTimer = 3000;
} else WaitTimer2 -= diff;
@@ -194,16 +194,16 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
{
WaitTimer = 3000;
CanStartEvent=true;//fresh fished from pool
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
} else WaitTimer -= diff;
}
return;
}
- if (m_creature->getThreatManager().getThreatList().empty())//check if should evade
+ if (me->getThreatManager().getThreatList().empty())//check if should evade
{
- if (m_creature->isInCombat())
+ if (me->isInCombat())
EnterEvadeMode();
return;
}
@@ -211,15 +211,15 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
{
if (PhaseTimer <= diff)
{
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature, SPELL_SUBMERGE);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me, SPELL_SUBMERGE);
PhaseTimer = 60000;//60secs submerged
Submerged = true;
} else PhaseTimer-=diff;
if (SpoutTimer <= diff)
{
- m_creature->MonsterTextEmote(EMOTE_SPOUT,0,true);
+ me->MonsterTextEmote(EMOTE_SPOUT,0,true);
me->SetReactState(REACT_PASSIVE);
me->GetMotionMaster()->MoveRotate(20000, rand()%2 ? ROTATE_DIRECTION_LEFT : ROTATE_DIRECTION_RIGHT);
SpoutTimer = 45000;
@@ -232,19 +232,19 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
if (WhirlTimer <= diff)
{
WhirlTimer = 18000;
- DoCast(m_creature, SPELL_WHIRL);
+ DoCast(me, SPELL_WHIRL);
} else WhirlTimer -= diff;
if (CheckTimer <= diff)//check if there are players in melee range
{
InRange = false;
- Map* pMap = m_creature->GetMap();
+ Map* pMap = me->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
if (!PlayerList.isEmpty())
{
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
- if (m_creature->IsWithinMeleeRange(i->getSource()))
+ if (me->IsWithinMeleeRange(i->getSource()))
InRange = true;
}
}
@@ -253,20 +253,20 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
if (RotTimer)
{
- Map* pMap = m_creature->GetMap();
+ Map* pMap = me->GetMap();
if (pMap->IsDungeon())
{
Map::PlayerList const &PlayerList = pMap->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
- if (i->getSource() && i->getSource()->isAlive() && m_creature->HasInArc((double)diff/20000*(double)M_PI*2,i->getSource()) && m_creature->IsWithinDist(i->getSource(), SPOUT_DIST) && !i->getSource()->IsInWater())
+ if (i->getSource() && i->getSource()->isAlive() && me->HasInArc((double)diff/20000*(double)M_PI*2,i->getSource()) && me->IsWithinDist(i->getSource(), SPOUT_DIST) && !i->getSource()->IsInWater())
DoCast(i->getSource(), SPELL_SPOUT, true);//only knock back palyers in arc, in 100yards, not in water
}
}
if (SpoutAnimTimer <= diff)
{
- DoCast(m_creature, SPELL_SPOUT_ANIM, true);
+ DoCast(me, SPELL_SPOUT_ANIM, true);
SpoutAnimTimer = 1000;
} else SpoutAnimTimer -= diff;
@@ -280,8 +280,8 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
if (GeyserTimer <= diff)
{
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
- if (!pTarget && m_creature->getVictim())
- pTarget = m_creature->getVictim();
+ if (!pTarget && me->getVictim())
+ pTarget = me->getVictim();
if (pTarget)
DoCast(pTarget, SPELL_GEYSER, true);
GeyserTimer = rand()%5000 + 15000;
@@ -292,8 +292,8 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
if (WaterboltTimer <= diff)
{
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
- if (!pTarget && m_creature->getVictim())
- pTarget = m_creature->getVictim();
+ if (!pTarget && me->getVictim())
+ pTarget = me->getVictim();
if (pTarget)
DoCast(pTarget, SPELL_WATERBOLT, true);
WaterboltTimer = 3000;
@@ -310,35 +310,35 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI
if (PhaseTimer <= diff)
{
Submerged = false;
- m_creature->InterruptNonMeleeSpells(false);//shouldn't be any
- m_creature->RemoveAllAuras();
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
- m_creature->RemoveFlag(UNIT_NPC_EMOTESTATE,EMOTE_STATE_SUBMERGED);
- DoCast(m_creature, SPELL_EMERGE, true);
+ me->InterruptNonMeleeSpells(false);//shouldn't be any
+ me->RemoveAllAuras();
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_NPC_EMOTESTATE,EMOTE_STATE_SUBMERGED);
+ DoCast(me, SPELL_EMERGE, true);
Spawned = false;
SpoutTimer = 3000; // directly cast Spout after emerging!
PhaseTimer = 120000;
return;
} else PhaseTimer-=diff;
- if (m_creature->getThreatManager().getThreatList().empty())//check if should evade
+ if (me->getThreatManager().getThreatList().empty())//check if should evade
{
EnterEvadeMode();
return;
}
- if (!m_creature->isInCombat())
+ if (!me->isInCombat())
DoZoneInCombat();
if (!Spawned)
{
- m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
//spawn adds
for (uint8 i = 0; i < 9; ++i)
{
Creature* Summoned;
if (i < 6)
- Summoned = m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
- else Summoned = m_creature->SummonCreature(MOB_COILFANG_GUARDIAN,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Summoned = me->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ else Summoned = me->SummonCreature(MOB_COILFANG_GUARDIAN,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Summoned)
Summons.Summon(Summoned);
@@ -394,9 +394,9 @@ struct mob_coilfang_ambusherAI : public Scripted_NoMovementAI
void MoveInLineOfSight(Unit *who)
{
- if (!who || m_creature->getVictim()) return;
+ if (!who || me->getVictim()) return;
- if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who) && m_creature->IsWithinDistInMap(who, 45))
+ if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(me) && me->IsHostileTo(who) && me->IsWithinDistInMap(who, 45))
{
AttackStart(who);
}
@@ -406,8 +406,8 @@ struct mob_coilfang_ambusherAI : public Scripted_NoMovementAI
{
if (MultiShotTimer <= diff)
{
- if (m_creature->getVictim())
- DoCast(m_creature->getVictim(), SPELL_SPREAD_SHOT, true);
+ if (me->getVictim())
+ DoCast(me->getVictim(), SPELL_SPREAD_SHOT, true);
MultiShotTimer = 10000+rand()%10000;
ShootBowTimer += 1500;//add global cooldown
@@ -419,7 +419,7 @@ struct mob_coilfang_ambusherAI : public Scripted_NoMovementAI
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
int bp0 = 1100;
if (pTarget)
- m_creature->CastCustomSpell(pTarget,SPELL_SHOOT,&bp0,NULL,NULL,true);
+ me->CastCustomSpell(pTarget,SPELL_SHOOT,&bp0,NULL,NULL,true);
ShootBowTimer = 4000+rand()%5000;
MultiShotTimer += 1500;//add global cooldown
} else ShootBowTimer -= diff;
diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
index 3ba2272463c..c2b88822824 100644
--- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
+++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
@@ -138,7 +138,7 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
void StartEvent()
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
if (pInstance)
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
@@ -146,12 +146,12 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE);
@@ -159,7 +159,7 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- PlayerList = &m_creature->GetMap()->GetPlayers();
+ PlayerList = &me->GetMap()->GetPlayers();
Playercount = PlayerList->getSize();
StartEvent();
}
@@ -186,22 +186,22 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
{
if (!Earthquake)
{
- DoCast(m_creature->getVictim(), SPELL_EARTHQUAKE);
+ DoCast(me->getVictim(), SPELL_EARTHQUAKE);
Earthquake = true;
Earthquake_Timer = 10000;
}
else
{
- DoScriptText(RAND(SAY_SUMMON1,SAY_SUMMON2), m_creature);
+ DoScriptText(RAND(SAY_SUMMON1,SAY_SUMMON2), me);
for (uint8 i = 0; i < 10; ++i)
{
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
- Creature* Murloc = m_creature->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
+ Creature* Murloc = me->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
if (pTarget && Murloc)
Murloc->AI()->AttackStart(pTarget);
}
- DoScriptText(EMOTE_EARTHQUAKE, m_creature);
+ DoScriptText(EMOTE_EARTHQUAKE, me);
Earthquake = false;
Earthquake_Timer = 40000+rand()%5000;
}
@@ -210,7 +210,7 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
//TidalWave_Timer
if (TidalWave_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_TIDAL_WAVE);
+ DoCast(me->getVictim(), SPELL_TIDAL_WAVE);
TidalWave_Timer = 20000;
} else TidalWave_Timer -= diff;
@@ -244,14 +244,14 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
}
}
- DoScriptText(RAND(SAY_SUMMON_BUBL1,SAY_SUMMON_BUBL2), m_creature);
+ DoScriptText(RAND(SAY_SUMMON_BUBL1,SAY_SUMMON_BUBL2), me);
- DoScriptText(EMOTE_WATERY_GRAVE, m_creature);
+ DoScriptText(EMOTE_WATERY_GRAVE, me);
WateryGrave_Timer = 30000;
} else WateryGrave_Timer -= diff;
//Start Phase2
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
+ if ((me->GetHealth()*100 / me->GetMaxHealth()) < 25)
Phase2 = true;
}
else
@@ -278,7 +278,7 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
globulelist.insert(pGlobuleTarget->GetGUID());
pGlobuleTarget->CastSpell(pGlobuleTarget, globulespell[g], true);
}
- DoScriptText(EMOTE_WATERY_GLOBULES, m_creature);
+ DoScriptText(EMOTE_WATERY_GLOBULES, me);
WateryGlobules_Timer = 25000;
} else WateryGlobules_Timer -= diff;
}
@@ -300,19 +300,19 @@ struct mob_water_globuleAI : public ScriptedAI
{
Check_Timer = 1000;
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->setFaction(14);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->setFaction(14);
}
void EnterCombat(Unit *who) {}
void MoveInLineOfSight(Unit *who)
{
- if (!who || m_creature->getVictim())
+ if (!who || me->getVictim())
return;
- if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
+ if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(me) && me->IsHostileTo(who))
{
//no attack radius check - it attacks the first target that moves in his los
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
@@ -328,12 +328,12 @@ struct mob_water_globuleAI : public ScriptedAI
if (Check_Timer <= diff)
{
- if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
+ if (me->IsWithinDistInMap(me->getVictim(), 5))
{
- DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION);
+ DoCast(me->getVictim(), SPELL_GLOBULE_EXPLOSION);
//despawn
- m_creature->ForcedDespawn();
+ me->ForcedDespawn();
return;
}
Check_Timer = 500;
diff --git a/src/scripts/outland/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp b/src/scripts/outland/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
index 7fda5e69384..7b4f0fac6aa 100644
--- a/src/scripts/outland/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
+++ b/src/scripts/outland/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
@@ -66,7 +66,7 @@ struct boss_thespiaAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEAD, m_creature);
+ DoScriptText(SAY_DEAD, me);
if (pInstance)
pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE);
@@ -74,12 +74,12 @@ struct boss_thespiaAI : public ScriptedAI
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
if (pInstance)
pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS);
@@ -152,7 +152,7 @@ struct mob_coilfang_waterelementalAI : public ScriptedAI
if (WaterBoltVolley_Timer <= diff)
{
- DoCast(m_creature, SPELL_WATER_BOLT_VOLLEY);
+ DoCast(me, SPELL_WATER_BOLT_VOLLEY);
WaterBoltVolley_Timer = 7000+rand()%5000;
} else WaterBoltVolley_Timer -= diff;
diff --git a/src/scripts/outland/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp b/src/scripts/outland/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
index eec25ee7d49..2cf5e8e3a85 100644
--- a/src/scripts/outland/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
+++ b/src/scripts/outland/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
@@ -78,7 +78,7 @@ struct boss_mekgineer_steamriggerAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE);
@@ -86,12 +86,12 @@ struct boss_mekgineer_steamriggerAI : public ScriptedAI
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), me);
}
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
if (pInstance)
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS);
@@ -100,7 +100,7 @@ struct boss_mekgineer_steamriggerAI : public ScriptedAI
//no known summon spells exist
void SummonMechanichs()
{
- DoScriptText(SAY_MECHANICS, m_creature);
+ DoScriptText(SAY_MECHANICS, me);
DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,-5,5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
@@ -119,7 +119,7 @@ struct boss_mekgineer_steamriggerAI : public ScriptedAI
if (Shrink_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SUPER_SHRINK_RAY);
+ DoCast(me->getVictim(), SPELL_SUPER_SHRINK_RAY);
Shrink_Timer = 20000;
} else Shrink_Timer -= diff;
@@ -128,21 +128,21 @@ struct boss_mekgineer_steamriggerAI : public ScriptedAI
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_SAW_BLADE);
else
- DoCast(m_creature->getVictim(), SPELL_SAW_BLADE);
+ DoCast(me->getVictim(), SPELL_SAW_BLADE);
Saw_Blade_Timer = 15000;
} else Saw_Blade_Timer -= diff;
if (Electrified_Net_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ELECTRIFIED_NET);
+ DoCast(me->getVictim(), SPELL_ELECTRIFIED_NET);
Electrified_Net_Timer = 10000;
}
else Electrified_Net_Timer -= diff;
if (!Summon75)
{
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 75)
+ if ((me->GetHealth()*100 / me->GetMaxHealth()) < 75)
{
SummonMechanichs();
Summon75 = true;
@@ -151,7 +151,7 @@ struct boss_mekgineer_steamriggerAI : public ScriptedAI
if (!Summon50)
{
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50)
+ if ((me->GetHealth()*100 / me->GetMaxHealth()) < 50)
{
SummonMechanichs();
Summon50 = true;
@@ -160,7 +160,7 @@ struct boss_mekgineer_steamriggerAI : public ScriptedAI
if (!Summon25)
{
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
+ if ((me->GetHealth()*100 / me->GetMaxHealth()) < 25)
{
SummonMechanichs();
Summon25 = true;
@@ -213,24 +213,24 @@ struct mob_steamrigger_mechanicAI : public ScriptedAI
{
if (pInstance && pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS)
{
- if (Unit* pMekgineer = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER)))
+ if (Unit* pMekgineer = Unit::GetUnit((*me), pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER)))
{
- if (m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE))
+ if (me->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE))
{
//are we already channeling? Doesn't work very well, find better check?
- if (!m_creature->GetUInt32Value(UNIT_CHANNEL_SPELL))
+ if (!me->GetUInt32Value(UNIT_CHANNEL_SPELL))
{
- //m_creature->GetMotionMaster()->MovementExpired();
- //m_creature->GetMotionMaster()->MoveIdle();
+ //me->GetMotionMaster()->MovementExpired();
+ //me->GetMotionMaster()->MoveIdle();
- DoCast(m_creature, SPELL_REPAIR, true);
+ DoCast(me, SPELL_REPAIR, true);
}
Repair_Timer = 5000;
}
else
{
- //m_creature->GetMotionMaster()->MovementExpired();
- //m_creature->GetMotionMaster()->MoveFollow(pMekgineer,0,0);
+ //me->GetMotionMaster()->MovementExpired();
+ //me->GetMotionMaster()->MoveFollow(pMekgineer,0,0);
}
}
} else Repair_Timer = 5000;
diff --git a/src/scripts/outland/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp b/src/scripts/outland/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
index f46b8b335c0..6f9a5a4a858 100644
--- a/src/scripts/outland/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
+++ b/src/scripts/outland/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
@@ -51,16 +51,16 @@ struct mob_naga_distillerAI : public ScriptedAI
void Reset()
{
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
//hack, due to really weird spell behaviour :(
if (pInstance)
{
if (pInstance->GetData(TYPE_DISTILLER) == IN_PROGRESS)
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
}
}
@@ -69,10 +69,10 @@ struct mob_naga_distillerAI : public ScriptedAI
void StartRageGen(Unit *caster)
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- DoCast(m_creature, SPELL_WARLORDS_RAGE_NAGA, true);
+ DoCast(me, SPELL_WARLORDS_RAGE_NAGA, true);
if (pInstance)
pInstance->SetData(TYPE_DISTILLER,IN_PROGRESS);
@@ -80,7 +80,7 @@ struct mob_naga_distillerAI : public ScriptedAI
void DamageTaken(Unit *done_by, uint32 &damage)
{
- if (m_creature->GetHealth() <= damage)
+ if (me->GetHealth() <= damage)
if (pInstance)
pInstance->SetData(TYPE_DISTILLER,DONE);
}
@@ -113,7 +113,7 @@ struct boss_warlord_kalithreshAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), me);
if (pInstance)
pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS);
@@ -121,7 +121,7 @@ struct boss_warlord_kalithreshAI : public ScriptedAI
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
void SpellHit(Unit *caster, const SpellEntry *spell)
@@ -130,12 +130,12 @@ struct boss_warlord_kalithreshAI : public ScriptedAI
if (spell->Id == SPELL_WARLORDS_RAGE_PROC)
if (pInstance)
if (pInstance->GetData(TYPE_DISTILLER) == DONE)
- m_creature->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC);
+ me->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE);
@@ -150,9 +150,9 @@ struct boss_warlord_kalithreshAI : public ScriptedAI
{
if (Creature* distiller = me->FindNearestCreature(17954, 100.0f))
{
- DoScriptText(SAY_REGEN, m_creature);
- DoCast(m_creature, SPELL_WARLORDS_RAGE);
- CAST_AI(mob_naga_distillerAI, distiller->AI())->StartRageGen(m_creature);
+ DoScriptText(SAY_REGEN, me);
+ DoCast(me, SPELL_WARLORDS_RAGE);
+ CAST_AI(mob_naga_distillerAI, distiller->AI())->StartRageGen(me);
}
Rage_Timer = 3000+rand()%15000;
} else Rage_Timer -= diff;
@@ -160,7 +160,7 @@ struct boss_warlord_kalithreshAI : public ScriptedAI
//Reflection_Timer
if (Reflection_Timer <= diff)
{
- DoCast(m_creature, SPELL_SPELL_REFLECTION);
+ DoCast(me, SPELL_SPELL_REFLECTION);
Reflection_Timer = 15000+rand()%10000;
} else Reflection_Timer -= diff;
diff --git a/src/scripts/outland/coilfang_resevoir/underbog/boss_hungarfen.cpp b/src/scripts/outland/coilfang_resevoir/underbog/boss_hungarfen.cpp
index 3736e4a230d..a453b9ca0aa 100644
--- a/src/scripts/outland/coilfang_resevoir/underbog/boss_hungarfen.cpp
+++ b/src/scripts/outland/coilfang_resevoir/underbog/boss_hungarfen.cpp
@@ -52,11 +52,11 @@ struct boss_hungarfenAI : public ScriptedAI
if (!UpdateVictim())
return;
- if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20)
+ if ((me->GetHealth()*100) / me->GetMaxHealth() <= 20)
{
if (!Root)
{
- DoCast(m_creature, SPELL_FOUL_SPORES);
+ DoCast(me, SPELL_FOUL_SPORES);
Root = true;
}
}
@@ -64,9 +64,9 @@ struct boss_hungarfenAI : public ScriptedAI
if (Mushroom_Timer <= diff)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
- m_creature->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
+ me->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
else
- m_creature->SummonCreature(17990, m_creature->GetPositionX()+(rand()%8), m_creature->GetPositionY()+(rand()%8), m_creature->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
+ me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
Mushroom_Timer = 10000;
} else Mushroom_Timer -= diff;
@@ -104,8 +104,8 @@ struct mob_underbog_mushroomAI : public ScriptedAI
Grow_Timer = 0;
Shrink_Timer = 20000;
- DoCast(m_creature, SPELL_PUTRID_MUSHROOM, true);
- DoCast(m_creature, SPELL_SPORE_CLOUD, true);
+ DoCast(me, SPELL_PUTRID_MUSHROOM, true);
+ DoCast(me, SPELL_SPORE_CLOUD, true);
}
void MoveInLineOfSight(Unit *who) { return; }
@@ -121,13 +121,13 @@ struct mob_underbog_mushroomAI : public ScriptedAI
if (Grow_Timer <= diff)
{
- DoCast(m_creature, SPELL_GROW);
+ DoCast(me, SPELL_GROW);
Grow_Timer = 3000;
} else Grow_Timer -= diff;
if (Shrink_Timer <= diff)
{
- m_creature->RemoveAurasDueToSpell(SPELL_GROW);
+ me->RemoveAurasDueToSpell(SPELL_GROW);
Stop = true;
} else Shrink_Timer -= diff;
}
diff --git a/src/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp b/src/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
index 9be8d3294d5..a970debdaea 100644
--- a/src/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
+++ b/src/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
@@ -71,15 +71,15 @@ struct boss_the_black_stalkerAI : public ScriptedAI
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
summon->AI()->AttackStart(pTarget);
else
- if (m_creature->getVictim())
- summon->AI()->AttackStart(m_creature->getVictim());
+ if (me->getVictim())
+ summon->AI()->AttackStart(me->getVictim());
}
}
void JustDied(Unit *who)
{
for (std::list<uint64>::const_iterator i = Striders.begin(); i != Striders.end(); ++i)
- if (Creature *strider = Unit::GetCreature(*m_creature, *i))
+ if (Creature *strider = Unit::GetCreature(*me, *i))
strider->DisappearAndDie();
}
@@ -92,8 +92,8 @@ struct boss_the_black_stalkerAI : public ScriptedAI
if (check_Timer <= diff)
{
float x,y,z,o;
- m_creature->GetHomePosition(x,y,z,o);
- if (!m_creature->IsWithinDist3d(x,y,z, 60))
+ me->GetHomePosition(x,y,z,o);
+ if (!me->IsWithinDist3d(x,y,z, 60))
{
EnterEvadeMode();
return;
@@ -104,7 +104,7 @@ struct boss_the_black_stalkerAI : public ScriptedAI
// Spore Striders
if (IsHeroic() && SporeStriders_Timer <= diff)
{
- DoCast(m_creature, SPELL_SUMMON_SPORE_STRIDER);
+ DoCast(me, SPELL_SUMMON_SPORE_STRIDER);
SporeStriders_Timer = 10000+rand()%5000;
} else SporeStriders_Timer -= diff;
@@ -113,7 +113,7 @@ struct boss_the_black_stalkerAI : public ScriptedAI
{
if (LevitatedTarget_Timer <= diff)
{
- if (Unit *pTarget = Unit::GetUnit(*m_creature, LevitatedTarget))
+ if (Unit *pTarget = Unit::GetUnit(*me, LevitatedTarget))
{
if (!pTarget->HasAura(SPELL_LEVITATE))
{
diff --git a/src/scripts/outland/gruuls_lair/boss_gruul.cpp b/src/scripts/outland/gruuls_lair/boss_gruul.cpp
index 25b6c73f472..c0b29be3e94 100644
--- a/src/scripts/outland/gruuls_lair/boss_gruul.cpp
+++ b/src/scripts/outland/gruuls_lair/boss_gruul.cpp
@@ -86,7 +86,7 @@ struct boss_gruulAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
if (pInstance)
pInstance->SetData(DATA_GRUULEVENT, IN_PROGRESS);
@@ -94,12 +94,12 @@ struct boss_gruulAI : public ScriptedAI
void KilledUnit()
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
{
@@ -118,8 +118,8 @@ struct boss_gruulAI : public ScriptedAI
{
switch (urand(0,1))
{
- case 0: pTarget->CastSpell(pTarget, SPELL_MAGNETIC_PULL, true, NULL, NULL, m_creature->GetGUID()); break;
- case 1: pTarget->CastSpell(pTarget, SPELL_KNOCK_BACK, true, NULL, NULL, m_creature->GetGUID()); break;
+ case 0: pTarget->CastSpell(pTarget, SPELL_MAGNETIC_PULL, true, NULL, NULL, me->GetGUID()); break;
+ case 1: pTarget->CastSpell(pTarget, SPELL_KNOCK_BACK, true, NULL, NULL, me->GetGUID()); break;
}
}
}
@@ -139,10 +139,10 @@ struct boss_gruulAI : public ScriptedAI
m_bPerformingGroundSlam = false;
//and correct movement, if not already
- if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE)
+ if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE)
{
- if (m_creature->getVictim())
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
+ if (me->getVictim())
+ me->GetMotionMaster()->MoveChase(me->getVictim());
}
}
}
@@ -158,8 +158,8 @@ struct boss_gruulAI : public ScriptedAI
// Gruul can cast this spell up to 30 times
if (m_uiGrowth_Timer <= uiDiff)
{
- DoScriptText(EMOTE_GROW, m_creature);
- DoCast(m_creature, SPELL_GROWTH);
+ DoScriptText(EMOTE_GROW, me);
+ DoCast(me, SPELL_GROWTH);
m_uiGrowth_Timer = 30000;
}
else
@@ -175,7 +175,7 @@ struct boss_gruulAI : public ScriptedAI
if (m_uiReverberation_Timer < 10000) //Give a little time to the players to undo the damage from shatter
m_uiReverberation_Timer += 10000;
- DoCast(m_creature, SPELL_SHATTER);
+ DoCast(me, SPELL_SHATTER);
}
else
m_uiGroundSlamTimer -= uiDiff;
@@ -187,10 +187,10 @@ struct boss_gruulAI : public ScriptedAI
{
Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,1);
- if (pTarget && m_creature->IsWithinMeleeRange(m_creature->getVictim()))
+ if (pTarget && me->IsWithinMeleeRange(me->getVictim()))
DoCast(pTarget, SPELL_HURTFUL_STRIKE);
else
- DoCast(m_creature->getVictim(), SPELL_HURTFUL_STRIKE);
+ DoCast(me->getVictim(), SPELL_HURTFUL_STRIKE);
m_uiHurtfulStrike_Timer= 8000;
}
@@ -200,7 +200,7 @@ struct boss_gruulAI : public ScriptedAI
// Reverberation
if (m_uiReverberation_Timer <= uiDiff)
{
- DoCast(m_creature->getVictim(), SPELL_REVERBERATION, true);
+ DoCast(me->getVictim(), SPELL_REVERBERATION, true);
m_uiReverberation_Timer = 15000 + rand()%10000;
}
else
@@ -223,13 +223,13 @@ struct boss_gruulAI : public ScriptedAI
// Ground Slam, Gronn Lord's Grasp, Stoned, Shatter
if (m_uiGroundSlamTimer <= uiDiff)
{
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
m_bPerformingGroundSlam= true;
m_uiGroundSlamTimer = 10000;
- DoCast(m_creature, SPELL_GROUND_SLAM);
+ DoCast(me, SPELL_GROUND_SLAM);
}
else
m_uiGroundSlamTimer -= uiDiff;
diff --git a/src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp
index 8984c1759d2..01367894c3d 100644
--- a/src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp
+++ b/src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp
@@ -65,9 +65,9 @@ EndScriptData */
#define SPELL_SPELLSHIELD 33054
#define SPELL_BLAST_WAVE 33061
-bool CheckAllBossDied(ScriptedInstance* pInstance, Creature* m_creature)
+bool CheckAllBossDied(ScriptedInstance* pInstance, Creature* me)
{
- if (!pInstance || !m_creature)
+ if (!pInstance || !me)
return false;
uint64 MaulgarGUID = 0;
@@ -88,11 +88,11 @@ bool CheckAllBossDied(ScriptedInstance* pInstance, Creature* m_creature)
OlmGUID = pInstance->GetData64(DATA_OLMTHESUMMONER);
KroshGUID = pInstance->GetData64(DATA_KROSHFIREHAND);
- Maulgar = (Unit::GetCreature((*m_creature), MaulgarGUID));
- Kiggler = (Unit::GetCreature((*m_creature), KigglerGUID));
- Blindeye = (Unit::GetCreature((*m_creature), BlindeyeGUID));
- Olm = (Unit::GetCreature((*m_creature), OlmGUID));
- Krosh = (Unit::GetCreature((*m_creature), KroshGUID));
+ Maulgar = (Unit::GetCreature((*me), MaulgarGUID));
+ Kiggler = (Unit::GetCreature((*me), KigglerGUID));
+ Blindeye = (Unit::GetCreature((*me), BlindeyeGUID));
+ Olm = (Unit::GetCreature((*me), OlmGUID));
+ Krosh = (Unit::GetCreature((*me), KroshGUID));
if (!Maulgar || !Kiggler || !Blindeye || !Olm || !Krosh)
return false;
@@ -133,7 +133,7 @@ struct boss_high_king_maulgarAI : public ScriptedAI
Charging_Timer = 0;
Roar_Timer = 0;
- DoCast(m_creature, SPELL_DUAL_WIELD, false);
+ DoCast(me, SPELL_DUAL_WIELD, false);
Phase2 = false;
@@ -142,7 +142,7 @@ struct boss_high_king_maulgarAI : public ScriptedAI
{
if (Council[i])
{
- pCreature = (Unit::GetCreature((*m_creature), Council[i]));
+ pCreature = (Unit::GetCreature((*me), Council[i]));
if (pCreature && !pCreature->isAlive())
{
pCreature->Respawn();
@@ -158,20 +158,20 @@ struct boss_high_king_maulgarAI : public ScriptedAI
void KilledUnit()
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
- if (CheckAllBossDied(pInstance, m_creature))
+ if (CheckAllBossDied(pInstance, me))
pInstance->SetData(DATA_MAULGAREVENT, DONE);
}
void AddDeath()
{
- DoScriptText(RAND(SAY_OGRE_DEATH1,SAY_OGRE_DEATH2,SAY_OGRE_DEATH3,SAY_OGRE_DEATH4), m_creature);
+ DoScriptText(RAND(SAY_OGRE_DEATH1,SAY_OGRE_DEATH2,SAY_OGRE_DEATH3,SAY_OGRE_DEATH4), me);
}
void EnterCombat(Unit *who)
@@ -198,7 +198,7 @@ struct boss_high_king_maulgarAI : public ScriptedAI
GetCouncil();
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
@@ -209,9 +209,9 @@ struct boss_high_king_maulgarAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
if (pTarget)
{
@@ -234,33 +234,33 @@ struct boss_high_king_maulgarAI : public ScriptedAI
//ArcingSmash_Timer
if (ArcingSmash_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCING_SMASH);
+ DoCast(me->getVictim(), SPELL_ARCING_SMASH);
ArcingSmash_Timer = 10000;
} else ArcingSmash_Timer -= diff;
//Whirlwind_Timer
if (Whirlwind_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_WHIRLWIND);
+ DoCast(me->getVictim(), SPELL_WHIRLWIND);
Whirlwind_Timer = 55000;
} else Whirlwind_Timer -= diff;
//MightyBlow_Timer
if (MightyBlow_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_MIGHTY_BLOW);
+ DoCast(me->getVictim(), SPELL_MIGHTY_BLOW);
MightyBlow_Timer = 30000+rand()%10000;
} else MightyBlow_Timer -= diff;
//Entering Phase 2
- if (!Phase2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50)
+ if (!Phase2 && (me->GetHealth()*100 / me->GetMaxHealth()) < 50)
{
Phase2 = true;
- DoScriptText(SAY_ENRAGE, m_creature);
+ DoScriptText(SAY_ENRAGE, me);
- DoCast(m_creature, SPELL_DUAL_WIELD, true);
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
- m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
+ DoCast(me, SPELL_DUAL_WIELD, true);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
+ me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
}
if (Phase2)
@@ -281,7 +281,7 @@ struct boss_high_king_maulgarAI : public ScriptedAI
//Intimidating Roar
if (Roar_Timer <= diff)
{
- DoCast(m_creature, SPELL_ROAR);
+ DoCast(me, SPELL_ROAR);
Roar_Timer = 40000+(rand()%10000);
} else Roar_Timer -= diff;
}
@@ -320,13 +320,13 @@ struct boss_olm_the_summonerAI : public ScriptedAI
if (!pWho)
return;
- if (m_creature->Attack(pWho, true))
+ if (me->Attack(pWho, true))
{
- m_creature->AddThreat(pWho, 0.0f);
- m_creature->SetInCombatWith(pWho);
- pWho->SetInCombatWith(m_creature);
+ me->AddThreat(pWho, 0.0f);
+ me->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(me);
- m_creature->GetMotionMaster()->MoveChase(pWho, 30.0f);
+ me->GetMotionMaster()->MoveChase(pWho, 30.0f);
}
}
@@ -344,12 +344,12 @@ struct boss_olm_the_summonerAI : public ScriptedAI
if (pInstance)
{
Creature *Maulgar = NULL;
- Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
+ Maulgar = (Unit::GetCreature((*me), pInstance->GetData64(DATA_MAULGAR)));
if (Maulgar)
CAST_AI(boss_high_king_maulgarAI, Maulgar->AI())->AddDeath();
- if (CheckAllBossDied(pInstance, m_creature))
+ if (CheckAllBossDied(pInstance, me))
pInstance->SetData(DATA_MAULGAREVENT, DONE);
}
}
@@ -357,9 +357,9 @@ struct boss_olm_the_summonerAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
if (pTarget)
{
@@ -381,14 +381,14 @@ struct boss_olm_the_summonerAI : public ScriptedAI
//DarkDecay_Timer
if (DarkDecay_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_DARK_DECAY);
+ DoCast(me->getVictim(), SPELL_DARK_DECAY);
DarkDecay_Timer = 20000;
} else DarkDecay_Timer -= diff;
//Summon_Timer
if (Summon_Timer <= diff)
{
- DoCast(m_creature, SPELL_SUMMON_WFH);
+ DoCast(me, SPELL_SUMMON_WFH);
Summon_Timer = 30000;
} else Summon_Timer -= diff;
@@ -447,12 +447,12 @@ struct boss_kiggler_the_crazedAI : public ScriptedAI
if (pInstance)
{
Creature *Maulgar = NULL;
- Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
+ Maulgar = (Unit::GetCreature((*me), pInstance->GetData64(DATA_MAULGAR)));
if (Maulgar)
CAST_AI(boss_high_king_maulgarAI, Maulgar->AI())->AddDeath();
- if (CheckAllBossDied(pInstance, m_creature))
+ if (CheckAllBossDied(pInstance, me))
pInstance->SetData(DATA_MAULGAREVENT, DONE);
}
}
@@ -460,9 +460,9 @@ struct boss_kiggler_the_crazedAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
if (pTarget)
{
@@ -494,21 +494,21 @@ struct boss_kiggler_the_crazedAI : public ScriptedAI
//LightningBolt_Timer
if (LightningBolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT);
+ DoCast(me->getVictim(), SPELL_LIGHTNING_BOLT);
LightningBolt_Timer = 15000;
} else LightningBolt_Timer -= diff;
//ArcaneShock_Timer
if (ArcaneShock_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_SHOCK);
+ DoCast(me->getVictim(), SPELL_ARCANE_SHOCK);
ArcaneShock_Timer = 20000;
} else ArcaneShock_Timer -= diff;
//ArcaneExplosion_Timer
if (ArcaneExplosion_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION);
+ DoCast(me->getVictim(), SPELL_ARCANE_EXPLOSION);
ArcaneExplosion_Timer = 30000;
} else ArcaneExplosion_Timer -= diff;
@@ -555,12 +555,12 @@ struct boss_blindeye_the_seerAI : public ScriptedAI
if (pInstance)
{
Creature *Maulgar = NULL;
- Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
+ Maulgar = (Unit::GetCreature((*me), pInstance->GetData64(DATA_MAULGAR)));
if (Maulgar)
CAST_AI(boss_high_king_maulgarAI, Maulgar->AI())->AddDeath();
- if (CheckAllBossDied(pInstance, m_creature))
+ if (CheckAllBossDied(pInstance, me))
pInstance->SetData(DATA_MAULGAREVENT, DONE);
}
}
@@ -568,9 +568,9 @@ struct boss_blindeye_the_seerAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
if (pTarget)
{
@@ -592,21 +592,21 @@ struct boss_blindeye_the_seerAI : public ScriptedAI
//GreaterPowerWordShield_Timer
if (GreaterPowerWordShield_Timer <= diff)
{
- DoCast(m_creature, SPELL_GREATER_PW_SHIELD);
+ DoCast(me, SPELL_GREATER_PW_SHIELD);
GreaterPowerWordShield_Timer = 40000;
} else GreaterPowerWordShield_Timer -= diff;
//Heal_Timer
if (Heal_Timer <= diff)
{
- DoCast(m_creature, SPELL_HEAL);
+ DoCast(me, SPELL_HEAL);
Heal_Timer = 15000 + rand()%25000;
} else Heal_Timer -= diff;
//PrayerofHealing_Timer
if (PrayerofHealing_Timer <= diff)
{
- DoCast(m_creature, SPELL_PRAYER_OH);
+ DoCast(me, SPELL_PRAYER_OH);
PrayerofHealing_Timer = 35000 + rand()%15000;
} else PrayerofHealing_Timer -= diff;
@@ -653,12 +653,12 @@ struct boss_krosh_firehandAI : public ScriptedAI
if (pInstance)
{
Creature *Maulgar = NULL;
- Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
+ Maulgar = (Unit::GetCreature((*me), pInstance->GetData64(DATA_MAULGAR)));
if (Maulgar)
CAST_AI(boss_high_king_maulgarAI, Maulgar->AI())->AddDeath();
- if (CheckAllBossDied(pInstance, m_creature))
+ if (CheckAllBossDied(pInstance, me))
pInstance->SetData(DATA_MAULGAREVENT, DONE);
}
}
@@ -666,9 +666,9 @@ struct boss_krosh_firehandAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
//Only if not incombat check if the event is started
- if (!m_creature->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
+ if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_MAULGAREVENT))
{
- Unit *pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
+ Unit *pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_MAULGAREVENT_TANK));
if (pTarget)
{
@@ -688,17 +688,17 @@ struct boss_krosh_firehandAI : public ScriptedAI
}
//GreaterFireball_Timer
- if (GreaterFireball_Timer < diff || m_creature->IsWithinDist(m_creature->getVictim(), 30))
+ if (GreaterFireball_Timer < diff || me->IsWithinDist(me->getVictim(), 30))
{
- DoCast(m_creature->getVictim(), SPELL_GREATER_FIREBALL);
+ DoCast(me->getVictim(), SPELL_GREATER_FIREBALL);
GreaterFireball_Timer = 2000;
} else GreaterFireball_Timer -= diff;
//SpellShield_Timer
if (SpellShield_Timer <= diff)
{
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature->getVictim(), SPELL_SPELLSHIELD);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me->getVictim(), SPELL_SPELLSHIELD);
SpellShield_Timer = 30000;
} else SpellShield_Timer -= diff;
@@ -706,20 +706,20 @@ struct boss_krosh_firehandAI : public ScriptedAI
if (BlastWave_Timer <= diff)
{
Unit *pTarget;
- std::list<HostileReference *> t_list = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
std::vector<Unit *> target_list;
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
+ pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
//15 yard radius minimum
- if (pTarget && pTarget->IsWithinDist(m_creature, 15,false))
+ if (pTarget && pTarget->IsWithinDist(me, 15,false))
target_list.push_back(pTarget);
pTarget = NULL;
}
if (target_list.size())
pTarget = *(target_list.begin()+rand()%target_list.size());
- m_creature->InterruptNonMeleeSpells(false);
+ me->InterruptNonMeleeSpells(false);
DoCast(pTarget, SPELL_BLAST_WAVE);
BlastWave_Timer = 60000;
} else BlastWave_Timer -= diff;
diff --git a/src/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/src/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp
index b7198f26510..b231069dbd1 100644
--- a/src/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp
+++ b/src/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp
@@ -62,7 +62,7 @@ struct boss_broggokAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
if (pInstance)
{
pInstance->SetData(TYPE_BROGGOK_EVENT, IN_PROGRESS);
@@ -75,7 +75,7 @@ struct boss_broggokAI : public ScriptedAI
summoned->setFaction(16);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- summoned->CastSpell(summoned,SPELL_POISON,false,0,0,m_creature->GetGUID());
+ summoned->CastSpell(summoned,SPELL_POISON,false,0,0,me->GetGUID());
}
void UpdateAI(const uint32 diff)
@@ -85,19 +85,19 @@ struct boss_broggokAI : public ScriptedAI
if (AcidSpray_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SLIME_SPRAY);
+ DoCast(me->getVictim(), SPELL_SLIME_SPRAY);
AcidSpray_Timer = 4000+rand()%8000;
} else AcidSpray_Timer -=diff;
if (PoisonBolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_POISON_BOLT);
+ DoCast(me->getVictim(), SPELL_POISON_BOLT);
PoisonBolt_Timer = 4000+rand()%8000;
} else PoisonBolt_Timer -=diff;
if (PoisonSpawn_Timer <= diff)
{
- DoCast(m_creature, SPELL_POISON_CLOUD);
+ DoCast(me, SPELL_POISON_CLOUD);
PoisonSpawn_Timer = 20000;
} else PoisonSpawn_Timer -=diff;
diff --git a/src/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/src/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
index 40ca316e2fd..8fbabc21ddb 100644
--- a/src/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
+++ b/src/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
@@ -100,9 +100,9 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_WAKE, m_creature);
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ DoScriptText(SAY_WAKE, me);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
DoStartMovement(who);
if (pInstance)
pInstance->SetData(TYPE_KELIDAN_THE_BREAKER_EVENT, IN_PROGRESS);
@@ -113,7 +113,7 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
if (rand()%2)
return;
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), m_creature);
+ DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
}
void ChannelerEngaged(Unit* who)
@@ -121,11 +121,11 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
if (who && !addYell)
{
addYell = true;
- DoScriptText(RAND(SAY_ADD_AGGRO_1,SAY_ADD_AGGRO_2,SAY_ADD_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_ADD_AGGRO_1,SAY_ADD_AGGRO_2,SAY_ADD_AGGRO_3), me);
}
for (uint8 i=0; i<5; ++i)
{
- Creature *channeler = Unit::GetCreature(*m_creature, Channelers[i]);
+ Creature *channeler = Unit::GetCreature(*me, Channelers[i]);
if (who && channeler && !channeler->isInCombat())
channeler->AI()->AttackStart(who);
}
@@ -135,13 +135,13 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
{
for (uint8 i=0; i<5; ++i)
{
- Creature *channeler = Unit::GetCreature(*m_creature, Channelers[i]);
+ Creature *channeler = Unit::GetCreature(*me, Channelers[i]);
if (channeler && channeler->isAlive())
return;
}
if (killer)
- m_creature->AI()->AttackStart(killer);
+ me->AI()->AttackStart(killer);
}
uint64 GetChanneled(Creature *channeler1)
@@ -151,7 +151,7 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
uint8 i;
for (i=0; i<5; ++i)
{
- Creature *channeler = Unit::GetCreature(*m_creature, Channelers[i]);
+ Creature *channeler = Unit::GetCreature(*me, Channelers[i]);
if (channeler && channeler->GetGUID() == channeler1->GetGUID())
break;
}
@@ -162,9 +162,9 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
{
for (uint8 i=0; i<5; ++i)
{
- Creature *channeler = Unit::GetCreature(*m_creature, Channelers[i]);
+ Creature *channeler = Unit::GetCreature(*me, Channelers[i]);
if (!channeler || channeler->isDead())
- channeler = m_creature->SummonCreature(ENTRY_CHANNELER,ShadowmoonChannelers[i][0],ShadowmoonChannelers[i][1],ShadowmoonChannelers[i][2],ShadowmoonChannelers[i][3],TEMPSUMMON_CORPSE_TIMED_DESPAWN,300000);
+ channeler = me->SummonCreature(ENTRY_CHANNELER,ShadowmoonChannelers[i][0],ShadowmoonChannelers[i][1],ShadowmoonChannelers[i][2],ShadowmoonChannelers[i][3],TEMPSUMMON_CORPSE_TIMED_DESPAWN,300000);
if (channeler)
Channelers[i] = channeler->GetGUID();
else
@@ -174,7 +174,7 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DIE, m_creature);
+ DoScriptText(SAY_DIE, me);
if (!pInstance)
return;
@@ -190,8 +190,8 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
{
if (check_Timer <= diff)
{
- if (!m_creature->IsNonMeleeSpellCasted(false))
- DoCast(m_creature, SPELL_EVOCATION);
+ if (!me->IsNonMeleeSpellCasted(false))
+ DoCast(me, SPELL_EVOCATION);
check_Timer = 5000;
} else check_Timer -= diff;
return;
@@ -201,7 +201,7 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
{
if (Firenova_Timer <= diff)
{
- DoCast(m_creature, SPELL_FIRE_NOVA, true);
+ DoCast(me, SPELL_FIRE_NOVA, true);
Firenova = false;
ShadowVolley_Timer = 2000;
} else Firenova_Timer -=diff;
@@ -211,22 +211,22 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
if (ShadowVolley_Timer <= diff)
{
- DoCast(m_creature, SPELL_SHADOW_BOLT_VOLLEY);
+ DoCast(me, SPELL_SHADOW_BOLT_VOLLEY);
ShadowVolley_Timer = 5000+rand()%8000;
} else ShadowVolley_Timer -=diff;
if (Corruption_Timer <= diff)
{
- DoCast(m_creature, SPELL_CORRUPTION);
+ DoCast(me, SPELL_CORRUPTION);
Corruption_Timer = 30000+rand()%20000;
} else Corruption_Timer -=diff;
if (BurningNova_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
- DoScriptText(SAY_NOVA, m_creature);
+ DoScriptText(SAY_NOVA, me);
if (SpellEntry *nova = GET_SPELL(SPELL_BURNING_NOVA))
{
@@ -235,7 +235,7 @@ struct boss_kelidan_the_breakerAI : public ScriptedAI
}
if (IsHeroic())
- DoTeleportAll(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation());
+ DoTeleportAll(me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),me->GetOrientation());
BurningNova_Timer = 20000+rand()%8000;
Firenova_Timer= 5000;
@@ -280,16 +280,16 @@ struct mob_shadowmoon_channelerAI : public ScriptedAI
ShadowBolt_Timer = 1000+rand()%1000;
MarkOfShadow_Timer = 5000+rand()%2000;
check_Timer = 0;
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
}
void EnterCombat(Unit* who)
{
if (Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
CAST_AI(boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerEngaged(who);
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
DoStartMovement(who);
}
@@ -305,11 +305,11 @@ struct mob_shadowmoon_channelerAI : public ScriptedAI
{
if (check_Timer <= diff)
{
- if (!m_creature->IsNonMeleeSpellCasted(false))
+ if (!me->IsNonMeleeSpellCasted(false))
if (Creature *Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
{
- uint64 channeler = CAST_AI(boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(m_creature);
- if (Unit *channeled = Unit::GetUnit(*m_creature, channeler))
+ uint64 channeler = CAST_AI(boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(me);
+ if (Unit *channeled = Unit::GetUnit(*me, channeler))
DoCast(channeled, SPELL_CHANNELING);
}
check_Timer = 5000;
@@ -326,7 +326,7 @@ struct mob_shadowmoon_channelerAI : public ScriptedAI
if (ShadowBolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SHADOW_BOLT);
+ DoCast(me->getVictim(), SPELL_SHADOW_BOLT);
ShadowBolt_Timer = 5000+rand()%1000;
} else ShadowBolt_Timer -=diff;
diff --git a/src/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/src/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp
index 9f204d63e9d..4defbe3182e 100644
--- a/src/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp
+++ b/src/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp
@@ -69,7 +69,7 @@ struct boss_the_makerAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
if (!pInstance)
return;
@@ -80,12 +80,12 @@ struct boss_the_makerAI : public ScriptedAI
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), m_creature);
+ DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DIE, m_creature);
+ DoScriptText(SAY_DIE, me);
if (!pInstance)
return;
@@ -103,7 +103,7 @@ struct boss_the_makerAI : public ScriptedAI
if (AcidSpray_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ACID_SPRAY);
+ DoCast(me->getVictim(), SPELL_ACID_SPRAY);
AcidSpray_Timer = 15000+rand()%8000;
} else AcidSpray_Timer -=diff;
@@ -128,7 +128,7 @@ struct boss_the_makerAI : public ScriptedAI
if (Knockdown_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_KNOCKDOWN);
+ DoCast(me->getVictim(), SPELL_KNOCKDOWN);
Knockdown_Timer = 4000+rand()%8000;
} else Knockdown_Timer -=diff;
diff --git a/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
index 03e5757b918..770f8859604 100644
--- a/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
+++ b/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
@@ -60,7 +60,7 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
void Reset()
{
- DoScriptText(SAY_WIPE, m_creature);
+ DoScriptText(SAY_WIPE, me);
OrbitalStrike_Timer = 25000;
ShadowWhip_Timer = 2000;
@@ -75,7 +75,7 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
}
void KilledUnit(Unit* victim)
@@ -83,12 +83,12 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
if (rand()%2)
return;
- DoScriptText(SAY_KILL_1, m_creature);
+ DoScriptText(SAY_KILL_1, me);
}
void JustSummoned(Creature* summoned)
{
- DoScriptText(SAY_SUMMON, m_creature);
+ DoScriptText(SAY_SUMMON, me);
if (Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0))
summoned->AI()->AttackStart(random);
@@ -98,7 +98,7 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DIE, m_creature);
+ DoScriptText(SAY_DIE, me);
}
void UpdateAI(const uint32 diff)
@@ -111,8 +111,8 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
{
if (Summon_Timer <= diff)
{
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature, SPELL_SUMMON_FIENDISH_HOUND);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me, SPELL_SUMMON_FIENDISH_HOUND);
Summon_Timer = 15000+rand()%15000;
} else Summon_Timer -= diff;
}
@@ -126,7 +126,7 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
//if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted)
if (temp->HasUnitMovementFlag(MOVEMENTFLAG_FALLING))
{
- m_creature->InterruptNonMeleeSpells(false);
+ me->InterruptNonMeleeSpells(false);
DoCast(temp, SPELL_SHADOW_WHIP);
}
}
@@ -138,8 +138,8 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
else if (OrbitalStrike_Timer <= diff)
{
Unit* temp = NULL;
- if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
- temp = m_creature->getVictim();
+ if (me->IsWithinMeleeRange(me->getVictim()))
+ temp = me->getVictim();
else temp = SelectUnit(SELECT_TARGET_RANDOM,0);
if (temp && temp->GetTypeId() == TYPEID_PLAYER)
@@ -153,18 +153,18 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
}
} else OrbitalStrike_Timer -= diff;
- if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20)
+ if ((me->GetHealth()*100) / me->GetMaxHealth() < 20)
{
if (DemonicShield_Timer <= diff)
{
- DoCast(m_creature, SPELL_DEMONIC_SHIELD);
+ DoCast(me, SPELL_DEMONIC_SHIELD);
DemonicShield_Timer = 15000;
} else DemonicShield_Timer -= diff;
}
if (Aura_Timer <= diff)
{
- DoScriptText(SAY_CURSE, m_creature);
+ DoScriptText(SAY_CURSE, me);
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
{
@@ -178,7 +178,7 @@ struct boss_omor_the_unscarredAI : public ScriptedAI
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
{
if (pTarget)
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
DoCast(pTarget, SPELL_SHADOW_BOLT);
Shadowbolt_Timer = 4000+rand()%2500;
diff --git a/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp b/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
index c65e5ad838b..4ad5ff31d8f 100644
--- a/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
+++ b/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
@@ -89,8 +89,8 @@ struct boss_nazanAI : public ScriptedAI
{
if (summoned && summoned->GetEntry() == ENTRY_LIQUID_FIRE)
{
- summoned->SetLevel(m_creature->getLevel());
- summoned->setFaction(m_creature->getFaction());
+ summoned->SetLevel(me->getLevel());
+ summoned->setFaction(me->getFaction());
summoned->CastSpell(summoned,SPELL_SUMMON_LIQUID_FIRE,true);
summoned->CastSpell(summoned,SPELL_FIRE_NOVA_VISUAL,true);
}
@@ -99,15 +99,15 @@ struct boss_nazanAI : public ScriptedAI
void SpellHitTarget(Unit *pTarget, const SpellEntry* entry)
{
if (pTarget && entry->Id == SPELL_FIREBALL)
- m_creature->SummonCreature(ENTRY_LIQUID_FIRE,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),pTarget->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,30000);
+ me->SummonCreature(ENTRY_LIQUID_FIRE,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),pTarget->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,30000);
}
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
{
- if (UnsummonCheck < diff && m_creature->isAlive())
- m_creature->DisappearAndDie();
+ if (UnsummonCheck < diff && me->isAlive())
+ me->DisappearAndDie();
else
UnsummonCheck -= diff;
return;
@@ -122,27 +122,27 @@ struct boss_nazanAI : public ScriptedAI
if (flight) // phase 1 - the flight
{
- Creature *Vazruden = Unit::GetCreature(*m_creature,VazrudenGUID);
+ Creature *Vazruden = Unit::GetCreature(*me,VazrudenGUID);
if (Fly_Timer < diff || !(Vazruden && Vazruden->isAlive() && (Vazruden->GetHealth()*5 > Vazruden->GetMaxHealth())))
{
flight = false;
BellowingRoar_Timer = 6000;
ConeOfFire_Timer = 12000;
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- m_creature->GetMotionMaster()->Clear();
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ me->GetMotionMaster()->Clear();
if (Unit *victim = SelectUnit(SELECT_TARGET_NEAREST,0))
- m_creature->AI()->AttackStart(victim);
- DoStartMovement(m_creature->getVictim());
- DoScriptText(EMOTE, m_creature);
+ me->AI()->AttackStart(victim);
+ DoStartMovement(me->getVictim());
+ DoScriptText(EMOTE, me);
return;
} else Fly_Timer -= diff;
if (Turn_Timer <= diff)
{
uint32 waypoint = (Fly_Timer/10000)%2;
- if (m_creature->IsWithinDist3d(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2], 5))
- m_creature->GetMotionMaster()->MovePoint(0,VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]);
+ if (me->IsWithinDist3d(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2], 5))
+ me->GetMotionMaster()->MovePoint(0,VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]);
Turn_Timer = 10000;
} else Turn_Timer -= diff;
}
@@ -150,7 +150,7 @@ struct boss_nazanAI : public ScriptedAI
{
if (ConeOfFire_Timer <= diff)
{
- DoCast(m_creature, SPELL_CONE_OF_FIRE);
+ DoCast(me, SPELL_CONE_OF_FIRE);
ConeOfFire_Timer = 12000;
Fireball_Timer = 4000;
} else ConeOfFire_Timer -= diff;
@@ -158,7 +158,7 @@ struct boss_nazanAI : public ScriptedAI
if (IsHeroic())
if (BellowingRoar_Timer <= diff)
{
- DoCast(m_creature, SPELL_BELLOWING_ROAR);
+ DoCast(me, SPELL_BELLOWING_ROAR);
BellowingRoar_Timer = 45000;
} else BellowingRoar_Timer -= diff;
@@ -186,40 +186,40 @@ struct boss_vazrudenAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
}
void KilledUnit(Unit* who)
{
if (who && who->GetEntry() != ENTRY_VAZRUDEN)
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), m_creature);
+ DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
}
void JustDied(Unit* who)
{
- if (who && who != m_creature)
- DoScriptText(SAY_DIE, m_creature);
+ if (who && who != me)
+ DoScriptText(SAY_DIE, me);
}
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
{
- if (UnsummonCheck < diff && m_creature->isAlive())
+ if (UnsummonCheck < diff && me->isAlive())
{
if (!WipeSaid)
{
- DoScriptText(SAY_WIPE, m_creature);
+ DoScriptText(SAY_WIPE, me);
WipeSaid = true;
}
- m_creature->DisappearAndDie();
+ me->DisappearAndDie();
} else UnsummonCheck -= diff;
return;
}
if (Revenge_Timer <= diff)
{
- if (Unit *victim = m_creature->getVictim())
+ if (Unit *victim = me->getVictim())
DoCast(victim, SPELL_REVENGE);
Revenge_Timer = 5000;
} else Revenge_Timer -= diff;
@@ -252,15 +252,15 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
waypoint = 0;
check = 0;
UnsummonAdds();
- m_creature->GetMotionMaster()->MovePath(PATH_ENTRY, true);
+ me->GetMotionMaster()->MovePath(PATH_ENTRY, true);
}
void UnsummonAdds()
{
if (summoned)
{
- Creature *Nazan = Unit::GetCreature(*m_creature, NazanGUID);
- Creature *Vazruden = Unit::GetCreature(*m_creature, VazrudenGUID);
+ Creature *Nazan = Unit::GetCreature(*me, NazanGUID);
+ Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID);
if (Nazan || (Nazan = me->FindNearestCreature(ENTRY_NAZAN, 5000)))
{
Nazan->DisappearAndDie();
@@ -272,8 +272,8 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
VazrudenGUID = 0;
}
summoned = false;
- m_creature->clearUnitState(UNIT_STAT_ROOT);
- m_creature->SetVisibility(VISIBILITY_ON);
+ me->clearUnitState(UNIT_STAT_ROOT);
+ me->SetVisibility(VISIBILITY_ON);
}
}
@@ -281,13 +281,13 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
{
if (!summoned)
{
- if (Creature* Vazruden = m_creature->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000))
+ if (Creature* Vazruden = me->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000))
VazrudenGUID = Vazruden->GetGUID();
- if (Creature* Nazan = m_creature->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000))
+ if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000))
NazanGUID = Nazan->GetGUID();
summoned = true;
- m_creature->SetVisibility(VISIBILITY_OFF);
- m_creature->addUnitState(UNIT_STAT_ROOT);
+ me->SetVisibility(VISIBILITY_OFF);
+ me->addUnitState(UNIT_STAT_ROOT);
}
}
@@ -297,14 +297,14 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
{
phase = 1;
check = 0;
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
}
}
void JustSummoned(Creature *summoned)
{
if (!summoned) return;
- Unit *victim = m_creature->getVictim();
+ Unit *victim = me->getVictim();
if (summoned->GetEntry() == ENTRY_NAZAN)
{
CAST_AI(boss_nazanAI, summoned->AI())->VazrudenGUID = VazrudenGUID;
@@ -338,10 +338,10 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
case 1: // go to the middle and begin the fight
if (check <= diff)
{
- if (!m_creature->IsWithinDist3d(VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],5))
+ if (!me->IsWithinDist3d(VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],5))
{
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MovePoint(0,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2]);
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MovePoint(0,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2]);
check = 1000;
}
else
@@ -355,8 +355,8 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
default: // adds do the job now
if (check <= diff)
{
- Creature *Nazan = Unit::GetCreature(*m_creature, NazanGUID);
- Creature *Vazruden = Unit::GetCreature(*m_creature, VazrudenGUID);
+ Creature *Nazan = Unit::GetCreature(*me, NazanGUID);
+ Creature *Vazruden = Unit::GetCreature(*me, VazrudenGUID);
if (Nazan && Nazan->isAlive() || Vazruden && Vazruden->isAlive())
{
if (Nazan && Nazan->getVictim() || Vazruden && Vazruden->getVictim())
@@ -370,9 +370,9 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
}
else
{
- m_creature->SummonGameObject(ENTRY_REINFORCED_FEL_IRON_CHEST,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,0,0,0,0,0);
- m_creature->SetLootRecipient(NULL); // don't think this is necessary..
- m_creature->Kill(m_creature);
+ me->SummonGameObject(ENTRY_REINFORCED_FEL_IRON_CHEST,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,0,0,0,0,0);
+ me->SetLootRecipient(NULL); // don't think this is necessary..
+ me->Kill(me);
}
check = 2000;
} else check -= diff;
@@ -407,7 +407,7 @@ struct mob_hellfire_sentryAI : public ScriptedAI
if (KidneyShot_Timer <= diff)
{
- if (Unit *victim = m_creature->getVictim())
+ if (Unit *victim = me->getVictim())
DoCast(victim, SPELL_KIDNEY_SHOT);
KidneyShot_Timer = 20000;
} else KidneyShot_Timer -= diff;
diff --git a/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
index 8d7b607a709..5afe596d907 100644
--- a/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
+++ b/src/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
@@ -63,25 +63,25 @@ struct boss_watchkeeper_gargolmarAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
}
void MoveInLineOfSight(Unit* who)
{
- if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessiblePlaceFor(m_creature))
+ if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
{
- if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
+ if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
return;
- float attackRadius = m_creature->GetAttackDistance(who);
- if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
+ float attackRadius = me->GetAttackDistance(who);
+ if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
{
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
}
- else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
+ else if (!HasTaunted && me->IsWithinDistInMap(who, 60.0f))
{
- DoScriptText(SAY_TAUNT, m_creature);
+ DoScriptText(SAY_TAUNT, me);
HasTaunted = true;
}
}
@@ -89,12 +89,12 @@ struct boss_watchkeeper_gargolmarAI : public ScriptedAI
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), m_creature);
+ DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DIE, m_creature);
+ DoScriptText(SAY_DIE, me);
}
void UpdateAI(const uint32 diff)
@@ -104,13 +104,13 @@ struct boss_watchkeeper_gargolmarAI : public ScriptedAI
if (MortalWound_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_MORTAL_WOUND);
+ DoCast(me->getVictim(), SPELL_MORTAL_WOUND);
MortalWound_Timer = 5000+rand()%8000;
} else MortalWound_Timer -= diff;
if (Surge_Timer <= diff)
{
- DoScriptText(SAY_SURGE, m_creature);
+ DoScriptText(SAY_SURGE, me);
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_SURGE);
@@ -118,20 +118,20 @@ struct boss_watchkeeper_gargolmarAI : public ScriptedAI
Surge_Timer = 5000+rand()%8000;
} else Surge_Timer -= diff;
- if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20)
+ if ((me->GetHealth()*100) / me->GetMaxHealth() < 20)
{
if (Retaliation_Timer <= diff)
{
- DoCast(m_creature, SPELL_RETALIATION);
+ DoCast(me, SPELL_RETALIATION);
Retaliation_Timer = 30000;
} else Retaliation_Timer -= diff;
}
if (!YelledForHeal)
{
- if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40)
+ if ((me->GetHealth()*100) / me->GetMaxHealth() < 40)
{
- DoScriptText(SAY_HEAL, m_creature);
+ DoScriptText(SAY_HEAL, me);
YelledForHeal = true;
}
}
diff --git a/src/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/src/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
index 1cc620d9926..bd8cfc69e5a 100644
--- a/src/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
+++ b/src/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
@@ -109,8 +109,8 @@ struct mob_abyssalAI : public ScriptedAI
{
if (trigger == 2 && spell->Id == SPELL_BLAZE_TARGET)
{
- DoCast(m_creature, SPELL_BLAZE_TRAP, true);
- m_creature->SetVisibility(VISIBILITY_OFF);
+ DoCast(me, SPELL_BLAZE_TRAP, true);
+ me->SetVisibility(VISIBILITY_OFF);
Despawn_Timer = 130000;
}
}
@@ -118,11 +118,11 @@ struct mob_abyssalAI : public ScriptedAI
void SetTrigger(uint32 _trigger)
{
trigger = _trigger;
- m_creature->SetDisplayId(11686);
+ me->SetDisplayId(11686);
if (trigger == 1) //debris
{
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoCast(m_creature, SPELL_DEBRIS_VISUAL, true);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ DoCast(me, SPELL_DEBRIS_VISUAL, true);
FireBlast_Timer = 5000;
Despawn_Timer = 10000;
}
@@ -140,7 +140,7 @@ struct mob_abyssalAI : public ScriptedAI
{
if (FireBlast_Timer <= diff)
{
- DoCast(m_creature, SPELL_DEBRIS_DAMAGE, true);
+ DoCast(me, SPELL_DEBRIS_DAMAGE, true);
trigger = 3;
} else FireBlast_Timer -= diff;
}
@@ -149,7 +149,7 @@ struct mob_abyssalAI : public ScriptedAI
if (Despawn_Timer <= diff)
{
- m_creature->ForcedDespawn();
+ me->ForcedDespawn();
} else Despawn_Timer -= diff;
if (!UpdateVictim())
@@ -157,7 +157,7 @@ struct mob_abyssalAI : public ScriptedAI
if (FireBlast_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_FIRE_BLAST);
+ DoCast(me->getVictim(), SPELL_FIRE_BLAST);
FireBlast_Timer = 5000+rand()%10000;
} else FireBlast_Timer -= diff;
@@ -170,8 +170,8 @@ struct boss_magtheridonAI : public ScriptedAI
boss_magtheridonAI(Creature *c) : ScriptedAI(c)
{
pInstance = c->GetInstanceData();
- m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
- m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
+ me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
+ me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
// target 7, random target with certain entry spell, need core fix
SpellEntry *TempSpell;
@@ -216,11 +216,11 @@ struct boss_magtheridonAI : public ScriptedAI
Phase3 = false;
NeedCheckCube = false;
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
- m_creature->addUnitState(UNIT_STAT_STUNNED);
- DoCast(m_creature, SPELL_SHADOW_CAGE_C, true);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->addUnitState(UNIT_STAT_STUNNED);
+ DoCast(me, SPELL_SHADOW_CAGE_C, true);
}
void JustReachedHome()
@@ -236,7 +236,7 @@ struct boss_magtheridonAI : public ScriptedAI
{
// to avoid multiclicks from 1 cube
if (uint64 guid = Cube[cubeGUID])
- DebuffClicker(Unit::GetUnit(*m_creature, guid));
+ DebuffClicker(Unit::GetUnit(*me, guid));
Cube[cubeGUID] = clickerGUID;
NeedCheckCube = true;
}
@@ -259,7 +259,7 @@ struct boss_magtheridonAI : public ScriptedAI
// if not - apply mind exhaustion and delete from clicker's list
for (CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i)
{
- Unit *clicker = Unit::GetUnit(*m_creature, (*i).second);
+ Unit *clicker = Unit::GetUnit(*me, (*i).second);
if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP))
{
DebuffClicker(clicker);
@@ -268,20 +268,20 @@ struct boss_magtheridonAI : public ScriptedAI
}
// if 5 clickers from other cubes apply shadow cage
- if (ClickerNum >= CLICKERS_COUNT && !m_creature->HasAura(SPELL_SHADOW_CAGE))
+ if (ClickerNum >= CLICKERS_COUNT && !me->HasAura(SPELL_SHADOW_CAGE))
{
- DoScriptText(SAY_BANISH, m_creature);
- DoCast(m_creature, SPELL_SHADOW_CAGE, true);
+ DoScriptText(SAY_BANISH, me);
+ DoCast(me, SPELL_SHADOW_CAGE, true);
}
- else if (ClickerNum < CLICKERS_COUNT && m_creature->HasAura(SPELL_SHADOW_CAGE))
- m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE);
+ else if (ClickerNum < CLICKERS_COUNT && me->HasAura(SPELL_SHADOW_CAGE))
+ me->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE);
if (!ClickerNum) NeedCheckCube = false;
}
void KilledUnit(Unit* victim)
{
- DoScriptText(SAY_PLAYER_KILLED, m_creature);
+ DoScriptText(SAY_PLAYER_KILLED, me);
}
void JustDied(Unit* Killer)
@@ -289,14 +289,14 @@ struct boss_magtheridonAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_MAGTHERIDON_EVENT, DONE);
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void MoveInLineOfSight(Unit* who) {}
void AttackStart(Unit *who)
{
- if (!m_creature->hasUnitState(UNIT_STAT_STUNNED))
+ if (!me->hasUnitState(UNIT_STAT_STUNNED))
ScriptedAI::AttackStart(who);
}
@@ -306,19 +306,19 @@ struct boss_magtheridonAI : public ScriptedAI
pInstance->SetData(DATA_MAGTHERIDON_EVENT, IN_PROGRESS);
DoZoneInCombat();
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_C);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_C);
- DoScriptText(SAY_FREED, m_creature);
+ DoScriptText(SAY_FREED, me);
}
void UpdateAI(const uint32 diff)
{
- if (!m_creature->isInCombat())
+ if (!me->isInCombat())
{
if (RandChat_Timer <= diff)
{
- DoScriptText(RandomTaunt[rand()%6].id, m_creature);
+ DoScriptText(RandomTaunt[rand()%6].id, me);
RandChat_Timer = 90000;
} else RandChat_Timer -= diff;
}
@@ -330,24 +330,24 @@ struct boss_magtheridonAI : public ScriptedAI
if (Berserk_Timer <= diff)
{
- DoCast(m_creature, SPELL_BERSERK, true);
- DoScriptText(EMOTE_BERSERK, m_creature);
+ DoCast(me, SPELL_BERSERK, true);
+ DoScriptText(EMOTE_BERSERK, me);
Berserk_Timer = 60000;
} else Berserk_Timer -= diff;
if (Cleave_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_CLEAVE);
+ DoCast(me->getVictim(), SPELL_CLEAVE);
Cleave_Timer = 10000;
} else Cleave_Timer -= diff;
if (BlastNova_Timer <= diff)
{
// to avoid earthquake interruption
- if (!m_creature->hasUnitState(UNIT_STAT_STUNNED))
+ if (!me->hasUnitState(UNIT_STAT_STUNNED))
{
- DoScriptText(EMOTE_BLASTNOVA, m_creature);
- DoCast(m_creature, SPELL_BLASTNOVA);
+ DoScriptText(EMOTE_BLASTNOVA, me);
+ DoCast(me, SPELL_BLASTNOVA);
BlastNova_Timer = 60000;
}
} else BlastNova_Timer -= diff;
@@ -355,9 +355,9 @@ struct boss_magtheridonAI : public ScriptedAI
if (Quake_Timer <= diff)
{
// to avoid blastnova interruption
- if (!m_creature->IsNonMeleeSpellCasted(false))
+ if (!me->IsNonMeleeSpellCasted(false))
{
- DoCast(m_creature, SPELL_QUAKE_TRIGGER, true);
+ DoCast(me, SPELL_QUAKE_TRIGGER, true);
Quake_Timer = 50000;
}
} else Quake_Timer -= diff;
@@ -368,7 +368,7 @@ struct boss_magtheridonAI : public ScriptedAI
{
float x, y, z;
pTarget->GetPosition(x, y, z);
- Creature *summon = m_creature->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Creature *summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (summon)
{
CAST_AI(mob_abyssalAI, summon->AI())->SetTrigger(2);
@@ -379,14 +379,14 @@ struct boss_magtheridonAI : public ScriptedAI
Blaze_Timer = 20000 + rand()%20000;
} else Blaze_Timer -= diff;
- if (!Phase3 && m_creature->GetHealth()*10 < m_creature->GetMaxHealth()*3
- && !m_creature->IsNonMeleeSpellCasted(false) // blast nova
- && !m_creature->hasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake
+ if (!Phase3 && me->GetHealth()*10 < me->GetMaxHealth()*3
+ && !me->IsNonMeleeSpellCasted(false) // blast nova
+ && !me->hasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake
{
Phase3 = true;
- DoScriptText(SAY_CHAMBER_DESTROY, m_creature);
- DoCast(m_creature, SPELL_CAMERA_SHAKE, true);
- DoCast(m_creature, SPELL_DEBRIS_KNOCKDOWN, true);
+ DoScriptText(SAY_CHAMBER_DESTROY, me);
+ DoCast(me, SPELL_CAMERA_SHAKE, true);
+ DoCast(me, SPELL_DEBRIS_KNOCKDOWN, true);
if (pInstance)
pInstance->SetData(DATA_COLLAPSE, true);
@@ -400,7 +400,7 @@ struct boss_magtheridonAI : public ScriptedAI
{
float x, y, z;
pTarget->GetPosition(x, y, z);
- Creature *summon = m_creature->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ Creature *summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (summon) CAST_AI(mob_abyssalAI, summon->AI())->SetTrigger(1);
}
Debris_Timer = 10000;
@@ -415,7 +415,7 @@ struct mob_hellfire_channelerAI : public ScriptedAI
{
mob_hellfire_channelerAI(Creature *c) : ScriptedAI(c)
{
- pInstance =m_creature->GetInstanceData();
+ pInstance =me->GetInstanceData();
}
ScriptedInstance* pInstance;
@@ -442,7 +442,7 @@ struct mob_hellfire_channelerAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_CHANNELER_EVENT, IN_PROGRESS);
- m_creature->InterruptNonMeleeSpells(false);
+ me->InterruptNonMeleeSpells(false);
DoZoneInCombat();
}
@@ -451,18 +451,18 @@ struct mob_hellfire_channelerAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_CHANNELER_EVENT, NOT_STARTED);
- DoCast(m_creature, SPELL_SHADOW_GRASP_C, false);
+ DoCast(me, SPELL_SHADOW_GRASP_C, false);
}
void JustSummoned(Creature *summon)
{
- summon->AI()->AttackStart(m_creature->getVictim());
+ summon->AI()->AttackStart(me->getVictim());
}
void DamageTaken(Unit*, uint32 &damage)
{
- if (damage >= m_creature->GetHealth())
- DoCast(m_creature, SPELL_SOUL_TRANSFER, true);
+ if (damage >= me->GetHealth())
+ DoCast(me, SPELL_SOUL_TRANSFER, true);
}
void JustDied(Unit* who)
@@ -478,14 +478,14 @@ struct mob_hellfire_channelerAI : public ScriptedAI
if (ShadowBoltVolley_Timer <= diff)
{
- DoCast(m_creature, SPELL_SHADOW_BOLT_VOLLEY);
+ DoCast(me, SPELL_SHADOW_BOLT_VOLLEY);
ShadowBoltVolley_Timer = 10000 + rand()%10000;
} else ShadowBoltVolley_Timer -= diff;
if (DarkMending_Timer <= diff)
{
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50)
- DoCast(m_creature, SPELL_DARK_MENDING);
+ if ((me->GetHealth()*100 / me->GetMaxHealth()) < 50)
+ DoCast(me, SPELL_DARK_MENDING);
DarkMending_Timer = 10000 +(rand() % 10000);
} else DarkMending_Timer -= diff;
diff --git a/src/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/src/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
index 3b41da6bfd9..0c8466b3686 100644
--- a/src/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
+++ b/src/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
@@ -99,7 +99,7 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
void Reset()
{
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
IsIntroEvent = false;
IntroOnce = false;
@@ -122,7 +122,7 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
if (PeonEngagedCount >= 4)
return;
- DoScriptText(PeonAttacked[PeonEngagedCount].id, m_creature);
+ DoScriptText(PeonAttacked[PeonEngagedCount].id, me);
++PeonEngagedCount;
}
@@ -131,27 +131,27 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
if (PeonKilledCount >= 4)
return;
- DoScriptText(PeonDies[PeonKilledCount].id, m_creature);
+ DoScriptText(PeonDies[PeonKilledCount].id, me);
++PeonKilledCount;
if (PeonKilledCount == 4)
{
IsIntroEvent = false;
IsMainEvent = true;
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
}
void DoTauntPeons()
{
- DoScriptText(RAND(SAY_TAUNT_1,SAY_TAUNT_2,SAY_TAUNT_3), m_creature);
+ DoScriptText(RAND(SAY_TAUNT_1,SAY_TAUNT_2,SAY_TAUNT_3), me);
//TODO: kill the peons first
IsIntroEvent = false;
PeonEngagedCount = 4;
PeonKilledCount = 4;
IsMainEvent = true;
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
void AttackStart(Unit* who)
@@ -159,7 +159,7 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
if (IsIntroEvent || !IsMainEvent)
return;
- if (m_creature->Attack(who, true))
+ if (me->Attack(who, true))
{
if (Phase)
DoStartNoMovement(who);
@@ -170,12 +170,12 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
void MoveInLineOfSight(Unit *who)
{
- if (!IntroOnce && m_creature->IsWithinDistInMap(who, 50.0f))
+ if (!IntroOnce && me->IsWithinDistInMap(who, 50.0f))
{
if (who->GetTypeId() != TYPEID_PLAYER)
return;
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
IntroOnce = true;
IsIntroEvent = true;
@@ -191,7 +191,7 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);
}
void JustSummoned(Creature *summoned)
@@ -202,17 +202,17 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
//triggered spell of consumption does not properly show it's SpellVisual, wrong spellid?
summoned->CastSpell(summoned,SPELL_TEMPORARY_VISUAL,true);
- summoned->CastSpell(summoned,SPELL_CONSUMPTION,false,0,0,m_creature->GetGUID());
+ summoned->CastSpell(summoned,SPELL_CONSUMPTION,false,0,0,me->GetGUID());
}
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DIE, m_creature);
+ DoScriptText(SAY_DIE, me);
if (!pInstance)
return;
@@ -247,13 +247,13 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
{
if (!SpinOnce)
{
- DoCast(m_creature->getVictim(), SPELL_DARK_SPIN);
+ DoCast(me->getVictim(), SPELL_DARK_SPIN);
SpinOnce = true;
}
if (Cleave_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SHADOW_CLEAVE);
+ DoCast(me->getVictim(), SPELL_SHADOW_CLEAVE);
Cleave_Timer = 6000+rand()%2500;
} else Cleave_Timer -= diff;
}
@@ -273,7 +273,7 @@ struct boss_grand_warlock_nethekurseAI : public ScriptedAI
DeathCoil_Timer = urand(15000,20000);
} else DeathCoil_Timer -= diff;
- if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20)
+ if ((me->GetHealth()*100) / me->GetMaxHealth() <= 20)
Phase = true;
DoMeleeAttackIfReady();
@@ -293,7 +293,7 @@ struct mob_fel_orc_convertAI : public ScriptedAI
void Reset()
{
- m_creature->SetNoCallAssistance(true); //we don't want any assistance (WE R HEROZ!)
+ me->SetNoCallAssistance(true); //we don't want any assistance (WE R HEROZ!)
Hemorrhage_Timer = 3000;
}
@@ -307,8 +307,8 @@ struct mob_fel_orc_convertAI : public ScriptedAI
{
if (pInstance->GetData64(DATA_NETHEKURSE))
{
- Creature *pKurse = Unit::GetCreature(*m_creature,pInstance->GetData64(DATA_NETHEKURSE));
- if (pKurse && m_creature->IsWithinDist(pKurse, 45.0f))
+ Creature *pKurse = Unit::GetCreature(*me,pInstance->GetData64(DATA_NETHEKURSE));
+ if (pKurse && me->IsWithinDist(pKurse, 45.0f))
{
CAST_AI(boss_grand_warlock_nethekurseAI, pKurse->AI())->DoYellForPeonAggro();
@@ -328,7 +328,7 @@ struct mob_fel_orc_convertAI : public ScriptedAI
if (pInstance->GetData(TYPE_NETHEKURSE) != IN_PROGRESS)
return;
if (pInstance->GetData64(DATA_NETHEKURSE))
- if (Creature *pKurse = Unit::GetCreature(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)))
+ if (Creature *pKurse = Unit::GetCreature(*me,pInstance->GetData64(DATA_NETHEKURSE)))
CAST_AI(boss_grand_warlock_nethekurseAI, pKurse->AI())->DoYellForPeonDeath();
}
}
@@ -340,7 +340,7 @@ struct mob_fel_orc_convertAI : public ScriptedAI
if (Hemorrhage_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_HEMORRHAGE);
+ DoCast(me->getVictim(), SPELL_HEMORRHAGE);
Hemorrhage_Timer = 15000;
} else Hemorrhage_Timer -= diff;
diff --git a/src/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/src/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
index 7417a9b46f6..f8409912717 100644
--- a/src/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
+++ b/src/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
@@ -124,9 +124,9 @@ struct mob_omrogg_headsAI : public ScriptedAI
if (Death_Timer <= diff)
{
- DoScriptText(YELL_DIE_R, m_creature);
+ DoScriptText(YELL_DIE_R, me);
Death_Timer = false;
- m_creature->setDeathState(JUST_DIED);
+ me->setDeathState(JUST_DIED);
} else Death_Timer -= diff;
}
};
@@ -163,13 +163,13 @@ struct boss_warbringer_omroggAI : public ScriptedAI
void Reset()
{
- if (Unit* pLeftHead = Unit::GetUnit(*m_creature,LeftHeadGUID))
+ if (Unit* pLeftHead = Unit::GetUnit(*me,LeftHeadGUID))
{
pLeftHead->setDeathState(JUST_DIED);
LeftHeadGUID = 0;
}
- if (Unit* pRightHead = Unit::GetUnit(*m_creature,RightHeadGUID))
+ if (Unit* pRightHead = Unit::GetUnit(*me,RightHeadGUID))
{
pRightHead->setDeathState(JUST_DIED);
RightHeadGUID = 0;
@@ -194,8 +194,8 @@ struct boss_warbringer_omroggAI : public ScriptedAI
void DoYellForThreat()
{
- Unit *pLeftHead = Unit::GetUnit(*m_creature,LeftHeadGUID);
- Unit *pRightHead = Unit::GetUnit(*m_creature,RightHeadGUID);
+ Unit *pLeftHead = Unit::GetUnit(*me,LeftHeadGUID);
+ Unit *pRightHead = Unit::GetUnit(*me,RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
@@ -212,10 +212,10 @@ struct boss_warbringer_omroggAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- m_creature->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
- m_creature->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
+ me->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
+ me->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
- if (Unit *pLeftHead = Unit::GetUnit(*m_creature,LeftHeadGUID))
+ if (Unit *pLeftHead = Unit::GetUnit(*me,LeftHeadGUID))
{
iaggro = rand()%3;
@@ -244,8 +244,8 @@ struct boss_warbringer_omroggAI : public ScriptedAI
void KilledUnit(Unit* victim)
{
- Unit* pLeftHead = Unit::GetUnit(*m_creature,LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*m_creature,RightHeadGUID);
+ Unit* pLeftHead = Unit::GetUnit(*me,LeftHeadGUID);
+ Unit* pRightHead = Unit::GetUnit(*me,RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
@@ -270,8 +270,8 @@ struct boss_warbringer_omroggAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- Unit* pLeftHead = Unit::GetUnit(*m_creature,LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*m_creature,RightHeadGUID);
+ Unit* pLeftHead = Unit::GetUnit(*me,LeftHeadGUID);
+ Unit* pRightHead = Unit::GetUnit(*me,RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
@@ -290,8 +290,8 @@ struct boss_warbringer_omroggAI : public ScriptedAI
{
Delay_Timer = 3500;
- Unit* pLeftHead = Unit::GetUnit(*m_creature,LeftHeadGUID);
- Unit* pRightHead = Unit::GetUnit(*m_creature,RightHeadGUID);
+ Unit* pLeftHead = Unit::GetUnit(*me,LeftHeadGUID);
+ Unit* pRightHead = Unit::GetUnit(*me,RightHeadGUID);
if (!pLeftHead || !pRightHead)
return;
@@ -333,7 +333,7 @@ struct boss_warbringer_omroggAI : public ScriptedAI
if (BlastCount && BlastWave_Timer <= diff)
{
- DoCast(m_creature, SPELL_BLAST_WAVE);
+ DoCast(me, SPELL_BLAST_WAVE);
BlastWave_Timer = 5000;
++BlastCount;
@@ -343,8 +343,8 @@ struct boss_warbringer_omroggAI : public ScriptedAI
if (BurningMaul_Timer <= diff)
{
- DoScriptText(EMOTE_ENRAGE, m_creature);
- DoCast(m_creature, SPELL_BURNING_MAUL);
+ DoScriptText(EMOTE_ENRAGE, me);
+ DoCast(me, SPELL_BURNING_MAUL);
BurningMaul_Timer = 40000;
BlastWave_Timer = 16000;
BlastCount = 1;
@@ -356,20 +356,20 @@ struct boss_warbringer_omroggAI : public ScriptedAI
{
DoYellForThreat();
DoResetThreat();
- m_creature->AddThreat(pTarget, 0.0f);
+ me->AddThreat(pTarget, 0.0f);
}
ResetThreat_Timer = 25000+rand()%15000;
} else ResetThreat_Timer -= diff;
if (Fear_Timer <= diff)
{
- DoCast(m_creature, SPELL_FEAR);
+ DoCast(me, SPELL_FEAR);
Fear_Timer = 15000+rand()%20000;
} else Fear_Timer -= diff;
if (ThunderClap_Timer <= diff)
{
- DoCast(m_creature, SPELL_THUNDERCLAP);
+ DoCast(me, SPELL_THUNDERCLAP);
ThunderClap_Timer = 15000+rand()%15000;
} else ThunderClap_Timer -= diff;
diff --git a/src/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/src/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp
index 0b1b3ab8428..1626e2450cd 100644
--- a/src/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp
+++ b/src/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp
@@ -74,8 +74,8 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
{
removeAdds();
- m_creature->SetSpeed(MOVE_RUN,2);
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ me->SetSpeed(MOVE_RUN,2);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
summoned = 2;
InBlade = false;
@@ -90,7 +90,7 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), m_creature);
+ DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), me);
}
void JustSummoned(Creature *summoned)
@@ -113,13 +113,13 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
{
if (victim->GetTypeId() == TYPEID_PLAYER)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
removeAdds();
}
@@ -136,7 +136,7 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
if (target_num > 0) // to prevent loops
{
Wait_Timer = 1;
- DoCast(m_creature, SPELL_BLADE_DANCE, true);
+ DoCast(me, SPELL_BLADE_DANCE, true);
target_num--;
}
}
@@ -146,11 +146,11 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
{
for (std::vector<uint64>::const_iterator itr = adds.begin(); itr!= adds.end(); ++itr)
{
- Unit* temp = Unit::GetUnit((*m_creature),*itr);
+ Unit* temp = Unit::GetUnit((*me),*itr);
if (temp && temp->isAlive())
{
(*temp).GetMotionMaster()->Clear(true);
- m_creature->DealDamage(temp,temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(temp,temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
CAST_CRE(temp)->RemoveCorpse();
}
}
@@ -158,11 +158,11 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
for (std::vector<uint64>::const_iterator itr = assassins.begin(); itr!= assassins.end(); ++itr)
{
- Unit* temp = Unit::GetUnit((*m_creature),*itr);
+ Unit* temp = Unit::GetUnit((*me),*itr);
if (temp && temp->isAlive())
{
(*temp).GetMotionMaster()->Clear(true);
- m_creature->DealDamage(temp,temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(temp,temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
CAST_CRE(temp)->RemoveCorpse();
}
}
@@ -170,10 +170,10 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
}
void SpawnAssassin()
{
- m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]+8, AssassEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
- m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]-8, AssassEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
- m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]+8, AssassExit[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
- m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]-8, AssassExit[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
+ me->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]+8, AssassEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
+ me->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]-8, AssassEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
+ me->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]+8, AssassExit[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
+ me->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]-8, AssassExit[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
}
void UpdateAI(const uint32 diff)
@@ -198,8 +198,8 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
{
// stop bladedance
InBlade = false;
- m_creature->SetSpeed(MOVE_RUN,2);
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
+ me->SetSpeed(MOVE_RUN,2);
+ me->GetMotionMaster()->MoveChase(me->getVictim());
Blade_Dance_Timer = 30000;
Wait_Timer = 0;
if (IsHeroic())
@@ -213,7 +213,7 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
randy = (rand()%40);
x = 210+ randx ;
y = -60- randy ;
- m_creature->GetMotionMaster()->MovePoint(1,x,y,m_creature->GetPositionZ());
+ me->GetMotionMaster()->MovePoint(1,x,y,me->GetPositionZ());
Wait_Timer = 0;
}
} else Wait_Timer -= diff;
@@ -227,7 +227,7 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
Wait_Timer = 1;
InBlade = true;
Blade_Dance_Timer = 0;
- m_creature->SetSpeed(MOVE_RUN,4);
+ me->SetSpeed(MOVE_RUN,4);
return;
} else Blade_Dance_Timer -= diff;
@@ -246,9 +246,9 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
{
switch (urand(0,2))
{
- case 0: m_creature->SummonCreature(MOB_HEARTHEN_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
- case 1: m_creature->SummonCreature(MOB_SHARPSHOOTER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
- case 2: m_creature->SummonCreature(MOB_REAVER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
+ case 0: me->SummonCreature(MOB_HEARTHEN_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
+ case 1: me->SummonCreature(MOB_SHARPSHOOTER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
+ case 2: me->SummonCreature(MOB_REAVER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
}
}
if (urand(0,9) < 2)
@@ -262,8 +262,8 @@ struct boss_warchief_kargath_bladefistAI : public ScriptedAI
if (resetcheck_timer <= diff)
{
uint32 tempx,tempy;
- tempx = uint32(m_creature->GetPositionX());
- tempy = uint32(m_creature->GetPositionY());
+ tempx = uint32(me->GetPositionX());
+ tempy = uint32(me->GetPositionY());
if (tempx > 255 || tempx < 205)
{
EnterEvadeMode();
diff --git a/src/scripts/outland/hellfire_peninsula.cpp b/src/scripts/outland/hellfire_peninsula.cpp
index cc7e0f675f7..6d1d9894074 100644
--- a/src/scripts/outland/hellfire_peninsula.cpp
+++ b/src/scripts/outland/hellfire_peninsula.cpp
@@ -66,10 +66,10 @@ struct npc_aeranasAI : public ScriptedAI
EnvelopingWinds_Timer = 9000;
Shock_Timer = 5000;
- m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- m_creature->setFaction(FACTION_FRIENDLY);
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ me->setFaction(FACTION_FRIENDLY);
- DoScriptText(SAY_SUMMON, m_creature);
+ DoScriptText(SAY_SUMMON, me);
}
void UpdateAI(const uint32 diff)
@@ -78,7 +78,7 @@ struct npc_aeranasAI : public ScriptedAI
{
if (Faction_Timer <= diff)
{
- m_creature->setFaction(FACTION_HOSTILE);
+ me->setFaction(FACTION_HOSTILE);
Faction_Timer = 0;
} else Faction_Timer -= diff;
}
@@ -86,26 +86,26 @@ struct npc_aeranasAI : public ScriptedAI
if (!UpdateVictim())
return;
- if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 30)
+ if ((me->GetHealth()*100) / me->GetMaxHealth() < 30)
{
- m_creature->setFaction(FACTION_FRIENDLY);
- m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- m_creature->RemoveAllAuras();
- m_creature->DeleteThreatList();
- m_creature->CombatStop(true);
- DoScriptText(SAY_FREE, m_creature);
+ me->setFaction(FACTION_FRIENDLY);
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ me->RemoveAllAuras();
+ me->DeleteThreatList();
+ me->CombatStop(true);
+ DoScriptText(SAY_FREE, me);
return;
}
if (Shock_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SHOCK);
+ DoCast(me->getVictim(), SPELL_SHOCK);
Shock_Timer = 10000;
} else Shock_Timer -= diff;
if (EnvelopingWinds_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ENVELOPING_WINDS);
+ DoCast(me->getVictim(), SPELL_ENVELOPING_WINDS);
EnvelopingWinds_Timer = 25000;
} else EnvelopingWinds_Timer -= diff;
@@ -151,12 +151,12 @@ struct npc_ancestral_wolfAI : public npc_escortAI
void Reset()
{
pRyga = NULL;
- DoCast(m_creature, SPELL_ANCESTRAL_WOLF_BUFF, true);
+ DoCast(me, SPELL_ANCESTRAL_WOLF_BUFF, true);
}
void MoveInLineOfSight(Unit* pWho)
{
- if (!pRyga && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_RYGA && m_creature->IsWithinDistInMap(pWho, 15.0f))
+ if (!pRyga && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(pWho, 15.0f))
pRyga = pWho;
npc_escortAI::MoveInLineOfSight(pWho);
@@ -167,10 +167,10 @@ struct npc_ancestral_wolfAI : public npc_escortAI
switch(uiPointId)
{
case 0:
- DoScriptText(EMOTE_WOLF_LIFT_HEAD, m_creature);
+ DoScriptText(EMOTE_WOLF_LIFT_HEAD, me);
break;
case 2:
- DoScriptText(EMOTE_WOLF_HOWL, m_creature);
+ DoScriptText(EMOTE_WOLF_HOWL, me);
break;
case 50:
if (pRyga && pRyga->isAlive() && !pRyga->isInCombat())
@@ -347,27 +347,27 @@ struct npc_wounded_blood_elfAI : public npc_escortAI
switch (i)
{
case 0:
- DoScriptText(SAY_ELF_START, m_creature, pPlayer);
+ DoScriptText(SAY_ELF_START, me, pPlayer);
break;
case 9:
- DoScriptText(SAY_ELF_SUMMON1, m_creature, pPlayer);
+ DoScriptText(SAY_ELF_SUMMON1, me, pPlayer);
// Spawn two Haal'eshi Talonguard
DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 13:
- DoScriptText(SAY_ELF_RESTING, m_creature, pPlayer);
+ DoScriptText(SAY_ELF_RESTING, me, pPlayer);
break;
case 14:
- DoScriptText(SAY_ELF_SUMMON2, m_creature, pPlayer);
+ DoScriptText(SAY_ELF_SUMMON2, me, pPlayer);
// Spawn two Haal'eshi Windwalker
DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 27:
- DoScriptText(SAY_ELF_COMPLETE, m_creature, pPlayer);
+ DoScriptText(SAY_ELF_COMPLETE, me, pPlayer);
// Award quest credit
- pPlayer->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH,m_creature);
+ pPlayer->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH,me);
break;
}
}
@@ -377,12 +377,12 @@ struct npc_wounded_blood_elfAI : public npc_escortAI
void EnterCombat(Unit* who)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
- DoScriptText(SAY_ELF_AGGRO, m_creature);
+ DoScriptText(SAY_ELF_AGGRO, me);
}
void JustSummoned(Creature* summoned)
{
- summoned->AI()->AttackStart(m_creature);
+ summoned->AI()->AttackStart(me);
}
};
diff --git a/src/scripts/outland/nagrand.cpp b/src/scripts/outland/nagrand.cpp
index 2d467ae7105..6c91aa78985 100644
--- a/src/scripts/outland/nagrand.cpp
+++ b/src/scripts/outland/nagrand.cpp
@@ -57,14 +57,14 @@ struct mob_shattered_rumblerAI : public ScriptedAI
{
if (Spellkind->Id == 32001 && !Spawn)
{
- float x = m_creature->GetPositionX();
- float y = m_creature->GetPositionY();
- float z = m_creature->GetPositionZ();
+ float x = me->GetPositionX();
+ float y = me->GetPositionY();
+ float z = me->GetPositionZ();
Hitter->SummonCreature(18181,x+(0.7 * (rand()%30)),y+(rand()%5),z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000);
Hitter->SummonCreature(18181,x+(rand()%5),y-(rand()%5),z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000);
Hitter->SummonCreature(18181,x-(rand()%5),y+(0.5 *(rand()%60)),z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000);
- m_creature->setDeathState(CORPSE);
+ me->setDeathState(CORPSE);
Spawn = true;
}
return;
@@ -108,15 +108,15 @@ struct mob_lumpAI : public ScriptedAI
Reset_Timer = 60000;
Spear_Throw_Timer = 2000;
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
void AttackedBy(Unit* pAttacker)
{
- if (m_creature->getVictim())
+ if (me->getVictim())
return;
- if (m_creature->IsFriendlyTo(pAttacker))
+ if (me->IsFriendlyTo(pAttacker))
return;
AttackStart(pAttacker);
@@ -124,7 +124,7 @@ struct mob_lumpAI : public ScriptedAI
void DamageTaken(Unit *done_by, uint32 & damage)
{
- if (done_by->GetTypeId() == TYPEID_PLAYER && (m_creature->GetHealth() - damage)*100 / m_creature->GetMaxHealth() < 30)
+ if (done_by->GetTypeId() == TYPEID_PLAYER && (me->GetHealth() - damage)*100 / me->GetMaxHealth() < 30)
{
if (!bReset && CAST_PLR(done_by)->GetQuestStatus(9918) == QUEST_STATUS_INCOMPLETE)
{
@@ -132,13 +132,13 @@ struct mob_lumpAI : public ScriptedAI
damage = 0;
CAST_PLR(done_by)->AttackStop();
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->RemoveAllAuras();
- m_creature->DeleteThreatList();
- m_creature->CombatStop(true);
- m_creature->setFaction(1080); //friendly
- m_creature->SetStandState(UNIT_STAND_STATE_SIT);
- DoScriptText(LUMP_DEFEAT, m_creature);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveAllAuras();
+ me->DeleteThreatList();
+ me->CombatStop(true);
+ me->setFaction(1080); //friendly
+ me->SetStandState(UNIT_STAND_STATE_SIT);
+ DoScriptText(LUMP_DEFEAT, me);
bReset = true;
}
@@ -147,13 +147,13 @@ struct mob_lumpAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- if (m_creature->HasAura(SPELL_VISUAL_SLEEP))
- m_creature->RemoveAura(SPELL_VISUAL_SLEEP);
+ if (me->HasAura(SPELL_VISUAL_SLEEP))
+ me->RemoveAura(SPELL_VISUAL_SLEEP);
- if (!m_creature->IsStandState())
- m_creature->SetStandState(UNIT_STAND_STATE_STAND);
+ if (!me->IsStandState())
+ me->SetStandState(UNIT_STAND_STATE_STAND);
- DoScriptText(RAND(LUMP_SAY0,LUMP_SAY1), m_creature);
+ DoScriptText(RAND(LUMP_SAY0,LUMP_SAY1), me);
}
void UpdateAI(const uint32 diff)
@@ -165,7 +165,7 @@ struct mob_lumpAI : public ScriptedAI
{
EnterEvadeMode();
bReset = false;
- m_creature->setFaction(1711); //hostile
+ me->setFaction(1711); //hostile
return;
}
else Reset_Timer -= diff;
@@ -178,7 +178,7 @@ struct mob_lumpAI : public ScriptedAI
//Spear_Throw_Timer
if (Spear_Throw_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SPEAR_THROW);
+ DoCast(me->getVictim(), SPELL_SPEAR_THROW);
Spear_Throw_Timer = 20000;
} else Spear_Throw_Timer -= diff;
@@ -235,8 +235,8 @@ struct mob_sunspring_villagerAI : public ScriptedAI
void Reset()
{
- m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
- m_creature->SetStandState(UNIT_STAND_STATE_DEAD);
+ me->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
+ me->SetStandState(UNIT_STAND_STATE_DEAD);
}
void EnterCombat(Unit *who) {}
@@ -245,8 +245,8 @@ struct mob_sunspring_villagerAI : public ScriptedAI
{
if (spell->Id == 32146)
{
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->RemoveCorpse();
}
}
};
@@ -566,7 +566,7 @@ struct npc_maghar_captiveAI : public npc_escortAI
void Aggro(Unit* pWho)
{
- DoCast(m_creature, SPELL_EARTHBIND_TOTEM, false);
+ DoCast(me, SPELL_EARTHBIND_TOTEM, false);
}
void WaypointReached(uint32 uiPointId)
@@ -574,21 +574,21 @@ struct npc_maghar_captiveAI : public npc_escortAI
switch(uiPointId)
{
case 7:
- DoScriptText(SAY_MAG_MORE, m_creature);
+ DoScriptText(SAY_MAG_MORE, me);
- if (Creature* pTemp = m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0], m_afAmbushB[1], m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
+ if (Creature* pTemp = me->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0], m_afAmbushB[1], m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
DoScriptText(SAY_MAG_MORE_REPLY, pTemp);
- m_creature->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0]-2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(NPC_MURK_PUTRIFIER, m_afAmbushB[0]-2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]+2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- m_creature->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]+2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(NPC_MURK_SCAVENGER, m_afAmbushB[0]+2.5f, m_afAmbushB[1]-2.5f, m_afAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 16:
- DoScriptText(SAY_MAG_COMPLETE, m_creature);
+ DoScriptText(SAY_MAG_COMPLETE, me);
if (Player* pPlayer = GetPlayerForEscort())
- pPlayer->GroupEventHappens(QUEST_TOTEM_KARDASH_H, m_creature);
+ pPlayer->GroupEventHappens(QUEST_TOTEM_KARDASH_H, me);
SetRun();
break;
@@ -604,8 +604,8 @@ struct npc_maghar_captiveAI : public npc_escortAI
return;
pSummoned->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- pSummoned->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
- pSummoned->AI()->AttackStart(m_creature);
+ pSummoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
+ pSummoned->AI()->AttackStart(me);
}
@@ -616,28 +616,28 @@ struct npc_maghar_captiveAI : public npc_escortAI
if (rand()%10)
return;
- DoScriptText(SAY_MAG_LIGHTNING, m_creature);
+ DoScriptText(SAY_MAG_LIGHTNING, me);
}
}
void UpdateEscortAI(const uint32 uiDiff)
{
- if (/*!m_creature->SelectHostilTarget() ||*/ !m_creature->getVictim())
+ if (/*!me->SelectHostilTarget() ||*/ !me->getVictim())
return;
if (m_uiChainLightningTimer <= uiDiff)
{
- DoCast(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING);
+ DoCast(me->getVictim(), SPELL_CHAIN_LIGHTNING);
m_uiChainLightningTimer = urand(7000, 14000);
}
else
m_uiChainLightningTimer -= uiDiff;
- if (m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*30)
+ if (me->GetHealth()*100 < me->GetMaxHealth()*30)
{
if (m_uiHealTimer <= uiDiff)
{
- DoCast(m_creature, SPELL_HEALING_WAVE);
+ DoCast(me, SPELL_HEALING_WAVE);
m_uiHealTimer = 5000;
}
else
@@ -646,7 +646,7 @@ struct npc_maghar_captiveAI : public npc_escortAI
if (m_uiFrostShockTimer <= uiDiff)
{
- DoCast(m_creature->getVictim(), SPELL_FROST_SHOCK);
+ DoCast(me->getVictim(), SPELL_FROST_SHOCK);
m_uiFrostShockTimer = urand(7500, 15000);
}
else
@@ -703,12 +703,12 @@ struct npc_creditmarker_visit_with_ancestorsAI : public ScriptedAI
{
if (CAST_PLR(who)->GetQuestStatus(10085) == QUEST_STATUS_INCOMPLETE)
{
- uint32 creditMarkerId = m_creature->GetEntry();
+ uint32 creditMarkerId = me->GetEntry();
if ((creditMarkerId >= 18840) && (creditMarkerId <= 18843))
{
// 18840: Sunspring, 18841: Laughing, 18842: Garadar, 18843: Bleeding
if (!CAST_PLR(who)->GetReqKillOrCastCurrentCount(10085, creditMarkerId))
- CAST_PLR(who)->KilledMonsterCredit(creditMarkerId, m_creature->GetGUID());
+ CAST_PLR(who)->KilledMonsterCredit(creditMarkerId, me->GetGUID());
}
}
}
@@ -738,7 +738,7 @@ struct mob_sparrowhawkAI : public ScriptedAI
void Reset()
{
- m_creature->RemoveAurasDueToSpell(SPELL_SPARROWHAWK_NET);
+ me->RemoveAurasDueToSpell(SPELL_SPARROWHAWK_NET);
Check_Timer = 1000;
PlayerGUID = 0;
fleeing = false;
@@ -758,7 +758,7 @@ struct mob_sparrowhawkAI : public ScriptedAI
if (!who || PlayerGUID)
return;
- if (!PlayerGUID && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 30) && CAST_PLR(who)->GetQuestStatus(10987) == QUEST_STATUS_INCOMPLETE)
+ if (!PlayerGUID && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 30) && CAST_PLR(who)->GetQuestStatus(10987) == QUEST_STATUS_INCOMPLETE)
{
PlayerGUID = who->GetGUID();
return;
@@ -773,22 +773,22 @@ struct mob_sparrowhawkAI : public ScriptedAI
{
if (PlayerGUID)
{
- if (fleeing && m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != FLEEING_MOTION_TYPE)
+ if (fleeing && me->GetMotionMaster()->GetCurrentMovementGeneratorType() != FLEEING_MOTION_TYPE)
fleeing = false;
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
- if (pPlayer && m_creature->IsWithinDistInMap(pPlayer, 30))
+ if (pPlayer && me->IsWithinDistInMap(pPlayer, 30))
{
if (!fleeing)
{
- m_creature->DeleteThreatList();
- m_creature->GetMotionMaster()->MoveFleeing(pPlayer);
+ me->DeleteThreatList();
+ me->GetMotionMaster()->MoveFleeing(pPlayer);
fleeing = true;
}
}
else if (fleeing)
{
- m_creature->GetMotionMaster()->MovementExpired(false);
+ me->GetMotionMaster()->MovementExpired(false);
PlayerGUID = 0;
fleeing = false;
}
@@ -809,8 +809,8 @@ struct mob_sparrowhawkAI : public ScriptedAI
if (spell->Id == SPELL_SPARROWHAWK_NET && CAST_PLR(caster)->GetQuestStatus(10987) == QUEST_STATUS_INCOMPLETE)
{
DoCast(caster, SPELL_ITEM_CAPTIVE_SPARROWHAWK, true);
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
}
return;
diff --git a/src/scripts/outland/netherstorm.cpp b/src/scripts/outland/netherstorm.cpp
index c944b2b480d..c3bc1a49eb5 100644
--- a/src/scripts/outland/netherstorm.cpp
+++ b/src/scripts/outland/netherstorm.cpp
@@ -94,14 +94,14 @@ struct npc_manaforge_control_consoleAI : public ScriptedAI
void JustDied(Unit* killer)
{
- DoScriptText(EMOTE_ABORT, m_creature);
+ DoScriptText(EMOTE_ABORT, me);
if (someplayer)
{
- Unit* p = Unit::GetUnit((*m_creature),someplayer);
+ Unit* p = Unit::GetUnit((*me),someplayer);
if (p && p->GetTypeId() == TYPEID_PLAYER)
{
- switch(m_creature->GetEntry())
+ switch(me->GetEntry())
{
case ENTRY_BNAAR_C_CONSOLE:
CAST_PLR(p)->FailQuest(10299);
@@ -125,7 +125,7 @@ struct npc_manaforge_control_consoleAI : public ScriptedAI
if (goConsole)
{
- if (GameObject* pGo = GameObject::GetGameObject((*m_creature),goConsole))
+ if (GameObject* pGo = GameObject::GetGameObject((*me),goConsole))
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
}
}
@@ -137,47 +137,47 @@ struct npc_manaforge_control_consoleAI : public ScriptedAI
case ENTRY_BNAAR_C_CONSOLE:
if (rand()%2)
{
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2933.68,4162.55,164.00,1.60,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2933.68,4162.55,164.00,1.60,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2927.36,4212.97,164.00);
}
else
{
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2927.36,4212.97,164.00,4.94,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2927.36,4212.97,164.00,4.94,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2933.68,4162.55,164.00);
}
Wave_Timer = 30000;
break;
case ENTRY_CORUU_C_CONSOLE:
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2445.21,2765.26,134.49,3.93,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2445.21,2765.26,134.49,3.93,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2424.21,2740.15,133.81);
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2429.86,2731.85,134.53,1.31,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2429.86,2731.85,134.53,1.31,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2435.37,2766.04,133.81);
Wave_Timer = 20000;
break;
case ENTRY_DURO_C_CONSOLE:
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2986.80,2205.36,165.37,3.74,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2986.80,2205.36,165.37,3.74,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2985.15,2197.32,164.79);
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2952.91,2191.20,165.32,0.22,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2952.91,2191.20,165.32,0.22,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2060.01,2185.27,164.67);
Wave_Timer = 15000;
break;
case ENTRY_ARA_C_CONSOLE:
if (rand()%2)
{
- add = m_creature->SummonCreature(ENTRY_ARA_TECH,4035.11,4038.97,194.27,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_ARA_TECH,4035.11,4038.97,194.27,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49);
- add = m_creature->SummonCreature(ENTRY_ARA_TECH,4033.66,4036.79,194.28,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_ARA_TECH,4033.66,4036.79,194.28,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49);
- add = m_creature->SummonCreature(ENTRY_ARA_TECH,4037.13,4037.30,194.23,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_ARA_TECH,4037.13,4037.30,194.23,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49);
}
else
{
- add = m_creature->SummonCreature(ENTRY_ARA_TECH,3099.59,4049.30,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_ARA_TECH,3099.59,4049.30,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59);
- add = m_creature->SummonCreature(ENTRY_ARA_TECH,3999.72,4046.75,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_ARA_TECH,3999.72,4046.75,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59);
- add = m_creature->SummonCreature(ENTRY_ARA_TECH,3996.81,4048.26,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_ARA_TECH,3996.81,4048.26,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59);
}
Wave_Timer = 15000;
@@ -189,29 +189,29 @@ struct npc_manaforge_control_consoleAI : public ScriptedAI
switch(pCreature->GetEntry())
{
case ENTRY_BNAAR_C_CONSOLE:
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2946.52,4201.42,163.47,3.54,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2946.52,4201.42,163.47,3.54,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2927.49,4192.81,163.00);
break;
case ENTRY_CORUU_C_CONSOLE:
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2453.88,2737.85,133.27,2.59,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2453.88,2737.85,133.27,2.59,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85);
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2441.62,2735.32,134.49,1.97,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2441.62,2735.32,134.49,1.97,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85);
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2450.73,2754.50,134.49,3.29,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2450.73,2754.50,134.49,3.29,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85);
break;
case ENTRY_DURO_C_CONSOLE:
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2956.18,2202.85,165.32,5.45,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2956.18,2202.85,165.32,5.45,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48);
- add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2975.30,2211.50,165.32,4.55,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_TECH,2975.30,2211.50,165.32,4.55,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48);
- add = m_creature->SummonCreature(ENTRY_SUNFURY_PROT,2965.02,2217.45,164.16,4.96,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_SUNFURY_PROT,2965.02,2217.45,164.16,4.96,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48);
break;
case ENTRY_ARA_C_CONSOLE:
- add = m_creature->SummonCreature(ENTRY_ARA_ENGI,3994.51,4020.46,192.18,0.91,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_ARA_ENGI,3994.51,4020.46,192.18,0.91,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,4008.35,4035.04,192.70);
- add = m_creature->SummonCreature(ENTRY_ARA_GORKLONN,4021.56,4059.35,193.59,4.44,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ add = me->SummonCreature(ENTRY_ARA_GORKLONN,4021.56,4059.35,193.59,4.44,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
if (add) add->GetMotionMaster()->MovePoint(0,4016.62,4039.89,193.46);
break;
}
@@ -226,42 +226,42 @@ struct npc_manaforge_control_consoleAI : public ScriptedAI
case 1:
if (someplayer)
{
- Unit* u = Unit::GetUnit((*m_creature), someplayer);
- if (u && u->GetTypeId() == TYPEID_PLAYER) DoScriptText(EMOTE_START, m_creature, u);
+ Unit* u = Unit::GetUnit((*me), someplayer);
+ if (u && u->GetTypeId() == TYPEID_PLAYER) DoScriptText(EMOTE_START, me, u);
}
Event_Timer = 60000;
Wave = true;
++Phase;
break;
case 2:
- DoScriptText(EMOTE_60, m_creature);
+ DoScriptText(EMOTE_60, me);
Event_Timer = 30000;
++Phase;
break;
case 3:
- DoScriptText(EMOTE_30, m_creature);
+ DoScriptText(EMOTE_30, me);
Event_Timer = 20000;
- DoFinalSpawnForCreature(m_creature);
+ DoFinalSpawnForCreature(me);
++Phase;
break;
case 4:
- DoScriptText(EMOTE_10, m_creature);
+ DoScriptText(EMOTE_10, me);
Event_Timer = 10000;
Wave = false;
++Phase;
break;
case 5:
- DoScriptText(EMOTE_COMPLETE, m_creature);
+ DoScriptText(EMOTE_COMPLETE, me);
if (someplayer)
{
- Unit* u = Unit::GetUnit((*m_creature),someplayer);
+ Unit* u = Unit::GetUnit((*me),someplayer);
if (u && u->GetTypeId() == TYPEID_PLAYER)
- CAST_PLR(u)->KilledMonsterCredit(m_creature->GetEntry(),m_creature->GetGUID());
- DoCast(m_creature, SPELL_DISABLE_VISUAL);
+ CAST_PLR(u)->KilledMonsterCredit(me->GetEntry(),me->GetGUID());
+ DoCast(me, SPELL_DISABLE_VISUAL);
}
if (goConsole)
{
- if (GameObject* pGo = GameObject::GetGameObject((*m_creature),goConsole))
+ if (GameObject* pGo = GameObject::GetGameObject((*me),goConsole))
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
}
++Phase;
@@ -273,7 +273,7 @@ struct npc_manaforge_control_consoleAI : public ScriptedAI
{
if (Wave_Timer <= diff)
{
- DoWaveSpawnForCreature(m_creature);
+ DoWaveSpawnForCreature(me);
} else Wave_Timer -= diff;
}
}
@@ -397,51 +397,51 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
// Emote Ardonis and Pathaleon
void Turn_to_Pathaleons_Image()
{
- Creature *ardonis = Unit::GetCreature(*m_creature,ardonisGUID);
- Creature *pathaleon = Unit::GetCreature(*m_creature,pathaleonGUID);
+ Creature *ardonis = Unit::GetCreature(*me,ardonisGUID);
+ Creature *pathaleon = Unit::GetCreature(*me,pathaleonGUID);
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
if (!ardonis || !pathaleon || !pPlayer)
return;
//Calculate the angle to Pathaleon
- angle_dawnforge = m_creature->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY());
+ angle_dawnforge = me->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY());
angle_ardonis = ardonis->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY());
//Turn Dawnforge and update
- m_creature->SetOrientation(angle_dawnforge);
- m_creature->SendUpdateToPlayer(pPlayer);
+ me->SetOrientation(angle_dawnforge);
+ me->SendUpdateToPlayer(pPlayer);
//Turn Ardonis and update
ardonis->SetOrientation(angle_ardonis);
ardonis->SendUpdateToPlayer(pPlayer);
//Set them to kneel
- m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
+ me->SetStandState(UNIT_STAND_STATE_KNEEL);
ardonis->SetStandState(UNIT_STAND_STATE_KNEEL);
}
//Set them back to each other
void Turn_to_eachother()
{
- if (Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID))
+ if (Unit *ardonis = Unit::GetUnit(*me,ardonisGUID))
{
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
if (!pPlayer)
return;
- angle_dawnforge = m_creature->GetAngle(ardonis->GetPositionX(), ardonis->GetPositionY());
- angle_ardonis = ardonis->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY());
+ angle_dawnforge = me->GetAngle(ardonis->GetPositionX(), ardonis->GetPositionY());
+ angle_ardonis = ardonis->GetAngle(me->GetPositionX(), me->GetPositionY());
//Turn Dawnforge and update
- m_creature->SetOrientation(angle_dawnforge);
- m_creature->SendUpdateToPlayer(pPlayer);
+ me->SetOrientation(angle_dawnforge);
+ me->SendUpdateToPlayer(pPlayer);
//Turn Ardonis and update
ardonis->SetOrientation(angle_ardonis);
ardonis->SendUpdateToPlayer(pPlayer);
//Set state
- m_creature->SetStandState(UNIT_STAND_STATE_STAND);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
ardonis->SetStandState(UNIT_STAND_STATE_STAND);
}
}
@@ -480,8 +480,8 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
return;
}
- Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID);
- Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID);
+ Unit *ardonis = Unit::GetUnit(*me,ardonisGUID);
+ Unit *pathaleon = Unit::GetUnit(*me,pathaleonGUID);
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
if (!ardonis || !pPlayer)
@@ -500,7 +500,7 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
switch (Phase)
{
case 1:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_1, m_creature);
+ DoScriptText(SAY_COMMANDER_DAWNFORGE_1, me);
++Phase;
Phase_Timer = 16000;
break;
@@ -512,14 +512,14 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
break;
//Phase 3 Dawnforge say
case 3:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_2, m_creature);
+ DoScriptText(SAY_COMMANDER_DAWNFORGE_2, me);
++Phase;
Phase_Timer = 16000;
break;
//Phase 4 Pathaleon spawns up to phase 9
case 4:
//spawn pathaleon's image
- m_creature->SummonCreature(CreatureEntry[2], 2325.851563, 2799.534668, 133.084229, 6.038996, TEMPSUMMON_TIMED_DESPAWN, 90000);
+ me->SummonCreature(CreatureEntry[2], 2325.851563, 2799.534668, 133.084229, 6.038996, TEMPSUMMON_TIMED_DESPAWN, 90000);
++Phase;
Phase_Timer = 500;
break;
@@ -541,7 +541,7 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
break;
//Subphase 2 Dawnforge say
case 1:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_3, m_creature);
+ DoScriptText(SAY_COMMANDER_DAWNFORGE_3, me);
PhaseSubphase = 0;
++Phase;
Phase_Timer = 8000;
@@ -575,7 +575,7 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
break;
//Phase 8 Dawnforge & Ardonis say
case 8:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_4, m_creature);
+ DoScriptText(SAY_COMMANDER_DAWNFORGE_4, me);
DoScriptText(SAY_ARCANIST_ARDONIS_2, ardonis);
++Phase;
Phase_Timer = 4000;
@@ -591,7 +591,7 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
break;
//Phase 10 Dawnforge say
case 10:
- DoScriptText(SAY_COMMANDER_DAWNFORGE_5, m_creature);
+ DoScriptText(SAY_COMMANDER_DAWNFORGE_5, me);
pPlayer->AreaExploredOrEventHappens(QUEST_INFO_GATHERING);
Reset();
break;
@@ -711,8 +711,8 @@ struct mob_phase_hunterAI : public ScriptedAI
ManaBurnTimer = 5000 + (rand() % 3 * 1000); // 5-8 sec cd
- if (m_creature->GetEntry() == NPC_DRAINED_PHASE_HUNTER_ENTRY)
- m_creature->UpdateEntry(NPC_PHASE_HUNTER_ENTRY);
+ if (me->GetEntry() == NPC_DRAINED_PHASE_HUNTER_ENTRY)
+ me->UpdateEntry(NPC_PHASE_HUNTER_ENTRY);
}
void EnterCombat(Unit *who)
@@ -723,19 +723,19 @@ struct mob_phase_hunterAI : public ScriptedAI
void SpellHit(Unit *caster, const SpellEntry *spell)
{
- DoCast(m_creature, SPELL_DE_MATERIALIZE);
+ DoCast(me, SPELL_DE_MATERIALIZE);
}
void UpdateAI(const uint32 diff)
{
if (!Materialize)
{
- DoCast(m_creature, SPELL_MATERIALIZE);
+ DoCast(me, SPELL_MATERIALIZE);
Materialize = true;
}
- if (m_creature->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || m_creature->hasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it
- DoCast(m_creature, SPELL_PHASE_SLIP);
+ if (me->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || me->hasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it
+ DoCast(me, SPELL_PHASE_SLIP);
if (!UpdateVictim())
return;
@@ -743,12 +743,12 @@ struct mob_phase_hunterAI : public ScriptedAI
// some code to cast spell Mana Burn on random target which has mana
if (ManaBurnTimer <= diff)
{
- std::list<HostileReference*> AggroList = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*> AggroList = me->getThreatManager().getThreatList();
std::list<Unit*> UnitsWithMana;
for (std::list<HostileReference*>::const_iterator itr = AggroList.begin(); itr != AggroList.end(); ++itr)
{
- if (Unit *pUnit = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()))
+ if (Unit *pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
{
if (pUnit->GetCreateMana() > 0)
UnitsWithMana.push_back(pUnit);
@@ -767,22 +767,22 @@ struct mob_phase_hunterAI : public ScriptedAI
if (Player *pPlayer = Unit::GetPlayer(PlayerGUID)) // start: support for quest 10190
{
- if (!Weak && m_creature->GetHealth() < (m_creature->GetMaxHealth() / 100 * WeakPercent)
+ if (!Weak && me->GetHealth() < (me->GetMaxHealth() / 100 * WeakPercent)
&& pPlayer->GetQuestStatus(QUEST_RECHARGING_THE_BATTERIES) == QUEST_STATUS_INCOMPLETE)
{
- DoScriptText(EMOTE_WEAK, m_creature);
+ DoScriptText(EMOTE_WEAK, me);
Weak = true;
}
- if (Weak && !Drained && m_creature->HasAura(SPELL_RECHARGING_BATTERY))
+ if (Weak && !Drained && me->HasAura(SPELL_RECHARGING_BATTERY))
{
Drained = true;
- HpPercent = float(m_creature->GetHealth()) / float(m_creature->GetMaxHealth());
+ HpPercent = float(me->GetHealth()) / float(me->GetMaxHealth());
- m_creature->UpdateEntry(NPC_DRAINED_PHASE_HUNTER_ENTRY);
+ me->UpdateEntry(NPC_DRAINED_PHASE_HUNTER_ENTRY);
- m_creature->SetHealth(m_creature->GetMaxHealth() * HpPercent);
- m_creature->LowerPlayerDamageReq(m_creature->GetMaxHealth() - m_creature->GetHealth());
- m_creature->SetInCombatWith(pPlayer);
+ me->SetHealth(me->GetMaxHealth() * HpPercent);
+ me->LowerPlayerDamageReq(me->GetMaxHealth() - me->GetHealth());
+ me->SetInCombatWith(pPlayer);
}
} // end: support for quest 10190
@@ -827,30 +827,30 @@ struct npc_bessyAI : public npc_escortAI
switch(i)
{
case 3: //first spawn
- m_creature->SummonCreature(SPAWN_FIRST, 2449.67, 2183.11, 96.85, 6.20, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- m_creature->SummonCreature(SPAWN_FIRST, 2449.53, 2184.43, 96.36, 6.27, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- m_creature->SummonCreature(SPAWN_FIRST, 2449.85, 2186.34, 97.57, 6.08, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(SPAWN_FIRST, 2449.67, 2183.11, 96.85, 6.20, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(SPAWN_FIRST, 2449.53, 2184.43, 96.36, 6.27, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(SPAWN_FIRST, 2449.85, 2186.34, 97.57, 6.08, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 7:
- m_creature->SummonCreature(SPAWN_SECOND, 2309.64, 2186.24, 92.25, 6.06, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- m_creature->SummonCreature(SPAWN_SECOND, 2309.25, 2183.46, 91.75, 6.22, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(SPAWN_SECOND, 2309.64, 2186.24, 92.25, 6.06, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(SPAWN_SECOND, 2309.25, 2183.46, 91.75, 6.22, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 12:
if (pPlayer)
- pPlayer->GroupEventHappens(Q_ALMABTRIEB, m_creature);
+ pPlayer->GroupEventHappens(Q_ALMABTRIEB, me);
if (Unit* Thadell = me->FindNearestCreature(N_THADELL, 30))
- DoScriptText(SAY_THADELL_1, m_creature); break;
+ DoScriptText(SAY_THADELL_1, me); break;
case 13:
if (Unit* Thadell = me->FindNearestCreature(N_THADELL, 30))
- DoScriptText(SAY_THADELL_2, m_creature, pPlayer); break;
+ DoScriptText(SAY_THADELL_2, me, pPlayer); break;
}
}
void JustSummoned(Creature* summoned)
{
- summoned->AI()->AttackStart(m_creature);
+ summoned->AI()->AttackStart(me);
}
void Reset()
diff --git a/src/scripts/outland/shadowmoon_valley.cpp b/src/scripts/outland/shadowmoon_valley.cpp
index f37b833515c..10b5e52d24f 100644
--- a/src/scripts/outland/shadowmoon_valley.cpp
+++ b/src/scripts/outland/shadowmoon_valley.cpp
@@ -89,7 +89,7 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI
if (bCanEat || bIsEating)
return;
- if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_PLACE_CARCASS && !m_creature->HasAura(SPELL_JUST_EATEN))
+ if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_PLACE_CARCASS && !me->HasAura(SPELL_JUST_EATEN))
{
uiPlayerGUID = pCaster->GetGUID();
bCanEat = true;
@@ -105,7 +105,7 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI
{
bIsEating = true;
EatTimer = 7000;
- m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED);
}
}
@@ -117,36 +117,36 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI
{
if (bCanEat && !bIsEating)
{
- if (Unit* pUnit = Unit::GetUnit(*m_creature, uiPlayerGUID))
+ if (Unit* pUnit = Unit::GetUnit(*me, uiPlayerGUID))
{
if (GameObject* pGo = pUnit->FindNearestGameObject(GO_CARCASS, 10))
{
- if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
- m_creature->GetMotionMaster()->MovementExpired();
+ if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
+ me->GetMotionMaster()->MovementExpired();
- m_creature->GetMotionMaster()->MoveIdle();
- m_creature->StopMoving();
+ me->GetMotionMaster()->MoveIdle();
+ me->StopMoving();
- m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ());
+ me->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ());
}
}
bCanEat = false;
}
else if (bIsEating)
{
- DoCast(m_creature, SPELL_JUST_EATEN);
- DoScriptText(SAY_JUST_EATEN, m_creature);
+ DoCast(me, SPELL_JUST_EATEN);
+ DoScriptText(SAY_JUST_EATEN, me);
if (Player* pPlr = Unit::GetPlayer(uiPlayerGUID))
{
- pPlr->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetGUID());
+ pPlr->KilledMonsterCredit(NPC_EVENT_PINGER, me->GetGUID());
if (GameObject* pGo = pPlr->FindNearestGameObject(GO_CARCASS, 10))
pGo->Delete();
}
Reset();
- m_creature->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->Clear();
}
}
else
@@ -160,7 +160,7 @@ struct mob_mature_netherwing_drakeAI : public ScriptedAI
if (CastTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_NETHER_BREATH);
+ DoCast(me->getVictim(), SPELL_NETHER_BREATH);
CastTimer = 5000;
} else CastTimer -= diff;
@@ -202,11 +202,11 @@ struct mob_enslaved_netherwing_drakeAI : public ScriptedAI
void Reset()
{
if (!Tapped)
- m_creature->setFaction(FACTION_DEFAULT);
+ me->setFaction(FACTION_DEFAULT);
FlyTimer = 10000;
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- m_creature->SetVisibility(VISIBILITY_ON);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->SetVisibility(VISIBILITY_ON);
}
void SpellHit(Unit* caster, const SpellEntry* spell)
@@ -219,18 +219,18 @@ struct mob_enslaved_netherwing_drakeAI : public ScriptedAI
Tapped = true;
PlayerGUID = caster->GetGUID();
- m_creature->setFaction(FACTION_FRIENDLY);
+ me->setFaction(FACTION_FRIENDLY);
DoCast(caster, SPELL_FORCE_OF_NELTHARAKU, true);
Unit* Dragonmaw = me->FindNearestCreature(CREATURE_DRAGONMAW_SUBJUGATOR, 50);
if (Dragonmaw)
{
- m_creature->AddThreat(Dragonmaw, 100000.0f);
+ me->AddThreat(Dragonmaw, 100000.0f);
AttackStart(Dragonmaw);
}
- HostileReference* ref = m_creature->getThreatManager().getOnlineContainer().getReferenceByTarget(caster);
+ HostileReference* ref = me->getThreatManager().getOnlineContainer().getReferenceByTarget(caster);
if (ref)
ref->removeReference();
}
@@ -245,16 +245,16 @@ struct mob_enslaved_netherwing_drakeAI : public ScriptedAI
{
if (PlayerGUID)
{
- Unit* plr = Unit::GetUnit((*m_creature), PlayerGUID);
+ Unit* plr = Unit::GetUnit((*me), PlayerGUID);
if (plr)
DoCast(plr, SPELL_FORCE_OF_NELTHARAKU, true);
PlayerGUID = 0;
}
- m_creature->SetVisibility(VISIBILITY_OFF);
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- m_creature->RemoveCorpse();
+ me->SetVisibility(VISIBILITY_OFF);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->RemoveCorpse();
}
}
@@ -274,10 +274,10 @@ struct mob_enslaved_netherwing_drakeAI : public ScriptedAI
DoCast(plr, SPELL_FORCE_OF_NELTHARAKU, true);
/*
float x,y,z;
- m_creature->GetPosition(x,y,z);
+ me->GetPosition(x,y,z);
float dx,dy,dz;
- m_creature->GetRandomPoint(x, y, z, 20, dx, dy, dz);
+ me->GetRandomPoint(x, y, z, 20, dx, dy, dz);
dz += 20; // so it's in the air, not ground*/
Position pos;
@@ -285,12 +285,12 @@ struct mob_enslaved_netherwing_drakeAI : public ScriptedAI
EscapeDummy->GetPosition(&pos);
else
{
- m_creature->GetRandomNearPosition(pos, 20);
+ me->GetRandomNearPosition(pos, 20);
pos.m_positionZ += 25;
}
- m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- m_creature->GetMotionMaster()->MovePoint(1, pos);
+ me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ me->GetMotionMaster()->MovePoint(1, pos);
}
}
} else FlyTimer -= diff;
@@ -336,10 +336,10 @@ struct mob_dragonmaw_peonAI : public ScriptedAI
Tapped = true;
float x, y, z;
- caster->GetClosePoint(x, y, z, m_creature->GetObjectSize());
+ caster->GetClosePoint(x, y, z, me->GetObjectSize());
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- m_creature->GetMotionMaster()->MovePoint(1, x, y, z);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ me->GetMotionMaster()->MovePoint(1, x, y, z);
}
}
@@ -350,7 +350,7 @@ struct mob_dragonmaw_peonAI : public ScriptedAI
if (id)
{
- m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_EAT);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_EAT);
PoisonTimer = 15000;
}
}
@@ -364,10 +364,10 @@ struct mob_dragonmaw_peonAI : public ScriptedAI
{
Player* plr = Unit::GetPlayer(PlayerGUID);
if (plr && plr->GetQuestStatus(11020) == QUEST_STATUS_INCOMPLETE)
- plr->KilledMonsterCredit(23209, m_creature->GetGUID());
+ plr->KilledMonsterCredit(23209, me->GetGUID());
}
PoisonTimer = 0;
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
} else PoisonTimer -= diff;
}
};
@@ -692,14 +692,14 @@ struct npc_overlord_morghorAI : public ScriptedAI
Step = 0;
Event = false;
- m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 2);
+ me->SetUInt32Value(UNIT_NPC_FLAGS, 2);
}
void StartEvent()
{
- m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
- Unit* Illidan = m_creature->SummonCreature(C_ILLIDAN, -5107.83, 602.584, 85.2393, 4.92598, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
+ me->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
+ Unit* Illidan = me->SummonCreature(C_ILLIDAN, -5107.83, 602.584, 85.2393, 4.92598, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Illidan)
{
IllidanGUID = Illidan->GetGUID();
@@ -709,7 +709,7 @@ struct npc_overlord_morghorAI : public ScriptedAI
{
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
if (pPlayer)
- DoScriptText(OVERLORD_SAY_1, m_creature, pPlayer);
+ DoScriptText(OVERLORD_SAY_1, me, pPlayer);
}
ConversationTimer = 4200;
Step = 0;
@@ -718,9 +718,9 @@ struct npc_overlord_morghorAI : public ScriptedAI
uint32 NextStep(uint32 Step)
{
- Unit* plr = Unit::GetUnit((*m_creature), PlayerGUID);
+ Unit* plr = Unit::GetUnit((*me), PlayerGUID);
- Unit* Illi = Unit::GetUnit((*m_creature), IllidanGUID);
+ Unit* Illi = Unit::GetUnit((*me), IllidanGUID);
if (!plr || !Illi)
{
@@ -731,22 +731,22 @@ struct npc_overlord_morghorAI : public ScriptedAI
switch(Step)
{
case 0: return 0; break;
- case 1: m_creature->GetMotionMaster()->MovePoint(0, -5104.41, 595.297, 85.6838); return 9000; break;
- case 2: DoScriptText(OVERLORD_YELL_1, m_creature, plr); return 4500; break;
- case 3: m_creature->SetInFront(plr); return 3200; break;
- case 4: DoScriptText(OVERLORD_SAY_2, m_creature, plr); return 2000; break;
+ case 1: me->GetMotionMaster()->MovePoint(0, -5104.41, 595.297, 85.6838); return 9000; break;
+ case 2: DoScriptText(OVERLORD_YELL_1, me, plr); return 4500; break;
+ case 3: me->SetInFront(plr); return 3200; break;
+ case 4: DoScriptText(OVERLORD_SAY_2, me, plr); return 2000; break;
case 5: Illi->SetVisibility(VISIBILITY_ON);
Illi->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); return 350; break;
case 6:
Illi->CastSpell(Illi, SPELL_ONE, true);
- Illi->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID());
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID);
+ Illi->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
+ me->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID);
return 2000; break;
- case 7: DoScriptText(OVERLORD_YELL_2, m_creature); return 4500; break;
- case 8: m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 8); return 2500; break;
- case 9: DoScriptText(OVERLORD_SAY_3, m_creature); return 6500; break;
+ case 7: DoScriptText(OVERLORD_YELL_2, me); return 4500; break;
+ case 8: me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8); return 2500; break;
+ case 9: DoScriptText(OVERLORD_SAY_3, me); return 6500; break;
case 10: DoScriptText(LORD_ILLIDAN_SAY_1, Illi); return 5000; break;
- case 11: DoScriptText(OVERLORD_SAY_4, m_creature, plr); return 6000; break;
+ case 11: DoScriptText(OVERLORD_SAY_4, me, plr); return 6000; break;
case 12: DoScriptText(LORD_ILLIDAN_SAY_2, Illi); return 5500; break;
case 13: DoScriptText(LORD_ILLIDAN_SAY_3, Illi); return 4000; break;
case 14: Illi->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); return 1500; break;
@@ -769,17 +769,17 @@ struct npc_overlord_morghorAI : public ScriptedAI
Illi->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
Illi->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
return 500; break;
- case 21: DoScriptText(OVERLORD_SAY_5, m_creature); return 500; break;
+ case 21: DoScriptText(OVERLORD_SAY_5, me); return 500; break;
case 22:
Illi->SetVisibility(VISIBILITY_OFF);
Illi->setDeathState(JUST_DIED);
return 1000; break;
- case 23: m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0); return 2000; break;
- case 24: m_creature->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); return 5000; break;
- case 25: DoScriptText(OVERLORD_SAY_6, m_creature); return 2000; break;
+ case 23: me->SetUInt32Value(UNIT_FIELD_BYTES_1,0); return 2000; break;
+ case 24: me->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); return 5000; break;
+ case 25: DoScriptText(OVERLORD_SAY_6, me); return 2000; break;
case 26:
if (plr)
- CAST_PLR(plr)->GroupEventHappens(QUEST_LORD_ILLIDAN_STORMRAGE, m_creature);
+ CAST_PLR(plr)->GroupEventHappens(QUEST_LORD_ILLIDAN_STORMRAGE, me);
return 6000; break;
case 27:
{
@@ -815,7 +815,7 @@ struct npc_overlord_morghorAI : public ScriptedAI
Yarzill->CastSpell(plr, 41540, true);
return 1000;}
break;
- case 32: m_creature->GetMotionMaster()->MovePoint(0, -5085.77, 577.231, 86.6719); return 5000; break;
+ case 32: me->GetMotionMaster()->MovePoint(0, -5085.77, 577.231, 86.6719); return 5000; break;
case 33: Reset(); return 100; break;
default : return 0;
@@ -901,14 +901,14 @@ struct npc_earthmender_wildaAI : public npc_escortAI
switch(uiPointId)
{
case 13:
- DoScriptText(SAY_WIL_PROGRESS1, m_creature, pPlayer);
+ DoScriptText(SAY_WIL_PROGRESS1, me, pPlayer);
DoSpawnAssassin();
break;
case 14:
DoSpawnAssassin();
break;
case 15:
- DoScriptText(SAY_WIL_FIND_EXIT, m_creature, pPlayer);
+ DoScriptText(SAY_WIL_FIND_EXIT, me, pPlayer);
break;
case 19:
DoRandomSay();
@@ -935,7 +935,7 @@ struct npc_earthmender_wildaAI : public npc_escortAI
DoSpawnAssassin();
break;
case 39:
- DoScriptText(SAY_WIL_JUST_AHEAD, m_creature, pPlayer);
+ DoScriptText(SAY_WIL_JUST_AHEAD, me, pPlayer);
break;
case 43:
DoRandomSay();
@@ -944,10 +944,10 @@ struct npc_earthmender_wildaAI : public npc_escortAI
DoSpawnAssassin();
break;
case 50:
- DoScriptText(SAY_WIL_END, m_creature, pPlayer);
+ DoScriptText(SAY_WIL_END, me, pPlayer);
if (Player* pPlayer = GetPlayerForEscort())
- pPlayer->GroupEventHappens(QUEST_ESCAPE_COILSCAR, m_creature);
+ pPlayer->GroupEventHappens(QUEST_ESCAPE_COILSCAR, me);
break;
}
}
@@ -955,13 +955,13 @@ struct npc_earthmender_wildaAI : public npc_escortAI
void JustSummoned(Creature* pSummoned)
{
if (pSummoned->GetEntry() == NPC_COILSKAR_ASSASSIN)
- pSummoned->AI()->AttackStart(m_creature);
+ pSummoned->AI()->AttackStart(me);
}
//this is very unclear, random say without no real relevance to script/event
void DoRandomSay()
{
- DoScriptText(RAND(SAY_WIL_PROGRESS2,SAY_WIL_PROGRESS4,SAY_WIL_PROGRESS5), m_creature);
+ DoScriptText(RAND(SAY_WIL_PROGRESS2,SAY_WIL_PROGRESS4,SAY_WIL_PROGRESS5), me);
}
void DoSpawnAssassin()
@@ -993,11 +993,11 @@ struct npc_earthmender_wildaAI : public npc_escortAI
return;
//TODO: add more abilities
- if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 30)
+ if (me->GetHealth()*100 / me->GetMaxHealth() <= 30)
{
if (m_uiHealingTimer <= uiDiff)
{
- DoCast(m_creature, SPELL_HEALING_WAVE);
+ DoCast(me, SPELL_HEALING_WAVE);
m_uiHealingTimer = 15000;
}
else
@@ -1148,17 +1148,17 @@ struct mob_illidari_spawnAI : public ScriptedAI
if (!Timers)
{
- if (m_creature->GetEntry() == 22075)//Illidari Soldier
+ if (me->GetEntry() == 22075)//Illidari Soldier
{
SpellTimer1 = SpawnCast[0].Timer1 + (rand()%4 * 1000);
}
- if (m_creature->GetEntry() == 22074)//Illidari Mind Breaker
+ if (me->GetEntry() == 22074)//Illidari Mind Breaker
{
SpellTimer1 = SpawnCast[1].Timer1 + (rand()%10 * 1000);
SpellTimer2 = SpawnCast[2].Timer1 + (rand()%4 * 1000);
SpellTimer3 = SpawnCast[3].Timer1 + (rand()%4 * 1000);
}
- if (m_creature->GetEntry() == 19797)// Illidari Highlord
+ if (me->GetEntry() == 19797)// Illidari Highlord
{
SpellTimer1 = SpawnCast[4].Timer1 + (rand()%4 * 1000);
SpellTimer2 = SpawnCast[5].Timer1 + (rand()%4 * 1000);
@@ -1166,16 +1166,16 @@ struct mob_illidari_spawnAI : public ScriptedAI
Timers = true;
}
//Illidari Soldier
- if (m_creature->GetEntry() == 22075)
+ if (me->GetEntry() == 22075)
{
if (SpellTimer1 <= diff)
{
- DoCast(m_creature->getVictim(), SpawnCast[0].SpellId);//Spellbreaker
+ DoCast(me->getVictim(), SpawnCast[0].SpellId);//Spellbreaker
SpellTimer1 = SpawnCast[0].Timer2 + (rand()%5 * 1000);
} else SpellTimer1 -= diff;
}
//Illidari Mind Breaker
- if (m_creature->GetEntry() == 22074)
+ if (me->GetEntry() == 22074)
{
if (SpellTimer1 <= diff)
{
@@ -1191,28 +1191,28 @@ struct mob_illidari_spawnAI : public ScriptedAI
if (SpellTimer2 <= diff)
{
- DoCast(m_creature->getVictim(), SpawnCast[2].SpellId);//Psychic Scream
+ DoCast(me->getVictim(), SpawnCast[2].SpellId);//Psychic Scream
SpellTimer2 = SpawnCast[2].Timer2 + (rand()%13 * 1000);
} else SpellTimer2 -= diff;
if (SpellTimer3 <= diff)
{
- DoCast(m_creature->getVictim(), SpawnCast[3].SpellId);//Mind Blast
+ DoCast(me->getVictim(), SpawnCast[3].SpellId);//Mind Blast
SpellTimer3 = SpawnCast[3].Timer2 + (rand()%8 * 1000);
} else SpellTimer3 -= diff;
}
//Illidari Highlord
- if (m_creature->GetEntry() == 19797)
+ if (me->GetEntry() == 19797)
{
if (SpellTimer1 <= diff)
{
- DoCast(m_creature->getVictim(), SpawnCast[4].SpellId);//Curse Of Flames
+ DoCast(me->getVictim(), SpawnCast[4].SpellId);//Curse Of Flames
SpellTimer1 = SpawnCast[4].Timer2 + (rand()%10 * 1000);
} else SpellTimer1 -= diff;
if (SpellTimer2 <= diff)
{
- DoCast(m_creature->getVictim(), SpawnCast[5].SpellId);//Flamestrike
+ DoCast(me->getVictim(), SpawnCast[5].SpellId);//Flamestrike
SpellTimer2 = SpawnCast[5].Timer2 + (rand()%7 * 13000);
} else SpellTimer2 -= diff;
}
@@ -1246,20 +1246,20 @@ struct mob_torloth_the_magnificentAI : public ScriptedAI
AggroTargetGUID = 0;
Timers = false;
- m_creature->addUnitState(UNIT_STAT_ROOT);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0);
+ me->addUnitState(UNIT_STAT_ROOT);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
}
void EnterCombat(Unit* who){}
void HandleAnimation()
{
- Creature* pCreature = m_creature;
+ Creature* pCreature = me;
if (TorlothAnim[AnimationCount].pCreature == 1)
{
- pCreature = (Unit::GetCreature(*m_creature, LordIllidanGUID));
+ pCreature = (Unit::GetCreature(*me, LordIllidanGUID));
if (!pCreature)
return;
@@ -1273,28 +1273,28 @@ struct mob_torloth_the_magnificentAI : public ScriptedAI
switch(AnimationCount)
{
case 0:
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,8);
+ me->SetUInt32Value(UNIT_FIELD_BYTES_1,8);
break;
case 3:
- m_creature->RemoveFlag(UNIT_FIELD_BYTES_1,8);
+ me->RemoveFlag(UNIT_FIELD_BYTES_1,8);
break;
case 5:
if (Player* AggroTarget = (Unit::GetPlayer(AggroTargetGUID)))
{
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, AggroTarget->GetGUID());
- m_creature->AddThreat(AggroTarget, 1);
- m_creature->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
+ me->SetUInt64Value(UNIT_FIELD_TARGET, AggroTarget->GetGUID());
+ me->AddThreat(AggroTarget, 1);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
}
break;
case 6:
if (Player* AggroTarget = (Unit::GetPlayer(AggroTargetGUID)))
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->clearUnitState(UNIT_STAT_ROOT);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->clearUnitState(UNIT_STAT_ROOT);
float x, y, z;
AggroTarget->GetPosition(x,y,z);
- m_creature->GetMotionMaster()->MovePoint(0,x,y,z);
+ me->GetMotionMaster()->MovePoint(0,x,y,z);
}
break;
}
@@ -1313,7 +1313,7 @@ struct mob_torloth_the_magnificentAI : public ScriptedAI
if (AnimationCount < 6)
{
- m_creature->CombatStop();
+ me->CombatStop();
} else if (!Timers)
{
@@ -1327,19 +1327,19 @@ struct mob_torloth_the_magnificentAI : public ScriptedAI
{
if (SpellTimer1 <= diff)
{
- DoCast(m_creature->getVictim(), SpawnCast[6].SpellId);//Cleave
+ DoCast(me->getVictim(), SpawnCast[6].SpellId);//Cleave
SpellTimer1 = SpawnCast[6].Timer2 + (rand()%10 * 1000);
} else SpellTimer1 -= diff;
if (SpellTimer2 <= diff)
{
- DoCast(m_creature->getVictim(), SpawnCast[7].SpellId);//Shadowfury
+ DoCast(me->getVictim(), SpawnCast[7].SpellId);//Shadowfury
SpellTimer2 = SpawnCast[7].Timer2 + (rand()%5 * 1000);
} else SpellTimer2 -= diff;
if (SpellTimer3 <= diff)
{
- DoCast(m_creature, SpawnCast[8].SpellId);
+ DoCast(me, SpawnCast[8].SpellId);
SpellTimer3 = SpawnCast[8].Timer2 + (rand()%7 * 1000);//Spell Reflection
} else SpellTimer3 -= diff;
}
@@ -1355,15 +1355,15 @@ struct mob_torloth_the_magnificentAI : public ScriptedAI
case TYPEID_UNIT:
if (Unit *owner = slayer->GetOwner())
if (owner->GetTypeId() == TYPEID_PLAYER)
- CAST_PLR(owner)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, m_creature);
+ CAST_PLR(owner)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me);
break;
case TYPEID_PLAYER:
- CAST_PLR(slayer)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, m_creature);
+ CAST_PLR(slayer)->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, me);
break;
}
- if (Creature* LordIllidan = (Unit::GetCreature(*m_creature, LordIllidanGUID)))
+ if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID)))
{
DoScriptText(END_TEXT, LordIllidan, slayer);
LordIllidan->AI()->EnterEvadeMode();
@@ -1404,7 +1404,7 @@ struct npc_lord_illidan_stormrageAI : public ScriptedAI
Announced = false;
Failed = false;
- m_creature->SetVisibility(VISIBILITY_OFF);
+ me->SetVisibility(VISIBILITY_OFF);
}
void EnterCombat(Unit* who) {}
@@ -1426,7 +1426,7 @@ struct npc_lord_illidan_stormrageAI : public ScriptedAI
float Y = SpawnLocation[locIndex + i].y;
float Z = SpawnLocation[locIndex + i].z;
float O = SpawnLocation[locIndex + i].o;
- Spawn = m_creature->SummonCreature(WavesInfo[WaveCount].CreatureId, X, Y, Z, O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
+ Spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, X, Y, Z, O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
++LiveCount;
if (Spawn)
@@ -1463,12 +1463,12 @@ struct npc_lord_illidan_stormrageAI : public ScriptedAI
Spawn->GetMotionMaster()->MovePoint(0,x, y, z);
}
}
- CAST_AI(mob_illidari_spawnAI, Spawn->AI())->LordIllidanGUID = m_creature->GetGUID();
+ CAST_AI(mob_illidari_spawnAI, Spawn->AI())->LordIllidanGUID = me->GetGUID();
}
if (WavesInfo[WaveCount].CreatureId == 22076) // Torloth
{
- CAST_AI(mob_torloth_the_magnificentAI, Spawn->AI())->LordIllidanGUID = m_creature->GetGUID();
+ CAST_AI(mob_torloth_the_magnificentAI, Spawn->AI())->LordIllidanGUID = me->GetGUID();
if (PlayerGUID)
CAST_AI(mob_torloth_the_magnificentAI, Spawn->AI())->AggroTargetGUID = PlayerGUID;
}
@@ -1501,7 +1501,7 @@ struct npc_lord_illidan_stormrageAI : public ScriptedAI
GroupMember = (Unit::GetPlayer(itr->guid));
if (!GroupMember)
continue;
- if (!GroupMember->IsWithinDistInMap(m_creature, EVENT_AREA_RADIUS) && GroupMember->GetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) == QUEST_STATUS_INCOMPLETE)
+ if (!GroupMember->IsWithinDistInMap(me, EVENT_AREA_RADIUS) && GroupMember->GetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) == QUEST_STATUS_INCOMPLETE)
{
GroupMember->FailQuest(QUEST_BATTLE_OF_THE_CRIMSON_WATCH);
GroupMember->SetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, QUEST_STATUS_NONE);
@@ -1534,7 +1534,7 @@ struct npc_lord_illidan_stormrageAI : public ScriptedAI
}
Failed = true;
}
- } else if (pPlayer->isDead() || !pPlayer->IsWithinDistInMap(m_creature, EVENT_AREA_RADIUS))
+ } else if (pPlayer->isDead() || !pPlayer->IsWithinDistInMap(me, EVENT_AREA_RADIUS))
{
pPlayer->FailQuest(QUEST_BATTLE_OF_THE_CRIMSON_WATCH);
Failed = true;
@@ -1557,7 +1557,7 @@ struct npc_lord_illidan_stormrageAI : public ScriptedAI
{
if (!Announced && AnnounceTimer <= diff)
{
- DoScriptText(WavesInfo[WaveCount].WaveTextId, m_creature);
+ DoScriptText(WavesInfo[WaveCount].WaveTextId, me);
Announced = true;
} else AnnounceTimer -= diff;
@@ -1575,8 +1575,8 @@ struct npc_lord_illidan_stormrageAI : public ScriptedAI
void mob_illidari_spawnAI::JustDied(Unit *slayer)
{
- m_creature->RemoveCorpse();
- if (Creature* LordIllidan = (Unit::GetCreature(*m_creature, LordIllidanGUID)))
+ me->RemoveCorpse();
+ if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID)))
if (LordIllidan)
CAST_AI(npc_lord_illidan_stormrageAI, LordIllidan->AI())->LiveCounter();
}
@@ -1676,7 +1676,7 @@ struct npc_enraged_spiritAI : public ScriptedAI
uint32 entry = 0;
uint32 credit = 0;
- switch(m_creature->GetEntry()) {
+ switch(me->GetEntry()) {
case ENTRY_ENRAGED_FIRE_SPIRIT:
entry = ENTRY_FIERY_SOUL;
//credit = SPELL_FIERY_SOUL_CAPTURED_CREDIT;
diff --git a/src/scripts/outland/shattrath_city.cpp b/src/scripts/outland/shattrath_city.cpp
index 7361c774b8c..86f84dac123 100644
--- a/src/scripts/outland/shattrath_city.cpp
+++ b/src/scripts/outland/shattrath_city.cpp
@@ -71,7 +71,7 @@ struct npc_raliq_the_drunkAI : public ScriptedAI
if (Uppercut_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_UPPERCUT);
+ DoCast(me->getVictim(), SPELL_UPPERCUT);
Uppercut_Timer = 15000;
} else Uppercut_Timer -= diff;
@@ -129,9 +129,9 @@ struct npc_salsalabimAI : public ScriptedAI
void DamageTaken(Unit *done_by, uint32 &damage)
{
if (done_by->GetTypeId() == TYPEID_PLAYER)
- if ((m_creature->GetHealth()-damage)*100 / m_creature->GetMaxHealth() < 20)
+ if ((me->GetHealth()-damage)*100 / me->GetMaxHealth() < 20)
{
- CAST_PLR(done_by)->GroupEventHappens(QUEST_10004,m_creature);
+ CAST_PLR(done_by)->GroupEventHappens(QUEST_10004,me);
damage = 0;
EnterEvadeMode();
}
@@ -144,7 +144,7 @@ struct npc_salsalabimAI : public ScriptedAI
if (MagneticPull_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_MAGNETIC_PULL);
+ DoCast(me->getVictim(), SPELL_MAGNETIC_PULL);
MagneticPull_Timer = 15000;
} else MagneticPull_Timer -= diff;
@@ -289,30 +289,30 @@ public:
switch(i)
{
- case 0: DoScriptText(SAY1, m_creature, pPlayer); break;
- case 4: DoScriptText(WHISP1, m_creature, pPlayer); break;
- case 6: DoScriptText(WHISP2, m_creature, pPlayer); break;
- case 7: DoScriptText(WHISP3, m_creature, pPlayer); break;
- case 8: DoScriptText(WHISP4, m_creature, pPlayer); break;
- case 17: DoScriptText(WHISP5, m_creature, pPlayer); break;
- case 18: DoScriptText(WHISP6, m_creature, pPlayer); break;
- case 19: DoScriptText(WHISP7, m_creature, pPlayer); break;
- case 33: DoScriptText(WHISP8, m_creature, pPlayer); break;
- case 34: DoScriptText(WHISP9, m_creature, pPlayer); break;
- case 35: DoScriptText(WHISP10, m_creature, pPlayer); break;
- case 36: DoScriptText(WHISP11, m_creature, pPlayer); break;
- case 43: DoScriptText(WHISP12, m_creature, pPlayer); break;
- case 44: DoScriptText(WHISP13, m_creature, pPlayer); break;
- case 49: DoScriptText(WHISP14, m_creature, pPlayer); break;
- case 50: DoScriptText(WHISP15, m_creature, pPlayer); break;
- case 51: DoScriptText(WHISP16, m_creature, pPlayer); break;
- case 52: DoScriptText(WHISP17, m_creature, pPlayer); break;
- case 53: DoScriptText(WHISP18, m_creature, pPlayer); break;
- case 54: DoScriptText(WHISP19, m_creature, pPlayer); break;
- case 55: DoScriptText(WHISP20, m_creature, pPlayer); break;
- case 56: DoScriptText(WHISP21, m_creature, pPlayer);
+ case 0: DoScriptText(SAY1, me, pPlayer); break;
+ case 4: DoScriptText(WHISP1, me, pPlayer); break;
+ case 6: DoScriptText(WHISP2, me, pPlayer); break;
+ case 7: DoScriptText(WHISP3, me, pPlayer); break;
+ case 8: DoScriptText(WHISP4, me, pPlayer); break;
+ case 17: DoScriptText(WHISP5, me, pPlayer); break;
+ case 18: DoScriptText(WHISP6, me, pPlayer); break;
+ case 19: DoScriptText(WHISP7, me, pPlayer); break;
+ case 33: DoScriptText(WHISP8, me, pPlayer); break;
+ case 34: DoScriptText(WHISP9, me, pPlayer); break;
+ case 35: DoScriptText(WHISP10, me, pPlayer); break;
+ case 36: DoScriptText(WHISP11, me, pPlayer); break;
+ case 43: DoScriptText(WHISP12, me, pPlayer); break;
+ case 44: DoScriptText(WHISP13, me, pPlayer); break;
+ case 49: DoScriptText(WHISP14, me, pPlayer); break;
+ case 50: DoScriptText(WHISP15, me, pPlayer); break;
+ case 51: DoScriptText(WHISP16, me, pPlayer); break;
+ case 52: DoScriptText(WHISP17, me, pPlayer); break;
+ case 53: DoScriptText(WHISP18, me, pPlayer); break;
+ case 54: DoScriptText(WHISP19, me, pPlayer); break;
+ case 55: DoScriptText(WHISP20, me, pPlayer); break;
+ case 56: DoScriptText(WHISP21, me, pPlayer);
if (pPlayer)
- pPlayer->GroupEventHappens(10211,m_creature);
+ pPlayer->GroupEventHappens(10211,me);
break;
}
}
@@ -327,7 +327,7 @@ public:
if (CAST_PLR(pWho)->GetQuestStatus(10211) == QUEST_STATUS_INCOMPLETE)
{
float Radius = 10.0;
- if (m_creature->IsWithinDistInMap(pWho, Radius))
+ if (me->IsWithinDistInMap(pWho, Radius))
{
Start(false, false, pWho->GetGUID());
}
@@ -382,8 +382,8 @@ struct npc_dirty_larryAI : public ScriptedAI
SayTimer = 0;
Step = 0;
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->setFaction(1194);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->setFaction(1194);
Unit* Creepjack = me->FindNearestCreature(NPC_CREEPJACK, 20);
if (Creepjack)
{
@@ -406,19 +406,19 @@ struct npc_dirty_larryAI : public ScriptedAI
switch(Step)
{
- case 0:{ m_creature->SetInFront(pPlayer);
+ case 0:{ me->SetInFront(pPlayer);
Unit* Creepjack = me->FindNearestCreature(NPC_CREEPJACK, 20);
if (Creepjack)
Creepjack->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Unit* Malone = me->FindNearestCreature(NPC_MALONE, 20);
if (Malone)
Malone->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }return 2000;
- case 1: DoScriptText(SAY_1, m_creature, pPlayer); return 3000;
- case 2: DoScriptText(SAY_2, m_creature, pPlayer); return 5000;
- case 3: DoScriptText(SAY_3, m_creature, pPlayer); return 2000;
- case 4: DoScriptText(SAY_4, m_creature, pPlayer); return 2000;
- case 5: DoScriptText(SAY_5, m_creature, pPlayer); return 2000;
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }return 2000;
+ case 1: DoScriptText(SAY_1, me, pPlayer); return 3000;
+ case 2: DoScriptText(SAY_2, me, pPlayer); return 5000;
+ case 3: DoScriptText(SAY_3, me, pPlayer); return 2000;
+ case 4: DoScriptText(SAY_4, me, pPlayer); return 2000;
+ case 5: DoScriptText(SAY_5, me, pPlayer); return 2000;
case 6: Attack = true; return 2000;
default: return 0;
}
@@ -437,8 +437,8 @@ struct npc_dirty_larryAI : public ScriptedAI
if (Attack)
{
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
- m_creature->setFaction(14);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->setFaction(14);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (pPlayer)
{
Unit* Creepjack = me->FindNearestCreature(NPC_CREEPJACK, 20);
@@ -463,10 +463,10 @@ struct npc_dirty_larryAI : public ScriptedAI
Attack = false;
}
- if ((m_creature->GetHealth()*100)/m_creature->GetMaxHealth() < 5 && !Done)
+ if ((me->GetHealth()*100)/me->GetMaxHealth() < 5 && !Done)
{
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->RemoveAllAuras();
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveAllAuras();
Unit* Creepjack = me->FindNearestCreature(NPC_CREEPJACK, 20);
if (Creepjack)
@@ -484,15 +484,15 @@ struct npc_dirty_larryAI : public ScriptedAI
Malone->GetMotionMaster()->MoveTargetedHome();
Malone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
- m_creature->setFaction(1194);
+ me->setFaction(1194);
Done = true;
- DoScriptText(SAY_GIVEUP, m_creature, NULL);
- m_creature->DeleteThreatList();
- m_creature->CombatStop();
- m_creature->GetMotionMaster()->MoveTargetedHome();
+ DoScriptText(SAY_GIVEUP, me, NULL);
+ me->DeleteThreatList();
+ me->CombatStop();
+ me->GetMotionMaster()->MoveTargetedHome();
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
if (pPlayer)
- CAST_PLR(pPlayer)->GroupEventHappens(QUEST_WBI, m_creature);
+ CAST_PLR(pPlayer)->GroupEventHappens(QUEST_WBI, me);
}
DoMeleeAttackIfReady();
}
diff --git a/src/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/src/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp
index d089abcfe01..11f475b5b05 100644
--- a/src/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp
+++ b/src/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp
@@ -93,20 +93,20 @@ struct npc_millhouse_manastormAI : public ScriptedAI
if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == DONE)
{
- DoScriptText(SAY_COMPLETE, m_creature);
+ DoScriptText(SAY_COMPLETE, me);
}
}
}
void AttackStart(Unit* pWho)
{
- if (m_creature->Attack(pWho, true))
+ if (me->Attack(pWho, true))
{
- m_creature->AddThreat(pWho, 0.0f);
- m_creature->SetInCombatWith(pWho);
- pWho->SetInCombatWith(m_creature);
+ me->AddThreat(pWho, 0.0f);
+ me->SetInCombatWith(pWho);
+ pWho->SetInCombatWith(me);
- m_creature->GetMotionMaster()->MoveChase(pWho, 25.0f);
+ me->GetMotionMaster()->MoveChase(pWho, 25.0f);
}
}
@@ -116,12 +116,12 @@ struct npc_millhouse_manastormAI : public ScriptedAI
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), m_creature);
+ DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
/*for questId 10886 (heroic mode only)
if (pInstance && pInstance->GetData(TYPE_HARBINGERSKYRISS) != DONE)
@@ -139,30 +139,30 @@ struct npc_millhouse_manastormAI : public ScriptedAI
switch(Phase)
{
case 1:
- DoScriptText(SAY_INTRO_1, m_creature);
+ DoScriptText(SAY_INTRO_1, me);
EventProgress_Timer = 18000;
break;
case 2:
- DoScriptText(SAY_INTRO_2, m_creature);
+ DoScriptText(SAY_INTRO_2, me);
EventProgress_Timer = 18000;
break;
case 3:
- DoScriptText(SAY_WATER, m_creature);
- DoCast(m_creature, SPELL_CONJURE_WATER);
+ DoScriptText(SAY_WATER, me);
+ DoCast(me, SPELL_CONJURE_WATER);
EventProgress_Timer = 7000;
break;
case 4:
- DoScriptText(SAY_BUFFS, m_creature);
- DoCast(m_creature, SPELL_ICE_ARMOR);
+ DoScriptText(SAY_BUFFS, me);
+ DoCast(me, SPELL_ICE_ARMOR);
EventProgress_Timer = 7000;
break;
case 5:
- DoScriptText(SAY_DRINK, m_creature);
- DoCast(m_creature, SPELL_ARCANE_INTELLECT);
+ DoScriptText(SAY_DRINK, me);
+ DoCast(me, SPELL_ARCANE_INTELLECT);
EventProgress_Timer = 7000;
break;
case 6:
- DoScriptText(SAY_READY, m_creature);
+ DoScriptText(SAY_READY, me);
EventProgress_Timer = 6000;
break;
case 7:
@@ -179,26 +179,26 @@ struct npc_millhouse_manastormAI : public ScriptedAI
if (!UpdateVictim())
return;
- if (!LowHp && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20))
+ if (!LowHp && ((me->GetHealth()*100 / me->GetMaxHealth()) < 20))
{
- DoScriptText(SAY_LOWHP, m_creature);
+ DoScriptText(SAY_LOWHP, me);
LowHp = true;
}
if (Pyroblast_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
+ if (me->IsNonMeleeSpellCasted(false))
return;
- DoScriptText(SAY_PYRO, m_creature);
+ DoScriptText(SAY_PYRO, me);
- DoCast(m_creature->getVictim(), SPELL_PYROBLAST);
+ DoCast(me->getVictim(), SPELL_PYROBLAST);
Pyroblast_Timer = 40000;
} else Pyroblast_Timer -=diff;
if (Fireball_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_FIREBALL);
+ DoCast(me->getVictim(), SPELL_FIREBALL);
Fireball_Timer = 4000;
} else Fireball_Timer -=diff;
@@ -269,8 +269,8 @@ struct npc_warden_mellicharAI : public ScriptedAI
EventProgress_Timer = 22000;
Phase = 1;
- m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
- DoCast(m_creature, SPELL_TARGET_OMEGA);
+ me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
+ DoCast(me, SPELL_TARGET_OMEGA);
if (pInstance)
pInstance->SetData(TYPE_HARBINGERSKYRISS,NOT_STARTED);
@@ -283,23 +283,23 @@ struct npc_warden_mellicharAI : public ScriptedAI
if (IsRunning)
return;
- if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessiblePlaceFor(m_creature))
+ if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
{
- if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
+ if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
return;
if (who->GetTypeId() != TYPEID_PLAYER)
return;
- float attackRadius = m_creature->GetAttackDistance(who)/10;
- if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
+ float attackRadius = me->GetAttackDistance(who)/10;
+ if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
EnterCombat(who);
}
}
void EnterCombat(Unit *who)
{
- DoScriptText(YELL_INTRO1, m_creature);
- DoCast(m_creature, SPELL_BUBBLE_VISUAL);
+ DoScriptText(YELL_INTRO1, me);
+ DoCast(me, SPELL_BUBBLE_VISUAL);
if (pInstance)
{
@@ -336,26 +336,26 @@ struct npc_warden_mellicharAI : public ScriptedAI
{
if (pInstance)
{
- m_creature->InterruptNonMeleeSpells(true);
- m_creature->RemoveAurasByType(SPELL_AURA_DUMMY);
+ me->InterruptNonMeleeSpells(true);
+ me->RemoveAurasByType(SPELL_AURA_DUMMY);
switch(Phase)
{
case 2:
- DoCast(m_creature, SPELL_TARGET_ALPHA);
+ DoCast(me, SPELL_TARGET_ALPHA);
pInstance->SetData(TYPE_WARDEN_1,IN_PROGRESS);
pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), false);
break;
case 3:
- DoCast(m_creature, SPELL_TARGET_BETA);
+ DoCast(me, SPELL_TARGET_BETA);
pInstance->SetData(TYPE_WARDEN_2,IN_PROGRESS);
break;
case 5:
- DoCast(m_creature, SPELL_TARGET_DELTA);
+ DoCast(me, SPELL_TARGET_DELTA);
pInstance->SetData(TYPE_WARDEN_3,IN_PROGRESS);
break;
case 6:
- DoCast(m_creature, SPELL_TARGET_GAMMA);
+ DoCast(me, SPELL_TARGET_GAMMA);
pInstance->SetData(TYPE_WARDEN_4,IN_PROGRESS);
break;
case 7:
@@ -386,40 +386,40 @@ struct npc_warden_mellicharAI : public ScriptedAI
{
//continue beam omega pod, unless we are about to summon skyriss
if (Phase != 7)
- DoCast(m_creature, SPELL_TARGET_OMEGA);
+ DoCast(me, SPELL_TARGET_OMEGA);
switch(Phase)
{
case 2:
switch (urand(0,1))
{
- case 0: m_creature->SummonCreature(ENTRY_TRICKSTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
- case 1: m_creature->SummonCreature(ENTRY_PH_HUNTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
+ case 0: me->SummonCreature(ENTRY_TRICKSTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
+ case 1: me->SummonCreature(ENTRY_PH_HUNTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
}
break;
case 3:
- m_creature->SummonCreature(ENTRY_MILLHOUSE,413.292,-148.378,42.56,6.27,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
+ me->SummonCreature(ENTRY_MILLHOUSE,413.292,-148.378,42.56,6.27,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
break;
case 4:
- DoScriptText(YELL_RELEASE2B, m_creature);
+ DoScriptText(YELL_RELEASE2B, me);
break;
case 5:
switch (urand(0,1))
{
- case 0: m_creature->SummonCreature(ENTRY_AKKIRIS,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
- case 1: m_creature->SummonCreature(ENTRY_SULFURON,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
+ case 0: me->SummonCreature(ENTRY_AKKIRIS,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
+ case 1: me->SummonCreature(ENTRY_SULFURON,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
}
break;
case 6:
switch (urand(0,1))
{
- case 0: m_creature->SummonCreature(ENTRY_TW_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
- case 1: m_creature->SummonCreature(ENTRY_BL_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
+ case 0: me->SummonCreature(ENTRY_TW_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
+ case 1: me->SummonCreature(ENTRY_BL_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
}
break;
case 7:
- m_creature->SummonCreature(ENTRY_SKYRISS,445.763,-191.639,44.64,1.60,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
- DoScriptText(YELL_WELCOME, m_creature);
+ me->SummonCreature(ENTRY_SKYRISS,445.763,-191.639,44.64,1.60,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
+ DoScriptText(YELL_WELCOME, me);
break;
}
CanSpawn = false;
@@ -430,17 +430,17 @@ struct npc_warden_mellicharAI : public ScriptedAI
switch(Phase)
{
case 1:
- DoScriptText(YELL_INTRO2, m_creature);
+ DoScriptText(YELL_INTRO2, me);
EventProgress_Timer = 10000;
++Phase;
break;
case 2:
- DoScriptText(YELL_RELEASE1, m_creature);
+ DoScriptText(YELL_RELEASE1, me);
DoPrepareForPhase();
EventProgress_Timer = 7000;
break;
case 3:
- DoScriptText(YELL_RELEASE2A, m_creature);
+ DoScriptText(YELL_RELEASE2A, me);
DoPrepareForPhase();
EventProgress_Timer = 10000;
break;
@@ -449,12 +449,12 @@ struct npc_warden_mellicharAI : public ScriptedAI
EventProgress_Timer = 15000;
break;
case 5:
- DoScriptText(YELL_RELEASE3, m_creature);
+ DoScriptText(YELL_RELEASE3, me);
DoPrepareForPhase();
EventProgress_Timer = 15000;
break;
case 6:
- DoScriptText(YELL_RELEASE4, m_creature);
+ DoScriptText(YELL_RELEASE4, me);
DoPrepareForPhase();
EventProgress_Timer = 15000;
break;
@@ -484,11 +484,11 @@ struct mob_zerekethvoidzoneAI : public ScriptedAI
void Reset()
{
- m_creature->SetUInt32Value(UNIT_NPC_FLAGS,0);
- m_creature->setFaction(16);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetUInt32Value(UNIT_NPC_FLAGS,0);
+ me->setFaction(16);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- DoCast(m_creature, SPELL_VOID_ZONE_DAMAGE);
+ DoCast(me, SPELL_VOID_ZONE_DAMAGE);
}
void EnterCombat(Unit* who) {}
diff --git a/src/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/src/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
index 4e828c67749..bd90f525bc0 100644
--- a/src/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
@@ -77,7 +77,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
void Reset()
{
if (!Intro)
- m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
IsImage33 = false;
IsImage66 = false;
@@ -103,7 +103,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(TYPE_HARBINGERSKYRISS,DONE);
}
@@ -116,7 +116,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
summon->SetHealth((summon->GetMaxHealth()*33)/100);
else
summon->SetHealth((summon->GetMaxHealth()*66)/100);
- if (m_creature->getVictim())
+ if (me->getVictim())
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
summon->AI()->AttackStart(pTarget);
}
@@ -127,20 +127,20 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
if (victim->GetEntry() == 21436)
return;
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), m_creature);
+ DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
}
void DoSplit(uint32 val)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(false);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(false);
- DoScriptText(SAY_IMAGE, m_creature);
+ DoScriptText(SAY_IMAGE, me);
if (val == 66)
- DoCast(m_creature, SPELL_66_ILLUSION);
+ DoCast(me, SPELL_66_ILLUSION);
else
- DoCast(m_creature, SPELL_33_ILLUSION);
+ DoCast(me, SPELL_33_ILLUSION);
}
void UpdateAI(const uint32 diff)
@@ -155,14 +155,14 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
switch(Intro_Phase)
{
case 1:
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), true);
++Intro_Phase;
Intro_Timer = 25000;
break;
case 2:
- DoScriptText(SAY_AGGRO, m_creature);
- if (Unit *mellic = Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_MELLICHAR)))
+ DoScriptText(SAY_AGGRO, me);
+ if (Unit *mellic = Unit::GetUnit(*me,pInstance->GetData64(DATA_MELLICHAR)))
{
//should have a better way to do this. possibly spell exist.
mellic->setDeathState(JUST_DIED);
@@ -173,7 +173,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
Intro_Timer = 3000;
break;
case 3:
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
Intro = true;
break;
}
@@ -183,12 +183,12 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
if (!UpdateVictim())
return;
- if (!IsImage66 && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 66))
+ if (!IsImage66 && ((me->GetHealth()*100) / me->GetMaxHealth() <= 66))
{
DoSplit(66);
IsImage66 = true;
}
- if (!IsImage33 && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 33))
+ if (!IsImage33 && ((me->GetHealth()*100) / me->GetMaxHealth() <= 33))
{
DoSplit(33);
IsImage33 = true;
@@ -199,37 +199,37 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_MIND_REND);
else
- DoCast(m_creature->getVictim(), SPELL_MIND_REND);
+ DoCast(me->getVictim(), SPELL_MIND_REND);
MindRend_Timer = 8000;
} else MindRend_Timer -=diff;
if (Fear_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
+ if (me->IsNonMeleeSpellCasted(false))
return;
- DoScriptText(RAND(SAY_FEAR_1,SAY_FEAR_2), m_creature);
+ DoScriptText(RAND(SAY_FEAR_1,SAY_FEAR_2), me);
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_FEAR);
else
- DoCast(m_creature->getVictim(), SPELL_FEAR);
+ DoCast(me->getVictim(), SPELL_FEAR);
Fear_Timer = 25000;
} else Fear_Timer -=diff;
if (Domination_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
+ if (me->IsNonMeleeSpellCasted(false))
return;
- DoScriptText(RAND(SAY_MIND_1,SAY_MIND_2), m_creature);
+ DoScriptText(RAND(SAY_MIND_1,SAY_MIND_2), me);
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_DOMINATION);
else
- DoCast(m_creature->getVictim(), SPELL_DOMINATION);
+ DoCast(me->getVictim(), SPELL_DOMINATION);
Domination_Timer = 16000+rand()%16000;
} else Domination_Timer -=diff;
@@ -238,7 +238,7 @@ struct boss_harbinger_skyrissAI : public ScriptedAI
{
if (ManaBurn_Timer <= diff)
{
- if (m_creature->IsNonMeleeSpellCasted(false))
+ if (me->IsNonMeleeSpellCasted(false))
return;
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
diff --git a/src/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/src/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
index 67b80e0f5d4..96808a2e5cf 100644
--- a/src/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
+++ b/src/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
@@ -66,7 +66,7 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
}
void JustSummoned(Creature *summoned)
@@ -79,21 +79,21 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI
{
switch(rand()%4)
{
- case 0: DoCast(m_creature, SPELL_PLANT_WHITE); break;
- case 1: DoCast(m_creature, SPELL_PLANT_GREEN); break;
- case 2: DoCast(m_creature, SPELL_PLANT_BLUE); break;
- case 3: DoCast(m_creature, SPELL_PLANT_RED); break;
+ case 0: DoCast(me, SPELL_PLANT_WHITE); break;
+ case 1: DoCast(me, SPELL_PLANT_GREEN); break;
+ case 2: DoCast(me, SPELL_PLANT_BLUE); break;
+ case 3: DoCast(me, SPELL_PLANT_RED); break;
}
}
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), m_creature);
+ DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void UpdateAI(const uint32 diff)
@@ -103,18 +103,18 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI
if (TreeForm_Timer <= diff)
{
- DoScriptText(RAND(SAY_TREE_1,SAY_TREE_2), m_creature);
+ DoScriptText(RAND(SAY_TREE_1,SAY_TREE_2), me);
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(true);
+ if (me->IsNonMeleeSpellCasted(false))
+ me->InterruptNonMeleeSpells(true);
- m_creature->RemoveAllAuras();
+ me->RemoveAllAuras();
- DoCast(m_creature, SPELL_SUMMON_FRAYER, true);
- DoCast(m_creature, SPELL_TRANQUILITY, true);
- DoCast(m_creature, SPELL_TREE_FORM, true);
+ DoCast(me, SPELL_SUMMON_FRAYER, true);
+ DoCast(me, SPELL_TRANQUILITY, true);
+ DoCast(me, SPELL_TREE_FORM, true);
- m_creature->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->MoveIdle();
MoveFree = false;
TreeForm_Timer = 75000;
@@ -128,7 +128,7 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI
{
for (std::list<uint64>::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr)
{
- if (Unit *temp = Unit::GetUnit(*m_creature,*itr))
+ if (Unit *temp = Unit::GetUnit(*me,*itr))
{
if (!temp->isAlive())
{
@@ -148,9 +148,9 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI
Adds_List.clear();
DeadAddsCount = 0;
- m_creature->InterruptNonMeleeSpells(true);
- m_creature->RemoveAllAuras();
- m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
+ me->InterruptNonMeleeSpells(true);
+ me->RemoveAllAuras();
+ me->GetMotionMaster()->MoveChase(me->getVictim());
MoveFree = true;
}
MoveCheck_Timer = 500;
@@ -160,7 +160,7 @@ struct boss_high_botanist_freywinnAI : public ScriptedAI
return;
}
- /*if (m_creature->HasAura(SPELL_TREE_FORM,0) || m_creature->HasAura(SPELL_TRANQUILITY,0))
+ /*if (me->HasAura(SPELL_TREE_FORM,0) || me->HasAura(SPELL_TRANQUILITY,0))
return;*/
//one random seedling every 5 secs, but not in tree form
diff --git a/src/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/src/scripts/outland/tempest_keep/botanica/boss_laj.cpp
index a3f86d77c23..fa1cc2fe602 100644
--- a/src/scripts/outland/tempest_keep/botanica/boss_laj.cpp
+++ b/src/scripts/outland/tempest_keep/botanica/boss_laj.cpp
@@ -55,12 +55,12 @@ struct boss_lajAI : public ScriptedAI
void Reset()
{
- m_creature->SetDisplayId(MODEL_DEFAULT);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
+ me->SetDisplayId(MODEL_DEFAULT);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
CanSummon = false;
Teleport_Timer = 20000;
@@ -74,44 +74,44 @@ struct boss_lajAI : public ScriptedAI
switch(rand()%5)
{
case 0:
- m_creature->SetDisplayId(MODEL_DEFAULT);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
+ me->SetDisplayId(MODEL_DEFAULT);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
break;
case 1:
- m_creature->SetDisplayId(MODEL_ARCANE);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
+ me->SetDisplayId(MODEL_ARCANE);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
break;
case 2:
- m_creature->SetDisplayId(MODEL_FIRE);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
+ me->SetDisplayId(MODEL_FIRE);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
break;
case 3:
- m_creature->SetDisplayId(MODEL_FROST);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
+ me->SetDisplayId(MODEL_FROST);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
break;
case 4:
- m_creature->SetDisplayId(MODEL_NATURE);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
+ me->SetDisplayId(MODEL_NATURE);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
break;
}
}
@@ -121,20 +121,20 @@ struct boss_lajAI : public ScriptedAI
switch(rand()%4)
{
case 0:
- DoCast(m_creature, SPELL_SUMMON_LASHER_1, true);
- DoCast(m_creature, SPELL_SUMMON_FLAYER_1, true);
+ DoCast(me, SPELL_SUMMON_LASHER_1, true);
+ DoCast(me, SPELL_SUMMON_FLAYER_1, true);
break;
case 1:
- DoCast(m_creature, SPELL_SUMMON_LASHER_2, true);
- DoCast(m_creature, SPELL_SUMMON_FLAYER_2, true);
+ DoCast(me, SPELL_SUMMON_LASHER_2, true);
+ DoCast(me, SPELL_SUMMON_FLAYER_2, true);
break;
case 2:
- DoCast(m_creature, SPELL_SUMMON_LASHER_3, true);
- DoCast(m_creature, SPELL_SUMMON_FLAYER_3, true);
+ DoCast(me, SPELL_SUMMON_LASHER_3, true);
+ DoCast(me, SPELL_SUMMON_FLAYER_3, true);
break;
case 3:
- DoCast(m_creature, SPELL_SUMMON_LASHER_4, true);
- DoCast(m_creature, SPELL_SUMMON_FLAYER_4, true);
+ DoCast(me, SPELL_SUMMON_LASHER_4, true);
+ DoCast(me, SPELL_SUMMON_FLAYER_4, true);
break;
}
CanSummon = false;
@@ -146,7 +146,7 @@ struct boss_lajAI : public ScriptedAI
void JustSummoned(Creature *summon)
{
- if (summon && m_creature->getVictim())
+ if (summon && me->getVictim())
summon->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
}
@@ -159,7 +159,7 @@ struct boss_lajAI : public ScriptedAI
{
if (Summon_Timer <= diff)
{
- DoScriptText(EMOTE_SUMMON, m_creature);
+ DoScriptText(EMOTE_SUMMON, me);
DoSummons();
Summon_Timer = 2500;
} else Summon_Timer -= diff;
@@ -167,13 +167,13 @@ struct boss_lajAI : public ScriptedAI
if (Allergic_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ALLERGIC_REACTION);
+ DoCast(me->getVictim(), SPELL_ALLERGIC_REACTION);
Allergic_Timer = 25000+rand()%15000;
} else Allergic_Timer -= diff;
if (Teleport_Timer <= diff)
{
- DoCast(m_creature, SPELL_TELEPORT_SELF);
+ DoCast(me, SPELL_TELEPORT_SELF);
Teleport_Timer = 30000+rand()%10000;
CanSummon = true;
} else Teleport_Timer -= diff;
diff --git a/src/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/src/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp
index 8bc0408b046..573fc466300 100644
--- a/src/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp
+++ b/src/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp
@@ -54,23 +54,23 @@ struct mob_treantAI : public ScriptedAI
{
if (WarpGuid && check_Timer <= diff)
{
- if (Unit *Warp = Unit::GetUnit(*m_creature, WarpGuid))
+ if (Unit *Warp = Unit::GetUnit(*me, WarpGuid))
{
- if (m_creature->IsWithinMeleeRange(Warp,2.5f))
+ if (me->IsWithinMeleeRange(Warp,2.5f))
{
- int32 CurrentHP_Treant = (int32)m_creature->GetHealth();
- Warp->CastCustomSpell(Warp,SPELL_HEAL_FATHER,&CurrentHP_Treant, 0, 0, true,0 ,0, m_creature->GetGUID());
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ int32 CurrentHP_Treant = (int32)me->GetHealth();
+ Warp->CastCustomSpell(Warp,SPELL_HEAL_FATHER,&CurrentHP_Treant, 0, 0, true,0 ,0, me->GetGUID());
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
return;
}
- m_creature->GetMotionMaster()->MoveFollow(Warp,0,0);
+ me->GetMotionMaster()->MoveFollow(Warp,0,0);
}
check_Timer = 1000;
} else check_Timer -= diff;
return;
}
- if (m_creature->getVictim()->GetGUID() != WarpGuid)
+ if (me->getVictim()->GetGUID() != WarpGuid)
DoMeleeAttackIfReady();
}
};
@@ -125,22 +125,22 @@ struct boss_warp_splinterAI : public ScriptedAI
Summon_Treants_Timer = 45000;
Arcane_Volley_Timer = 8000 + rand()%12000;
- m_creature->SetSpeed(MOVE_RUN, 0.7f, true);
+ me->SetSpeed(MOVE_RUN, 0.7f, true);
}
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
}
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
}
void SummonTreants()
@@ -151,12 +151,12 @@ struct boss_warp_splinterAI : public ScriptedAI
float X = Treant_Spawn_Pos_X + TREANT_SPAWN_DIST * cos(angle);
float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * sin(angle);
- float O = - m_creature->GetAngle(X,Y);
+ float O = - me->GetAngle(X,Y);
- if (Creature *pTreant = m_creature->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,25000))
- CAST_AI(mob_treantAI, pTreant->AI())->WarpGuid = m_creature->GetGUID();
+ if (Creature *pTreant = me->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,25000))
+ CAST_AI(mob_treantAI, pTreant->AI())->WarpGuid = me->GetGUID();
}
- DoScriptText(RAND(SAY_SUMMON_1,SAY_SUMMON_2), m_creature);
+ DoScriptText(RAND(SAY_SUMMON_1,SAY_SUMMON_2), me);
}
void UpdateAI(const uint32 diff)
@@ -167,14 +167,14 @@ struct boss_warp_splinterAI : public ScriptedAI
//Check for War Stomp
if (War_Stomp_Timer <= diff)
{
- DoCast(m_creature->getVictim(), WAR_STOMP);
+ DoCast(me->getVictim(), WAR_STOMP);
War_Stomp_Timer = 25000 + rand()%15000;
} else War_Stomp_Timer -= diff;
//Check for Arcane Volley
if (Arcane_Volley_Timer <= diff)
{
- DoCast(m_creature->getVictim(), ARCANE_VOLLEY);
+ DoCast(me->getVictim(), ARCANE_VOLLEY);
Arcane_Volley_Timer = 20000 + rand()%15000;
} else Arcane_Volley_Timer -= diff;
diff --git a/src/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/src/scripts/outland/tempest_keep/the_eye/boss_alar.cpp
index a9c579eadf0..cf920ca762f 100644
--- a/src/scripts/outland/tempest_keep/the_eye/boss_alar.cpp
+++ b/src/scripts/outland/tempest_keep/the_eye/boss_alar.cpp
@@ -112,14 +112,14 @@ struct boss_alarAI : public ScriptedAI
cur_wp = 4;
- m_creature->SetDisplayId(m_creature->GetNativeDisplayId());
- m_creature->SetSpeed(MOVE_RUN, DefaultMoveSpeedRate);
- //m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
- //m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
- m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->setActive(false);
+ me->SetDisplayId(me->GetNativeDisplayId());
+ me->SetSpeed(MOVE_RUN, DefaultMoveSpeedRate);
+ //me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
+ //me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
+ me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->setActive(false);
}
void EnterCombat(Unit *who)
@@ -127,9 +127,9 @@ struct boss_alarAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_ALAREVENT, IN_PROGRESS);
- m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); // after enterevademode will be set walk movement
+ me->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); // after enterevademode will be set walk movement
DoZoneInCombat();
- m_creature->setActive(true);
+ me->setActive(true);
}
void JustDied(Unit *victim)
@@ -157,22 +157,22 @@ struct boss_alarAI : public ScriptedAI
void DamageTaken(Unit* pKiller, uint32 &damage)
{
- if (damage >= m_creature->GetHealth() && Phase1)
+ if (damage >= me->GetHealth() && Phase1)
{
damage = 0;
if (!WaitEvent)
{
WaitEvent = WE_DIE;
WaitTimer = 0;
- m_creature->SetHealth(0);
- m_creature->InterruptNonMeleeSpells(true);
- m_creature->RemoveAllAuras();
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->AttackStop();
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0);
- m_creature->SetSpeed(MOVE_RUN, 5.0f);
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MovePoint(0, waypoint[5][0], waypoint[5][1], waypoint[5][2]);
+ me->SetHealth(0);
+ me->InterruptNonMeleeSpells(true);
+ me->RemoveAllAuras();
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->AttackStop();
+ me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
+ me->SetSpeed(MOVE_RUN, 5.0f);
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MovePoint(0, waypoint[5][0], waypoint[5][1], waypoint[5][2]);
}
}
}
@@ -181,9 +181,9 @@ struct boss_alarAI : public ScriptedAI
{
if (spell->Id == SPELL_DIVE_BOMB_VISUAL)
{
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
- m_creature->SetDisplayId(11686);
- //m_creature->SendUpdateObjectToAllExcept(NULL);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
+ me->SetDisplayId(11686);
+ //me->SendUpdateObjectToAllExcept(NULL);
}
}
@@ -199,12 +199,12 @@ struct boss_alarAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if (!m_creature->isInCombat()) // sometimes isincombat but !incombat, faction bug?
+ if (!me->isInCombat()) // sometimes isincombat but !incombat, faction bug?
return;
if (Berserk_Timer <= diff)
{
- DoCast(m_creature, SPELL_BERSERK, true);
+ DoCast(me, SPELL_BERSERK, true);
Berserk_Timer = 60000;
} else Berserk_Timer -= diff;
@@ -212,7 +212,7 @@ struct boss_alarAI : public ScriptedAI
{
if (ForceTimer <= diff)
{
- m_creature->GetMotionMaster()->MovePoint(0, waypoint[cur_wp][0], waypoint[cur_wp][1], waypoint[cur_wp][2]);
+ me->GetMotionMaster()->MovePoint(0, waypoint[cur_wp][0], waypoint[cur_wp][1], waypoint[cur_wp][2]);
ForceTimer = 5000;
} else ForceTimer -= diff;
@@ -225,7 +225,7 @@ struct boss_alarAI : public ScriptedAI
{
if (AfterMoving)
{
- m_creature->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->MoveIdle();
AfterMoving = false;
}
@@ -235,24 +235,24 @@ struct boss_alarAI : public ScriptedAI
Platforms_Move_Timer = 30000+rand()%5000;
break;
case WE_QUILL:
- DoCast(m_creature, SPELL_FLAME_QUILLS, true);
+ DoCast(me, SPELL_FLAME_QUILLS, true);
Platforms_Move_Timer = 1;
WaitTimer = 10000;
WaitEvent = WE_DUMMY;
return;
case WE_DIE:
ForceMove = false;
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
+ me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
WaitTimer = 5000;
WaitEvent = WE_REVIVE;
return;
case WE_REVIVE:
- m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
- m_creature->SetHealth(m_creature->GetMaxHealth());
- m_creature->SetSpeed(MOVE_RUN, DefaultMoveSpeedRate);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
+ me->SetHealth(me->GetMaxHealth());
+ me->SetSpeed(MOVE_RUN, DefaultMoveSpeedRate);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
DoZoneInCombat();
- DoCast(m_creature, SPELL_REBIRTH, true);
+ DoCast(me, SPELL_REBIRTH, true);
MeltArmor_Timer = 60000;
Charge_Timer = 7000;
DiveBomb_Timer = 40000+rand()%5000;
@@ -260,22 +260,22 @@ struct boss_alarAI : public ScriptedAI
Phase1 = false;
break;
case WE_METEOR:
- m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
- DoCast(m_creature, SPELL_DIVE_BOMB_VISUAL, false);
+ me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false);
+ DoCast(me, SPELL_DIVE_BOMB_VISUAL, false);
WaitEvent = WE_DIVE;
WaitTimer = 4000;
return;
case WE_DIVE:
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
- m_creature->RemoveAurasDueToSpell(SPELL_DIVE_BOMB_VISUAL);
+ me->RemoveAurasDueToSpell(SPELL_DIVE_BOMB_VISUAL);
DoCast(pTarget, SPELL_DIVE_BOMB, true);
float dist = 3.0f;
- if (m_creature->IsWithinDist3d(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 5.0f))
+ if (me->IsWithinDist3d(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 5.0f))
dist = 5.0f;
WaitTimer = 1000 + floor(dist / 80 * 1000.0f);
- m_creature->GetMap()->CreatureRelocation(m_creature, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0.0f);
- m_creature->StopMoving();
+ me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0.0f);
+ me->StopMoving();
WaitEvent = WE_LAND;
}
else
@@ -290,10 +290,10 @@ struct boss_alarAI : public ScriptedAI
case WE_SUMMON:
for (uint8 i = 0; i < 2; ++i)
DoSpawnCreature(CREATURE_EMBER_OF_ALAR, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
- m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetDisplayId(m_creature->GetNativeDisplayId());
- DoCast(m_creature, SPELL_REBIRTH_2, true);
+ me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetDisplayId(me->GetNativeDisplayId());
+ DoCast(me, SPELL_REBIRTH_2, true);
break;
case WE_DUMMY:
default:
@@ -309,7 +309,7 @@ struct boss_alarAI : public ScriptedAI
if (Phase1)
{
- if (m_creature->getThreatManager().getThreatList().empty())
+ if (me->getThreatManager().getThreatList().empty())
{
EnterEvadeMode();
return;
@@ -341,7 +341,7 @@ struct boss_alarAI : public ScriptedAI
}
ForceMove = true;
ForceTimer = 5000;
- m_creature->GetMotionMaster()->MovePoint(0, waypoint[cur_wp][0], waypoint[cur_wp][1], waypoint[cur_wp][2]);
+ me->GetMotionMaster()->MovePoint(0, waypoint[cur_wp][0], waypoint[cur_wp][1], waypoint[cur_wp][2]);
WaitTimer = 0;
return;
} else Platforms_Move_Timer -= diff;
@@ -358,16 +358,16 @@ struct boss_alarAI : public ScriptedAI
if (MeltArmor_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_MELT_ARMOR);
+ DoCast(me->getVictim(), SPELL_MELT_ARMOR);
MeltArmor_Timer = 60000;
} else MeltArmor_Timer -= diff;
if (DiveBomb_Timer <= diff)
{
- m_creature->AttackStop();
- m_creature->GetMotionMaster()->MovePoint(6, waypoint[4][0], waypoint[4][1], waypoint[4][2]);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 50);
+ me->AttackStop();
+ me->GetMotionMaster()->MovePoint(6, waypoint[4][0], waypoint[4][1], waypoint[4][2]);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 50);
WaitEvent = WE_METEOR;
WaitTimer = 0;
DiveBomb_Timer = 40000+rand()%5000;
@@ -378,14 +378,14 @@ struct boss_alarAI : public ScriptedAI
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
- Creature* Summoned = m_creature->SummonCreature(CREATURE_FLAME_PATCH_ALAR, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 120000);
+ Creature* Summoned = me->SummonCreature(CREATURE_FLAME_PATCH_ALAR, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 120000);
if (Summoned)
{
Summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Summoned->SetFloatValue(OBJECT_FIELD_SCALE_X, Summoned->GetFloatValue(OBJECT_FIELD_SCALE_X)*2.5f);
Summoned->SetDisplayId(11686);
- Summoned->setFaction(m_creature->getFaction());
- Summoned->SetLevel(m_creature->getLevel());
+ Summoned->setFaction(me->getFaction());
+ Summoned->SetLevel(me->getLevel());
Summoned->CastSpell(Summoned, SPELL_FLAME_PATCH, false);
}
}
@@ -398,23 +398,23 @@ struct boss_alarAI : public ScriptedAI
void DoMeleeAttackIfReady()
{
- if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false))
+ if (me->isAttackReady() && !me->IsNonMeleeSpellCasted(false))
{
- if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
+ if (me->IsWithinMeleeRange(me->getVictim()))
{
- m_creature->AttackerStateUpdate(m_creature->getVictim());
- m_creature->resetAttackTimer();
+ me->AttackerStateUpdate(me->getVictim());
+ me->resetAttackTimer();
}
else
{
Unit *pTarget = NULL;
- pTarget = m_creature->SelectNearestTarget(5);
+ pTarget = me->SelectNearestTarget(5);
if (pTarget)
- m_creature->AI()->AttackStart(pTarget);
+ me->AI()->AttackStart(pTarget);
else
{
- DoCast(m_creature, SPELL_FLAME_BUFFET, true);
- m_creature->setAttackTimer(BASE_ATTACK, 1500);
+ DoCast(me, SPELL_FLAME_BUFFET, true);
+ me->setAttackTimer(BASE_ATTACK, 1500);
}
}
}
@@ -440,19 +440,19 @@ struct mob_ember_of_alarAI : public ScriptedAI
void Reset() {toDie = false;}
void EnterCombat(Unit *who) {DoZoneInCombat();}
- void EnterEvadeMode() {m_creature->setDeathState(JUST_DIED);}
+ void EnterEvadeMode() {me->setDeathState(JUST_DIED);}
void DamageTaken(Unit* pKiller, uint32 &damage)
{
- if (damage >= m_creature->GetHealth() && pKiller != m_creature && !toDie)
+ if (damage >= me->GetHealth() && pKiller != me && !toDie)
{
damage = 0;
- DoCast(m_creature, SPELL_EMBER_BLAST, true);
- m_creature->SetDisplayId(11686);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ DoCast(me, SPELL_EMBER_BLAST, true);
+ me->SetDisplayId(11686);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
if (pInstance && pInstance->GetData(DATA_ALAREVENT) == 2)
{
- if (Unit* Alar = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ALAR)))
+ if (Unit* Alar = Unit::GetUnit((*me), pInstance->GetData64(DATA_ALAR)))
{
int AlarHealth = Alar->GetHealth() - Alar->GetMaxHealth()*0.03;
if (AlarHealth > 0)
@@ -472,8 +472,8 @@ struct mob_ember_of_alarAI : public ScriptedAI
if (toDie)
{
- m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- //m_creature->SetVisibility(VISIBILITY_OFF);
+ me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ //me->SetVisibility(VISIBILITY_OFF);
}
DoMeleeAttackIfReady();
diff --git a/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp
index 0bc2226df19..d29d58e606f 100644
--- a/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp
+++ b/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp
@@ -71,7 +71,7 @@ static float SolarianPos[4] = {432.909, -373.424, 17.9608, 1.06421};
struct boss_high_astromancer_solarianAI : public ScriptedAI
{
- boss_high_astromancer_solarianAI(Creature *c) : ScriptedAI(c), Summons(m_creature)
+ boss_high_astromancer_solarianAI(Creature *c) : ScriptedAI(c), Summons(me)
{
pInstance = c->GetInstanceData();
@@ -122,25 +122,25 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, NOT_STARTED);
- m_creature->SetArmor(defaultarmor);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetVisibility(VISIBILITY_ON);
- m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
- m_creature->SetDisplayId(MODEL_HUMAN);
+ me->SetArmor(defaultarmor);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetVisibility(VISIBILITY_ON);
+ me->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
+ me->SetDisplayId(MODEL_HUMAN);
Summons.DespawnAll();
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_KILL1,SAY_KILL2,SAY_KILL3), m_creature);
+ DoScriptText(RAND(SAY_KILL1,SAY_KILL2,SAY_KILL3), me);
}
void JustDied(Unit *victim)
{
- m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
- m_creature->SetDisplayId(MODEL_HUMAN);
- DoScriptText(SAY_DEATH, m_creature);
+ me->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
+ me->SetDisplayId(MODEL_HUMAN);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, DONE);
@@ -148,7 +148,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
DoZoneInCombat();
if (pInstance)
@@ -157,7 +157,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
void SummonMinion(uint32 entry, float x, float y, float z)
{
- Creature* Summoned = m_creature->SummonCreature(entry, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
+ Creature* Summoned = me->SummonCreature(entry, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
if (Summoned)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
@@ -189,15 +189,15 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
if (AppearDelay)
{
- m_creature->StopMoving();
- m_creature->AttackStop();
+ me->StopMoving();
+ me->AttackStop();
if (AppearDelay_Timer <= diff)
{
AppearDelay = false;
if (Phase == 2)
{
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetVisibility(VISIBILITY_OFF);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetVisibility(VISIBILITY_OFF);
}
AppearDelay_Timer = 2000;
} else AppearDelay_Timer -= diff;
@@ -213,7 +213,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
if (Wrath_Timer <= diff)
{
- m_creature->InterruptNonMeleeSpells(false);
+ me->InterruptNonMeleeSpells(false);
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
DoCast(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER, true);
Wrath_Timer = 20000+rand()%5000;
@@ -223,13 +223,13 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
{
if (BlindingLight)
{
- DoCast(m_creature->getVictim(), SPELL_BLINDING_LIGHT);
+ DoCast(me->getVictim(), SPELL_BLINDING_LIGHT);
BlindingLight = false;
}else{
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
- if (!m_creature->HasInArc(2.5f, pTarget))
- pTarget = m_creature->getVictim();
+ if (!me->HasInArc(2.5f, pTarget))
+ pTarget = me->getVictim();
if (pTarget)
DoCast(pTarget, SPELL_ARCANE_MISSILES);
@@ -239,7 +239,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
if (m_uiWrathOfTheAstromancer_Timer <= diff)
{
- m_creature->InterruptNonMeleeSpells(false);
+ me->InterruptNonMeleeSpells(false);
//Target the tank ?
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1))
@@ -258,8 +258,8 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
Phase = 2;
Phase1_Timer = 50000;
//After these 50 seconds she portals to the middle of the room and disappears, leaving 3 light portals behind.
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, CENTER_Z, CENTER_O);
+ me->GetMotionMaster()->Clear();
+ me->GetMap()->CreatureRelocation(me, CENTER_X, CENTER_Y, CENTER_Z, CENTER_O);
for (uint8 i=0; i <= 2; ++i)
{
if (!i)
@@ -285,7 +285,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
}
for (int i=0; i <= 2; ++i)
{
- if (Creature* Summoned = m_creature->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O, TEMPSUMMON_TIMED_DESPAWN, Phase2_Timer+Phase3_Timer+AppearDelay_Timer+1700))
+ if (Creature* Summoned = me->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O, TEMPSUMMON_TIMED_DESPAWN, Phase2_Timer+Phase3_Timer+AppearDelay_Timer+1700))
{
Summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Summoned->CastSpell(Summoned, SPELL_SPOTLIGHT, false);
@@ -297,8 +297,8 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
else if (Phase == 2)
{
//10 seconds after Solarian disappears, 12 mobs spawn out of the three portals.
- m_creature->AttackStop();
- m_creature->StopMoving();
+ me->AttackStop();
+ me->StopMoving();
if (Phase2_Timer <= diff)
{
Phase = 3;
@@ -306,14 +306,14 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
for (int j=1; j <= 4; j++)
SummonMinion(NPC_SOLARIUM_AGENT, Portals[i][0], Portals[i][1], Portals[i][2]);
- DoScriptText(SAY_SUMMON1, m_creature);
+ DoScriptText(SAY_SUMMON1, me);
Phase2_Timer = 10000;
} else Phase2_Timer -= diff;
}
else if (Phase == 3)
{
- m_creature->AttackStop();
- m_creature->StopMoving();
+ me->AttackStop();
+ me->StopMoving();
//Check Phase3_Timer
if (Phase3_Timer <= diff)
@@ -322,17 +322,17 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
//15 seconds later Solarian reappears out of one of the 3 portals. Simultaneously, 2 healers appear in the two other portals.
int i = rand()%3;
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMap()->CreatureRelocation(m_creature, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O);
+ me->GetMotionMaster()->Clear();
+ me->GetMap()->CreatureRelocation(me, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O);
for (int j=0; j <= 2; j++)
if (j != i)
SummonMinion(NPC_SOLARIUM_PRIEST, Portals[j][0], Portals[j][1], Portals[j][2]);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetVisibility(VISIBILITY_ON);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetVisibility(VISIBILITY_ON);
- DoScriptText(SAY_SUMMON2, m_creature);
+ DoScriptText(SAY_SUMMON2, me);
AppearDelay = true;
Phase3_Timer = 15000;
} else Phase3_Timer -= diff;
@@ -342,31 +342,31 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI
//Fear_Timer
if (Fear_Timer <= diff)
{
- DoCast(m_creature, SPELL_FEAR);
+ DoCast(me, SPELL_FEAR);
Fear_Timer = 20000;
} else Fear_Timer -= diff;
//VoidBolt_Timer
if (VoidBolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_VOID_BOLT);
+ DoCast(me->getVictim(), SPELL_VOID_BOLT);
VoidBolt_Timer = 10000;
} else VoidBolt_Timer -= diff;
}
//When Solarian reaches 20% she will transform into a huge void walker.
- if (Phase != 4 && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth())<20))
+ if (Phase != 4 && ((me->GetHealth()*100 / me->GetMaxHealth())<20))
{
Phase = 4;
//To make sure she wont be invisible or not selecatble
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetVisibility(VISIBILITY_ON);
- DoScriptText(SAY_VOIDA, m_creature);
- DoScriptText(SAY_VOIDB, m_creature);
- m_creature->SetArmor(WV_ARMOR);
- m_creature->SetDisplayId(MODEL_VOIDWALKER);
- m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize*2.5f);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetVisibility(VISIBILITY_ON);
+ DoScriptText(SAY_VOIDA, me);
+ DoScriptText(SAY_VOIDB, me);
+ me->SetArmor(WV_ARMOR);
+ me->SetDisplayId(MODEL_VOIDWALKER);
+ me->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize*2.5f);
}
DoMeleeAttackIfReady();
@@ -410,10 +410,10 @@ struct mob_solarium_priestAI : public ScriptedAI
{
case 0:
if (pInstance)
- pTarget = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ASTROMANCER));
+ pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_ASTROMANCER));
break;
case 1:
- pTarget = m_creature;
+ pTarget = me;
break;
}
@@ -426,13 +426,13 @@ struct mob_solarium_priestAI : public ScriptedAI
if (holysmiteTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SOLARIUM_HOLY_SMITE);
+ DoCast(me->getVictim(), SPELL_SOLARIUM_HOLY_SMITE);
holysmiteTimer = 4000;
} else holysmiteTimer -= diff;
if (aoesilenceTimer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SOLARIUM_ARCANE_TORRENT);
+ DoCast(me->getVictim(), SPELL_SOLARIUM_ARCANE_TORRENT);
aoesilenceTimer = 13000;
} else aoesilenceTimer -= diff;
diff --git a/src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp
index 26a744e6ff4..53ddbddc841 100644
--- a/src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp
+++ b/src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp
@@ -159,7 +159,7 @@ struct advisorbase_ai : public ScriptedAI
{
if (m_bDoubled_Health)
{
- m_creature->SetMaxHealth(m_creature->GetMaxHealth() / 2);
+ me->SetMaxHealth(me->GetMaxHealth() / 2);
m_bDoubled_Health = false;
}
@@ -167,19 +167,19 @@ struct advisorbase_ai : public ScriptedAI
DelayRes_Timer = 0;
DelayRes_Target = 0;
- m_creature->SetStandState(UNIT_STAND_STATE_STAND);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
//reset encounter
if (m_pInstance && (m_pInstance->GetData(DATA_KAELTHASEVENT) == 1 || m_pInstance->GetData(DATA_KAELTHASEVENT) == 3))
- if (Creature *Kaelthas = Unit::GetCreature((*m_creature), m_pInstance->GetData64(DATA_KAELTHAS)))
+ if (Creature *Kaelthas = Unit::GetCreature((*me), m_pInstance->GetData64(DATA_KAELTHAS)))
Kaelthas->AI()->EnterEvadeMode();
}
void MoveInLineOfSight(Unit *who)
{
- if (!who || FakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (!who || FakeDeath || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::MoveInLineOfSight(who);
@@ -187,7 +187,7 @@ struct advisorbase_ai : public ScriptedAI
void AttackStart(Unit* who)
{
- if (!who || FakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (!who || FakeDeath || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
ScriptedAI::AttackStart(who);
@@ -195,20 +195,20 @@ struct advisorbase_ai : public ScriptedAI
void Revive(Unit* Target)
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// double health for phase 3
- m_creature->SetMaxHealth(m_creature->GetMaxHealth() * 2);
+ me->SetMaxHealth(me->GetMaxHealth() * 2);
m_bDoubled_Health = true;
- m_creature->SetHealth(m_creature->GetMaxHealth());
- m_creature->SetStandState(UNIT_STAND_STATE_STAND);
+ me->SetHealth(me->GetMaxHealth());
+ me->SetStandState(UNIT_STAND_STATE_STAND);
- DoCast(m_creature, SPELL_RES_VISUAL, false);
+ DoCast(me, SPELL_RES_VISUAL, false);
DelayRes_Timer = 2000;
}
void DamageTaken(Unit* pKiller, uint32 &damage)
{
- if (damage < m_creature->GetHealth())
+ if (damage < me->GetHealth())
return;
//Prevent glitch if in fake death
@@ -225,19 +225,19 @@ struct advisorbase_ai : public ScriptedAI
damage = 0;
FakeDeath = true;
- m_creature->InterruptNonMeleeSpells(false);
- m_creature->SetHealth(0);
- m_creature->StopMoving();
- m_creature->ClearComboPointHolders();
- m_creature->RemoveAllAurasOnDeath();
- m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
- m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->ClearAllReactives();
- m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0);
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MoveIdle();
- m_creature->SetStandState(UNIT_STAND_STATE_DEAD);
+ me->InterruptNonMeleeSpells(false);
+ me->SetHealth(0);
+ me->StopMoving();
+ me->ClearComboPointHolders();
+ me->RemoveAllAurasOnDeath();
+ me->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
+ me->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->ClearAllReactives();
+ me->SetUInt64Value(UNIT_FIELD_TARGET,0);
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ me->SetStandState(UNIT_STAND_STATE_DEAD);
JustDied(pKiller);
}
}
@@ -251,15 +251,15 @@ struct advisorbase_ai : public ScriptedAI
DelayRes_Timer = 0;
FakeDeath = false;
- Unit* Target = Unit::GetUnit((*m_creature), DelayRes_Target);
+ Unit* Target = Unit::GetUnit((*me), DelayRes_Target);
if (!Target)
- Target = m_creature->getVictim();
+ Target = me->getVictim();
DoResetThreat();
AttackStart(Target);
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MoveChase(Target);
- m_creature->AddThreat(Target, 0.0f);
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveChase(Target);
+ me->AddThreat(Target, 0.0f);
} else DelayRes_Timer -= diff;
}
}
@@ -269,7 +269,7 @@ struct advisorbase_ai : public ScriptedAI
//Kael'thas AI
struct boss_kaelthasAI : public ScriptedAI
{
- boss_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature), summons(m_creature)
+ boss_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature), summons(me)
{
m_pInstance = pCreature->GetInstanceData();
memset(&m_auiAdvisorGuid, 0, sizeof(m_auiAdvisorGuid));
@@ -318,13 +318,13 @@ struct boss_kaelthasAI : public ScriptedAI
IsCastingFireball = false;
ChainPyros = false;
- if (m_creature->isInCombat())
+ if (me->isInCombat())
PrepareAdvisors();
summons.DespawnAll();
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (m_pInstance)
m_pInstance->SetData(DATA_KAELTHASEVENT, 0);
@@ -334,11 +334,11 @@ struct boss_kaelthasAI : public ScriptedAI
{
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
{
- if (Creature *pCreature = Unit::GetCreature((*m_creature), m_auiAdvisorGuid[i]))
+ if (Creature *pCreature = Unit::GetCreature((*me), m_auiAdvisorGuid[i]))
{
pCreature->Respawn();
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pCreature->setFaction(m_creature->getFaction());
+ pCreature->setFaction(me->getFaction());
pCreature->AI()->EnterEvadeMode();
}
}
@@ -358,14 +358,14 @@ struct boss_kaelthasAI : public ScriptedAI
{
error_log("TSCR: Kael'Thas One or more advisors missing, Skipping Phases 1-3");
- DoScriptText(SAY_PHASE4_INTRO2, m_creature);
+ DoScriptText(SAY_PHASE4_INTRO2, me);
Phase = 4;
m_pInstance->SetData(DATA_KAELTHASEVENT, 4);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
AttackStart(pTarget);
@@ -375,10 +375,10 @@ struct boss_kaelthasAI : public ScriptedAI
{
PrepareAdvisors();
- DoScriptText(SAY_INTRO, m_creature);
+ DoScriptText(SAY_INTRO, me);
m_pInstance->SetData(DATA_KAELTHASEVENT, 1);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
PhaseSubphase = 0;
Phase_Timer = 23000;
@@ -388,27 +388,27 @@ struct boss_kaelthasAI : public ScriptedAI
void MoveInLineOfSight(Unit *who)
{
- if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && who->isTargetableForAttack() &&
- m_creature->IsHostileTo(who) && who->isInAccessiblePlaceFor(m_creature))
+ if (!me->hasUnitState(UNIT_STAT_STUNNED) && who->isTargetableForAttack() &&
+ me->IsHostileTo(who) && who->isInAccessiblePlaceFor(me))
{
- if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
+ if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
return;
- float attackRadius = m_creature->GetAttackDistance(who);
- if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
+ float attackRadius = me->GetAttackDistance(who);
+ if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
{
- if (!m_creature->getVictim() && Phase >= 4)
+ if (!me->getVictim() && Phase >= 4)
{
who->RemoveAurasDueToSpell(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
}
- else if (m_creature->GetMap()->IsDungeon())
+ else if (me->GetMap()->IsDungeon())
{
if (m_pInstance && !m_pInstance->GetData(DATA_KAELTHASEVENT) && !Phase)
StartEvent();
- who->SetInCombatWith(m_creature);
- m_creature->AddThreat(who, 0.0f);
+ who->SetInCombatWith(me);
+ me->AddThreat(who, 0.0f);
}
}
}
@@ -422,7 +422,7 @@ struct boss_kaelthasAI : public ScriptedAI
void KilledUnit()
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
}
void JustSummoned(Creature* pSummoned)
@@ -441,10 +441,10 @@ struct boss_kaelthasAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
summons.DespawnAll();
@@ -453,7 +453,7 @@ struct boss_kaelthasAI : public ScriptedAI
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
{
- if (Unit* pAdvisor = Unit::GetUnit((*m_creature), m_auiAdvisorGuid[i]))
+ if (Unit* pAdvisor = Unit::GetUnit((*me), m_auiAdvisorGuid[i]))
pAdvisor->Kill(pAdvisor);
}
}
@@ -475,7 +475,7 @@ struct boss_kaelthasAI : public ScriptedAI
case 0:
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_INTRO_THALADRED, m_creature);
+ DoScriptText(SAY_INTRO_THALADRED, me);
//start advisor within 7 seconds
Phase_Timer = 7000;
@@ -487,12 +487,12 @@ struct boss_kaelthasAI : public ScriptedAI
case 1:
if (Phase_Timer <= diff)
{
- Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[0]));
+ Advisor = (Unit::GetCreature((*me), m_auiAdvisorGuid[0]));
if (Advisor)
{
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- Advisor->setFaction(m_creature->getFaction());
+ Advisor->setFaction(me->getFaction());
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)
@@ -505,11 +505,11 @@ struct boss_kaelthasAI : public ScriptedAI
//Subphase 2 - Start
case 2:
- Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[0]));
+ Advisor = (Unit::GetCreature((*me), m_auiAdvisorGuid[0]));
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_SANGUINAR, m_creature);
+ DoScriptText(SAY_INTRO_SANGUINAR, me);
//start advisor within 12.5 seconds
Phase_Timer = 12500;
@@ -521,12 +521,12 @@ struct boss_kaelthasAI : public ScriptedAI
case 3:
if (Phase_Timer <= diff)
{
- Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[1]));
+ Advisor = (Unit::GetCreature((*me), m_auiAdvisorGuid[1]));
if (Advisor)
{
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- Advisor->setFaction(m_creature->getFaction());
+ Advisor->setFaction(me->getFaction());
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)
@@ -539,11 +539,11 @@ struct boss_kaelthasAI : public ScriptedAI
//Subphase 3 - Start
case 4:
- Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[1]));
+ Advisor = (Unit::GetCreature((*me), m_auiAdvisorGuid[1]));
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_CAPERNIAN, m_creature);
+ DoScriptText(SAY_INTRO_CAPERNIAN, me);
//start advisor within 7 seconds
Phase_Timer = 7000;
@@ -555,12 +555,12 @@ struct boss_kaelthasAI : public ScriptedAI
case 5:
if (Phase_Timer <= diff)
{
- Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[2]));
+ Advisor = (Unit::GetCreature((*me), m_auiAdvisorGuid[2]));
if (Advisor)
{
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- Advisor->setFaction(m_creature->getFaction());
+ Advisor->setFaction(me->getFaction());
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)
@@ -573,11 +573,11 @@ struct boss_kaelthasAI : public ScriptedAI
//Subphase 4 - Start
case 6:
- Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[2]));
+ Advisor = (Unit::GetCreature((*me), m_auiAdvisorGuid[2]));
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
- DoScriptText(SAY_INTRO_TELONICUS, m_creature);
+ DoScriptText(SAY_INTRO_TELONICUS, me);
//start advisor within 8.4 seconds
Phase_Timer = 8400;
@@ -589,12 +589,12 @@ struct boss_kaelthasAI : public ScriptedAI
case 7:
if (Phase_Timer <= diff)
{
- Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[3]));
+ Advisor = (Unit::GetCreature((*me), m_auiAdvisorGuid[3]));
if (Advisor)
{
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- Advisor->setFaction(m_creature->getFaction());
+ Advisor->setFaction(me->getFaction());
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (pTarget)
@@ -608,7 +608,7 @@ struct boss_kaelthasAI : public ScriptedAI
//End of phase 1
case 8:
- Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[3]));
+ Advisor = (Unit::GetCreature((*me), m_auiAdvisorGuid[3]));
if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD))
{
@@ -616,11 +616,11 @@ struct boss_kaelthasAI : public ScriptedAI
if (m_pInstance)
m_pInstance->SetData(DATA_KAELTHASEVENT, 2);
- DoScriptText(SAY_PHASE2_WEAPON, m_creature);
+ DoScriptText(SAY_PHASE2_WEAPON, me);
PhaseSubphase = 0;
Phase_Timer = 3500;
- DoCast(m_creature, SPELL_SUMMON_WEAPONS);
+ DoCast(me, SPELL_SUMMON_WEAPONS);
}
break;
}
@@ -640,12 +640,12 @@ struct boss_kaelthasAI : public ScriptedAI
//Spawn weapons
if (PhaseSubphase == 1)
{
- DoCast(m_creature, SPELL_SUMMON_WEAPONS, false);
+ DoCast(me, SPELL_SUMMON_WEAPONS, false);
uint8 uiMaxWeapon = sizeof(m_auiSpellSummonWeapon)/sizeof(uint32);
for (uint32 i = 0; i < uiMaxWeapon; ++i)
- DoCast(m_creature, m_auiSpellSummonWeapon[i], true);
+ DoCast(me, m_auiSpellSummonWeapon[i], true);
PhaseSubphase = 2;
Phase_Timer = TIME_PHASE_2_3;
@@ -655,7 +655,7 @@ struct boss_kaelthasAI : public ScriptedAI
{
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_PHASE3_ADVANCE, m_creature);
+ DoScriptText(SAY_PHASE3_ADVANCE, me);
if (m_pInstance)
m_pInstance->SetData(DATA_KAELTHASEVENT, 3);
Phase = 3;
@@ -675,7 +675,7 @@ struct boss_kaelthasAI : public ScriptedAI
Creature *Advisor;
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
{
- Advisor = Unit::GetCreature((*m_creature), m_auiAdvisorGuid[i]);
+ Advisor = Unit::GetCreature((*me), m_auiAdvisorGuid[i]);
if (!Advisor)
error_log("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
@@ -689,7 +689,7 @@ struct boss_kaelthasAI : public ScriptedAI
if (Phase_Timer <= diff)
{
- DoScriptText(SAY_PHASE4_INTRO2, m_creature);
+ DoScriptText(SAY_PHASE4_INTRO2, me);
Phase = 4;
if (m_pInstance)
@@ -698,8 +698,8 @@ struct boss_kaelthasAI : public ScriptedAI
// Sometimes people can collect Aggro in Phase 1-3. Reset threat before releasing Kael.
DoResetThreat();
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
AttackStart(pTarget);
@@ -724,12 +724,12 @@ struct boss_kaelthasAI : public ScriptedAI
{
if (!IsCastingFireball)
{
- if (!m_creature->IsNonMeleeSpellCasted(false))
+ if (!me->IsNonMeleeSpellCasted(false))
{
//interruptable
- m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, false);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, false);
int32 dmg = 20000+rand()%5000;
- m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_FIREBALL, &dmg, 0, 0, false);
+ me->CastCustomSpell(me->getVictim(), SPELL_FIREBALL, &dmg, 0, 0, false);
IsCastingFireball = true;
Fireball_Timer = 2500;
}
@@ -737,7 +737,7 @@ struct boss_kaelthasAI : public ScriptedAI
else
{
//apply resistance
- m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true);
IsCastingFireball = false;
Fireball_Timer = 5000+rand()%10000;
}
@@ -746,7 +746,7 @@ struct boss_kaelthasAI : public ScriptedAI
//ArcaneDisruption_Timer
if (ArcaneDisruption_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_DISRUPTION, true);
+ DoCast(me->getVictim(), SPELL_ARCANE_DISRUPTION, true);
ArcaneDisruption_Timer = 60000;
} else ArcaneDisruption_Timer -= diff;
@@ -760,7 +760,7 @@ struct boss_kaelthasAI : public ScriptedAI
if (MindControl_Timer <= diff)
{
- if (m_creature->getThreatManager().getThreatList().size() >= 2)
+ if (me->getThreatManager().getThreatList().size() >= 2)
for (uint32 i = 0; i < 3; ++i)
{
debug_log("SD2: Kael'Thas mind control not supported.");
@@ -774,8 +774,8 @@ struct boss_kaelthasAI : public ScriptedAI
//Phoenix_Timer
if (Phoenix_Timer <= diff)
{
- DoCast(m_creature, SPELL_PHOENIX_ANIMATION);
- DoScriptText(RAND(SAY_SUMMON_PHOENIX1,SAY_SUMMON_PHOENIX2), m_creature);
+ DoCast(me, SPELL_PHOENIX_ANIMATION);
+ DoScriptText(RAND(SAY_SUMMON_PHOENIX1,SAY_SUMMON_PHOENIX2), me);
Phoenix_Timer = 60000;
} else Phoenix_Timer -= diff;
@@ -783,41 +783,41 @@ struct boss_kaelthasAI : public ScriptedAI
//Phase 4 specific spells
if (Phase == 4)
{
- if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50)
+ if (me->GetHealth()*100 / me->GetMaxHealth() < 50)
{
if (m_pInstance)
m_pInstance->SetData(DATA_KAELTHASEVENT, 4);
Phase = 5;
Phase_Timer = 10000;
- DoScriptText(SAY_PHASE5_NUTS, m_creature);
+ DoScriptText(SAY_PHASE5_NUTS, me);
- m_creature->StopMoving();
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MoveIdle();
- m_creature->GetMap()->CreatureRelocation(m_creature, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
- m_creature->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, 0, 0);
+ me->StopMoving();
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ me->GetMap()->CreatureRelocation(me, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
+ me->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, 0, 0);
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature, SPELL_FULLPOWER);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me, SPELL_FULLPOWER);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
//ShockBarrier_Timer
if (ShockBarrier_Timer <= diff)
{
- DoCast(m_creature, SPELL_SHOCK_BARRIER);
+ DoCast(me, SPELL_SHOCK_BARRIER);
ChainPyros = true;
PyrosCasted = 0;
ShockBarrier_Timer = 60000;
} else ShockBarrier_Timer -= diff;
//Chain Pyros (3 of them max)
- if (ChainPyros && !m_creature->IsNonMeleeSpellCasted(false))
+ if (ChainPyros && !me->IsNonMeleeSpellCasted(false))
{
if (PyrosCasted < 3)
{
- DoCast(m_creature->getVictim(), SPELL_PYROBLAST);
+ DoCast(me->getVictim(), SPELL_PYROBLAST);
++PyrosCasted;
}
else
@@ -833,14 +833,14 @@ struct boss_kaelthasAI : public ScriptedAI
{
if (Phase_Timer <= diff)
{
- m_creature->InterruptNonMeleeSpells(false);
- m_creature->RemoveAurasDueToSpell(SPELL_FULLPOWER);
+ me->InterruptNonMeleeSpells(false);
+ me->RemoveAurasDueToSpell(SPELL_FULLPOWER);
- DoCast(m_creature, SPELL_EXPLODE);
+ DoCast(me, SPELL_EXPLODE);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Phase = 6;
- AttackStart(m_creature->getVictim());
+ AttackStart(me->getVictim());
} else Phase_Timer -= diff;
}
@@ -851,20 +851,20 @@ struct boss_kaelthasAI : public ScriptedAI
//GravityLapse_Timer
if (GravityLapse_Timer <= diff)
{
- std::list<HostileReference*>::const_iterator i = m_creature->getThreatManager().getThreatList().begin();
+ std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
switch (GravityLapse_Phase)
{
case 0:
- m_creature->StopMoving();
- m_creature->GetMotionMaster()->Clear();
- m_creature->GetMotionMaster()->MoveIdle();
- m_creature->GetMap()->CreatureRelocation(m_creature, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
- m_creature->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, MOVEMENTFLAG_NONE, 0);
+ me->StopMoving();
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ me->GetMap()->CreatureRelocation(me, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0);
+ me->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, MOVEMENTFLAG_NONE, 0);
// 1) Kael'thas will portal the whole raid right into his body
- for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end(); ++i)
+ for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
+ Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid());
if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER))
{
//Use work around packet to prevent player from being dropped from combat
@@ -880,18 +880,18 @@ struct boss_kaelthasAI : public ScriptedAI
break;
case 1:
- DoScriptText(RAND(SAY_GRAVITYLAPSE1,SAY_GRAVITYLAPSE2), m_creature);
+ DoScriptText(RAND(SAY_GRAVITYLAPSE1,SAY_GRAVITYLAPSE2), me);
// 2) At that point he will put a Gravity Lapse debuff on everyone
- for (i = m_creature->getThreatManager().getThreatList().begin(); i != m_creature->getThreatManager().getThreatList().end(); ++i)
+ for (i = me->getThreatManager().getThreatList().begin(); i != me->getThreatManager().getThreatList().end(); ++i)
{
- if (Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()))
+ if (Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid()))
{
DoCast(pUnit, SPELL_KNOCKBACK, true);
//Gravity lapse - needs an exception in Spell system to work
- pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE, true, 0, 0, m_creature->GetGUID());
- pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_AURA, true, 0, 0, m_creature->GetGUID());
+ pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE, true, 0, 0, me->GetGUID());
+ pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_AURA, true, 0, 0, me->GetGUID());
//Using packet workaround
WorldPacket data(12);
@@ -907,8 +907,8 @@ struct boss_kaelthasAI : public ScriptedAI
case 2:
//Cast nether vapor aura on self
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature, SPELL_NETHER_VAPOR);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me, SPELL_NETHER_VAPOR);
GravityLapse_Timer = 20000;
++GravityLapse_Phase;
@@ -916,9 +916,9 @@ struct boss_kaelthasAI : public ScriptedAI
case 3:
//Remove flight
- for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end(); ++i)
+ for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i)
{
- if (Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()))
+ if (Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid()))
{
//Using packet workaround
WorldPacket data(12);
@@ -929,11 +929,11 @@ struct boss_kaelthasAI : public ScriptedAI
}
}
- m_creature->RemoveAurasDueToSpell(SPELL_NETHER_VAPOR);
+ me->RemoveAurasDueToSpell(SPELL_NETHER_VAPOR);
InGravityLapse = false;
GravityLapse_Timer = 60000;
GravityLapse_Phase = 0;
- AttackStart(m_creature->getVictim());
+ AttackStart(me->getVictim());
break;
}
} else GravityLapse_Timer -= diff;
@@ -943,7 +943,7 @@ struct boss_kaelthasAI : public ScriptedAI
//ShockBarrier_Timer
if (ShockBarrier_Timer <= diff)
{
- DoCast(m_creature, SPELL_SHOCK_BARRIER);
+ DoCast(me, SPELL_SHOCK_BARRIER);
ShockBarrier_Timer = 20000;
} else ShockBarrier_Timer -= diff;
@@ -985,20 +985,20 @@ struct boss_thaladred_the_darkenerAI : public advisorbase_ai
void Aggro(Unit *who)
{
- if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (!who || FakeDeath)
return;
- DoScriptText(SAY_THALADRED_AGGRO, m_creature);
- m_creature->AddThreat(who, 5000000.0f);
+ DoScriptText(SAY_THALADRED_AGGRO, me);
+ me->AddThreat(who, 5000000.0f);
}
void JustDied(Unit* pKiller)
{
if (m_pInstance && m_pInstance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_THALADRED_DEATH, m_creature);
+ DoScriptText(SAY_THALADRED_DEATH, me);
}
void UpdateAI(const uint32 diff)
@@ -1019,8 +1019,8 @@ struct boss_thaladred_the_darkenerAI : public advisorbase_ai
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
DoResetThreat();
- m_creature->AddThreat(pTarget, 5000000.0f);
- DoScriptText(EMOTE_THALADRED_GAZE, m_creature, pTarget);
+ me->AddThreat(pTarget, 5000000.0f);
+ DoScriptText(EMOTE_THALADRED_GAZE, me, pTarget);
Gaze_Timer = 8500;
}
} else Gaze_Timer -= diff;
@@ -1028,14 +1028,14 @@ struct boss_thaladred_the_darkenerAI : public advisorbase_ai
//Silence_Timer
if (Silence_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SILENCE);
+ DoCast(me->getVictim(), SPELL_SILENCE);
Silence_Timer = 20000;
} else Silence_Timer -= diff;
//PsychicBlow_Timer
if (PsychicBlow_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_PSYCHIC_BLOW);
+ DoCast(me->getVictim(), SPELL_PSYCHIC_BLOW);
PsychicBlow_Timer = 20000+rand()%5000;
} else PsychicBlow_Timer -= diff;
@@ -1058,19 +1058,19 @@ struct boss_lord_sanguinarAI : public advisorbase_ai
void Aggro(Unit *who)
{
- if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (!who || FakeDeath)
return;
- DoScriptText(SAY_SANGUINAR_AGGRO, m_creature);
+ DoScriptText(SAY_SANGUINAR_AGGRO, me);
}
void JustDied(Unit* Killer)
{
if (m_pInstance && m_pInstance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_SANGUINAR_DEATH, m_creature);
+ DoScriptText(SAY_SANGUINAR_DEATH, me);
}
void UpdateAI(const uint32 diff)
@@ -1088,7 +1088,7 @@ struct boss_lord_sanguinarAI : public advisorbase_ai
//Fear_Timer
if (Fear_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_BELLOWING_ROAR);
+ DoCast(me->getVictim(), SPELL_BELLOWING_ROAR);
Fear_Timer = 25000+rand()%10000; //approximately every 30 seconds
} else Fear_Timer -= diff;
@@ -1121,27 +1121,27 @@ struct boss_grand_astromancer_capernianAI : public advisorbase_ai
void JustDied(Unit* pKiller)
{
if (m_pInstance && m_pInstance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_CAPERNIAN_DEATH, m_creature);
+ DoScriptText(SAY_CAPERNIAN_DEATH, me);
}
void AttackStart(Unit* who)
{
- if (!who || FakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (!who || FakeDeath || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
- if (m_creature->Attack(who, true))
+ if (me->Attack(who, true))
{
- m_creature->AddThreat(who, 0.0f);
- m_creature->SetInCombatWith(who);
- who->SetInCombatWith(m_creature);
+ me->AddThreat(who, 0.0f);
+ me->SetInCombatWith(who);
+ who->SetInCombatWith(me);
- m_creature->GetMotionMaster()->MoveChase(who, CAPERNIAN_DISTANCE);
+ me->GetMotionMaster()->MoveChase(who, CAPERNIAN_DISTANCE);
}
}
void Aggro(Unit *who)
{
- if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (!who || FakeDeath)
@@ -1165,7 +1165,7 @@ struct boss_grand_astromancer_capernianAI : public advisorbase_ai
{
if (Yell_Timer <= diff)
{
- DoScriptText(SAY_CAPERNIAN_AGGRO, m_creature);
+ DoScriptText(SAY_CAPERNIAN_AGGRO, me);
Yell = true;
} else Yell_Timer -= diff;
}
@@ -1173,7 +1173,7 @@ struct boss_grand_astromancer_capernianAI : public advisorbase_ai
//Fireball_Timer
if (Fireball_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_CAPERNIAN_FIREBALL);
+ DoCast(me->getVictim(), SPELL_CAPERNIAN_FIREBALL);
Fireball_Timer = 4000;
} else Fireball_Timer -= diff;
@@ -1183,10 +1183,10 @@ struct boss_grand_astromancer_capernianAI : public advisorbase_ai
Unit *pTarget = NULL;
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
- if (pTarget && m_creature->IsWithinDistInMap(pTarget, 30))
+ if (pTarget && me->IsWithinDistInMap(pTarget, 30))
DoCast(pTarget, SPELL_CONFLAGRATION);
else
- DoCast(m_creature->getVictim(), SPELL_CONFLAGRATION);
+ DoCast(me->getVictim(), SPELL_CONFLAGRATION);
Conflagration_Timer = 10000+rand()%5000;
} else Conflagration_Timer -= diff;
@@ -1196,12 +1196,12 @@ struct boss_grand_astromancer_capernianAI : public advisorbase_ai
{
bool InMeleeRange = false;
Unit *pTarget = NULL;
- std::list<HostileReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
for (std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); i!= m_threatlist.end(); ++i)
{
- Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
+ Unit* pUnit = Unit::GetUnit((*me), (*i)->getUnitGuid());
//if in melee range
- if (pUnit && pUnit->IsWithinDistInMap(m_creature, 5))
+ if (pUnit && pUnit->IsWithinDistInMap(me, 5))
{
InMeleeRange = true;
pTarget = pUnit;
@@ -1238,18 +1238,18 @@ struct boss_master_engineer_telonicusAI : public advisorbase_ai
void JustDied(Unit* pKiller)
{
if (m_pInstance && m_pInstance->GetData(DATA_KAELTHASEVENT) == 3)
- DoScriptText(SAY_TELONICUS_DEATH, m_creature);
+ DoScriptText(SAY_TELONICUS_DEATH, me);
}
void Aggro(Unit *who)
{
- if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
if (!who || FakeDeath)
return;
- DoScriptText(SAY_TELONICUS_AGGRO, m_creature);
+ DoScriptText(SAY_TELONICUS_AGGRO, me);
}
void UpdateAI(const uint32 diff)
@@ -1267,7 +1267,7 @@ struct boss_master_engineer_telonicusAI : public advisorbase_ai
//Bomb_Timer
if (Bomb_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_BOMB);
+ DoCast(me->getVictim(), SPELL_BOMB);
Bomb_Timer = 25000;
} else Bomb_Timer -= diff;
@@ -1299,8 +1299,8 @@ struct mob_kael_flamestrikeAI : public Scripted_NoMovementAI
Casting = false;
KillSelf = false;
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- m_creature->setFaction(14);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->setFaction(14);
}
void MoveInLineOfSight(Unit *who) {}
@@ -1311,7 +1311,7 @@ struct mob_kael_flamestrikeAI : public Scripted_NoMovementAI
{
if (!Casting)
{
- DoCast(m_creature, SPELL_FLAME_STRIKE_VIS);
+ DoCast(me, SPELL_FLAME_STRIKE_VIS);
Casting = true;
}
@@ -1320,9 +1320,9 @@ struct mob_kael_flamestrikeAI : public Scripted_NoMovementAI
{
if (!KillSelf)
{
- m_creature->InterruptNonMeleeSpells(false);
- DoCast(m_creature, SPELL_FLAME_STRIKE_DMG);
- } else m_creature->Kill(m_creature);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(me, SPELL_FLAME_STRIKE_DMG);
+ } else me->Kill(me);
KillSelf = true;
Timer = 1000;
@@ -1340,14 +1340,14 @@ struct mob_phoenix_tkAI : public ScriptedAI
void Reset()
{
Cycle_Timer = 2000;
- DoCast(m_creature, SPELL_BURN, true);
+ DoCast(me, SPELL_BURN, true);
}
void JustDied(Unit* killer)
{
//is this spell in use anylonger?
- //DoCast(m_creature, SPELL_EMBER_BLAST, true);
- m_creature->SummonCreature(NPC_PHOENIX_EGG,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,16000);
+ //DoCast(me, SPELL_EMBER_BLAST, true);
+ me->SummonCreature(NPC_PHOENIX_EGG,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),me->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,16000);
}
void UpdateAI(const uint32 diff)
@@ -1359,8 +1359,8 @@ struct mob_phoenix_tkAI : public ScriptedAI
{
//spell Burn should possible do this, but it doesn't, so do this for now.
uint32 dmg = urand(4500,5500);
- if (m_creature->GetHealth() > dmg)
- m_creature->SetHealth(uint32(m_creature->GetHealth()-dmg));
+ if (me->GetHealth() > dmg)
+ me->SetHealth(uint32(me->GetHealth()-dmg));
Cycle_Timer = 2000;
} else Cycle_Timer -= diff;
@@ -1385,10 +1385,10 @@ struct mob_phoenix_egg_tkAI : public ScriptedAI
void AttackStart(Unit* who)
{
- if (m_creature->Attack(who, false))
+ if (me->Attack(who, false))
{
- m_creature->SetInCombatWith(who);
- who->SetInCombatWith(m_creature);
+ me->SetInCombatWith(who);
+ who->SetInCombatWith(me);
DoStartNoMovement(who);
}
@@ -1396,7 +1396,7 @@ struct mob_phoenix_egg_tkAI : public ScriptedAI
void JustSummoned(Creature* summoned)
{
- summoned->AddThreat(m_creature->getVictim(), 0.0f);
+ summoned->AddThreat(me->getVictim(), 0.0f);
summoned->CastSpell(summoned,SPELL_REBIRTH,false);
}
@@ -1407,7 +1407,7 @@ struct mob_phoenix_egg_tkAI : public ScriptedAI
if (Rebirth_Timer <= diff)
{
- m_creature->SummonCreature(NPC_PHOENIX,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,5000);
+ me->SummonCreature(NPC_PHOENIX,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),me->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,5000);
Rebirth_Timer = 0;
} else Rebirth_Timer -= diff;
}
diff --git a/src/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/src/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp
index e6823106ad8..b8523e2d1df 100644
--- a/src/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp
+++ b/src/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp
@@ -65,18 +65,18 @@ struct boss_void_reaverAI : public ScriptedAI
Enraged = false;
- if (pInstance && m_creature->isAlive())
+ if (pInstance && me->isAlive())
pInstance->SetData(DATA_VOIDREAVEREVENT, NOT_STARTED);
}
void KilledUnit(Unit *victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
}
void JustDied(Unit *victim)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
DoZoneInCombat();
if (pInstance)
@@ -85,7 +85,7 @@ struct boss_void_reaverAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
if (pInstance)
pInstance->SetData(DATA_VOIDREAVEREVENT, IN_PROGRESS);
@@ -99,9 +99,9 @@ struct boss_void_reaverAI : public ScriptedAI
// Pounding
if (Pounding_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_POUNDING);
+ DoCast(me->getVictim(), SPELL_POUNDING);
- DoScriptText(RAND(SAY_POUNDING1,SAY_POUNDING2), m_creature);
+ DoScriptText(RAND(SAY_POUNDING1,SAY_POUNDING2), me);
Pounding_Timer = 15000; //cast time(3000) + cooldown time(12000)
} else Pounding_Timer -= diff;
@@ -109,11 +109,11 @@ struct boss_void_reaverAI : public ScriptedAI
if (ArcaneOrb_Timer <= diff)
{
Unit *pTarget = NULL;
- std::list<HostileReference *> t_list = m_creature->getThreatManager().getThreatList();
+ std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
std::vector<Unit *> target_list;
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
- pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
+ pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
if (!pTarget)
continue;
@@ -122,7 +122,7 @@ struct boss_void_reaverAI : public ScriptedAI
continue;
//18 yard radius minimum
- if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->isAlive() && !pTarget->IsWithinDist(m_creature, 18, false))
+ if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->isAlive() && !pTarget->IsWithinDist(me, 18, false))
target_list.push_back(pTarget);
pTarget = NULL;
}
@@ -130,10 +130,10 @@ struct boss_void_reaverAI : public ScriptedAI
if (target_list.size())
pTarget = *(target_list.begin()+rand()%target_list.size());
else
- pTarget = m_creature->getVictim();
+ pTarget = me->getVictim();
if (pTarget)
- m_creature->CastSpell(pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(), SPELL_ARCANE_ORB, false, NULL, NULL, NULL, pTarget);
+ me->CastSpell(pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(), SPELL_ARCANE_ORB, false, NULL, NULL, NULL, pTarget);
ArcaneOrb_Timer = 3000;
} else ArcaneOrb_Timer -= diff;
@@ -141,11 +141,11 @@ struct boss_void_reaverAI : public ScriptedAI
// Single Target knock back, reduces aggro
if (KnockAway_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_KNOCK_AWAY);
+ DoCast(me->getVictim(), SPELL_KNOCK_AWAY);
//Drop 25% aggro
- if (DoGetThreat(m_creature->getVictim()))
- DoModifyThreatPercent(m_creature->getVictim(),-25);
+ if (DoGetThreat(me->getVictim()))
+ DoModifyThreatPercent(me->getVictim(),-25);
KnockAway_Timer = 30000;
} else KnockAway_Timer -= diff;
@@ -153,7 +153,7 @@ struct boss_void_reaverAI : public ScriptedAI
//Berserk
if (Berserk_Timer < diff && !Enraged)
{
- DoCast(m_creature, SPELL_BERSERK);
+ DoCast(me, SPELL_BERSERK);
Enraged = true;
} else Berserk_Timer -= diff;
diff --git a/src/scripts/outland/tempest_keep/the_eye/the_eye.cpp b/src/scripts/outland/tempest_keep/the_eye/the_eye.cpp
index b28acec8f9d..8a7e1531960 100644
--- a/src/scripts/outland/tempest_keep/the_eye/the_eye.cpp
+++ b/src/scripts/outland/tempest_keep/the_eye/the_eye.cpp
@@ -57,16 +57,16 @@ struct mob_crystalcore_devastatorAI : public ScriptedAI
//Knockaway_Timer
if (Knockaway_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_KNOCKAWAY, true);
+ DoCast(me->getVictim(), SPELL_KNOCKAWAY, true);
// current aggro target is knocked away pick new target
Unit* pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 0);
- if (!pTarget || pTarget == m_creature->getVictim())
+ if (!pTarget || pTarget == me->getVictim())
pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 1);
if (pTarget)
- m_creature->TauntApply(pTarget);
+ me->TauntApply(pTarget);
Knockaway_Timer = 23000;
} else Knockaway_Timer -= diff;
@@ -74,7 +74,7 @@ struct mob_crystalcore_devastatorAI : public ScriptedAI
//Countercharge_Timer
if (Countercharge_Timer <= diff)
{
- DoCast(m_creature, SPELL_COUNTERCHARGE);
+ DoCast(me, SPELL_COUNTERCHARGE);
Countercharge_Timer = 45000;
} else Countercharge_Timer -= diff;
diff --git a/src/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/src/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
index 7eca6355001..266511bcd46 100644
--- a/src/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
@@ -59,7 +59,7 @@ struct boss_gatewatcher_iron_handAI : public ScriptedAI
}
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO_1, m_creature);
+ DoScriptText(SAY_AGGRO_1, me);
}
void KilledUnit(Unit* victim)
@@ -67,12 +67,12 @@ struct boss_gatewatcher_iron_handAI : public ScriptedAI
if (rand()%2)
return;
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH_1, m_creature);
+ DoScriptText(SAY_DEATH_1, me);
//TODO: Add door check/open code
}
@@ -85,7 +85,7 @@ struct boss_gatewatcher_iron_handAI : public ScriptedAI
//Shadow Power
if (Shadow_Power_Timer <= diff)
{
- DoCast(m_creature, SPELL_SHADOW_POWER);
+ DoCast(me, SPELL_SHADOW_POWER);
Shadow_Power_Timer = 20000 + rand()%8000;
} else Shadow_Power_Timer -= diff;
@@ -93,21 +93,21 @@ struct boss_gatewatcher_iron_handAI : public ScriptedAI
if (Jackhammer_Timer <= diff)
{
//TODO: expect cast this about 5 times in a row (?), announce it by emote only once
- DoScriptText(EMOTE_HAMMER, m_creature);
- DoCast(m_creature->getVictim(), SPELL_JACKHAMMER);
+ DoScriptText(EMOTE_HAMMER, me);
+ DoCast(me->getVictim(), SPELL_JACKHAMMER);
//chance to yell, but not same time as emote (after spell in fact casted)
if (rand()%2)
return;
- DoScriptText(RAND(SAY_HAMMER_1,SAY_HAMMER_2), m_creature);
+ DoScriptText(RAND(SAY_HAMMER_1,SAY_HAMMER_2), me);
Jackhammer_Timer = 30000;
} else Jackhammer_Timer -= diff;
//Stream of Machine Fluid
if (Stream_of_Machine_Fluid_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_STREAM_OF_MACHINE_FLUID);
+ DoCast(me->getVictim(), SPELL_STREAM_OF_MACHINE_FLUID);
Stream_of_Machine_Fluid_Timer = 35000 + rand()%15000;
} else Stream_of_Machine_Fluid_Timer -= diff;
diff --git a/src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
index 22451829fc9..730618aff90 100644
--- a/src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
@@ -73,19 +73,19 @@ struct boss_nethermancer_sepethreaAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_NETHERMANCER_EVENT, IN_PROGRESS);
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
DoCast(who, SPELL_SUMMON_RAGIN_FLAMES);
- DoScriptText(SAY_SUMMON, m_creature);
+ DoScriptText(SAY_SUMMON, me);
}
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), m_creature);
+ DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
if (pInstance)
pInstance->SetData(DATA_NETHERMANCER_EVENT, DONE);
@@ -100,26 +100,26 @@ struct boss_nethermancer_sepethreaAI : public ScriptedAI
//Frost Attack
if (frost_attack_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_FROST_ATTACK);
+ DoCast(me->getVictim(), SPELL_FROST_ATTACK);
frost_attack_Timer = 7000 + rand()%3000;
} else frost_attack_Timer -= diff;
//Arcane Blast
if (arcane_blast_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_BLAST);
+ DoCast(me->getVictim(), SPELL_ARCANE_BLAST);
arcane_blast_Timer = 15000;
} else arcane_blast_Timer -= diff;
//Dragons Breath
if (dragons_breath_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_DRAGONS_BREATH);
+ DoCast(me->getVictim(), SPELL_DRAGONS_BREATH);
{
if (rand()%2)
return;
- DoScriptText(RAND(SAY_DRAGONS_BREATH_1,SAY_DRAGONS_BREATH_2), m_creature);
+ DoScriptText(RAND(SAY_DRAGONS_BREATH_1,SAY_DRAGONS_BREATH_2), me);
}
dragons_breath_Timer = 12000 + rand()%10000;
} else dragons_breath_Timer -= diff;
@@ -127,14 +127,14 @@ struct boss_nethermancer_sepethreaAI : public ScriptedAI
//Knockback
if (knockback_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_KNOCKBACK);
+ DoCast(me->getVictim(), SPELL_KNOCKBACK);
knockback_Timer = 15000 + rand()%10000;
} else knockback_Timer -= diff;
//Solarburn
if (solarburn_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SOLARBURN);
+ DoCast(me->getVictim(), SPELL_SOLARBURN);
solarburn_Timer = 30000;
} else solarburn_Timer -= diff;
@@ -172,9 +172,9 @@ struct mob_ragin_flamesAI : public ScriptedAI
flame_timer = 500;
Check_Timer = 2000;
onlyonce = false;
- m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
- m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true);
- m_creature->SetSpeed(MOVE_RUN, DUNGEON_MODE(0.5f, 0.7f));
+ me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
+ me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true);
+ me->SetSpeed(MOVE_RUN, DUNGEON_MODE(0.5f, 0.7f));
}
void EnterCombat(Unit* who)
@@ -191,8 +191,8 @@ struct mob_ragin_flamesAI : public ScriptedAI
if (pInstance->GetData(DATA_NETHERMANCER_EVENT) != IN_PROGRESS)
{
//remove
- m_creature->setDeathState(JUST_DIED);
- m_creature->RemoveCorpse();
+ me->setDeathState(JUST_DIED);
+ me->RemoveCorpse();
}
}
Check_Timer = 1000;
@@ -204,20 +204,20 @@ struct mob_ragin_flamesAI : public ScriptedAI
if (!onlyonce)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
- m_creature->GetMotionMaster()->MoveChase(pTarget);
+ me->GetMotionMaster()->MoveChase(pTarget);
onlyonce = true;
}
if (inferno_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_INFERNO);
- m_creature->TauntApply(m_creature->getVictim());
+ DoCast(me->getVictim(), SPELL_INFERNO);
+ me->TauntApply(me->getVictim());
inferno_Timer = 10000;
} else inferno_Timer -= diff;
if (flame_timer <= diff)
{
- DoCast(m_creature, SPELL_FIRE_TAIL);
+ DoCast(me, SPELL_FIRE_TAIL);
flame_timer = 500;
} else flame_timer -=diff;
diff --git a/src/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/src/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
index 008a3c2dc61..29085d25bb0 100644
--- a/src/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
+++ b/src/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
@@ -50,7 +50,7 @@ EndScriptData */
struct boss_pathaleon_the_calculatorAI : public ScriptedAI
{
- boss_pathaleon_the_calculatorAI(Creature *c) : ScriptedAI(c), summons(m_creature)
+ boss_pathaleon_the_calculatorAI(Creature *c) : ScriptedAI(c), summons(me)
{
}
@@ -80,17 +80,17 @@ struct boss_pathaleon_the_calculatorAI : public ScriptedAI
}
void EnterCombat(Unit *who)
{
- DoScriptText(SAY_AGGRO, m_creature);
+ DoScriptText(SAY_AGGRO, me);
}
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), m_creature);
+ DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
void JustDied(Unit* Killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, me);
summons.DespawnAll();
}
@@ -109,23 +109,23 @@ struct boss_pathaleon_the_calculatorAI : public ScriptedAI
for (uint8 i = 0; i < 3; ++i)
{
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
- Creature* Wraith = m_creature->SummonCreature(21062,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ Creature* Wraith = me->SummonCreature(21062,me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
if (pTarget && Wraith)
Wraith->AI()->AttackStart(pTarget);
}
- DoScriptText(SAY_SUMMON, m_creature);
+ DoScriptText(SAY_SUMMON, me);
Summon_Timer = 30000 + rand()%15000;
} else Summon_Timer -= diff;
if (ManaTap_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_MANA_TAP);
+ DoCast(me->getVictim(), SPELL_MANA_TAP);
ManaTap_Timer = 14000 + rand()%8000;
} else ManaTap_Timer -= diff;
if (ArcaneTorrent_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_ARCANE_TORRENT);
+ DoCast(me->getVictim(), SPELL_ARCANE_TORRENT);
ArcaneTorrent_Timer = 12000 + rand()%6000;
} else ArcaneTorrent_Timer -= diff;
@@ -133,7 +133,7 @@ struct boss_pathaleon_the_calculatorAI : public ScriptedAI
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
{
- DoScriptText(RAND(SAY_DOMINATION_1,SAY_DOMINATION_2), m_creature);
+ DoScriptText(RAND(SAY_DOMINATION_1,SAY_DOMINATION_2), me);
DoCast(pTarget, SPELL_DOMINATION);
}
@@ -145,15 +145,15 @@ struct boss_pathaleon_the_calculatorAI : public ScriptedAI
{
if (ArcaneExplosion_Timer <= diff)
{
- DoCast(m_creature->getVictim(), H_SPELL_ARCANE_EXPLOSION);
+ DoCast(me->getVictim(), H_SPELL_ARCANE_EXPLOSION);
ArcaneExplosion_Timer = 10000 + rand()%4000;
} else ArcaneExplosion_Timer -= diff;
}
- if (!Enraged && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21)
+ if (!Enraged && me->GetHealth()*100 / me->GetMaxHealth() < 21)
{
- DoCast(m_creature, SPELL_FRENZY);
- DoScriptText(SAY_ENRAGE, m_creature);
+ DoCast(me, SPELL_FRENZY);
+ DoScriptText(SAY_ENRAGE, me);
Enraged = true;
}
@@ -198,7 +198,7 @@ struct mob_nether_wraithAI : public ScriptedAI
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_ARCANE_MISSILES);
else
- DoCast(m_creature->getVictim(), SPELL_ARCANE_MISSILES);
+ DoCast(me->getVictim(), SPELL_ARCANE_MISSILES);
ArcaneMissiles_Timer = 5000 + rand()%5000;
} else ArcaneMissiles_Timer -=diff;
@@ -207,7 +207,7 @@ struct mob_nether_wraithAI : public ScriptedAI
{
if (Detonation_Timer <= diff)
{
- DoCast(m_creature, SPELL_DETONATION);
+ DoCast(me, SPELL_DETONATION);
Detonation = true;
} else Detonation_Timer -= diff;
}
@@ -216,8 +216,8 @@ struct mob_nether_wraithAI : public ScriptedAI
{
if (Die_Timer <= diff)
{
- m_creature->setDeathState(JUST_DIED);
- m_creature->RemoveCorpse();
+ me->setDeathState(JUST_DIED);
+ me->RemoveCorpse();
} else Die_Timer -= diff;
}
diff --git a/src/scripts/outland/terokkar_forest.cpp b/src/scripts/outland/terokkar_forest.cpp
index 2a91a96fdb5..4567986bca0 100644
--- a/src/scripts/outland/terokkar_forest.cpp
+++ b/src/scripts/outland/terokkar_forest.cpp
@@ -60,27 +60,27 @@ struct mob_unkor_the_ruthlessAI : public ScriptedAI
CanDoQuest = false;
UnkorUnfriendly_Timer = 0;
Pulverize_Timer = 3000;
- m_creature->SetStandState(UNIT_STAND_STATE_STAND);
- m_creature->setFaction(FACTION_HOSTILE);
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ me->setFaction(FACTION_HOSTILE);
}
void EnterCombat(Unit *who) {}
void DoNice()
{
- DoScriptText(SAY_SUBMIT, m_creature);
- m_creature->setFaction(FACTION_FRIENDLY);
- m_creature->SetStandState(UNIT_STAND_STATE_SIT);
- m_creature->RemoveAllAuras();
- m_creature->DeleteThreatList();
- m_creature->CombatStop(true);
+ DoScriptText(SAY_SUBMIT, me);
+ me->setFaction(FACTION_FRIENDLY);
+ me->SetStandState(UNIT_STAND_STATE_SIT);
+ me->RemoveAllAuras();
+ me->DeleteThreatList();
+ me->CombatStop(true);
UnkorUnfriendly_Timer = 60000;
}
void DamageTaken(Unit *done_by, uint32 &damage)
{
if (done_by->GetTypeId() == TYPEID_PLAYER)
- if ((m_creature->GetHealth()-damage)*100 / m_creature->GetMaxHealth() < 30)
+ if ((me->GetHealth()-damage)*100 / me->GetMaxHealth() < 30)
{
if (Group* pGroup = CAST_PLR(done_by)->GetGroup())
{
@@ -112,7 +112,7 @@ struct mob_unkor_the_ruthlessAI : public ScriptedAI
{
if (!UnkorUnfriendly_Timer)
{
- //DoCast(m_creature, SPELL_QUID9889); //not using spell for now
+ //DoCast(me, SPELL_QUID9889); //not using spell for now
DoNice();
}
else
@@ -130,7 +130,7 @@ struct mob_unkor_the_ruthlessAI : public ScriptedAI
if (Pulverize_Timer <= diff)
{
- DoCast(m_creature, SPELL_PULVERIZE);
+ DoCast(me, SPELL_PULVERIZE);
Pulverize_Timer = 9000;
} else Pulverize_Timer -= diff;
@@ -157,10 +157,10 @@ struct mob_infested_root_walkerAI : public ScriptedAI
void DamageTaken(Unit *done_by, uint32 &damage)
{
if (done_by && done_by->GetTypeId() == TYPEID_PLAYER)
- if (m_creature->GetHealth() <= damage)
+ if (me->GetHealth() <= damage)
if (rand()%100 < 75)
//Summon Wood Mites
- DoCast(m_creature, 39130, true);
+ DoCast(me, 39130, true);
}
};
CreatureAI* GetAI_mob_infested_root_walker(Creature* pCreature)
@@ -202,7 +202,7 @@ public:
if (CAST_PLR(who)->GetQuestStatus(10898) == QUEST_STATUS_INCOMPLETE)
{
float Radius = 10.0;
- if (m_creature->IsWithinDistInMap(who, Radius))
+ if (me->IsWithinDistInMap(who, Radius))
{
Start(false, false, who->GetGUID());
}
@@ -237,10 +237,10 @@ struct mob_rotting_forest_ragerAI : public ScriptedAI
void DamageTaken(Unit *done_by, uint32 &damage)
{
if (done_by->GetTypeId() == TYPEID_PLAYER)
- if (m_creature->GetHealth() <= damage)
+ if (me->GetHealth() <= damage)
if (rand()%100 < 75)
//Summon Lots of Wood Mights
- DoCast(m_creature, 39134, true);
+ DoCast(me, 39134, true);
}
};
CreatureAI* GetAI_mob_rotting_forest_rager(Creature* pCreature)
@@ -275,15 +275,15 @@ struct mob_netherweb_victimAI : public ScriptedAI
{
if (rand()%100 < 25)
{
- m_creature->SummonCreature(QUEST_TARGET, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
- CAST_PLR(Killer)->KilledMonsterCredit(QUEST_TARGET, m_creature->GetGUID());
+ me->SummonCreature(QUEST_TARGET, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
+ CAST_PLR(Killer)->KilledMonsterCredit(QUEST_TARGET, me->GetGUID());
}
else
- m_creature->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
+ me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
if (rand()%100 < 75)
- m_creature->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f,0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
- m_creature->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
+ me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f,0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
+ me->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
}
}
}
@@ -329,8 +329,8 @@ struct npc_floonAI : public ScriptedAI
Silence_Timer = 2000;
Frostbolt_Timer = 4000;
FrostNova_Timer = 9000;
- if (m_creature->getFaction() != m_uiNormFaction)
- m_creature->setFaction(m_uiNormFaction);
+ if (me->getFaction() != m_uiNormFaction)
+ me->setFaction(m_uiNormFaction);
}
void EnterCombat(Unit *who) {}
@@ -342,19 +342,19 @@ struct npc_floonAI : public ScriptedAI
if (Silence_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_SILENCE);
+ DoCast(me->getVictim(), SPELL_SILENCE);
Silence_Timer = 30000;
} else Silence_Timer -= diff;
if (FrostNova_Timer <= diff)
{
- DoCast(m_creature, SPELL_FROST_NOVA);
+ DoCast(me, SPELL_FROST_NOVA);
FrostNova_Timer = 20000;
} else FrostNova_Timer -= diff;
if (Frostbolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_FROSTBOLT);
+ DoCast(me->getVictim(), SPELL_FROSTBOLT);
Frostbolt_Timer = 5000;
} else Frostbolt_Timer -= diff;
@@ -427,21 +427,21 @@ struct npc_isla_starmaneAI : public npc_escortAI
Cage->SetGoState(GO_STATE_ACTIVE);
}
break;
- case 2: DoScriptText(SAY_PROGRESS_1, m_creature, pPlayer); break;
- case 5: DoScriptText(SAY_PROGRESS_2, m_creature, pPlayer); break;
- case 6: DoScriptText(SAY_PROGRESS_3, m_creature, pPlayer); break;
- case 29:DoScriptText(SAY_PROGRESS_4, m_creature, pPlayer);
+ case 2: DoScriptText(SAY_PROGRESS_1, me, pPlayer); break;
+ case 5: DoScriptText(SAY_PROGRESS_2, me, pPlayer); break;
+ case 6: DoScriptText(SAY_PROGRESS_3, me, pPlayer); break;
+ case 29:DoScriptText(SAY_PROGRESS_4, me, pPlayer);
if (pPlayer)
{
if (pPlayer->GetTeam() == ALLIANCE)
- pPlayer->GroupEventHappens(QUEST_EFTW_A, m_creature);
+ pPlayer->GroupEventHappens(QUEST_EFTW_A, me);
else if (pPlayer->GetTeam() == HORDE)
- pPlayer->GroupEventHappens(QUEST_EFTW_H, m_creature);
+ pPlayer->GroupEventHappens(QUEST_EFTW_H, me);
}
- m_creature->SetInFront(pPlayer); break;
- case 30: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
- case 31: DoCast(m_creature, SPELL_CAT);
- m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
+ me->SetInFront(pPlayer); break;
+ case 30: me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
+ case 31: DoCast(me, SPELL_CAT);
+ me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
}
}
@@ -581,19 +581,19 @@ struct npc_akunoAI : public npc_escortAI
switch(i)
{
case 3:
- m_creature->SummonCreature(NPC_CABAL_SKRIMISHER,-2795.99,5420.33,-34.53,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- m_creature->SummonCreature(NPC_CABAL_SKRIMISHER,-2793.55,5412.79,-34.53,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(NPC_CABAL_SKRIMISHER,-2795.99,5420.33,-34.53,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ me->SummonCreature(NPC_CABAL_SKRIMISHER,-2793.55,5412.79,-34.53,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
break;
case 11:
if (pPlayer && pPlayer->GetTypeId() == TYPEID_PLAYER)
- pPlayer->GroupEventHappens(QUEST_ESCAPING_THE_TOMB,m_creature);
+ pPlayer->GroupEventHappens(QUEST_ESCAPING_THE_TOMB,me);
break;
}
}
void JustSummoned(Creature* summon)
{
- summon->AI()->AttackStart(m_creature);
+ summon->AI()->AttackStart(me);
}
};
diff --git a/src/scripts/outland/zangarmarsh.cpp b/src/scripts/outland/zangarmarsh.cpp
index c4b620eb92e..5d8c30b45fe 100644
--- a/src/scripts/outland/zangarmarsh.cpp
+++ b/src/scripts/outland/zangarmarsh.cpp
@@ -142,8 +142,8 @@ struct npc_cooshcooshAI : public ScriptedAI
void Reset()
{
LightningBolt_Timer = 2000;
- if (m_creature->getFaction() != m_uiNormFaction)
- m_creature->setFaction(m_uiNormFaction);
+ if (me->getFaction() != m_uiNormFaction)
+ me->setFaction(m_uiNormFaction);
}
void EnterCombat(Unit *who) {}
@@ -155,7 +155,7 @@ struct npc_cooshcooshAI : public ScriptedAI
if (LightningBolt_Timer <= diff)
{
- DoCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT);
+ DoCast(me->getVictim(), SPELL_LIGHTNING_BOLT);
LightningBolt_Timer = 5000;
} else LightningBolt_Timer -= diff;
@@ -294,26 +294,26 @@ struct npc_kayra_longmaneAI : public npc_escortAI
switch(i)
{
case 4:
- DoScriptText(SAY_AMBUSH1, m_creature, pPlayer);
+ DoScriptText(SAY_AMBUSH1, me, pPlayer);
DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 5:
- DoScriptText(SAY_PROGRESS, m_creature, pPlayer);
+ DoScriptText(SAY_PROGRESS, me, pPlayer);
SetRun();
break;
case 16:
- DoScriptText(SAY_AMBUSH2, m_creature, pPlayer);
+ DoScriptText(SAY_AMBUSH2, me, pPlayer);
DoSpawnCreature(NPC_SLAVEBINDER, -10.0f, -5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
DoSpawnCreature(NPC_SLAVEBINDER, -8.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
break;
case 17:
SetRun(false);
- DoScriptText(SAY_NEAR_END, m_creature, pPlayer);
+ DoScriptText(SAY_NEAR_END, me, pPlayer);
break;
case 25:
- DoScriptText(SAY_END, m_creature, pPlayer);
- pPlayer->GroupEventHappens(QUEST_ESCAPE_FROM, m_creature);
+ DoScriptText(SAY_END, me, pPlayer);
+ pPlayer->GroupEventHappens(QUEST_ESCAPE_FROM, me);
break;
}
}