REPO: Code-style clean-ups
* Fixed pMap->map * Fixed pInstance->instance * Fixed pInsta->instance * Fixed pQuest->quest * Fixed pWho->who * Fixed pTarget->target * Fixed pGo->go ~DEVNOTES: Handlers/QuestHandler.cpp still needs to be cleaned...
This commit is contained in:
+59
-59
@@ -109,13 +109,13 @@ public:
|
||||
{
|
||||
boss_fathomlord_karathressAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
Advisors[0] = 0;
|
||||
Advisors[1] = 0;
|
||||
Advisors[2] = 0;
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 CataclysmicBolt_Timer;
|
||||
uint32 Enrage_Timer;
|
||||
@@ -133,12 +133,12 @@ public:
|
||||
|
||||
BlessingOfTides = false;
|
||||
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
uint64 RAdvisors[MAX_ADVISORS];
|
||||
RAdvisors[0] = pInstance->GetData64(DATA_SHARKKIS);
|
||||
RAdvisors[1] = pInstance->GetData64(DATA_TIDALVESS);
|
||||
RAdvisors[2] = pInstance->GetData64(DATA_CARIBDIS);
|
||||
RAdvisors[0] = instance->GetData64(DATA_SHARKKIS);
|
||||
RAdvisors[1] = instance->GetData64(DATA_TIDALVESS);
|
||||
RAdvisors[2] = instance->GetData64(DATA_CARIBDIS);
|
||||
//Respawn of the 3 Advisors
|
||||
Creature* pAdvisor = NULL;
|
||||
for (int i=0; i<MAX_ADVISORS; ++i)
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
pAdvisor->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
}
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -177,17 +177,17 @@ public:
|
||||
|
||||
void GetAdvisors()
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
Advisors[0] = pInstance->GetData64(DATA_SHARKKIS);
|
||||
Advisors[1] = pInstance->GetData64(DATA_TIDALVESS);
|
||||
Advisors[2] = pInstance->GetData64(DATA_CARIBDIS);
|
||||
Advisors[0] = instance->GetData64(DATA_SHARKKIS);
|
||||
Advisors[1] = instance->GetData64(DATA_TIDALVESS);
|
||||
Advisors[2] = instance->GetData64(DATA_CARIBDIS);
|
||||
}
|
||||
|
||||
void StartEvent(Unit* who)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
GetAdvisors();
|
||||
@@ -195,8 +195,8 @@ public:
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
DoZoneInCombat();
|
||||
|
||||
pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -208,8 +208,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, DONE);
|
||||
|
||||
//support for quest 10944
|
||||
me->SummonCreature(SEER_OLUM, OLUM_X, OLUM_Y, OLUM_Z, OLUM_O, TEMPSUMMON_TIMED_DESPAWN, 3600000);
|
||||
@@ -223,9 +223,9 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
if (!me->isInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
if (instance && !instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
@@ -319,10 +319,10 @@ public:
|
||||
{
|
||||
boss_fathomguard_sharkkisAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 LeechingThrow_Timer;
|
||||
uint32 TheBeastWithin_Timer;
|
||||
@@ -350,16 +350,16 @@ public:
|
||||
|
||||
SummonedPet = 0;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
|
||||
Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
if (!me->isAlive() && Karathress)
|
||||
@@ -369,19 +369,19 @@ public:
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
if (!me->isInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -394,7 +394,7 @@ public:
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
if (instance && !instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
@@ -473,10 +473,10 @@ public:
|
||||
{
|
||||
boss_fathomguard_tidalvessAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 FrostShock_Timer;
|
||||
uint32 Spitfire_Timer;
|
||||
@@ -490,16 +490,16 @@ public:
|
||||
PoisonCleansing_Timer = 30000;
|
||||
Earthbind_Timer = 45000;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
|
||||
Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
if (!me->isAlive() && Karathress)
|
||||
@@ -509,10 +509,10 @@ public:
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
}
|
||||
DoCast(me, SPELL_WINDFURY_WEAPON);
|
||||
}
|
||||
@@ -520,9 +520,9 @@ public:
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
if (!me->isInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -535,7 +535,7 @@ public:
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
if (instance && !instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
@@ -600,10 +600,10 @@ public:
|
||||
{
|
||||
boss_fathomguard_caribdisAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 WaterBoltVolley_Timer;
|
||||
uint32 TidalSurge_Timer;
|
||||
@@ -617,16 +617,16 @@ public:
|
||||
Heal_Timer = 55000;
|
||||
Cyclone_Timer = 30000+rand()%10000;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
Creature* Karathress = NULL;
|
||||
Karathress = (Unit::GetCreature((*me), pInstance->GetData64(DATA_KARATHRESS)));
|
||||
Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
if (!me->isAlive() && Karathress)
|
||||
@@ -636,19 +636,19 @@ public:
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
instance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Only if not incombat check if the event is started
|
||||
if (!me->isInCombat() && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
if (!me->isInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_KARATHRESSEVENT_STARTER));
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -661,7 +661,7 @@ public:
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
if (instance && !instance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
@@ -725,18 +725,18 @@ public:
|
||||
Unit* selectAdvisorUnit()
|
||||
{
|
||||
Unit* unit = NULL;
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
switch (rand()%4)
|
||||
{
|
||||
case 0:
|
||||
unit = Unit::GetUnit((*me), pInstance->GetData64(DATA_KARATHRESS));
|
||||
unit = Unit::GetUnit((*me), instance->GetData64(DATA_KARATHRESS));
|
||||
break;
|
||||
case 1:
|
||||
unit = Unit::GetUnit((*me), pInstance->GetData64(DATA_SHARKKIS));
|
||||
unit = Unit::GetUnit((*me), instance->GetData64(DATA_SHARKKIS));
|
||||
break;
|
||||
case 2:
|
||||
unit = Unit::GetUnit((*me), pInstance->GetData64(DATA_TIDALVESS));
|
||||
unit = Unit::GetUnit((*me), instance->GetData64(DATA_TIDALVESS));
|
||||
break;
|
||||
case 3:
|
||||
unit = me;
|
||||
|
||||
+8
-8
@@ -90,10 +90,10 @@ public:
|
||||
{
|
||||
boss_hydross_the_unstableAI(Creature* c) : ScriptedAI(c), Summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 beams[2];
|
||||
uint32 PosCheck_Timer;
|
||||
@@ -129,8 +129,8 @@ public:
|
||||
|
||||
me->SetDisplayId(MODEL_CLEAN);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
|
||||
beam = false;
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
@@ -170,8 +170,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -214,8 +214,8 @@ public:
|
||||
else
|
||||
DoScriptText(SAY_CLEAN_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE);
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -147,13 +147,13 @@ public:
|
||||
{
|
||||
boss_lady_vashjAI (Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
Intro = false;
|
||||
JustCreated = true;
|
||||
c->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on Creature create (no need do intro if wiped)
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 ShieldGeneratorChannel[4];
|
||||
|
||||
@@ -209,8 +209,8 @@ public:
|
||||
remo->setDeathState(JUST_DIED);
|
||||
}
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_LADYVASHJEVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_LADYVASHJEVENT, NOT_STARTED);
|
||||
ShieldGeneratorChannel[0] = 0;
|
||||
ShieldGeneratorChannel[1] = 0;
|
||||
ShieldGeneratorChannel[2] = 0;
|
||||
@@ -235,8 +235,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_LADYVASHJEVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_LADYVASHJEVENT, DONE);
|
||||
}
|
||||
|
||||
void StartEvent()
|
||||
@@ -245,17 +245,17 @@ public:
|
||||
|
||||
Phase = 1;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_LADYVASHJEVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_LADYVASHJEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
//remove old tainted cores to prevent cheating in phase 2
|
||||
Map* pMap = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player* i_pl = i->getSource())
|
||||
@@ -551,7 +551,7 @@ public:
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
//Start Phase 3
|
||||
if (pInstance && pInstance->GetData(DATA_CANSTARTPHASE3))
|
||||
if (instance && instance->GetData(DATA_CANSTARTPHASE3))
|
||||
{
|
||||
//set life 50%
|
||||
me->SetHealth(me->CountPctFromMaxHealth(50));
|
||||
@@ -589,10 +589,10 @@ public:
|
||||
{
|
||||
mob_enchanted_elementalAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
uint32 move;
|
||||
uint32 phase;
|
||||
float x, y, z;
|
||||
@@ -626,8 +626,8 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
VashjGUID = pInstance->GetData64(DATA_LADYVASHJ);
|
||||
if (instance)
|
||||
VashjGUID = instance->GetData64(DATA_LADYVASHJ);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
@@ -636,7 +636,7 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (!VashjGUID)
|
||||
@@ -691,10 +691,10 @@ public:
|
||||
{
|
||||
mob_tainted_elementalAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 PoisonBolt_Timer;
|
||||
uint32 Despawn_Timer;
|
||||
@@ -707,10 +707,10 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
Creature* Vashj = NULL;
|
||||
Vashj = (Unit::GetCreature((*me), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||
Vashj = (Unit::GetCreature((*me), instance->GetData64(DATA_LADYVASHJ)));
|
||||
|
||||
if (Vashj)
|
||||
CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->AI())->EventTaintedElementalDeath();
|
||||
@@ -766,11 +766,11 @@ public:
|
||||
{
|
||||
mob_toxic_sporebatAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
EnterEvadeMode();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 movement_timer;
|
||||
uint32 ToxicSpore_Timer;
|
||||
@@ -837,11 +837,11 @@ public:
|
||||
//Check_Timer
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
//check if vashj is death
|
||||
Unit* Vashj = NULL;
|
||||
Vashj = Unit::GetUnit((*me), pInstance->GetData64(DATA_LADYVASHJ));
|
||||
Vashj = Unit::GetUnit((*me), instance->GetData64(DATA_LADYVASHJ));
|
||||
if (!Vashj || (Vashj && !Vashj->isAlive()) || (Vashj && CAST_AI(boss_lady_vashj::boss_lady_vashjAI, CAST_CRE(Vashj)->AI())->Phase != 3))
|
||||
{
|
||||
//remove
|
||||
@@ -924,10 +924,10 @@ public:
|
||||
{
|
||||
mob_shield_generator_channelAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
uint32 Check_Timer;
|
||||
bool Casted;
|
||||
void Reset()
|
||||
@@ -945,13 +945,13 @@ public:
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
Unit* Vashj = NULL;
|
||||
Vashj = Unit::GetUnit((*me), pInstance->GetData64(DATA_LADYVASHJ));
|
||||
Vashj = Unit::GetUnit((*me), instance->GetData64(DATA_LADYVASHJ));
|
||||
|
||||
if (Vashj && Vashj->isAlive())
|
||||
{
|
||||
@@ -976,16 +976,16 @@ public:
|
||||
|
||||
bool OnUse(Player* player, Item* /*_Item*/, SpellCastTargets const& targets)
|
||||
{
|
||||
InstanceScript* pInstance = player->GetInstanceScript();
|
||||
InstanceScript* instance = player->GetInstanceScript();
|
||||
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
{
|
||||
player->GetSession()->SendNotification(TEXT_NOT_INITIALIZED);
|
||||
return true;
|
||||
}
|
||||
|
||||
Creature* Vashj = NULL;
|
||||
Vashj = (Unit::GetCreature((*player), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||
Vashj = (Unit::GetCreature((*player), instance->GetData64(DATA_LADYVASHJ)));
|
||||
if (Vashj && (CAST_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->AI())->Phase == 2))
|
||||
{
|
||||
if (GameObject* gObj = targets.GetGOTarget())
|
||||
@@ -1014,7 +1014,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (pInstance->GetData(identifier))
|
||||
if (instance->GetData(identifier))
|
||||
{
|
||||
player->GetSession()->SendNotification(TEXT_ALREADY_DEACTIVATED);
|
||||
return true;
|
||||
@@ -1029,7 +1029,7 @@ public:
|
||||
Channel->setDeathState(JUST_DIED);
|
||||
}
|
||||
|
||||
pInstance->SetData(identifier, 1);
|
||||
instance->SetData(identifier, 1);
|
||||
|
||||
//remove this item
|
||||
player->DestroyItemCount(31088, 1, true);
|
||||
|
||||
+23
-23
@@ -173,14 +173,14 @@ public:
|
||||
boss_leotheras_the_blindAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
c->GetPosition(x, y, z);
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
Demon = 0;
|
||||
|
||||
for (uint8 i = 0; i < 3; ++i)//clear guids
|
||||
SpellBinderGUID[i] = 0;
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Whirlwind_Timer;
|
||||
uint32 ChaosBlast_Timer;
|
||||
@@ -225,8 +225,8 @@ public:
|
||||
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);
|
||||
if (instance)
|
||||
instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void CheckChannelers(/*bool DoEvade = true*/)
|
||||
@@ -273,8 +273,8 @@ public:
|
||||
void StartEvent()
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void CheckBanish()
|
||||
@@ -302,10 +302,10 @@ public:
|
||||
// and reseting equipment
|
||||
me->LoadEquipment(me->GetEquipmentId());
|
||||
|
||||
if (pInstance && pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
|
||||
if (instance && instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
|
||||
{
|
||||
Unit* victim = NULL;
|
||||
victim = Unit::GetUnit(*me, pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
|
||||
victim = Unit::GetUnit(*me, instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
|
||||
if (victim)
|
||||
me->getThreatManager().addThreat(victim, 1);
|
||||
StartEvent();
|
||||
@@ -392,8 +392,8 @@ public:
|
||||
if (Creature* pDemon = Unit::GetCreature(*me, Demon))
|
||||
pDemon->DespawnOrUnsummon();
|
||||
}
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
@@ -675,12 +675,12 @@ public:
|
||||
{
|
||||
mob_greyheart_spellbinderAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
leotherasGUID = 0;
|
||||
AddedBanish = false;
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 leotherasGUID;
|
||||
|
||||
@@ -694,9 +694,9 @@ public:
|
||||
Mindblast_Timer = 3000 + rand()%5000;
|
||||
Earthshock_Timer = 5000 + rand()%5000;
|
||||
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0);
|
||||
instance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, 0);
|
||||
Creature* leotheras = Unit::GetCreature(*me, leotherasGUID);
|
||||
if (leotheras && leotheras->isAlive())
|
||||
CAST_AI(boss_leotheras_the_blind::boss_leotheras_the_blindAI, leotheras->AI())->CheckChannelers(/*false*/);
|
||||
@@ -706,8 +706,8 @@ public:
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, who->GetGUID());
|
||||
if (instance)
|
||||
instance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, who->GetGUID());
|
||||
}
|
||||
|
||||
void JustRespawned()
|
||||
@@ -731,15 +731,15 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (!leotherasGUID)
|
||||
leotherasGUID = pInstance->GetData64(DATA_LEOTHERAS);
|
||||
leotherasGUID = instance->GetData64(DATA_LEOTHERAS);
|
||||
|
||||
if (!me->isInCombat() && pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
|
||||
if (!me->isInCombat() && instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
|
||||
{
|
||||
Unit* victim = NULL;
|
||||
victim = Unit::GetUnit(*me, pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
|
||||
victim = Unit::GetUnit(*me, instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
|
||||
if (victim)
|
||||
AttackStart(victim);
|
||||
}
|
||||
@@ -751,7 +751,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (pInstance && !pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
|
||||
if (instance && !instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
@@ -769,8 +769,8 @@ public:
|
||||
|
||||
if (Earthshock_Timer <= diff)
|
||||
{
|
||||
Map* pMap = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
|
||||
{
|
||||
if (Player* i_pl = itr->getSource())
|
||||
|
||||
@@ -80,10 +80,10 @@ public:
|
||||
{
|
||||
boss_the_lurker_belowAI(Creature* c) : Scripted_NoMovementAI(c), Summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
SummonList Summons;
|
||||
|
||||
bool Spawned;
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
bool CheckCanStart()//check if players fished
|
||||
{
|
||||
if (pInstance && pInstance->GetData(DATA_STRANGE_POOL) == NOT_STARTED)
|
||||
if (instance && instance->GetData(DATA_STRANGE_POOL) == NOT_STARTED)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -128,10 +128,10 @@ public:
|
||||
|
||||
Summons.DespawnAll();
|
||||
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, NOT_STARTED);
|
||||
pInstance->SetData(DATA_STRANGE_POOL, NOT_STARTED);
|
||||
instance->SetData(DATA_THELURKERBELOWEVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_STRANGE_POOL, NOT_STARTED);
|
||||
}
|
||||
DoCast(me, SPELL_SUBMERGE);//submerge anim
|
||||
me->SetVisible(false);//we start invis under water, submerged
|
||||
@@ -141,10 +141,10 @@ public:
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, DONE);
|
||||
pInstance->SetData(DATA_STRANGE_POOL, IN_PROGRESS);
|
||||
instance->SetData(DATA_THELURKERBELOWEVENT, DONE);
|
||||
instance->SetData(DATA_STRANGE_POOL, IN_PROGRESS);
|
||||
}
|
||||
|
||||
Summons.DespawnAll();
|
||||
@@ -152,8 +152,8 @@ public:
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_THELURKERBELOWEVENT, IN_PROGRESS);
|
||||
Scripted_NoMovementAI::EnterCombat(who);
|
||||
}
|
||||
|
||||
@@ -251,8 +251,8 @@ public:
|
||||
if (CheckTimer <= diff)//check if there are players in melee range
|
||||
{
|
||||
InRange = false;
|
||||
Map* pMap = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
@@ -266,10 +266,10 @@ public:
|
||||
|
||||
if (RotTimer)
|
||||
{
|
||||
Map* pMap = me->GetMap();
|
||||
if (pMap->IsDungeon())
|
||||
Map* map = me->GetMap();
|
||||
if (map->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->getSource() && i->getSource()->isAlive() && me->HasInArc(float(diff/20000*M_PI*2), i->getSource()) && me->IsWithinDist(i->getSource(), SPOUT_DIST) && !i->getSource()->IsInWater())
|
||||
|
||||
+8
-8
@@ -91,10 +91,10 @@ public:
|
||||
{
|
||||
boss_morogrim_tidewalkerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
Map::PlayerList const* PlayerList;
|
||||
|
||||
@@ -123,16 +123,16 @@ public:
|
||||
Earthquake = false;
|
||||
Phase2 = false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -144,8 +144,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
|
||||
+7
-7
@@ -54,13 +54,13 @@ class go_bridge_console : public GameObjectScript
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* pInstance = go->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_CONTROL_CONSOLE, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_CONTROL_CONSOLE, DONE);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ class instance_serpent_shrine : public InstanceMapScript
|
||||
|
||||
struct instance_serpentshrine_cavern_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_serpentshrine_cavern_InstanceMapScript(Map* pMap) : InstanceScript(pMap)
|
||||
instance_serpentshrine_cavern_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -434,9 +434,9 @@ class instance_serpent_shrine : public InstanceMapScript
|
||||
bool DoSpawnFrenzy;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_serpentshrine_cavern_InstanceMapScript(pMap);
|
||||
return new instance_serpentshrine_cavern_InstanceMapScript(map);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+8
-8
@@ -60,10 +60,10 @@ public:
|
||||
{
|
||||
boss_thespiaAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 LightningCloud_Timer;
|
||||
uint32 LungBurst_Timer;
|
||||
@@ -75,16 +75,16 @@ public:
|
||||
LungBurst_Timer = 7000;
|
||||
EnvelopingWinds_Timer = 9000;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEAD, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HYDROMANCER_THESPIA, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -96,8 +96,8 @@ public:
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
+12
-12
@@ -62,10 +62,10 @@ public:
|
||||
{
|
||||
boss_mekgineer_steamriggerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Shrink_Timer;
|
||||
uint32 Saw_Blade_Timer;
|
||||
@@ -84,16 +84,16 @@ public:
|
||||
Summon50 = false;
|
||||
Summon25 = false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -105,8 +105,8 @@ public:
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS);
|
||||
}
|
||||
|
||||
//no known summon spells exist
|
||||
@@ -206,10 +206,10 @@ public:
|
||||
{
|
||||
mob_steamrigger_mechanicAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Repair_Timer;
|
||||
|
||||
@@ -229,9 +229,9 @@ public:
|
||||
{
|
||||
if (Repair_Timer <= diff)
|
||||
{
|
||||
if (pInstance && pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS)
|
||||
if (instance && instance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && instance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS)
|
||||
{
|
||||
if (Unit* pMekgineer = Unit::GetUnit((*me), pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER)))
|
||||
if (Unit* pMekgineer = Unit::GetUnit((*me), instance->GetData64(DATA_MEKGINEERSTEAMRIGGER)))
|
||||
{
|
||||
if (me->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE))
|
||||
{
|
||||
|
||||
+18
-18
@@ -56,10 +56,10 @@ public:
|
||||
{
|
||||
mob_naga_distillerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -67,9 +67,9 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
//hack, due to really weird spell behaviour :(
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(TYPE_DISTILLER) == IN_PROGRESS)
|
||||
if (instance->GetData(TYPE_DISTILLER) == IN_PROGRESS)
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -86,15 +86,15 @@ public:
|
||||
|
||||
DoCast(me, SPELL_WARLORDS_RAGE_NAGA, true);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_DISTILLER, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_DISTILLER, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
|
||||
{
|
||||
if (me->GetHealth() <= damage)
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_DISTILLER, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_DISTILLER, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,10 +114,10 @@ public:
|
||||
{
|
||||
boss_warlord_kalithreshAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Reflection_Timer;
|
||||
uint32 Impale_Timer;
|
||||
@@ -131,16 +131,16 @@ public:
|
||||
Rage_Timer = 45000;
|
||||
CanRage = false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -152,8 +152,8 @@ public:
|
||||
{
|
||||
//hack :(
|
||||
if (spell->Id == SPELL_WARLORDS_RAGE_PROC)
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(TYPE_DISTILLER) == DONE)
|
||||
if (instance)
|
||||
if (instance->GetData(TYPE_DISTILLER) == DONE)
|
||||
me->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC);
|
||||
}
|
||||
|
||||
@@ -161,8 +161,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_WARLORD_KALITHRESH, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -45,16 +45,16 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* pInstance = go->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
if (go->GetEntry() == ACCESS_PANEL_HYDRO && (pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE || pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL))
|
||||
pInstance->SetData(TYPE_HYDROMANCER_THESPIA, SPECIAL);
|
||||
if (go->GetEntry() == ACCESS_PANEL_HYDRO && (instance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE || instance->GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL))
|
||||
instance->SetData(TYPE_HYDROMANCER_THESPIA, SPECIAL);
|
||||
|
||||
if (go->GetEntry() == ACCESS_PANEL_MEK && (pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE || pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL))
|
||||
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, SPECIAL);
|
||||
if (go->GetEntry() == ACCESS_PANEL_MEK && (instance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE || instance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL))
|
||||
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, SPECIAL);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -66,14 +66,14 @@ class instance_steam_vault : public InstanceMapScript
|
||||
public:
|
||||
instance_steam_vault() : InstanceMapScript("instance_steam_vault", 545) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_steam_vault_InstanceMapScript(pMap);
|
||||
return new instance_steam_vault_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_steam_vault_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_steam_vault_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_steam_vault_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user