Core/Script: Clean-Up in Scripts.
GameObject* pGO -> GameObject* go Signed-off-by: Gyx <[email protected]>
This commit is contained in:
@@ -387,20 +387,20 @@ class prince_taldaram_sphere : public GameObjectScript
|
||||
public:
|
||||
prince_taldaram_sphere() : GameObjectScript("prince_taldaram_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
if (!instance)
|
||||
return true;
|
||||
|
||||
Creature* pPrinceTaldaram = Unit::GetCreature(*pGO, instance->GetData64(DATA_PRINCE_TALDARAM));
|
||||
Creature* pPrinceTaldaram = Unit::GetCreature(*go, instance->GetData64(DATA_PRINCE_TALDARAM));
|
||||
if (pPrinceTaldaram && pPrinceTaldaram->isAlive())
|
||||
{
|
||||
// maybe these are hacks :(
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
switch (pGO->GetEntry())
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_SPHERE1: instance->SetData(DATA_SPHERE1_EVENT, IN_PROGRESS); break;
|
||||
case GO_SPHERE2: instance->SetData(DATA_SPHERE2_EVENT, IN_PROGRESS); break;
|
||||
|
||||
+2
-2
@@ -125,8 +125,8 @@ public:
|
||||
break;
|
||||
case DATA_IN_POSITION: //movement done.
|
||||
me->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
|
||||
if (GameObject* pGO = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
|
||||
instance->HandleGameObject(pGO->GetGUID(), false);
|
||||
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
|
||||
instance->HandleGameObject(go->GetGUID(), false);
|
||||
NextStep(10000, false, 3);
|
||||
break;
|
||||
case DATA_LESSER_CHAMPIONS_DEFEATED:
|
||||
|
||||
+7
-4
@@ -275,8 +275,11 @@ class boss_lich_king_toc : public CreatureScript
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!m_instance) return;
|
||||
if (m_instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1) return;
|
||||
if (!m_instance)
|
||||
return;
|
||||
|
||||
if (m_instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1)
|
||||
return;
|
||||
|
||||
m_uiUpdateTimer = m_instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (m_uiUpdateTimer <= uiDiff)
|
||||
@@ -318,8 +321,8 @@ class boss_lich_king_toc : public CreatureScript
|
||||
m_instance->SetData(TYPE_EVENT, 5080);
|
||||
break;
|
||||
case 5080:
|
||||
if (GameObject* pGoFloor = m_instance->instance->GetGameObject(m_instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
pGoFloor->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
|
||||
if (GameObject* go = m_instance->instance->GetGameObject(m_instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED);
|
||||
me->CastSpell(me, 69016, false);
|
||||
if (m_instance)
|
||||
{
|
||||
|
||||
@@ -519,17 +519,17 @@ class go_gundrak_altar : public GameObjectScript
|
||||
public:
|
||||
go_gundrak_altar() : GameObjectScript("go_gundrak_altar") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
uint64 uiStatue = 0;
|
||||
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
switch (pGO->GetEntry())
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case 192518:
|
||||
uiStatue = instance->GetData64(DATA_SLAD_RAN_STATUE);
|
||||
@@ -545,8 +545,8 @@ public:
|
||||
if (!instance->GetData64(DATA_STATUE_ACTIVATE))
|
||||
{
|
||||
instance->SetData64(DATA_STATUE_ACTIVATE, uiStatue);
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -208,16 +208,16 @@ class containment_sphere : public GameObjectScript
|
||||
public:
|
||||
containment_sphere() : GameObjectScript("containment_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
Creature* pKeristrasza = Unit::GetCreature(*pGO, instance ? instance->GetData64(DATA_KERISTRASZA) : 0);
|
||||
Creature* pKeristrasza = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_KERISTRASZA) : 0);
|
||||
if (pKeristrasza && pKeristrasza->isAlive())
|
||||
{
|
||||
// maybe these are hacks :(
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
CAST_AI(boss_keristrasza::boss_keristraszaAI, pKeristrasza->AI())->CheckContainmentSpheres(true);
|
||||
}
|
||||
|
||||
@@ -835,15 +835,15 @@ class go_palehoof_sphere : public GameObjectScript
|
||||
public:
|
||||
go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* pGO)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* instance = pGO->GetInstanceScript();
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
Creature* pPalehoof = Unit::GetCreature(*pGO, instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
Creature* pPalehoof = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->isAlive())
|
||||
{
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
|
||||
}
|
||||
|
||||
@@ -461,15 +461,15 @@ class go_harpoon_launcher : public GameObjectScript
|
||||
public:
|
||||
go_harpoon_launcher() : GameObjectScript("go_harpoon_launcher") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
{
|
||||
InstanceScript* m_instance = pGO->GetInstanceScript();
|
||||
if (!m_instance) return false;
|
||||
InstanceScript* m_instance = go->GetInstanceScript();
|
||||
if (!m_instance)
|
||||
return false;
|
||||
|
||||
if (Creature* pSkadi = Unit::GetCreature((*pGO), m_instance->GetData64(DATA_SKADI_THE_RUTHLESS)))
|
||||
{
|
||||
if (Creature* pSkadi = Unit::GetCreature(*go, m_instance->GetData64(DATA_SKADI_THE_RUTHLESS)))
|
||||
player->CastSpell(pSkadi, SPELL_RAPID_FIRE, true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -795,7 +795,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*pGO*/, uint32 uiEventId)
|
||||
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId)
|
||||
{
|
||||
switch (uiEventId)
|
||||
{
|
||||
|
||||
@@ -403,9 +403,9 @@ public:
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
|
||||
if (GameObject* pGO = me->FindNearestGameObject(GO_SCOURGE_CAGE, 5.0f))
|
||||
if (pGO->GetGoState() == GO_STATE_ACTIVE)
|
||||
pGO->SetGoState(GO_STATE_READY);
|
||||
if (GameObject* go = me->FindNearestGameObject(GO_SCOURGE_CAGE, 5.0f))
|
||||
if (go->GetGoState() == GO_STATE_ACTIVE)
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -52,8 +52,7 @@ public:
|
||||
float x, y, z;
|
||||
me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, 0.1f);
|
||||
|
||||
if (Unit* summon = me->SummonCreature(NPC_RAGECLAW, x, y, z,
|
||||
0, TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
if (Unit* summon = me->SummonCreature(NPC_RAGECLAW, x, y, z, 0, TEMPSUMMON_DEAD_DESPAWN, 1000))
|
||||
{
|
||||
RageclawGUID = summon->GetGUID();
|
||||
LockRageclaw();
|
||||
@@ -1397,14 +1396,14 @@ class go_scourge_enclosure : public GameObjectScript
|
||||
public:
|
||||
go_scourge_enclosure() : GameObjectScript("go_scourge_enclosure") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* pGO)
|
||||
bool OnGossipHello(Player* player, GameObject* go)
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
Creature* pGymerDummy = pGO->FindNearestCreature(NPC_GYMER_DUMMY, 20.0f);
|
||||
Creature* pGymerDummy = go->FindNearestCreature(NPC_GYMER_DUMMY, 20.0f);
|
||||
if (pGymerDummy)
|
||||
{
|
||||
pGO->UseDoorOrButton();
|
||||
go->UseDoorOrButton();
|
||||
player->KilledMonsterCredit(pGymerDummy->GetEntry(), pGymerDummy->GetGUID());
|
||||
pGymerDummy->CastSpell(pGymerDummy, 55529, true);
|
||||
pGymerDummy->DisappearAndDie();
|
||||
|
||||
Reference in New Issue
Block a user