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:
@@ -37,7 +37,7 @@ class go_blackfathom_altar : public GameObjectScript
|
||||
public:
|
||||
go_blackfathom_altar() : GameObjectScript("go_blackfathom_altar") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*pGo*/)
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/)
|
||||
{
|
||||
if (!player->HasAura(SPELL_BLESSING_OF_BLACKFATHOM))
|
||||
player->AddAura(SPELL_BLESSING_OF_BLACKFATHOM, player);
|
||||
@@ -51,15 +51,15 @@ class go_blackfathom_fire : public GameObjectScript
|
||||
public:
|
||||
go_blackfathom_fire() : GameObjectScript("go_blackfathom_fire") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* pInstance = pGo->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pInstance->SetData(DATA_FIRE, pInstance->GetData(DATA_FIRE) + 1);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
instance->SetData(DATA_FIRE, instance->GetData(DATA_FIRE) + 1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -87,10 +87,10 @@ public:
|
||||
AttackPlayer();
|
||||
}
|
||||
|
||||
pInstance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiRavageTimer;
|
||||
uint32 uiFrostNovaTimer;
|
||||
@@ -183,8 +183,8 @@ public:
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (me->isSummon()) //we are not a normal spawn.
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EVENT, pInstance->GetData(DATA_EVENT) + 1);
|
||||
if (instance)
|
||||
instance->SetData(DATA_EVENT, instance->GetData(DATA_EVENT) + 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -38,32 +38,32 @@ public:
|
||||
{
|
||||
boss_aku_maiAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 uiPoisonCloudTimer;
|
||||
bool bIsEnraged;
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiPoisonCloudTimer = urand(5000, 9000);
|
||||
bIsEnraged = false;
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_AKU_MAI, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_AKU_MAI, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_AKU_MAI, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -37,30 +37,30 @@ public:
|
||||
{
|
||||
boss_gelihastAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 uiNetTimer;
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiNetTimer = urand(2000, 4000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_GELIHAST, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_GELIHAST, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GELIHAST, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_GELIHAST, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -46,34 +46,34 @@ public:
|
||||
{
|
||||
boss_kelrisAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 uiMindBlastTimer;
|
||||
uint32 uiSleepTimer;
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiMindBlastTimer = urand(2000, 5000);
|
||||
uiSleepTimer = urand(9000, 12000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_KELRIS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_KELRIS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_KELRIS, DONE);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_KELRIS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -56,14 +56,14 @@ class instance_blackfathom_deeps : public InstanceMapScript
|
||||
public:
|
||||
instance_blackfathom_deeps() : InstanceMapScript("instance_blackfathom_deeps", 48) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_blackfathom_deeps_InstanceMapScript(pMap);
|
||||
return new instance_blackfathom_deeps_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_blackfathom_deeps_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_blackfathom_deeps_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_blackfathom_deeps_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint64 m_uiTwilightLordKelrisGUID;
|
||||
uint64 m_uiShrine1GUID;
|
||||
|
||||
@@ -66,8 +66,8 @@ public:
|
||||
{
|
||||
boss_anetheronAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
uint32 SleepTimer;
|
||||
uint32 AuraTimer;
|
||||
uint32 InfernoTimer;
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
@@ -86,14 +86,14 @@ public:
|
||||
AuraTimer = 5000;
|
||||
InfernoTimer = 45000;
|
||||
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_ANETHERONEVENT, NOT_STARTED);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_ANETHERONEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_ANETHERONEVENT, IN_PROGRESS);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_ANETHERONEVENT, IN_PROGRESS);
|
||||
DoPlaySoundToSet(me, SOUND_ONAGGRO);
|
||||
me->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
@@ -120,9 +120,9 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance)
|
||||
if (i == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -131,8 +131,8 @@ public:
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_ANETHERONEVENT, DONE);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_ANETHERONEVENT, DONE);
|
||||
DoPlaySoundToSet(me, SOUND_ONDEATH);
|
||||
me->MonsterYell(SAY_ONDEATH, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
@@ -143,10 +143,10 @@ public:
|
||||
{
|
||||
//Must update npc_escortAI
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f);
|
||||
AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f);
|
||||
@@ -250,15 +250,15 @@ public:
|
||||
{
|
||||
mob_towering_infernalAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
if (pInstance)
|
||||
AnetheronGUID = pInstance->GetData64(DATA_ANETHERON);
|
||||
instance = c->GetInstanceScript();
|
||||
if (instance)
|
||||
AnetheronGUID = instance->GetData64(DATA_ANETHERON);
|
||||
}
|
||||
|
||||
uint32 ImmolationTimer;
|
||||
uint32 CheckTimer;
|
||||
uint64 AnetheronGUID;
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
@@ -88,11 +88,11 @@ public:
|
||||
{
|
||||
mob_ancient_wispAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
ArchimondeGUID = 0;
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
uint64 ArchimondeGUID;
|
||||
uint32 CheckTimer;
|
||||
|
||||
@@ -100,8 +100,8 @@ public:
|
||||
{
|
||||
CheckTimer = 1000;
|
||||
|
||||
if (pInstance)
|
||||
ArchimondeGUID = pInstance->GetData64(DATA_ARCHIMONDE);
|
||||
if (instance)
|
||||
ArchimondeGUID = instance->GetData64(DATA_ARCHIMONDE);
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
@@ -235,10 +235,10 @@ public:
|
||||
{
|
||||
boss_archimondeAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 DoomfireSpiritGUID;
|
||||
uint64 WorldTreeGUID;
|
||||
@@ -264,8 +264,8 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ARCHIMONDEEVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, NOT_STARTED);
|
||||
|
||||
DoomfireSpiritGUID = 0;
|
||||
damageTaken = 0;
|
||||
@@ -297,8 +297,8 @@ public:
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
DoZoneInCombat();
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ARCHIMONDEEVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
@@ -339,8 +339,8 @@ public:
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ARCHIMONDEEVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARCHIMONDEEVENT, DONE);
|
||||
}
|
||||
|
||||
bool CanUseFingerOfDeath()
|
||||
@@ -460,15 +460,15 @@ public:
|
||||
{
|
||||
if (!me->isInCombat())
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
// Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished.
|
||||
if ((pInstance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35)))
|
||||
if ((instance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35)))
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->setFaction(35);
|
||||
}
|
||||
else if ((pInstance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35)))
|
||||
else if ((instance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35)))
|
||||
{
|
||||
me->setFaction(1720);
|
||||
me->SetVisible(true);
|
||||
|
||||
@@ -57,8 +57,8 @@ public:
|
||||
{
|
||||
boss_azgalorAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
uint32 EnrageTimer;
|
||||
bool enraged;
|
||||
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
@@ -82,14 +82,14 @@ public:
|
||||
EnrageTimer = 600000;
|
||||
enraged = false;
|
||||
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_AZGALOREVENT, NOT_STARTED);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_AZGALOREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_AZGALOREVENT, IN_PROGRESS);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_AZGALOREVENT, IN_PROGRESS);
|
||||
DoPlaySoundToSet(me, SOUND_ONAGGRO);
|
||||
me->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
@@ -116,9 +116,9 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance)
|
||||
if (i == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -127,8 +127,8 @@ public:
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_AZGALOREVENT, DONE);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_AZGALOREVENT, DONE);
|
||||
DoPlaySoundToSet(me, SOUND_ONDEATH);
|
||||
}
|
||||
|
||||
@@ -138,10 +138,10 @@ public:
|
||||
{
|
||||
//Must update npc_escortAI
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f);
|
||||
AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f);
|
||||
@@ -217,16 +217,16 @@ public:
|
||||
{
|
||||
mob_lesser_doomguardAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
if (pInstance)
|
||||
AzgalorGUID = pInstance->GetData64(DATA_AZGALOR);
|
||||
instance = c->GetInstanceScript();
|
||||
if (instance)
|
||||
AzgalorGUID = instance->GetData64(DATA_AZGALOR);
|
||||
}
|
||||
|
||||
uint32 CrippleTimer;
|
||||
uint32 WarstompTimer;
|
||||
uint32 CheckTimer;
|
||||
uint64 AzgalorGUID;
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
@@ -54,8 +54,8 @@ public:
|
||||
{
|
||||
boss_kazrogalAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
uint32 WarStompTimer;
|
||||
uint32 MarkTimer;
|
||||
uint32 MarkTimerBase;
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
@@ -74,14 +74,14 @@ public:
|
||||
MarkTimer = 45000;
|
||||
MarkTimerBase = 45000;
|
||||
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_KAZROGALEVENT, NOT_STARTED);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_KAZROGALEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_KAZROGALEVENT, IN_PROGRESS);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_KAZROGALEVENT, IN_PROGRESS);
|
||||
DoPlaySoundToSet(me, SOUND_ONAGGRO);
|
||||
me->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
@@ -108,9 +108,9 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance)
|
||||
if (i == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -119,8 +119,8 @@ public:
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_KAZROGALEVENT, DONE);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_KAZROGALEVENT, DONE);
|
||||
DoPlaySoundToSet(me, SOUND_ONDEATH);
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ public:
|
||||
{
|
||||
//Must update npc_escortAI
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, 5492.91f, -2404.61f, 1462.63f);
|
||||
AddWaypoint(1, 5531.76f, -2460.87f, 1469.55f);
|
||||
|
||||
+14
-14
@@ -60,8 +60,8 @@ public:
|
||||
{
|
||||
boss_rage_winterchillAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
uint32 DecayTimer;
|
||||
uint32 NovaTimer;
|
||||
uint32 IceboltTimer;
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
|
||||
void Reset()
|
||||
@@ -80,14 +80,14 @@ public:
|
||||
NovaTimer = 15000;
|
||||
IceboltTimer = 10000;
|
||||
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_RAGEWINTERCHILLEVENT, IN_PROGRESS);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, IN_PROGRESS);
|
||||
DoPlaySoundToSet(me, SOUND_ONAGGRO);
|
||||
me->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
@@ -110,9 +110,9 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance)
|
||||
if (i == 7 && instance)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -121,8 +121,8 @@ public:
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_RAGEWINTERCHILLEVENT, DONE);
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, DONE);
|
||||
DoPlaySoundToSet(me, SOUND_ONDEATH);
|
||||
me->MonsterYell(SAY_ONDEATH, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
@@ -133,10 +133,10 @@ public:
|
||||
{
|
||||
//Must update npc_escortAI
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, 4896.08f, -1576.35f, 1333.65f);
|
||||
AddWaypoint(1, 4898.68f, -1615.02f, 1329.48f);
|
||||
|
||||
@@ -312,7 +312,7 @@ float HordeFirePos[65][8]=//spawn points for the fire visuals (GO) in the horde
|
||||
|
||||
hyjalAI::hyjalAI(Creature* c) : npc_escortAI(c), Summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
VeinsSpawned[0] = false;
|
||||
VeinsSpawned[1] = false;
|
||||
for (uint8 i=0; i<14; ++i)
|
||||
@@ -392,15 +392,15 @@ void hyjalAI::Reset()
|
||||
memset(Spells, 0, sizeof(Spell) * HYJAL_AI_MAX_SPELLS);
|
||||
|
||||
//Reset Instance Data for trash count
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if ((!pInstance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == JAINA) || (pInstance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == THRALL))
|
||||
if ((!instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == JAINA) || (instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == THRALL))
|
||||
{
|
||||
//Reset World States
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0);
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
|
||||
pInstance->SetData(DATA_RESET_TRASH_COUNT, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
|
||||
instance->SetData(DATA_RESET_TRASH_COUNT, 0);
|
||||
}
|
||||
} else sLog->outError(ERROR_INST_DATA);
|
||||
|
||||
@@ -510,9 +510,9 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
||||
CAST_AI(hyjal_trashAI, creature->AI())->IsEvent = true;
|
||||
break;
|
||||
}
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE)
|
||||
if (instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE)
|
||||
creature->SetDisableReputationGain(true);//no repu for solo farming
|
||||
}
|
||||
// Check if Creature is a boss.
|
||||
@@ -531,14 +531,14 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
|
||||
if (rand()%4 == 0)
|
||||
Talk(RALLY);
|
||||
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
{
|
||||
sLog->outError(ERROR_INST_DATA);
|
||||
return;
|
||||
}
|
||||
InfernalCount = 0;//reset infernal count every new wave
|
||||
|
||||
EnemyCount = pInstance->GetData(DATA_TRASH);
|
||||
EnemyCount = instance->GetData(DATA_TRASH);
|
||||
for (uint8 i = 0; i < 18; ++i)
|
||||
{
|
||||
if (wave[Count].Mob[i])
|
||||
@@ -552,11 +552,11 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
|
||||
stateValue -= 9; // Subtract 9 from it to give the proper wave number if we are greater than 8
|
||||
|
||||
// Set world state to our current wave number
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, stateValue); // Set world state to our current wave number
|
||||
instance->DoUpdateWorldState(WORLD_STATE_WAVES, stateValue); // Set world state to our current wave number
|
||||
// Enable world state
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 1); // Enable world state
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 1); // Enable world state
|
||||
|
||||
pInstance->SetData(DATA_TRASH, EnemyCount); // Send data for instance script to update count
|
||||
instance->SetData(DATA_TRASH, EnemyCount); // Send data for instance script to update count
|
||||
|
||||
if (!Debug)
|
||||
NextWaveTimer = wave[Count].WaveTimer;
|
||||
@@ -569,11 +569,11 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
|
||||
else
|
||||
{
|
||||
// Set world state for waves to 0 to disable it.
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 1);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 1);
|
||||
|
||||
// Set World State for enemies invading to 1.
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 1);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 1);
|
||||
|
||||
Summon = false;
|
||||
}
|
||||
@@ -582,7 +582,7 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
|
||||
|
||||
void hyjalAI::StartEvent(Player* player)
|
||||
{
|
||||
if (!player || IsDummy || !pInstance)
|
||||
if (!player || IsDummy || !instance)
|
||||
return;
|
||||
|
||||
Talk(BEGIN);
|
||||
@@ -596,17 +596,17 @@ void hyjalAI::StartEvent(Player* player)
|
||||
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0);
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0);
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
|
||||
|
||||
DeSpawnVeins();
|
||||
}
|
||||
|
||||
uint32 hyjalAI::GetInstanceData(uint32 Event)
|
||||
{
|
||||
if (pInstance)
|
||||
return pInstance->GetData(Event);
|
||||
if (instance)
|
||||
return instance->GetData(Event);
|
||||
else sLog->outError(ERROR_INST_DATA);
|
||||
|
||||
return 0;
|
||||
@@ -650,13 +650,13 @@ void hyjalAI::Talk(uint32 id)
|
||||
|
||||
void hyjalAI::Retreat()
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(TYPE_RETREAT, SPECIAL);
|
||||
instance->SetData(TYPE_RETREAT, SPECIAL);
|
||||
|
||||
if (Faction == 0)
|
||||
{
|
||||
pInstance->SetData(DATA_ALLIANCE_RETREAT, 1);
|
||||
instance->SetData(DATA_ALLIANCE_RETREAT, 1);
|
||||
AddWaypoint(0, JainaWPs[0][0], JainaWPs[0][1], JainaWPs[0][2]);
|
||||
AddWaypoint(1, JainaWPs[1][0], JainaWPs[1][1], JainaWPs[1][2]);
|
||||
Start(false, false);
|
||||
@@ -664,7 +664,7 @@ void hyjalAI::Retreat()
|
||||
}
|
||||
if (Faction == 1)
|
||||
{
|
||||
pInstance->SetData(DATA_HORDE_RETREAT, 1);
|
||||
instance->SetData(DATA_HORDE_RETREAT, 1);
|
||||
Creature* JainaDummy = me->SummonCreature(JAINA, JainaDummySpawn[0][0], JainaDummySpawn[0][1], JainaDummySpawn[0][2], JainaDummySpawn[0][3], TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
if (JainaDummy)
|
||||
{
|
||||
@@ -710,28 +710,28 @@ void hyjalAI::SpawnVeins()
|
||||
|
||||
void hyjalAI::DeSpawnVeins()
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
if (Faction == 1)
|
||||
{
|
||||
Creature* unit=Unit::GetCreature((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Creature* unit=Unit::GetCreature((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (!unit)return;
|
||||
hyjalAI* ai = CAST_AI(hyjalAI, unit->AI());
|
||||
if (!ai)return;
|
||||
for (uint8 i = 0; i<7; ++i)
|
||||
{
|
||||
if (GameObject* gem = pInstance->instance->GetGameObject(ai->VeinGUID[i]))
|
||||
if (GameObject* gem = instance->instance->GetGameObject(ai->VeinGUID[i]))
|
||||
gem->Delete();
|
||||
}
|
||||
} else if (Faction)
|
||||
{
|
||||
Creature* unit=Unit::GetCreature((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Creature* unit=Unit::GetCreature((*me), instance->GetData64(DATA_THRALL));
|
||||
if (!unit)return;
|
||||
hyjalAI* ai = CAST_AI(hyjalAI, unit->AI());
|
||||
if (!ai)return;
|
||||
for (uint8 i = 7; i<14; ++i)
|
||||
{
|
||||
if (GameObject* gem = pInstance->instance->GetGameObject(ai->VeinGUID[i]))
|
||||
if (GameObject* gem = instance->instance->GetGameObject(ai->VeinGUID[i]))
|
||||
gem->Delete();
|
||||
}
|
||||
}
|
||||
@@ -754,7 +754,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case JAINA:
|
||||
if (pInstance && pInstance->GetData(DATA_ALLIANCE_RETREAT))
|
||||
if (instance && instance->GetData(DATA_ALLIANCE_RETREAT))
|
||||
{
|
||||
me->SetVisible(false);
|
||||
HideNearPos(me->GetPositionX(), me->GetPositionY());
|
||||
@@ -766,7 +766,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
|
||||
else me->SetVisible(true);
|
||||
break;
|
||||
case THRALL: //thrall
|
||||
if (pInstance && pInstance->GetData(DATA_HORDE_RETREAT))
|
||||
if (instance && instance->GetData(DATA_HORDE_RETREAT))
|
||||
{
|
||||
me->SetVisible(false);
|
||||
HideNearPos(me->GetPositionX(), me->GetPositionY());
|
||||
@@ -830,9 +830,9 @@ void hyjalAI::UpdateAI(const uint32 diff)
|
||||
|
||||
if (Summon)
|
||||
{
|
||||
if (pInstance && EnemyCount)
|
||||
if (instance && EnemyCount)
|
||||
{
|
||||
EnemyCount = pInstance->GetData(DATA_TRASH);
|
||||
EnemyCount = instance->GetData(DATA_TRASH);
|
||||
if (!EnemyCount)
|
||||
NextWaveTimer = 5000;
|
||||
}
|
||||
@@ -870,8 +870,8 @@ void hyjalAI::UpdateAI(const uint32 diff)
|
||||
CheckTimer = 0;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
BossGUID[i] = 0;
|
||||
if (pInstance)
|
||||
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it
|
||||
if (instance)
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -919,17 +919,17 @@ void hyjalAI::JustDied(Unit* /*killer*/)
|
||||
RespawnTimer = 120000;
|
||||
Talk(DEATH);
|
||||
Summons.DespawnAll();//despawn all wave's summons
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{//reset encounter if boss is despawned (ex: thrall is killed, boss despawns, event stucks at inprogress)
|
||||
if (pInstance->GetData(DATA_RAGEWINTERCHILLEVENT) == IN_PROGRESS)
|
||||
pInstance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED);
|
||||
if (pInstance->GetData(DATA_ANETHERONEVENT) == IN_PROGRESS)
|
||||
pInstance->SetData(DATA_ANETHERONEVENT, NOT_STARTED);
|
||||
if (pInstance->GetData(DATA_KAZROGALEVENT) == IN_PROGRESS)
|
||||
pInstance->SetData(DATA_KAZROGALEVENT, NOT_STARTED);
|
||||
if (pInstance->GetData(DATA_AZGALOREVENT) == IN_PROGRESS)
|
||||
pInstance->SetData(DATA_AZGALOREVENT, NOT_STARTED);
|
||||
pInstance->SetData(DATA_RESET_RAIDDAMAGE, 0);//reset damage on die
|
||||
if (instance->GetData(DATA_RAGEWINTERCHILLEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_ANETHERONEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_ANETHERONEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_KAZROGALEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_KAZROGALEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_AZGALOREVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_AZGALOREVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_RESET_RAIDDAMAGE, 0);//reset damage on die
|
||||
}
|
||||
}
|
||||
void hyjalAI::HideNearPos(float x, float y)
|
||||
|
||||
@@ -212,7 +212,7 @@ struct hyjalAI : public npc_escortAI
|
||||
void Talk(uint32 id); // Searches for the appropriate yell and sound and uses it to inform the raid of various things
|
||||
|
||||
public:
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 PlayerGUID;
|
||||
uint64 BossGUID[2];
|
||||
|
||||
@@ -157,7 +157,7 @@ float HordeOverrunWP[21][3]=//waypoints in the horde base used in the end in the
|
||||
|
||||
hyjal_trashAI::hyjal_trashAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
IsEvent = false;
|
||||
Delay = 0;
|
||||
LastOverronPos = 0;
|
||||
@@ -175,8 +175,8 @@ void hyjal_trashAI::DamageTaken(Unit* done_by, uint32 &damage)
|
||||
if (done_by->GetTypeId() == TYPEID_PLAYER || (done_by->GetTypeId() == TYPEID_UNIT && CAST_CRE(done_by)->isPet()))
|
||||
{
|
||||
damageTaken += damage;
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAIDDAMAGE, damage);//store raid's damage
|
||||
if (instance)
|
||||
instance->SetData(DATA_RAIDDAMAGE, damage);//store raid's damage
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,12 +379,12 @@ void hyjal_trashAI::UpdateAI(const uint32 /*diff*/)
|
||||
|
||||
void hyjal_trashAI::JustDied(Unit* /*victim*/)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
if (IsEvent && !me->isWorldBoss())
|
||||
pInstance->SetData(DATA_TRASH, 0);//signal trash is dead
|
||||
instance->SetData(DATA_TRASH, 0);//signal trash is dead
|
||||
|
||||
if ((pInstance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE && !me->isWorldBoss()) || (damageTaken < me->GetMaxHealth()/4 && me->isWorldBoss()))
|
||||
if ((instance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE && !me->isWorldBoss()) || (damageTaken < me->GetMaxHealth()/4 && me->isWorldBoss()))
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);//no loot
|
||||
}
|
||||
|
||||
@@ -397,14 +397,14 @@ public:
|
||||
{
|
||||
mob_giant_infernalAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
meteor = false;//call once!
|
||||
CanMove = false;
|
||||
Delay = rand()%30000;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(MODEL_INVIS);
|
||||
pGo = false;
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
@@ -412,7 +412,7 @@ public:
|
||||
bool meteor;
|
||||
bool CanMove;
|
||||
bool WpEnabled;
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 pos;
|
||||
uint32 spawnTimer;
|
||||
uint32 FlameBuffetTimer;
|
||||
@@ -430,11 +430,11 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 0 && pInstance && !IsOverrun)
|
||||
if (i == 0 && instance && !IsOverrun)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -471,14 +471,14 @@ public:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(me->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
|
||||
CanMove = true;
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT) && !pInstance->GetData(DATA_HORDE_RETREAT))
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT) && !instance->GetData(DATA_HORDE_RETREAT))
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
} else if (pInstance->GetData(DATA_ALLIANCE_RETREAT) && pInstance->GetData(DATA_HORDE_RETREAT)){
|
||||
} else if (instance->GetData(DATA_ALLIANCE_RETREAT) && instance->GetData(DATA_HORDE_RETREAT)){
|
||||
//do overrun
|
||||
}
|
||||
}
|
||||
@@ -490,10 +490,10 @@ public:
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
AddWaypoint(0, HordeWPs[7][0]+irand(-3, 3), HordeWPs[7][1]+irand(-3, 3), HordeWPs[7][2]);//HordeWPs[7] infront of thrall
|
||||
Start(true, true);
|
||||
@@ -541,13 +541,13 @@ public:
|
||||
{
|
||||
mob_abominationAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 KnockDownTimer;
|
||||
uint32 pos;
|
||||
void Reset()
|
||||
@@ -558,15 +558,15 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance && !IsOverrun)
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -590,12 +590,12 @@ public:
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
@@ -642,13 +642,13 @@ public:
|
||||
{
|
||||
mob_ghoulAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 FrenzyTimer;
|
||||
uint32 pos;
|
||||
uint32 MoveTimer;
|
||||
@@ -663,15 +663,15 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance && !IsOverrun)
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -697,12 +697,12 @@ public:
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
@@ -751,13 +751,13 @@ public:
|
||||
{
|
||||
mob_necromancerAI(Creature* c) : hyjal_trashAI(c), summons(me)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
SummonList summons;
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 ShadowBoltTimer;
|
||||
uint32 pos;
|
||||
void Reset()
|
||||
@@ -777,15 +777,15 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance && !IsOverrun)
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -819,12 +819,12 @@ public:
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
@@ -872,13 +872,13 @@ public:
|
||||
{
|
||||
mob_bansheeAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 CourseTimer;
|
||||
uint32 WailTimer;
|
||||
uint32 ShellTimer;
|
||||
@@ -893,15 +893,15 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance && !IsOverrun)
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -917,12 +917,12 @@ public:
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
@@ -977,13 +977,13 @@ public:
|
||||
{
|
||||
mob_crypt_fiendAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 WebTimer;
|
||||
uint32 pos;
|
||||
void Reset()
|
||||
@@ -994,15 +994,15 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance && !IsOverrun)
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -1018,12 +1018,12 @@ public:
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
@@ -1069,13 +1069,13 @@ public:
|
||||
{
|
||||
mob_fel_stalkerAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 ManaBurnTimer;
|
||||
uint32 pos;
|
||||
void Reset()
|
||||
@@ -1086,15 +1086,15 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 7 && pInstance && !IsOverrun)
|
||||
if (i == 7 && instance && !IsOverrun)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, attack thrall
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}else{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->isAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -1110,12 +1110,12 @@ public:
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
if (instance->GetData(DATA_ALLIANCE_RETREAT))//2.alliance boss down, use horde WPs
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
AddWaypoint(i, HordeWPs[i][0]+irand(-3, 3), HordeWPs[i][1]+irand(-3, 3), HordeWPs[i][2]);
|
||||
@@ -1161,13 +1161,13 @@ public:
|
||||
{
|
||||
mob_frost_wyrmAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 FrostBreathTimer;
|
||||
uint32 pos;
|
||||
uint32 MoveTimer;
|
||||
@@ -1182,9 +1182,9 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 2 && pInstance && !IsOverrun)
|
||||
if (i == 2 && instance && !IsOverrun)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
{
|
||||
me->AddThreat(target, 0.0f);
|
||||
@@ -1195,8 +1195,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*victim*/)
|
||||
{
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_TRASH, 0);//signal trash is dead
|
||||
if (instance && IsEvent)
|
||||
instance->SetData(DATA_TRASH, 0);//signal trash is dead
|
||||
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
@@ -1217,10 +1217,10 @@ public:
|
||||
}
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
if (!useFlyPath)
|
||||
{
|
||||
@@ -1278,14 +1278,14 @@ public:
|
||||
{
|
||||
mob_gargoyleAI(Creature* c) : hyjal_trashAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
pGo = false;
|
||||
instance = c->GetInstanceScript();
|
||||
go = false;
|
||||
pos = 0;
|
||||
DummyTarget[0] = 0;DummyTarget[1] = 0;DummyTarget[2] = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool pGo;
|
||||
bool go;
|
||||
uint32 StrikeTimer;
|
||||
uint32 pos;
|
||||
uint32 MoveTimer;
|
||||
@@ -1304,9 +1304,9 @@ public:
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
pos = i;
|
||||
if (i == 2 && pInstance && !IsOverrun)
|
||||
if (i == 2 && instance && !IsOverrun)
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*me), pInstance->GetData64(DATA_THRALL));
|
||||
Unit* target = Unit::GetUnit((*me), instance->GetData64(DATA_THRALL));
|
||||
if (target && target->isAlive())
|
||||
{
|
||||
me->AddThreat(target, 0.0f);
|
||||
@@ -1335,10 +1335,10 @@ public:
|
||||
}
|
||||
if (IsEvent)
|
||||
{
|
||||
if (!pGo)
|
||||
if (!go)
|
||||
{
|
||||
pGo = true;
|
||||
if (pInstance)
|
||||
go = true;
|
||||
if (instance)
|
||||
{
|
||||
if (!useFlyPath)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ struct hyjal_trashAI : public npc_escortAI
|
||||
void DamageTaken(Unit* done_by, uint32 &damage);
|
||||
|
||||
public:
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
bool IsEvent;
|
||||
uint32 Delay;
|
||||
uint32 LastOverronPos;
|
||||
|
||||
@@ -46,14 +46,14 @@ class instance_hyjal : public InstanceMapScript
|
||||
public:
|
||||
instance_hyjal() : InstanceMapScript("instance_hyjal", 534) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_mount_hyjal_InstanceMapScript(pMap);
|
||||
return new instance_mount_hyjal_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_mount_hyjal_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_mount_hyjal_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_mount_hyjal_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
@@ -193,11 +193,11 @@ public:
|
||||
{
|
||||
Creature* unit = creature->SummonCreature(21987, creature->GetPositionX(), creature->GetPositionY(), creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||
|
||||
Map* pMap = creature->GetMap();
|
||||
if (pMap->IsDungeon() && unit)
|
||||
Map* map = creature->GetMap();
|
||||
if (map->IsDungeon() && unit)
|
||||
{
|
||||
unit->SetVisible(false);
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
{
|
||||
boss_epochAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint8 uiStep;
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
uint32 uiTimeStopTimer;
|
||||
uint32 uiCurseOfExertionTimer;
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -84,16 +84,16 @@ public:
|
||||
uiTimeStopTimer = 21300;
|
||||
uiWoundingStrikeTimer = 5300;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EPOCH_EVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_EPOCH_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -135,8 +135,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EPOCH_EVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_EPOCH_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
|
||||
@@ -45,21 +45,21 @@ public:
|
||||
{
|
||||
boss_infinite_corruptorAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_INFINITE_EVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_INFINITE_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 /*diff*/)
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_INFINITE_EVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_INFINITE_EVENT, DONE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
{
|
||||
boss_mal_ganisAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 uiCarrionSwarmTimer;
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
CombatPhases Phase;
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -107,15 +107,15 @@ public:
|
||||
uiSleepTimer = urand(15000, 20000);
|
||||
uiOutroTimer = 1000;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
@@ -154,13 +154,13 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (Creature* pArthas = me->GetCreature(*me, pInstance ? pInstance->GetData64(DATA_ARTHAS) : 0))
|
||||
if (Creature* pArthas = me->GetCreature(*me, instance ? instance->GetData64(DATA_ARTHAS) : 0))
|
||||
if (pArthas->isDead())
|
||||
{
|
||||
EnterEvadeMode();
|
||||
me->DisappearAndDie();
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAL_GANIS_EVENT, FAIL);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, FAIL);
|
||||
}
|
||||
|
||||
if (uiCarrionSwarmTimer < diff)
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
uiOutroTimer = 8000;
|
||||
break;
|
||||
case 2:
|
||||
me->SetTarget(pInstance ? pInstance->GetData64(DATA_ARTHAS) : 0);
|
||||
me->SetTarget(instance ? instance->GetData64(DATA_ARTHAS) : 0);
|
||||
me->HandleEmoteCommand(29);
|
||||
DoScriptText(SAY_ESCAPE_SPEECH_2, me);
|
||||
++uiOutroStep;
|
||||
@@ -233,13 +233,13 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(DATA_MAL_GANIS_EVENT, DONE);
|
||||
instance->SetData(DATA_MAL_GANIS_EVENT, DONE);
|
||||
|
||||
// give achievement credit to players. criteria use spell 58630 which doesn't exist.
|
||||
if (pInstance)
|
||||
pInstance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 58630);
|
||||
if (instance)
|
||||
instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 58630);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
{
|
||||
boss_meathookAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
if (pInstance)
|
||||
instance = c->GetInstanceScript();
|
||||
if (instance)
|
||||
DoScriptText(SAY_SPAWN, me);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
uint32 uiDiseaseTimer;
|
||||
uint32 uiFrenzyTimer;
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -76,16 +76,16 @@ public:
|
||||
uiDiseaseTimer = urand(2000, 4000); //approx 3s
|
||||
uiFrenzyTimer = urand(21000, 26000); //made it up
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -120,8 +120,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MEATHOOK_EVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_MEATHOOK_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
|
||||
@@ -68,8 +68,8 @@ public:
|
||||
{
|
||||
boss_salrammAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
if (pInstance)
|
||||
instance = c->GetInstanceScript();
|
||||
if (instance)
|
||||
DoScriptText(SAY_SPAWN, me);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
uint32 uiStealFleshTimer;
|
||||
uint32 uiSummonGhoulsTimer;
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -89,16 +89,16 @@ public:
|
||||
uiStealFleshTimer = 12345;
|
||||
uiSummonGhoulsTimer = urand(19000, 24000); //on a video approx 24s after aggro
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -147,8 +147,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SALRAMM_EVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_SALRAMM_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
|
||||
+47
-47
@@ -327,11 +327,11 @@ public:
|
||||
{
|
||||
npc_arthasAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
pInstance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
Reset();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
bool bStepping;
|
||||
uint32 uiStep;
|
||||
@@ -375,9 +375,9 @@ public:
|
||||
uiMalganisGUID = 0;
|
||||
uiInfiniteGUID = 0;
|
||||
|
||||
if (pInstance) {
|
||||
pInstance->SetData(DATA_ARTHAS_EVENT, NOT_STARTED);
|
||||
switch (pInstance->GetData(DATA_ARTHAS_EVENT))
|
||||
if (instance) {
|
||||
instance->SetData(DATA_ARTHAS_EVENT, NOT_STARTED);
|
||||
switch (instance->GetData(DATA_ARTHAS_EVENT))
|
||||
{
|
||||
case NOT_STARTED:
|
||||
bStepping = true;
|
||||
@@ -400,8 +400,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ARTHAS_EVENT, FAIL);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARTHAS_EVENT, FAIL);
|
||||
}
|
||||
|
||||
void SpawnTimeRift(uint32 timeRiftID, uint64* guidVector)
|
||||
@@ -411,14 +411,14 @@ public:
|
||||
for (uint32 i = timeRiftID+1; i < ENCOUNTER_CHRONO_SPAWNS; ++i)
|
||||
{
|
||||
if ((uint32)RiftAndSpawnsLocations[i][0] == NPC_TIME_RIFT) break;
|
||||
if (Creature* pTemp = me->SummonCreature((uint32)RiftAndSpawnsLocations[i][0], RiftAndSpawnsLocations[timeRiftID][1], RiftAndSpawnsLocations[timeRiftID][2], RiftAndSpawnsLocations[timeRiftID][3], RiftAndSpawnsLocations[timeRiftID][4], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
|
||||
if (Creature* temp = me->SummonCreature((uint32)RiftAndSpawnsLocations[i][0], RiftAndSpawnsLocations[timeRiftID][1], RiftAndSpawnsLocations[timeRiftID][2], RiftAndSpawnsLocations[timeRiftID][3], RiftAndSpawnsLocations[timeRiftID][4], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
|
||||
{
|
||||
guidVector[i-timeRiftID-1] = pTemp->GetGUID();
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
|
||||
pTemp->SetReactState(REACT_PASSIVE);
|
||||
pTemp->GetMotionMaster()->MovePoint(0, RiftAndSpawnsLocations[i][1], RiftAndSpawnsLocations[i][2], RiftAndSpawnsLocations[i][3]);
|
||||
guidVector[i-timeRiftID-1] = temp->GetGUID();
|
||||
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
|
||||
temp->SetReactState(REACT_PASSIVE);
|
||||
temp->GetMotionMaster()->MovePoint(0, RiftAndSpawnsLocations[i][1], RiftAndSpawnsLocations[i][2], RiftAndSpawnsLocations[i][3]);
|
||||
if ((uint32)RiftAndSpawnsLocations[i][0] == NPC_EPOCH)
|
||||
uiEpochGUID = pTemp->GetGUID();
|
||||
uiEpochGUID = temp->GetGUID();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -428,9 +428,9 @@ public:
|
||||
for (uint32 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
|
||||
{
|
||||
if ((uint32)WavesLocations[waveID][i][0] == 0) break;
|
||||
if (Creature* pTemp = me->SummonCreature((uint32)WavesLocations[waveID][i][0], WavesLocations[waveID][i][1], WavesLocations[waveID][i][2], WavesLocations[waveID][i][3], WavesLocations[waveID][i][4], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
|
||||
if (Creature* temp = me->SummonCreature((uint32)WavesLocations[waveID][i][0], WavesLocations[waveID][i][1], WavesLocations[waveID][i][2], WavesLocations[waveID][i][3], WavesLocations[waveID][i][4], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000))
|
||||
{
|
||||
guidVector[i] = pTemp->GetGUID();
|
||||
guidVector[i] = temp->GetGUID();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -535,8 +535,8 @@ public:
|
||||
DoScriptText(SAY_PHASE403, me);
|
||||
break;
|
||||
case 36:
|
||||
if (pInstance)
|
||||
if (GameObject* pGate = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_SHKAF_GATE)))
|
||||
if (instance)
|
||||
if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_SHKAF_GATE)))
|
||||
pGate->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case 45:
|
||||
@@ -860,8 +860,8 @@ public:
|
||||
DoScriptText(SAY_PHASE209, me);
|
||||
|
||||
uiBossEvent = DATA_MEATHOOK_EVENT;
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS);
|
||||
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
SetDespawnAtFar(false);
|
||||
@@ -875,7 +875,7 @@ public:
|
||||
case 53:
|
||||
case 55:
|
||||
case 57:
|
||||
if (pInstance->GetData(uiBossEvent) != DONE)
|
||||
if (instance->GetData(uiBossEvent) != DONE)
|
||||
{
|
||||
SpawnWaveGroup(uiWave, uiWaveGUID);
|
||||
uiWave++;
|
||||
@@ -890,7 +890,7 @@ public:
|
||||
case 54:
|
||||
case 56:
|
||||
case 58:
|
||||
if (pInstance->GetData(uiBossEvent) != DONE)
|
||||
if (instance->GetData(uiBossEvent) != DONE)
|
||||
{
|
||||
uint32 mobCounter = 0;
|
||||
uint32 deadCounter = 0;
|
||||
@@ -899,8 +899,8 @@ public:
|
||||
if (uiWaveGUID[i] == 0)
|
||||
break;
|
||||
++mobCounter;
|
||||
Unit* pTemp = Unit::GetCreature(*me, uiWaveGUID[i]);
|
||||
if (!pTemp || pTemp->isDead())
|
||||
Unit* temp = Unit::GetCreature(*me, uiWaveGUID[i]);
|
||||
if (!temp || temp->isDead())
|
||||
++deadCounter;
|
||||
}
|
||||
|
||||
@@ -914,7 +914,7 @@ public:
|
||||
break;
|
||||
case 49: //Summon Boss
|
||||
case 59:
|
||||
if (pInstance->GetData(uiBossEvent) != DONE)
|
||||
if (instance->GetData(uiBossEvent) != DONE)
|
||||
{
|
||||
uint32 uiBossID = 0;
|
||||
if (uiBossEvent == DATA_MEATHOOK_EVENT)
|
||||
@@ -933,9 +933,9 @@ public:
|
||||
break;
|
||||
case 50: //Wait Boss death
|
||||
case 60:
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(uiBossEvent) == DONE)
|
||||
if (instance->GetData(uiBossEvent) == DONE)
|
||||
{
|
||||
JumpToNextStep(1000);
|
||||
if (uiBossEvent == DATA_MEATHOOK_EVENT)
|
||||
@@ -947,7 +947,7 @@ public:
|
||||
uiBossEvent = DATA_EPOCH_EVENT;
|
||||
}
|
||||
}
|
||||
else if (pInstance->GetData(uiBossEvent) == FAIL)
|
||||
else if (instance->GetData(uiBossEvent) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
uiPhaseTimer = 10000;
|
||||
@@ -1031,10 +1031,10 @@ public:
|
||||
case 77:
|
||||
//Make cratures attackable
|
||||
for (uint32 i = 0; i< ENCOUNTER_DRACONIAN_NUMBER; ++i)
|
||||
if (Creature* pTemp = Unit::GetCreature(*me, uiInfiniteDraconianGUID[i]))
|
||||
if (Creature* temp = Unit::GetCreature(*me, uiInfiniteDraconianGUID[i]))
|
||||
{
|
||||
pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
|
||||
pTemp->SetReactState(REACT_AGGRESSIVE);
|
||||
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
|
||||
temp->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
JumpToNextStep(5000);
|
||||
break;
|
||||
@@ -1068,8 +1068,8 @@ public:
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
case 80:
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
{
|
||||
SpawnTimeRift(17, &uiEpochGUID);
|
||||
if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID))
|
||||
@@ -1079,14 +1079,14 @@ public:
|
||||
JumpToNextStep(18000);
|
||||
break;
|
||||
case 81:
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
DoScriptText(SAY_PHASE315, me);
|
||||
JumpToNextStep(6000);
|
||||
break;
|
||||
case 82:
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
{
|
||||
if (Creature* pEpoch = Unit::GetCreature(*me, uiEpochGUID))
|
||||
{
|
||||
@@ -1100,9 +1100,9 @@ public:
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
case 83:
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_EPOCH_EVENT) == DONE)
|
||||
if (instance->GetData(DATA_EPOCH_EVENT) == DONE)
|
||||
{
|
||||
uiGossipStep = 3;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
@@ -1110,7 +1110,7 @@ public:
|
||||
uiBossEvent = DATA_MAL_GANIS_EVENT;
|
||||
JumpToNextStep(15000);
|
||||
}
|
||||
else if (pInstance->GetData(DATA_EPOCH_EVENT) == FAIL)
|
||||
else if (instance->GetData(DATA_EPOCH_EVENT) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
uiPhaseTimer = 10000;
|
||||
@@ -1130,8 +1130,8 @@ public:
|
||||
uiMalganisGUID = pMalganis->GetGUID();
|
||||
pMalganis->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
if (pInstance)
|
||||
if (GameObject* pGate = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MAL_GANIS_GATE_1)))
|
||||
if (instance)
|
||||
if (GameObject* pGate = instance->instance->GetGameObject(instance->GetData64(DATA_MAL_GANIS_GATE_1)))
|
||||
pGate->SetGoState(GO_STATE_ACTIVE);
|
||||
SetHoldState(false);
|
||||
bStepping = false;
|
||||
@@ -1152,14 +1152,14 @@ public:
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
case 88:
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_MAL_GANIS_EVENT) == DONE)
|
||||
if (instance->GetData(DATA_MAL_GANIS_EVENT) == DONE)
|
||||
{
|
||||
SetHoldState(false);
|
||||
JumpToNextStep(1000);
|
||||
}
|
||||
else if (pInstance->GetData(DATA_MAL_GANIS_EVENT) == FAIL)
|
||||
else if (instance->GetData(DATA_MAL_GANIS_EVENT) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
uiPhaseTimer = 10000;
|
||||
@@ -1173,10 +1173,10 @@ public:
|
||||
JumpToNextStep(7000);
|
||||
break;
|
||||
case 90:
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D
|
||||
me->SetTarget(pInstance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind
|
||||
instance->SetData(DATA_ARTHAS_EVENT, DONE); //Rewards: Achiev & Chest ;D
|
||||
me->SetTarget(instance->GetData64(DATA_MAL_GANIS_GATE_2)); //Look behind
|
||||
}
|
||||
DoScriptText(SAY_PHASE504, me);
|
||||
bStepping = false;
|
||||
|
||||
+3
-3
@@ -40,14 +40,14 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
public:
|
||||
instance_culling_of_stratholme() : InstanceMapScript("instance_culling_of_stratholme", 595) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_culling_of_stratholme_InstanceMapScript(pMap);
|
||||
return new instance_culling_of_stratholme_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_culling_of_stratholme_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_culling_of_stratholme_InstanceMapScript(Map* pMap) : InstanceScript(pMap)
|
||||
instance_culling_of_stratholme_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
_arthasGUID = 0;
|
||||
_meathookGUID = 0;
|
||||
|
||||
@@ -57,10 +57,10 @@ public:
|
||||
{
|
||||
boss_aeonusAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 SandBreath_Timer;
|
||||
uint32 TimeStop_Timer;
|
||||
@@ -97,10 +97,10 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(TYPE_RIFT, DONE);
|
||||
pInstance->SetData(TYPE_MEDIVH, DONE);//FIXME: later should be removed
|
||||
instance->SetData(TYPE_RIFT, DONE);
|
||||
instance->SetData(TYPE_MEDIVH, DONE);//FIXME: later should be removed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,10 +57,10 @@ public:
|
||||
{
|
||||
boss_chrono_lord_dejaAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 ArcaneBlast_Timer;
|
||||
uint32 TimeLapse_Timer;
|
||||
@@ -104,8 +104,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_RIFT, SPECIAL);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_RIFT, SPECIAL);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -56,10 +56,10 @@ public:
|
||||
{
|
||||
boss_temporusAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Haste_Timer;
|
||||
uint32 SpellReflection_Timer;
|
||||
@@ -88,8 +88,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_RIFT, SPECIAL);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_RIFT, SPECIAL);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
|
||||
@@ -70,10 +70,10 @@ public:
|
||||
{
|
||||
npc_medivh_bmAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 SpellCorrupt_Timer;
|
||||
uint32 Check_Timer;
|
||||
@@ -86,10 +86,10 @@ public:
|
||||
{
|
||||
SpellCorrupt_Timer = 0;
|
||||
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
if (instance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
DoCast(me, SPELL_CHANNEL, true);
|
||||
else if (me->HasAura(SPELL_CHANNEL))
|
||||
me->RemoveAura(SPELL_CHANNEL);
|
||||
@@ -99,22 +99,22 @@ public:
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS || pInstance->GetData(TYPE_MEDIVH) == DONE)
|
||||
if (instance->GetData(TYPE_MEDIVH) == IN_PROGRESS || instance->GetData(TYPE_MEDIVH) == DONE)
|
||||
return;
|
||||
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
pInstance->SetData(TYPE_MEDIVH, IN_PROGRESS);
|
||||
instance->SetData(TYPE_MEDIVH, IN_PROGRESS);
|
||||
DoCast(me, SPELL_CHANNEL, false);
|
||||
Check_Timer = 5000;
|
||||
}
|
||||
else if (who->GetTypeId() == TYPEID_UNIT && me->IsWithinDistInMap(who, 15.0f))
|
||||
{
|
||||
if (pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
if (instance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
return;
|
||||
|
||||
uint32 entry = who->GetEntry();
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
|
||||
void AttackStart(Unit* /*who*/)
|
||||
{
|
||||
//if (pInstance && pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
//if (instance && instance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
//return;
|
||||
|
||||
//ScriptedAI::AttackStart(who);
|
||||
@@ -163,14 +163,14 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (SpellCorrupt_Timer)
|
||||
{
|
||||
if (SpellCorrupt_Timer <= diff)
|
||||
{
|
||||
pInstance->SetData(TYPE_MEDIVH, SPECIAL);
|
||||
instance->SetData(TYPE_MEDIVH, SPECIAL);
|
||||
|
||||
if (me->HasAura(SPELL_CORRUPT_AEONUS))
|
||||
SpellCorrupt_Timer = 1000;
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
{
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
uint32 pct = pInstance->GetData(DATA_SHIELD);
|
||||
uint32 pct = instance->GetData(DATA_SHIELD);
|
||||
|
||||
Check_Timer = 5000;
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
}
|
||||
|
||||
//if we reach this it means event was running but at some point reset.
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == NOT_STARTED)
|
||||
if (instance->GetData(TYPE_MEDIVH) == NOT_STARTED)
|
||||
{
|
||||
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
me->RemoveCorpse();
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (pInstance->GetData(TYPE_RIFT) == DONE)
|
||||
if (instance->GetData(TYPE_RIFT) == DONE)
|
||||
{
|
||||
DoScriptText(SAY_WIN, me);
|
||||
Check_Timer = 0;
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
me->RemoveAura(SPELL_CHANNEL);
|
||||
|
||||
//TODO: start the post-event here
|
||||
pInstance->SetData(TYPE_MEDIVH, DONE);
|
||||
instance->SetData(TYPE_MEDIVH, DONE);
|
||||
}
|
||||
} else Check_Timer -= diff;
|
||||
}
|
||||
@@ -263,10 +263,10 @@ public:
|
||||
{
|
||||
npc_time_riftAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 TimeRiftWave_Timer;
|
||||
uint8 mRiftWaveCount;
|
||||
@@ -279,10 +279,10 @@ public:
|
||||
TimeRiftWave_Timer = 15000;
|
||||
mRiftWaveCount = 0;
|
||||
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
mPortalCount = pInstance->GetData(DATA_PORTAL_COUNT);
|
||||
mPortalCount = instance->GetData(DATA_PORTAL_COUNT);
|
||||
|
||||
if (mPortalCount < 6)
|
||||
mWaveId = 0;
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
if (!creature_entry)
|
||||
return;
|
||||
|
||||
if (pInstance && pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
if (instance && instance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAllAuras();
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
pos.m_positionZ = std::max(me->GetMap()->GetHeight(pos.m_positionX, pos.m_positionY, MAX_HEIGHT), me->GetMap()->GetWaterLevel(pos.m_positionX, pos.m_positionY));
|
||||
|
||||
if (Unit* Summon = DoSummon(creature_entry, pos, 30000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT))
|
||||
if (Unit* temp = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_MEDIVH) : 0))
|
||||
if (Unit* temp = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_MEDIVH) : 0))
|
||||
Summon->AddThreat(temp, 0.0f);
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (TimeRiftWave_Timer <= diff)
|
||||
@@ -352,8 +352,8 @@ public:
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_time_rift: not casting anylonger, i need to die.");
|
||||
me->setDeathState(JUST_DIED);
|
||||
|
||||
if (pInstance->GetData(TYPE_RIFT) == IN_PROGRESS)
|
||||
pInstance->SetData(TYPE_RIFT, SPECIAL);
|
||||
if (instance->GetData(TYPE_RIFT) == IN_PROGRESS)
|
||||
instance->SetData(TYPE_RIFT, SPECIAL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -66,14 +66,14 @@ class instance_dark_portal : public InstanceMapScript
|
||||
public:
|
||||
instance_dark_portal() : InstanceMapScript("instance_dark_portal", 269) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_dark_portal_InstanceMapScript(pMap);
|
||||
return new instance_dark_portal_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_dark_portal_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_dark_portal_InstanceMapScript(Map* pMap) : InstanceScript(pMap)
|
||||
instance_dark_portal_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -294,22 +294,22 @@ public:
|
||||
|
||||
CurrentRiftId = tmp;
|
||||
|
||||
Creature* pTemp = pMedivh->SummonCreature(C_TIME_RIFT,
|
||||
Creature* temp = pMedivh->SummonCreature(C_TIME_RIFT,
|
||||
PortalLocation[tmp][0], PortalLocation[tmp][1], PortalLocation[tmp][2], PortalLocation[tmp][3],
|
||||
TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (pTemp)
|
||||
if (temp)
|
||||
{
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
if (Creature* pBoss = SummonedPortalBoss(pTemp))
|
||||
if (Creature* pBoss = SummonedPortalBoss(temp))
|
||||
{
|
||||
if (pBoss->GetEntry() == C_AEONUS)
|
||||
pBoss->AddThreat(pMedivh, 0.0f);
|
||||
else
|
||||
{
|
||||
pBoss->AddThreat(pTemp, 0.0f);
|
||||
pTemp->CastSpell(pBoss, SPELL_RIFT_CHANNEL, false);
|
||||
pBoss->AddThreat(temp, 0.0f);
|
||||
temp->CastSpell(pBoss, SPELL_RIFT_CHANNEL, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -54,10 +54,10 @@ public:
|
||||
{
|
||||
boss_captain_skarlocAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Holy_Light_Timer;
|
||||
uint32 Cleanse_Timer;
|
||||
@@ -92,8 +92,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance && pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
|
||||
pInstance->SetData(TYPE_THRALL_PART1, DONE);
|
||||
if (instance && instance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
|
||||
instance->SetData(TYPE_THRALL_PART1, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
+4
-4
@@ -56,10 +56,10 @@ public:
|
||||
{
|
||||
boss_epoch_hunterAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 SandBreath_Timer;
|
||||
uint32 ImpendingDeath_Timer;
|
||||
@@ -88,8 +88,8 @@ public:
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
if (pInstance && pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
|
||||
pInstance->SetData(TYPE_THRALL_PART4, DONE);
|
||||
if (instance && instance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
|
||||
instance->SetData(TYPE_THRALL_PART4, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
+3
-3
@@ -38,12 +38,12 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
{
|
||||
if (InstanceScript* pInstance = pGO->GetInstanceScript())
|
||||
if (InstanceScript* instance = pGO->GetInstanceScript())
|
||||
{
|
||||
if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE)
|
||||
if (instance->GetData(TYPE_BARREL_DIVERSION) == DONE)
|
||||
return false;
|
||||
|
||||
pInstance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS);
|
||||
instance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
+3
-3
@@ -42,14 +42,14 @@ class instance_old_hillsbrad : public InstanceMapScript
|
||||
public:
|
||||
instance_old_hillsbrad() : InstanceMapScript("instance_old_hillsbrad", 560) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_old_hillsbrad_InstanceMapScript(pMap);
|
||||
return new instance_old_hillsbrad_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_old_hillsbrad_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_old_hillsbrad_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_old_hillsbrad_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
uint32 mBarrelCount;
|
||||
|
||||
+36
-36
@@ -76,8 +76,8 @@ public:
|
||||
if (creature->isQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if (pInstance && pInstance->GetData(TYPE_BARREL_DIVERSION) != DONE && !player->HasItemCount(ITEM_ENTRY_BOMBS, 1))
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetData(TYPE_BARREL_DIVERSION) != DONE && !player->HasItemCount(ITEM_ENTRY_BOMBS, 1))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_EROZION1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
if (player->GetQuestStatus(QUEST_ENTRY_RETURN) == QUEST_STATUS_COMPLETE)
|
||||
@@ -201,15 +201,15 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(TYPE_THRALL_EVENT, IN_PROGRESS);
|
||||
pInstance->SetData(TYPE_THRALL_PART1, IN_PROGRESS);
|
||||
instance->SetData(TYPE_THRALL_EVENT, IN_PROGRESS);
|
||||
instance->SetData(TYPE_THRALL_PART1, IN_PROGRESS);
|
||||
}
|
||||
|
||||
DoScriptText(SAY_TH_START_EVENT_PART1, creature);
|
||||
@@ -230,8 +230,8 @@ public:
|
||||
case GOSSIP_ACTION_INFO_DEF+20:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_ID_SKARLOC3, creature->GetGUID());
|
||||
creature->SummonCreature(SKARLOC_MOUNT, 2038.81f, 270.26f, 63.20f, 5.41f, TEMPSUMMON_TIMED_DESPAWN, 12000);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_THRALL_PART2, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_THRALL_PART2, IN_PROGRESS);
|
||||
|
||||
DoScriptText(SAY_TH_START_EVENT_PART2, creature);
|
||||
|
||||
@@ -240,8 +240,8 @@ public:
|
||||
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_THRALL_PART3, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_THRALL_PART3, IN_PROGRESS);
|
||||
CAST_AI(npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, creature->AI())->StartWP();
|
||||
break;
|
||||
}
|
||||
@@ -256,22 +256,22 @@ public:
|
||||
player->SendPreparedQuest(creature->GetGUID());
|
||||
}
|
||||
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if (pInstance)
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE && !pInstance->GetData(TYPE_THRALL_EVENT))
|
||||
if (instance->GetData(TYPE_BARREL_DIVERSION) == DONE && !instance->GetData(TYPE_THRALL_EVENT))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WALKING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_ID_START, creature->GetGUID());
|
||||
}
|
||||
|
||||
if (pInstance->GetData(TYPE_THRALL_PART1) == DONE && !pInstance->GetData(TYPE_THRALL_PART2))
|
||||
if (instance->GetData(TYPE_THRALL_PART1) == DONE && !instance->GetData(TYPE_THRALL_PART2))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_ID_SKARLOC1, creature->GetGUID());
|
||||
}
|
||||
|
||||
if (pInstance->GetData(TYPE_THRALL_PART2) == DONE && !pInstance->GetData(TYPE_THRALL_PART3))
|
||||
if (instance->GetData(TYPE_THRALL_PART2) == DONE && !instance->GetData(TYPE_THRALL_PART3))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TARREN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_ID_TARREN, creature->GetGUID());
|
||||
@@ -284,12 +284,12 @@ public:
|
||||
{
|
||||
npc_thrall_old_hillsbradAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
HadMount = false;
|
||||
me->setActive(true);
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 TarethaGUID;
|
||||
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
@@ -372,7 +372,7 @@ public:
|
||||
//make horsie run off
|
||||
SetEscortPaused(true);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pInstance->SetData(TYPE_THRALL_PART2, DONE);
|
||||
instance->SetData(TYPE_THRALL_PART2, DONE);
|
||||
SetRun();
|
||||
break;
|
||||
case 64:
|
||||
@@ -411,7 +411,7 @@ public:
|
||||
me->SummonCreature(MOB_ENTRY_INN_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 94:
|
||||
if (uint64 TarethaGUID = pInstance->GetData64(DATA_TARETHA))
|
||||
if (uint64 TarethaGUID = instance->GetData64(DATA_TARETHA))
|
||||
{
|
||||
if (Unit* Taretha = Unit::GetUnit((*me), TarethaGUID))
|
||||
DoScriptText(SAY_TA_ESCAPED, Taretha, me);
|
||||
@@ -419,7 +419,7 @@ public:
|
||||
break;
|
||||
case 95:
|
||||
DoScriptText(SAY_TH_MEET_TARETHA, me);
|
||||
pInstance->SetData(TYPE_THRALL_PART3, DONE);
|
||||
instance->SetData(TYPE_THRALL_PART3, DONE);
|
||||
SetEscortPaused(true);
|
||||
break;
|
||||
case 96:
|
||||
@@ -437,16 +437,16 @@ public:
|
||||
case 106:
|
||||
{
|
||||
//trigger taretha to run down outside
|
||||
if (Creature* Taretha = pInstance->instance->GetCreature(pInstance->GetData64(DATA_TARETHA)))
|
||||
if (Creature* Taretha = instance->instance->GetCreature(instance->GetData64(DATA_TARETHA)))
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
CAST_AI(npc_escortAI, (Taretha->AI()))->Start(false, true, player->GetGUID());
|
||||
}
|
||||
|
||||
//kill credit Creature for quest
|
||||
Map* pMap = me->GetMap();
|
||||
Map::PlayerList const& players = pMap->GetPlayers();
|
||||
if (!players.isEmpty() && pMap->IsDungeon())
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const& players = map->GetPlayers();
|
||||
if (!players.isEmpty() && map->IsDungeon())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
@@ -534,8 +534,8 @@ public:
|
||||
}
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_THRALL_EVENT, FAIL);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_THRALL_EVENT, FAIL);
|
||||
|
||||
// Don't do a yell if he kills self (if player goes too far or at the end).
|
||||
if (slayer == me)
|
||||
@@ -584,7 +584,7 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
@@ -594,13 +594,13 @@ public:
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
|
||||
if (pInstance && pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
|
||||
if (instance && instance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
pInstance->SetData(TYPE_THRALL_PART4, IN_PROGRESS);
|
||||
if (pInstance->GetData64(DATA_EPOCH) == 0)
|
||||
instance->SetData(TYPE_THRALL_PART4, IN_PROGRESS);
|
||||
if (instance->GetData64(DATA_EPOCH) == 0)
|
||||
creature->SummonCreature(ENTRY_EPOCH, 2639.13f, 698.55f, 65.43f, 4.59f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||
|
||||
if (uint64 ThrallGUID = pInstance->GetData64(DATA_THRALL))
|
||||
if (uint64 ThrallGUID = instance->GetData64(DATA_THRALL))
|
||||
{
|
||||
Creature* Thrall = (Unit::GetCreature((*creature), ThrallGUID));
|
||||
if (Thrall)
|
||||
@@ -613,8 +613,8 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if (pInstance && pInstance->GetData(TYPE_THRALL_PART3) == DONE && pInstance->GetData(TYPE_THRALL_PART4) == NOT_STARTED)
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetData(TYPE_THRALL_PART3) == DONE && instance->GetData(TYPE_THRALL_PART4) == NOT_STARTED)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_ID_EPOCH1, creature->GetGUID());
|
||||
@@ -626,10 +626,10 @@ public:
|
||||
{
|
||||
npc_tarethaAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
|
||||
@@ -114,11 +114,11 @@ public:
|
||||
{
|
||||
boss_onyxiaAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
m_pInstance = creature->GetInstanceScript();
|
||||
m_instance = creature->GetInstanceScript();
|
||||
Reset();
|
||||
}
|
||||
|
||||
InstanceScript* m_pInstance;
|
||||
InstanceScript* m_instance;
|
||||
SummonList Summons;
|
||||
|
||||
uint32 m_uiPhase;
|
||||
@@ -169,11 +169,11 @@ public:
|
||||
m_uiSummonWhelpCount = 0;
|
||||
m_bIsMoving = false;
|
||||
|
||||
if (m_pInstance)
|
||||
if (m_instance)
|
||||
{
|
||||
m_pInstance->SetData(DATA_ONYXIA, NOT_STARTED);
|
||||
m_pInstance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
m_pInstance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
m_instance->SetData(DATA_ONYXIA, NOT_STARTED);
|
||||
m_instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
m_instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,17 +182,17 @@ public:
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->SetInCombatWithZone();
|
||||
|
||||
if (m_pInstance)
|
||||
if (m_instance)
|
||||
{
|
||||
m_pInstance->SetData(DATA_ONYXIA, IN_PROGRESS);
|
||||
m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
m_instance->SetData(DATA_ONYXIA, IN_PROGRESS);
|
||||
m_instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_ONYXIA, DONE);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ONYXIA, DONE);
|
||||
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
@@ -265,8 +265,8 @@ public:
|
||||
me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(), Phase2Location.GetPositionY(), Phase2Location.GetPositionZ()+25);
|
||||
me->SetSpeed(MOVE_FLIGHT, 1.0f);
|
||||
DoScriptText(SAY_PHASE_2_TRANS, me);
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
m_uiWhelpTimer = 5000;
|
||||
m_uiLairGuardTimer = 15000;
|
||||
break;
|
||||
@@ -301,9 +301,9 @@ public:
|
||||
(pSpell->Id >= 22267 && pSpell->Id <= 22268)) &&
|
||||
(target->GetTypeId() == TYPEID_PLAYER))
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_instance)
|
||||
{
|
||||
m_pInstance->SetData(DATA_SHE_DEEP_BREATH_MORE, FAIL);
|
||||
m_instance->SetData(DATA_SHE_DEEP_BREATH_MORE, FAIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,8 +362,8 @@ public:
|
||||
Trinity::GameObjectInRangeCheck check(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 15);
|
||||
Trinity::GameObjectLastSearcher<Trinity::GameObjectInRangeCheck> searcher(me, pFloor, check);
|
||||
me->VisitNearbyGridObject(30, searcher);
|
||||
if (m_pInstance && pFloor)
|
||||
m_pInstance->SetData64(DATA_FLOOR_ERUPTION_GUID, pFloor->GetGUID());
|
||||
if (m_instance && pFloor)
|
||||
m_instance->SetData64(DATA_FLOOR_ERUPTION_GUID, pFloor->GetGUID());
|
||||
m_uiBellowingRoarTimer = 30000;
|
||||
}
|
||||
else
|
||||
@@ -409,8 +409,8 @@ public:
|
||||
if (HealthBelowPct(40))
|
||||
{
|
||||
m_uiPhase = PHASE_END;
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
if (m_instance)
|
||||
m_instance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
|
||||
DoScriptText(SAY_PHASE_3_TRANS, me);
|
||||
|
||||
SetCombatMovement(true);
|
||||
|
||||
@@ -30,14 +30,14 @@ class instance_onyxias_lair : public InstanceMapScript
|
||||
public:
|
||||
instance_onyxias_lair() : InstanceMapScript("instance_onyxias_lair", 249) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_onyxias_lair_InstanceMapScript(pMap);
|
||||
return new instance_onyxias_lair_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_onyxias_lair_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_onyxias_lair_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_onyxias_lair_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
//Eruption is a BFS graph problem
|
||||
//One map to remember all floor, one map to keep floor that still need to erupt and one queue to know what needs to be removed
|
||||
@@ -90,9 +90,9 @@ public:
|
||||
case GO_WHELP_SPAWNER:
|
||||
Position goPos;
|
||||
go->GetPosition(&goPos);
|
||||
if (Creature* pTemp = go->SummonCreature(NPC_WHELP, goPos, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
if (Creature* temp = go->SummonCreature(NPC_WHELP, goPos, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
pTemp->SetInCombatWithZone();
|
||||
temp->SetInCombatWithZone();
|
||||
++m_uiManyWhelpsCounter;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -25,14 +25,14 @@ class instance_razorfen_downs : public InstanceMapScript
|
||||
public:
|
||||
instance_razorfen_downs() : InstanceMapScript("instance_razorfen_downs", 129) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_razorfen_downs_InstanceMapScript(pMap);
|
||||
return new instance_razorfen_downs_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_razorfen_downs_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_razorfen_downs_InstanceMapScript(Map* pMap) : InstanceScript(pMap)
|
||||
instance_razorfen_downs_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -96,11 +96,11 @@ public:
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
{
|
||||
//basic support, not blizzlike data is missing...
|
||||
InstanceScript* pInstance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(DATA_GONG_WAVES, pInstance->GetData(DATA_GONG_WAVES)+1);
|
||||
instance->SetData(DATA_GONG_WAVES, instance->GetData(DATA_GONG_WAVES)+1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -128,10 +128,10 @@ public:
|
||||
{
|
||||
npc_tomb_creatureAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pInstance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiWebTimer;
|
||||
|
||||
@@ -160,8 +160,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GONG_WAVES, pInstance->GetData(DATA_GONG_WAVES)+1);
|
||||
if (instance)
|
||||
instance->SetData(DATA_GONG_WAVES, instance->GetData(DATA_GONG_WAVES)+1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -33,14 +33,14 @@ class instance_razorfen_kraul : public InstanceMapScript
|
||||
public:
|
||||
instance_razorfen_kraul() : InstanceMapScript("instance_razorfen_kraul", 47) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_razorfen_kraul_InstanceMapScript(pMap);
|
||||
return new instance_razorfen_kraul_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_razorfen_kraul_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_razorfen_kraul_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_razorfen_kraul_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint64 DoorWardGUID;
|
||||
int WardKeeperDeath;
|
||||
@@ -78,10 +78,10 @@ public:
|
||||
void Update(uint32 /*diff*/)
|
||||
{
|
||||
if (WardKeeperDeath == WARD_KEEPERS_NR)
|
||||
if (GameObject* pGo = instance->GetGameObject(DoorWardGUID))
|
||||
if (GameObject* go = instance->GetGameObject(DoorWardGUID))
|
||||
{
|
||||
pGo->SetUInt32Value(GAMEOBJECT_FLAGS, 33);
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 33);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,10 +51,10 @@ public:
|
||||
{
|
||||
boss_kriAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Cleave_Timer;
|
||||
uint32 ToxicVolley_Timer;
|
||||
@@ -79,13 +79,13 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
|
||||
pInstance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
}
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
//Checking if Vem is dead. If yes we will enrage.
|
||||
if (Check_Timer <= diff)
|
||||
{
|
||||
if (pInstance && pInstance->GetData(DATA_VEMISDEAD))
|
||||
if (instance && instance->GetData(DATA_VEMISDEAD))
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
VemDead = true;
|
||||
@@ -148,10 +148,10 @@ public:
|
||||
{
|
||||
boss_vemAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Charge_Timer;
|
||||
uint32 KnockBack_Timer;
|
||||
@@ -170,13 +170,13 @@ public:
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(DATA_VEM_DEATH, 0);
|
||||
if (pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
instance->SetData(DATA_VEM_DEATH, 0);
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
pInstance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,10 +241,10 @@ public:
|
||||
{
|
||||
boss_yaujAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Heal_Timer;
|
||||
uint32 Fear_Timer;
|
||||
@@ -263,12 +263,12 @@ public:
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
if (instance->GetData(DATA_BUG_TRIO_DEATH) < 2)
|
||||
// Unlootable if death
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
pInstance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
instance->SetData(DATA_BUG_TRIO_DEATH, 1);
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
@@ -301,10 +301,10 @@ public:
|
||||
//Casting Heal to other twins or herself.
|
||||
if (Heal_Timer <= diff)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
Unit* pKri = Unit::GetUnit((*me), pInstance->GetData64(DATA_KRI));
|
||||
Unit* pVem = Unit::GetUnit((*me), pInstance->GetData64(DATA_VEM));
|
||||
Unit* pKri = Unit::GetUnit((*me), instance->GetData64(DATA_KRI));
|
||||
Unit* pVem = Unit::GetUnit((*me), instance->GetData64(DATA_VEM));
|
||||
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
@@ -330,9 +330,9 @@ public:
|
||||
{
|
||||
if (!VemDead)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(DATA_VEMISDEAD))
|
||||
if (instance->GetData(DATA_VEMISDEAD))
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
VemDead = true;
|
||||
|
||||
@@ -178,12 +178,12 @@ public:
|
||||
{
|
||||
eye_of_cthunAI(Creature* c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
pInst = c->GetInstanceScript();
|
||||
if (!pInst)
|
||||
instance = c->GetInstanceScript();
|
||||
if (!instance)
|
||||
sLog->outError("TSCR: No Instance eye_of_cthunAI");
|
||||
}
|
||||
|
||||
InstanceScript* pInst;
|
||||
InstanceScript* instance;
|
||||
|
||||
//Global variables
|
||||
uint32 PhaseTimer;
|
||||
@@ -222,8 +222,8 @@ public:
|
||||
me->SetVisible(true);
|
||||
|
||||
//Reset Phase
|
||||
if (pInst)
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
|
||||
//to avoid having a following void zone
|
||||
Creature* pPortal= me->FindNearestCreature(MOB_CTHUN_PORTAL, 10);
|
||||
@@ -234,8 +234,8 @@ public:
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoZoneInCombat();
|
||||
if (pInst)
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_EYE_GREEN_BEAM);
|
||||
if (instance)
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_EYE_GREEN_BEAM);
|
||||
}
|
||||
|
||||
void SpawnEyeTentacle(float x, float y)
|
||||
@@ -253,10 +253,10 @@ public:
|
||||
return;
|
||||
|
||||
//No instance
|
||||
if (!pInst)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
uint32 currentPhase = pInst->GetData(DATA_CTHUN_PHASE);
|
||||
uint32 currentPhase = instance->GetData(DATA_CTHUN_PHASE);
|
||||
if (currentPhase == PHASE_EYE_GREEN_BEAM || currentPhase == PHASE_EYE_RED_BEAM)
|
||||
{
|
||||
// EyeTentacleTimer
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
if (PhaseTimer <= diff)
|
||||
{
|
||||
//Switch to Dark Beam
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_EYE_RED_BEAM);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_EYE_RED_BEAM);
|
||||
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
@@ -379,7 +379,7 @@ public:
|
||||
if (PhaseTimer <= diff)
|
||||
{
|
||||
//Switch to Eye Beam
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_EYE_GREEN_BEAM);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_EYE_GREEN_BEAM);
|
||||
|
||||
BeamTimer = 3000;
|
||||
ClawTentacleTimer = 12500; //4 per Eye beam phase (unsure if they spawn during Dark beam)
|
||||
@@ -421,10 +421,10 @@ public:
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
|
||||
{
|
||||
//No instance
|
||||
if (!pInst)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (pInst->GetData(DATA_CTHUN_PHASE))
|
||||
switch (instance->GetData(DATA_CTHUN_PHASE))
|
||||
{
|
||||
case PHASE_EYE_GREEN_BEAM:
|
||||
case PHASE_EYE_RED_BEAM:
|
||||
@@ -445,7 +445,7 @@ public:
|
||||
me->SetTarget(0);
|
||||
|
||||
//Death animation/respawning;
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_TRANSITION);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_TRANSITION);
|
||||
|
||||
me->SetHealth(0);
|
||||
damage = 0;
|
||||
@@ -484,12 +484,12 @@ public:
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
pInst = c->GetInstanceScript();
|
||||
if (!pInst)
|
||||
instance = c->GetInstanceScript();
|
||||
if (!instance)
|
||||
sLog->outError("TSCR: No Instance eye_of_cthunAI");
|
||||
}
|
||||
|
||||
InstanceScript* pInst;
|
||||
InstanceScript* instance;
|
||||
|
||||
//Out of combat whisper timer
|
||||
uint32 WisperTimer;
|
||||
@@ -544,8 +544,8 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetVisible(false);
|
||||
|
||||
if (pInst)
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
@@ -606,11 +606,11 @@ public:
|
||||
//WisperTimer
|
||||
if (WisperTimer <= diff)
|
||||
{
|
||||
Map* pMap = me->GetMap();
|
||||
if (!pMap->IsDungeon()) return;
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon()) return;
|
||||
|
||||
//Play random sound to the zone
|
||||
Map::PlayerList const &PlayerList = pMap->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
@@ -631,10 +631,10 @@ public:
|
||||
me->SetTarget(0);
|
||||
|
||||
//No instance
|
||||
if (!pInst)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
uint32 currentPhase = pInst->GetData(DATA_CTHUN_PHASE);
|
||||
uint32 currentPhase = instance->GetData(DATA_CTHUN_PHASE);
|
||||
if (currentPhase == PHASE_CTHUN_STOMACH || currentPhase == PHASE_CTHUN_WEAK)
|
||||
{
|
||||
// EyeTentacleTimer
|
||||
@@ -663,7 +663,7 @@ public:
|
||||
if (PhaseTimer <= diff)
|
||||
{
|
||||
//Switch
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_STOMACH);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_STOMACH);
|
||||
|
||||
//Switch to c'thun model
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
@@ -711,7 +711,7 @@ public:
|
||||
//Weaken
|
||||
if (FleshTentaclesKilled > 1)
|
||||
{
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_WEAK);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_WEAK);
|
||||
|
||||
DoScriptText(EMOTE_WEAKENED, me);
|
||||
PhaseTimer = 45000;
|
||||
@@ -855,7 +855,7 @@ public:
|
||||
if (PhaseTimer <= diff)
|
||||
{
|
||||
//Switch
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_STOMACH);
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_STOMACH);
|
||||
|
||||
//Remove purple coloration
|
||||
me->RemoveAurasDueToSpell(SPELL_PURPLE_COLORATION);
|
||||
@@ -880,17 +880,17 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
if (pInst)
|
||||
pInst->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_CTHUN_DONE);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
|
||||
{
|
||||
//No instance
|
||||
if (!pInst)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (pInst->GetData(DATA_CTHUN_PHASE))
|
||||
switch (instance->GetData(DATA_CTHUN_PHASE))
|
||||
{
|
||||
case PHASE_CTHUN_STOMACH:
|
||||
//Not weakened so reduce damage by 99%
|
||||
|
||||
@@ -63,10 +63,10 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
{
|
||||
boss_twinemperorsAI(Creature* c): ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Heal_Timer;
|
||||
uint32 Teleport_Timer;
|
||||
@@ -97,8 +97,8 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
|
||||
Creature* GetOtherBoss()
|
||||
{
|
||||
if (pInstance)
|
||||
return Unit::GetCreature(*me, pInstance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
|
||||
if (instance)
|
||||
return Unit::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -204,7 +204,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
|
||||
void TeleportToMyBrother()
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
Teleport_Timer = TELEPORTTIME;
|
||||
|
||||
@@ -31,14 +31,14 @@ class instance_temple_of_ahnqiraj : public InstanceMapScript
|
||||
public:
|
||||
instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_temple_of_ahnqiraj_InstanceMapScript(pMap);
|
||||
return new instance_temple_of_ahnqiraj_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_temple_of_ahnqiraj_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
//If Vem is dead...
|
||||
bool IsBossDied[3];
|
||||
|
||||
@@ -33,14 +33,14 @@ class instance_wailing_caverns : public InstanceMapScript
|
||||
public:
|
||||
instance_wailing_caverns() : InstanceMapScript("instance_wailing_caverns", 43) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_wailing_caverns_InstanceMapScript(pMap);
|
||||
return new instance_wailing_caverns_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_wailing_caverns_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_wailing_caverns_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_wailing_caverns_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
|
||||
@@ -88,12 +88,12 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_NARALEX_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_NARALEX_EVENT, IN_PROGRESS);
|
||||
|
||||
DoScriptText(SAY_MAKE_PREPARATIONS, creature);
|
||||
|
||||
@@ -109,21 +109,21 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
creature->CastSpell(player, SPELL_MARK_OF_THE_WILD_RANK_2, true);
|
||||
if ((pInstance->GetData(TYPE_LORD_COBRAHN) == DONE) && (pInstance->GetData(TYPE_LORD_PYTHAS) == DONE) &&
|
||||
(pInstance->GetData(TYPE_LADY_ANACONDRA) == DONE) && (pInstance->GetData(TYPE_LORD_SERPENTIS) == DONE))
|
||||
if ((instance->GetData(TYPE_LORD_COBRAHN) == DONE) && (instance->GetData(TYPE_LORD_PYTHAS) == DONE) &&
|
||||
(instance->GetData(TYPE_LADY_ANACONDRA) == DONE) && (instance->GetData(TYPE_LORD_SERPENTIS) == DONE))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NARALEX, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_ID_START_2, creature->GetGUID());
|
||||
|
||||
if (!pInstance->GetData(TYPE_NARALEX_YELLED))
|
||||
if (!instance->GetData(TYPE_NARALEX_YELLED))
|
||||
{
|
||||
DoScriptText(SAY_AT_LAST, creature);
|
||||
pInstance->SetData(TYPE_NARALEX_YELLED, 1);
|
||||
instance->SetData(TYPE_NARALEX_YELLED, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
{
|
||||
npc_disciple_of_naralexAI(Creature* c) : npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
instance = c->GetInstanceScript();
|
||||
eventTimer = 0;
|
||||
currentEvent = 0;
|
||||
eventProgress = 0;
|
||||
@@ -149,11 +149,11 @@ public:
|
||||
uint32 eventTimer;
|
||||
uint32 currentEvent;
|
||||
uint32 eventProgress;
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
@@ -161,16 +161,16 @@ public:
|
||||
case 4:
|
||||
eventProgress = 1;
|
||||
currentEvent = TYPE_NARALEX_PART1;
|
||||
pInstance->SetData(TYPE_NARALEX_PART1, IN_PROGRESS);
|
||||
instance->SetData(TYPE_NARALEX_PART1, IN_PROGRESS);
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(SAY_MUST_CONTINUE, me);
|
||||
pInstance->SetData(TYPE_NARALEX_PART1, DONE);
|
||||
instance->SetData(TYPE_NARALEX_PART1, DONE);
|
||||
break;
|
||||
case 11:
|
||||
eventProgress = 1;
|
||||
currentEvent = TYPE_NARALEX_PART2;
|
||||
pInstance->SetData(TYPE_NARALEX_PART2, IN_PROGRESS);
|
||||
instance->SetData(TYPE_NARALEX_PART2, IN_PROGRESS);
|
||||
break;
|
||||
case 19:
|
||||
DoScriptText(SAY_BEYOND_THIS_CORRIDOR, me);
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
case 24:
|
||||
eventProgress = 1;
|
||||
currentEvent = TYPE_NARALEX_PART3;
|
||||
pInstance->SetData(TYPE_NARALEX_PART3, IN_PROGRESS);
|
||||
instance->SetData(TYPE_NARALEX_PART3, IN_PROGRESS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -195,12 +195,12 @@ public:
|
||||
|
||||
void JustDied(Unit* /*slayer*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
pInstance->SetData(TYPE_NARALEX_EVENT, FAIL);
|
||||
pInstance->SetData(TYPE_NARALEX_PART1, FAIL);
|
||||
pInstance->SetData(TYPE_NARALEX_PART2, FAIL);
|
||||
pInstance->SetData(TYPE_NARALEX_PART3, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_EVENT, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART1, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART2, FAIL);
|
||||
instance->SetData(TYPE_NARALEX_PART3, FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,12 +214,12 @@ public:
|
||||
if (currentEvent != TYPE_NARALEX_PART3)
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!pInstance)
|
||||
if (!instance)
|
||||
return;
|
||||
if (eventTimer <= diff)
|
||||
{
|
||||
eventTimer = 0;
|
||||
if (pInstance->GetData(currentEvent) == IN_PROGRESS)
|
||||
if (instance->GetData(currentEvent) == IN_PROGRESS)
|
||||
{
|
||||
switch (currentEvent)
|
||||
{
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
{
|
||||
//CAST_AI(npc_escort::npc_escortAI, me->AI())->SetCanDefend(true);
|
||||
DoScriptText(SAY_CAVERNS_PURIFIED, me);
|
||||
pInstance->SetData(TYPE_NARALEX_PART2, DONE);
|
||||
instance->SetData(TYPE_NARALEX_PART2, DONE);
|
||||
if (me->HasAura(SPELL_SERPENTINE_CLEANSING))
|
||||
me->RemoveAura(SPELL_SERPENTINE_CLEANSING);
|
||||
}
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
++eventProgress;
|
||||
eventTimer = 15000;
|
||||
//CAST_AI(npc_escort::npc_escortAI, me->AI())->SetCanDefend(false);
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
DoCast(naralex, SPELL_NARALEXS_AWAKENING, true);
|
||||
DoScriptText(EMOTE_AWAKENING_RITUAL, me);
|
||||
}
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
{
|
||||
++eventProgress;
|
||||
eventTimer = 15000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
DoScriptText(EMOTE_TROUBLED_SLEEP, naralex);
|
||||
me->SummonCreature(NPC_DEVIATE_MOCCASIN, 135.943f, 199.701f, -103.529f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
|
||||
me->SummonCreature(NPC_DEVIATE_MOCCASIN, 151.08f, 221.13f, -103.609f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
{
|
||||
++eventProgress;
|
||||
eventTimer = 30000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
DoScriptText(EMOTE_WRITHE_IN_AGONY, naralex);
|
||||
me->SummonCreature(NPC_NIGHTMARE_ECTOPLASM, 133.413f, 207.188f, -102.469f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
|
||||
me->SummonCreature(NPC_NIGHTMARE_ECTOPLASM, 142.857f, 218.645f, -102.905f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000);
|
||||
@@ -302,26 +302,26 @@ public:
|
||||
if (eventProgress == 5)
|
||||
{
|
||||
++eventProgress;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
DoScriptText(EMOTE_HORRENDOUS_VISION, naralex);
|
||||
me->SummonCreature(NPC_MUTANUS_THE_DEVOURER, 150.872f, 262.905f, -103.503f, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
DoScriptText(SAY_MUTANUS_THE_DEVOURER, me);
|
||||
pInstance->SetData(TYPE_MUTANUS_THE_DEVOURER, IN_PROGRESS);
|
||||
instance->SetData(TYPE_MUTANUS_THE_DEVOURER, IN_PROGRESS);
|
||||
}
|
||||
else
|
||||
if (eventProgress == 6 && pInstance->GetData(TYPE_MUTANUS_THE_DEVOURER) == DONE)
|
||||
if (eventProgress == 6 && instance->GetData(TYPE_MUTANUS_THE_DEVOURER) == DONE)
|
||||
{
|
||||
++eventProgress;
|
||||
eventTimer = 3000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
{
|
||||
AchievementEntry const* AchievWC = GetAchievementStore()->LookupEntry(ACHIEVEMENT_WAILING_CAVERNS);
|
||||
if (AchievWC)
|
||||
{
|
||||
Map* pMap = me->GetMap();
|
||||
if (pMap && pMap->IsDungeon())
|
||||
Map* map = me->GetMap();
|
||||
if (map && map->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &players = pMap->GetPlayers();
|
||||
Map::PlayerList const &players = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
itr->getSource()->CompletedAchievement(AchievWC);
|
||||
}
|
||||
@@ -338,7 +338,7 @@ public:
|
||||
{
|
||||
++eventProgress;
|
||||
eventTimer = 6000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
DoScriptText(SAY_THANK_YOU, naralex);
|
||||
}
|
||||
else
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
{
|
||||
++eventProgress;
|
||||
eventTimer = 8000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
{
|
||||
DoScriptText(SAY_FAREWELL, naralex);
|
||||
naralex->AddAura(SPELL_FLIGHT_FORM, naralex);
|
||||
@@ -360,7 +360,7 @@ public:
|
||||
{
|
||||
++eventProgress;
|
||||
eventTimer = 1500;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
naralex->GetMotionMaster()->MovePoint(25, naralex->GetPositionX(), naralex->GetPositionY(), naralex->GetPositionZ());
|
||||
}
|
||||
else
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
{
|
||||
++eventProgress;
|
||||
eventTimer = 2500;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
{
|
||||
naralex->GetMotionMaster()->MovePoint(0, 117.095512f, 247.107971f, -96.167870f);
|
||||
naralex->GetMotionMaster()->MovePoint(1, 90.388809f, 276.135406f, -83.389801f);
|
||||
@@ -379,10 +379,10 @@ public:
|
||||
else
|
||||
if (eventProgress == 11)
|
||||
{
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
|
||||
naralex->SetVisible(false);
|
||||
me->SetVisible(false);
|
||||
pInstance->SetData(TYPE_NARALEX_PART3, DONE);
|
||||
instance->SetData(TYPE_NARALEX_PART3, DONE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -92,14 +92,14 @@ class instance_zulfarrak : public InstanceMapScript
|
||||
public:
|
||||
instance_zulfarrak() : InstanceMapScript("instance_zulfarrak", 209) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_zulfarrak_InstanceMapScript(pMap);
|
||||
return new instance_zulfarrak_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_zulfarrak_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_zulfarrak_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {}
|
||||
instance_zulfarrak_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 GahzRillaEncounter;
|
||||
uint64 ZumrahGUID;
|
||||
|
||||
@@ -75,15 +75,15 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (InstanceScript* pInstance = creature->GetInstanceScript())
|
||||
if (InstanceScript* instance = creature->GetInstanceScript())
|
||||
{
|
||||
if (pInstance->GetData(EVENT_PYRAMID) == PYRAMID_KILLED_ALL_TROLLS)
|
||||
if (instance->GetData(EVENT_PYRAMID) == PYRAMID_KILLED_ALL_TROLLS)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(1517, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
if (pInstance->GetData(EVENT_PYRAMID) == PYRAMID_NOT_STARTED)
|
||||
if (instance->GetData(EVENT_PYRAMID) == PYRAMID_NOT_STARTED)
|
||||
player->SEND_GOSSIP_MENU(1515, creature->GetGUID());
|
||||
else
|
||||
player->SEND_GOSSIP_MENU(1516, creature->GetGUID());
|
||||
@@ -101,11 +101,11 @@ public:
|
||||
{
|
||||
npc_sergeant_blyAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pInstance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
postGossipStep = 0;
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 postGossipStep;
|
||||
uint32 Text_Timer;
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
{
|
||||
case 1:
|
||||
//weegli doesn't fight - he goes & blows up the door
|
||||
if (Creature* pWeegli = pInstance->instance->GetCreature(pInstance->GetData64(ENTRY_WEEGLI)))
|
||||
if (Creature* pWeegli = instance->instance->GetCreature(instance->GetData64(ENTRY_WEEGLI)))
|
||||
pWeegli->AI()->DoAction(0);
|
||||
DoScriptText(SAY_1, me);
|
||||
Text_Timer = 5000;
|
||||
@@ -145,11 +145,11 @@ public:
|
||||
if (Player* target = Player::GetPlayer(*me, PlayerGUID))
|
||||
AttackStart(target);
|
||||
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
switchFactionIfAlive(pInstance, ENTRY_RAVEN);
|
||||
switchFactionIfAlive(pInstance, ENTRY_ORO);
|
||||
switchFactionIfAlive(pInstance, ENTRY_MURTA);
|
||||
switchFactionIfAlive(instance, ENTRY_RAVEN);
|
||||
switchFactionIfAlive(instance, ENTRY_ORO);
|
||||
switchFactionIfAlive(instance, ENTRY_MURTA);
|
||||
}
|
||||
}
|
||||
postGossipStep++;
|
||||
@@ -185,9 +185,9 @@ public:
|
||||
Text_Timer = 0;
|
||||
}
|
||||
|
||||
void switchFactionIfAlive(InstanceScript* pInstance, uint32 entry)
|
||||
void switchFactionIfAlive(InstanceScript* instance, uint32 entry)
|
||||
{
|
||||
if (Creature* crew = pInstance->instance->GetCreature(pInstance->GetData64(entry)))
|
||||
if (Creature* crew = instance->instance->GetCreature(instance->GetData64(entry)))
|
||||
if (crew->isAlive())
|
||||
crew->setFaction(FACTION_HOSTILE);
|
||||
}
|
||||
@@ -199,9 +199,9 @@ public:
|
||||
+## go_troll_cage
|
||||
+######*/
|
||||
|
||||
void initBlyCrewMember(InstanceScript* pInstance, uint32 entry, float x, float y, float z)
|
||||
void initBlyCrewMember(InstanceScript* instance, uint32 entry, float x, float y, float z)
|
||||
{
|
||||
if (Creature* crew = pInstance->instance->GetCreature(pInstance->GetData64(entry)))
|
||||
if (Creature* crew = instance->instance->GetCreature(instance->GetData64(entry)))
|
||||
{
|
||||
crew->SetReactState(REACT_AGGRESSIVE);
|
||||
crew->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
@@ -216,17 +216,17 @@ class go_troll_cage : public GameObjectScript
|
||||
public:
|
||||
go_troll_cage() : GameObjectScript("go_troll_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
if (InstanceScript* pInstance = pGo->GetInstanceScript())
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
{
|
||||
pInstance->SetData(EVENT_PYRAMID, PYRAMID_CAGES_OPEN);
|
||||
instance->SetData(EVENT_PYRAMID, PYRAMID_CAGES_OPEN);
|
||||
//set bly & co to aggressive & start moving to top of stairs
|
||||
initBlyCrewMember(pInstance, ENTRY_BLY, 1884.99f, 1263, 41.52f);
|
||||
initBlyCrewMember(pInstance, ENTRY_RAVEN, 1882.5f, 1263, 41.52f);
|
||||
initBlyCrewMember(pInstance, ENTRY_ORO, 1886.47f, 1270.68f, 41.68f);
|
||||
initBlyCrewMember(pInstance, ENTRY_WEEGLI, 1890, 1263, 41.52f);
|
||||
initBlyCrewMember(pInstance, ENTRY_MURTA, 1891.19f, 1272.03f, 41.60f);
|
||||
initBlyCrewMember(instance, ENTRY_BLY, 1884.99f, 1263, 41.52f);
|
||||
initBlyCrewMember(instance, ENTRY_RAVEN, 1882.5f, 1263, 41.52f);
|
||||
initBlyCrewMember(instance, ENTRY_ORO, 1886.47f, 1270.68f, 41.68f);
|
||||
initBlyCrewMember(instance, ENTRY_WEEGLI, 1890, 1263, 41.52f);
|
||||
initBlyCrewMember(instance, ENTRY_MURTA, 1891.19f, 1272.03f, 41.60f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -272,9 +272,9 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (InstanceScript* pInstance = creature->GetInstanceScript())
|
||||
if (InstanceScript* instance = creature->GetInstanceScript())
|
||||
{
|
||||
switch (pInstance->GetData(EVENT_PYRAMID))
|
||||
switch (instance->GetData(EVENT_PYRAMID))
|
||||
{
|
||||
case PYRAMID_KILLED_ALL_TROLLS:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEEGLI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
@@ -300,7 +300,7 @@ public:
|
||||
{
|
||||
npc_weegli_blastfuseAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pInstance = creature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
destroyingDoor=false;
|
||||
Bomb_Timer = 10000;
|
||||
LandMine_Timer = 30000;
|
||||
@@ -309,12 +309,12 @@ public:
|
||||
uint32 Bomb_Timer;
|
||||
uint32 LandMine_Timer;
|
||||
bool destroyingDoor;
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
/*if (pInstance)
|
||||
pInstance->SetData(0, NOT_STARTED);*/
|
||||
/*if (instance)
|
||||
instance->SetData(0, NOT_STARTED);*/
|
||||
}
|
||||
|
||||
void AttackStart(Unit* victim)
|
||||
@@ -324,8 +324,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*victim*/)
|
||||
{
|
||||
/*if (pInstance)
|
||||
pInstance->SetData(0, DONE);*/
|
||||
/*if (instance)
|
||||
instance->SetData(0, DONE);*/
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -355,18 +355,18 @@ public:
|
||||
|
||||
void MovementInform(uint32 /*type*/, uint32 /*id*/)
|
||||
{
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
if (pInstance->GetData(EVENT_PYRAMID) == PYRAMID_CAGES_OPEN)
|
||||
if (instance->GetData(EVENT_PYRAMID) == PYRAMID_CAGES_OPEN)
|
||||
{
|
||||
pInstance->SetData(EVENT_PYRAMID, PYRAMID_ARRIVED_AT_STAIR);
|
||||
instance->SetData(EVENT_PYRAMID, PYRAMID_ARRIVED_AT_STAIR);
|
||||
DoScriptText(SAY_WEEGLI_OHNO, me);
|
||||
me->SetHomePosition(1882.69f, 1272.28f, 41.87f, 0);
|
||||
}
|
||||
else
|
||||
if (destroyingDoor)
|
||||
{
|
||||
pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_END_DOOR));
|
||||
instance->DoUseDoorOrButton(instance->GetData64(GO_END_DOOR));
|
||||
//TODO: leave the area...
|
||||
me->DespawnOrUnsummon();
|
||||
};
|
||||
@@ -410,19 +410,19 @@ class go_shallow_grave : public GameObjectScript
|
||||
public:
|
||||
go_shallow_grave() : GameObjectScript("go_shallow_grave") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
// randomly summon a zombie or dead hero the first time a grave is used
|
||||
if (pGo->GetUseCount() == 0)
|
||||
if (go->GetUseCount() == 0)
|
||||
{
|
||||
uint32 randomchance = urand(0, 100);
|
||||
if (randomchance < ZOMBIE_CHANCE)
|
||||
pGo->SummonCreature(ZOMBIE, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
go->SummonCreature(ZOMBIE, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
else
|
||||
if ((randomchance-ZOMBIE_CHANCE) < DEAD_HERO_CHANCE)
|
||||
pGo->SummonCreature(DEAD_HERO, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
go->SummonCreature(DEAD_HERO, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
}
|
||||
pGo->AddUse();
|
||||
go->AddUse();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -329,9 +329,9 @@ class npc_muglash : public CreatureScript
|
||||
if (player)
|
||||
DoScriptText(SAY_MUG_BRAZIER, me, player);
|
||||
|
||||
if (GameObject* pGo = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2))
|
||||
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2))
|
||||
{
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
SetEscortPaused(true);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -354,10 +354,10 @@ public:
|
||||
if (Teleport_Timer <= diff)
|
||||
{
|
||||
//temp solution - unit can't be teleported by core using spelleffect 5, only players
|
||||
Map* pMap = me->GetMap();
|
||||
if (pMap)
|
||||
Map* map = me->GetMap();
|
||||
if (map)
|
||||
{
|
||||
pMap->CreatureRelocation(me, 3706.39f, -3969.15f, 35.9118f, 0);
|
||||
map->CreatureRelocation(me, 3706.39f, -3969.15f, 35.9118f, 0);
|
||||
me->AI_SendMoveToPacket(3706.39f, -3969.15f, 35.9118f, 0, 0, 0);
|
||||
}
|
||||
//begin swimming and summon depth charges
|
||||
|
||||
@@ -586,11 +586,11 @@ class go_ravager_cage : public GameObjectScript
|
||||
public:
|
||||
go_ravager_cage() : GameObjectScript("go_ravager_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* pGo)
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_STRENGTH_ONE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (Creature* ravager = pGo->FindNearestCreature(NPC_DEATH_RAVAGER, 5.0f, true))
|
||||
if (Creature* ravager = go->FindNearestCreature(NPC_DEATH_RAVAGER, 5.0f, true))
|
||||
{
|
||||
ravager->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
ravager->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
@@ -70,15 +70,15 @@ class npc_kerlonian : public CreatureScript
|
||||
public:
|
||||
npc_kerlonian() : CreatureScript("npc_kerlonian") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_SLEEPER_AWAKENED)
|
||||
if (quest->GetQuestId() == QUEST_SLEEPER_AWAKENED)
|
||||
{
|
||||
if (npc_kerlonianAI* pKerlonianAI = CAST_AI(npc_kerlonian::npc_kerlonianAI, creature->AI()))
|
||||
{
|
||||
creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
DoScriptText(SAY_KER_START, creature, player);
|
||||
pKerlonianAI->StartFollow(player, FACTION_KER_ESCORTEE, pQuest);
|
||||
pKerlonianAI->StartFollow(player, FACTION_KER_ESCORTEE, quest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,9 +209,9 @@ class npc_prospector_remtravel : public CreatureScript
|
||||
public:
|
||||
npc_prospector_remtravel() : CreatureScript("npc_prospector_remtravel") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_ABSENT_MINDED_PT2)
|
||||
if (quest->GetQuestId() == QUEST_ABSENT_MINDED_PT2)
|
||||
{
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_prospector_remtravel::npc_prospector_remtravelAI, creature->AI()))
|
||||
pEscortAI->Start(false, false, player->GetGUID());
|
||||
|
||||
@@ -431,9 +431,9 @@ class npc_private_hendel : public CreatureScript
|
||||
public:
|
||||
npc_private_hendel() : CreatureScript("npc_private_hendel") { }
|
||||
|
||||
bool OnQuestAccept(Player* /*player*/, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* /*player*/, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT16)
|
||||
if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT16)
|
||||
creature->setFaction(FACTION_HOSTILE);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -94,9 +94,9 @@ class npc_oox22fe : public CreatureScript
|
||||
public:
|
||||
npc_oox22fe() : CreatureScript("npc_oox22fe") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_RESCUE_OOX22FE)
|
||||
if (quest->GetQuestId() == QUEST_RESCUE_OOX22FE)
|
||||
{
|
||||
DoScriptText(SAY_OOX_START, creature);
|
||||
//change that the npc is not lying dead on the ground
|
||||
|
||||
@@ -162,10 +162,10 @@ public:
|
||||
case 1:
|
||||
if (Unit* unit = Unit::GetUnit(*me, uiPlayerGUID))
|
||||
{
|
||||
if (GameObject* pGo = unit->GetGameObject(SPELL_LUNCH))
|
||||
if (GameObject* go = unit->GetGameObject(SPELL_LUNCH))
|
||||
{
|
||||
m_bIsMovingToLunch = true;
|
||||
me->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ());
|
||||
me->GetMotionMaster()->MovePoint(POINT_ID, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -506,12 +506,12 @@ class npc_tooga : public CreatureScript
|
||||
public:
|
||||
npc_tooga() : CreatureScript("npc_tooga") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_TOOGA)
|
||||
if (quest->GetQuestId() == QUEST_TOOGA)
|
||||
{
|
||||
if (npc_toogaAI* pToogaAI = CAST_AI(npc_tooga::npc_toogaAI, creature->AI()))
|
||||
pToogaAI->StartFollow(player, FACTION_TOOG_ESCORTEE, pQuest);
|
||||
pToogaAI->StartFollow(player, FACTION_TOOG_ESCORTEE, quest);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -48,12 +48,12 @@ class npc_mist : public CreatureScript
|
||||
public:
|
||||
npc_mist() : CreatureScript("npc_mist") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_MIST)
|
||||
if (quest->GetQuestId() == QUEST_MIST)
|
||||
{
|
||||
if (npc_mistAI* pMistAI = CAST_AI(npc_mist::npc_mistAI, creature->AI()))
|
||||
pMistAI->StartFollow(player, FACTION_DARNASSUS, pQuest);
|
||||
pMistAI->StartFollow(player, FACTION_DARNASSUS, quest);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -101,9 +101,9 @@ class npc_gilthares : public CreatureScript
|
||||
public:
|
||||
npc_gilthares() : CreatureScript("npc_gilthares") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_FREE_FROM_HOLD)
|
||||
if (quest->GetQuestId() == QUEST_FREE_FROM_HOLD)
|
||||
{
|
||||
creature->setFaction(FACTION_ESCORTEE);
|
||||
creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
DoScriptText(SAY_GIL_START, creature, player);
|
||||
|
||||
if (npc_giltharesAI* pEscortAI = CAST_AI(npc_gilthares::npc_giltharesAI, creature->AI()))
|
||||
pEscortAI->Start(false, false, player->GetGUID(), pQuest);
|
||||
pEscortAI->Start(false, false, player->GetGUID(), quest);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -606,9 +606,9 @@ public:
|
||||
SetRun(false);
|
||||
break;
|
||||
case 17:
|
||||
if (Creature* pTemp = me->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000))
|
||||
if (Creature* temp = me->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000))
|
||||
{
|
||||
DoScriptText(SAY_MERCENARY, pTemp);
|
||||
DoScriptText(SAY_MERCENARY, temp);
|
||||
me->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -54,12 +54,12 @@ class npc_kanati : public CreatureScript
|
||||
public:
|
||||
npc_kanati() : CreatureScript("npc_kanati") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_PROTECT_KANATI)
|
||||
if (quest->GetQuestId() == QUEST_PROTECT_KANATI)
|
||||
{
|
||||
if (npc_kanatiAI* pEscortAI = CAST_AI(npc_kanati::npc_kanatiAI, creature->AI()))
|
||||
pEscortAI->Start(false, false, player->GetGUID(), pQuest, true);
|
||||
pEscortAI->Start(false, false, player->GetGUID(), quest, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -142,15 +142,15 @@ class npc_lakota_windsong : public CreatureScript
|
||||
public:
|
||||
npc_lakota_windsong() : CreatureScript("npc_lakota_windsong") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_FREE_AT_LAST)
|
||||
if (quest->GetQuestId() == QUEST_FREE_AT_LAST)
|
||||
{
|
||||
DoScriptText(SAY_LAKO_START, creature, player);
|
||||
creature->setFaction(FACTION_ESCORTEE_LAKO);
|
||||
|
||||
if (npc_lakota_windsongAI* pEscortAI = CAST_AI(npc_lakota_windsong::npc_lakota_windsongAI, creature->AI()))
|
||||
pEscortAI->Start(false, false, player->GetGUID(), pQuest);
|
||||
pEscortAI->Start(false, false, player->GetGUID(), quest);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -227,15 +227,15 @@ class npc_paoka_swiftmountain : public CreatureScript
|
||||
public:
|
||||
npc_paoka_swiftmountain() : CreatureScript("npc_paoka_swiftmountain") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_HOMEWARD)
|
||||
if (quest->GetQuestId() == QUEST_HOMEWARD)
|
||||
{
|
||||
DoScriptText(SAY_START, creature, player);
|
||||
creature->setFaction(FACTION_ESCORTEE);
|
||||
|
||||
if (npc_paoka_swiftmountainAI* pEscortAI = CAST_AI(npc_paoka_swiftmountain::npc_paoka_swiftmountainAI, creature->AI()))
|
||||
pEscortAI->Start(false, false, player->GetGUID(), pQuest);
|
||||
pEscortAI->Start(false, false, player->GetGUID(), quest);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -408,12 +408,12 @@ class go_panther_cage : public GameObjectScript
|
||||
public:
|
||||
go_panther_cage() : GameObjectScript("go_panther_cage") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* pGo)
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
{
|
||||
|
||||
if (player->GetQuestStatus(5151) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (Creature* panther = pGo->FindNearestCreature(ENRAGED_PANTHER, 5, true))
|
||||
if (Creature* panther = go->FindNearestCreature(ENRAGED_PANTHER, 5, true))
|
||||
{
|
||||
panther->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
panther->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
@@ -180,14 +180,14 @@ class npc_ringo : public CreatureScript
|
||||
public:
|
||||
npc_ringo() : CreatureScript("npc_ringo") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* pQuest)
|
||||
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_A_LITTLE_HELP)
|
||||
if (quest->GetQuestId() == QUEST_A_LITTLE_HELP)
|
||||
{
|
||||
if (npc_ringoAI* pRingoAI = CAST_AI(npc_ringo::npc_ringoAI, creature->AI()))
|
||||
{
|
||||
creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
pRingoAI->StartFollow(player, FACTION_ESCORTEE, pQuest);
|
||||
pRingoAI->StartFollow(player, FACTION_ESCORTEE, quest);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user