Core/Scripts: Split OnCreatureCreate() and OnGameObjectCreate() into two virtual functions each.
Note to scripters: be aware that you will need to hook into the Remove functions if you want to do stuff at GO/creature removal. Closes issue 5011. --HG-- branch : trunk
This commit is contained in:
@@ -55,21 +55,21 @@ public:
|
||||
m_uiIkissDoorGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
if (pCreature->GetEntry() == NPC_ANZU)
|
||||
if (creature->GetEntry() == NPC_ANZU)
|
||||
{
|
||||
if (AnzuEncounter >= IN_PROGRESS)
|
||||
pCreature->DisappearAndDie();
|
||||
creature->DisappearAndDie();
|
||||
else
|
||||
AnzuEncounter = IN_PROGRESS;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
if (pGo->GetEntry() == IKISS_DOOR)
|
||||
m_uiIkissDoorGUID = pGo->GetGUID();
|
||||
if (go->GetEntry() == IKISS_DOOR)
|
||||
m_uiIkissDoorGUID = go->GetGUID();
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
|
||||
+10
-10
@@ -80,32 +80,32 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case REFECTORY_DOOR:
|
||||
m_uiRefectoryDoorGUID = pGo->GetGUID();
|
||||
m_uiRefectoryDoorGUID = go->GetGUID();
|
||||
if (m_auiEncounter[2] == DONE)
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case SCREAMING_HALL_DOOR:
|
||||
m_uiScreamingHallDoorGUID = pGo->GetGUID();
|
||||
m_uiScreamingHallDoorGUID = go->GetGUID();
|
||||
if (m_auiEncounter[3] == DONE)
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 18732:
|
||||
m_uiGrandmasterVorpil = pCreature->GetGUID();
|
||||
m_uiGrandmasterVorpil = creature->GetGUID();
|
||||
break;
|
||||
case 18796:
|
||||
if (pCreature->isAlive())
|
||||
if (creature->isAlive())
|
||||
{
|
||||
++m_uiFelOverseerCount;
|
||||
sLog.outDebug("TSCR: Shadow Labyrinth: counting %u Fel Overseers.",m_uiFelOverseerCount);
|
||||
|
||||
@@ -140,51 +140,51 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 22887: Najentus = pCreature->GetGUID(); break;
|
||||
case 23089: Akama = pCreature->GetGUID(); break;
|
||||
case 22990: Akama_Shade = pCreature->GetGUID(); break;
|
||||
case 22841: ShadeOfAkama = pCreature->GetGUID(); break;
|
||||
case 22898: Supremus = pCreature->GetGUID(); break;
|
||||
case 22917: IllidanStormrage = pCreature->GetGUID(); break;
|
||||
case 22949: GathiosTheShatterer = pCreature->GetGUID(); break;
|
||||
case 22950: HighNethermancerZerevor = pCreature->GetGUID(); break;
|
||||
case 22951: LadyMalande = pCreature->GetGUID(); break;
|
||||
case 22952: VerasDarkshadow = pCreature->GetGUID(); break;
|
||||
case 23426: IllidariCouncil = pCreature->GetGUID(); break;
|
||||
case 23499: BloodElfCouncilVoice = pCreature->GetGUID(); break;
|
||||
case 22887: Najentus = creature->GetGUID(); break;
|
||||
case 23089: Akama = creature->GetGUID(); break;
|
||||
case 22990: Akama_Shade = creature->GetGUID(); break;
|
||||
case 22841: ShadeOfAkama = creature->GetGUID(); break;
|
||||
case 22898: Supremus = creature->GetGUID(); break;
|
||||
case 22917: IllidanStormrage = creature->GetGUID(); break;
|
||||
case 22949: GathiosTheShatterer = creature->GetGUID(); break;
|
||||
case 22950: HighNethermancerZerevor = creature->GetGUID(); break;
|
||||
case 22951: LadyMalande = creature->GetGUID(); break;
|
||||
case 22952: VerasDarkshadow = creature->GetGUID(); break;
|
||||
case 23426: IllidariCouncil = creature->GetGUID(); break;
|
||||
case 23499: BloodElfCouncilVoice = creature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 185483: NajentusGate = pGo->GetGUID();// Gate past Naj'entus (at the entrance to Supermoose's courtyards)
|
||||
if (m_auiEncounter[0] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 185882: MainTempleDoors = pGo->GetGUID();// Main Temple Doors - right past Supermoose (Supremus)
|
||||
if (m_auiEncounter[1] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 185478: ShadeOfAkamaDoor = pGo->GetGUID();break;
|
||||
case 185480: CommonDoor = pGo->GetGUID();
|
||||
if (m_auiEncounter[3] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 186153: TeronDoor = pGo->GetGUID();
|
||||
if (m_auiEncounter[3] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 185892: GuurtogDoor = pGo->GetGUID();
|
||||
if (m_auiEncounter[4] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 185479: TempleDoor = pGo->GetGUID();
|
||||
if (m_auiEncounter[5] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 185482: MotherDoor = pGo->GetGUID();
|
||||
if (m_auiEncounter[6] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 185481: CouncilDoor = pGo->GetGUID();
|
||||
if (m_auiEncounter[7] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 186152: SimpleDoor = pGo->GetGUID();
|
||||
if (m_auiEncounter[7] == DONE)HandleGameObject(NULL,true,pGo);break;
|
||||
case 185905: IllidanGate = pGo->GetGUID(); break; // Gate leading to Temple Summit
|
||||
case 186261: IllidanDoor[0] = pGo->GetGUID(); break; // Right door at Temple Summit
|
||||
case 186262: IllidanDoor[1] = pGo->GetGUID(); break; // Left door at Temple Summit
|
||||
case 185483: NajentusGate = go->GetGUID();// Gate past Naj'entus (at the entrance to Supermoose's courtyards)
|
||||
if (m_auiEncounter[0] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185882: MainTempleDoors = go->GetGUID();// Main Temple Doors - right past Supermoose (Supremus)
|
||||
if (m_auiEncounter[1] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185478: ShadeOfAkamaDoor = go->GetGUID();break;
|
||||
case 185480: CommonDoor = go->GetGUID();
|
||||
if (m_auiEncounter[3] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 186153: TeronDoor = go->GetGUID();
|
||||
if (m_auiEncounter[3] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185892: GuurtogDoor = go->GetGUID();
|
||||
if (m_auiEncounter[4] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185479: TempleDoor = go->GetGUID();
|
||||
if (m_auiEncounter[5] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185482: MotherDoor = go->GetGUID();
|
||||
if (m_auiEncounter[6] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185481: CouncilDoor = go->GetGUID();
|
||||
if (m_auiEncounter[7] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 186152: SimpleDoor = go->GetGUID();
|
||||
if (m_auiEncounter[7] == DONE)HandleGameObject(NULL,true,go);break;
|
||||
case 185905: IllidanGate = go->GetGUID(); break; // Gate leading to Temple Summit
|
||||
case 186261: IllidanDoor[0] = go->GetGUID(); break; // Right door at Temple Summit
|
||||
case 186262: IllidanDoor[1] = go->GetGUID(); break; // Left door at Temple Summit
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+22
-22
@@ -52,9 +52,9 @@ class go_bridge_console : public GameObjectScript
|
||||
public:
|
||||
go_bridge_console() : GameObjectScript("go_bridge_console") { }
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* pInstance = pGo->GetInstanceScript();
|
||||
InstanceScript* pInstance = go->GetInstanceScript();
|
||||
|
||||
if (!pInstance)
|
||||
return false;
|
||||
@@ -210,28 +210,28 @@ public:
|
||||
} else FrenzySpawnTimer -= diff;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 184568:
|
||||
ControlConsole = pGo->GetGUID();
|
||||
pGo->setActive(true);
|
||||
ControlConsole = go->GetGUID();
|
||||
go->setActive(true);
|
||||
break;
|
||||
|
||||
case 184203:
|
||||
BridgePart[0] = pGo->GetGUID();
|
||||
pGo->setActive(true);
|
||||
BridgePart[0] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
break;
|
||||
|
||||
case 184204:
|
||||
BridgePart[1] = pGo->GetGUID();
|
||||
pGo->setActive(true);
|
||||
BridgePart[1] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
break;
|
||||
|
||||
case 184205:
|
||||
BridgePart[2] = pGo->GetGUID();
|
||||
pGo->setActive(true);
|
||||
BridgePart[2] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
break;
|
||||
case GAMEOBJECT_FISHINGNODE_ENTRY://no way checking if fish is hooked, so we create a timed event
|
||||
if (LurkerSubEvent == LURKER_NOT_STARTED)
|
||||
@@ -243,20 +243,20 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 21212: LadyVashj = pCreature->GetGUID(); break;
|
||||
case 21214: Karathress = pCreature->GetGUID(); break;
|
||||
case 21966: Sharkkis = pCreature->GetGUID(); break;
|
||||
case 21217: LurkerBelow = pCreature->GetGUID(); break;
|
||||
case 21965: Tidalvess = pCreature->GetGUID(); break;
|
||||
case 21964: Caribdis = pCreature->GetGUID(); break;
|
||||
case 21215: LeotherasTheBlind = pCreature->GetGUID(); break;
|
||||
case 21212: LadyVashj = creature->GetGUID(); break;
|
||||
case 21214: Karathress = creature->GetGUID(); break;
|
||||
case 21966: Sharkkis = creature->GetGUID(); break;
|
||||
case 21217: LurkerBelow = creature->GetGUID(); break;
|
||||
case 21965: Tidalvess = creature->GetGUID(); break;
|
||||
case 21964: Caribdis = creature->GetGUID(); break;
|
||||
case 21215: LeotherasTheBlind = creature->GetGUID(); break;
|
||||
/*case TRASHMOB_COILFANG_PRIESTESS:
|
||||
case TRASHMOB_COILFANG_SHATTERER:
|
||||
if (pCreature->isAlive())
|
||||
if (creature->isAlive())
|
||||
++TrashCount;
|
||||
break;*/
|
||||
}
|
||||
|
||||
@@ -43,17 +43,17 @@ class go_main_chambers_access_panel : public GameObjectScript
|
||||
public:
|
||||
go_main_chambers_access_panel() : GameObjectScript("go_main_chambers_access_panel") { }
|
||||
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
|
||||
bool OnGossipHello(Player* /*pPlayer*/, GameObject* go)
|
||||
{
|
||||
InstanceScript* pInstance = pGo->GetInstanceScript();
|
||||
InstanceScript* pInstance = go->GetInstanceScript();
|
||||
|
||||
if (!pInstance)
|
||||
return false;
|
||||
|
||||
if (pGo->GetEntry() == ACCESS_PANEL_HYDRO && (pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE || pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL))
|
||||
if (go->GetEntry() == ACCESS_PANEL_HYDRO && (pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE || pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL))
|
||||
pInstance->SetData(TYPE_HYDROMANCER_THESPIA,SPECIAL);
|
||||
|
||||
if (pGo->GetEntry() == ACCESS_PANEL_MEK && (pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE || pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL))
|
||||
if (go->GetEntry() == ACCESS_PANEL_MEK && (pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE || pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL))
|
||||
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,SPECIAL);
|
||||
|
||||
return true;
|
||||
@@ -106,23 +106,23 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 17797: ThespiaGUID = pCreature->GetGUID(); break;
|
||||
case 17796: MekgineerGUID = pCreature->GetGUID(); break;
|
||||
case 17798: KalithreshGUID = pCreature->GetGUID(); break;
|
||||
case 17797: ThespiaGUID = creature->GetGUID(); break;
|
||||
case 17796: MekgineerGUID = creature->GetGUID(); break;
|
||||
case 17798: KalithreshGUID = creature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case MAIN_CHAMBERS_DOOR: MainChambersDoor = pGo->GetGUID(); break;
|
||||
case ACCESS_PANEL_HYDRO: AccessPanelHydro = pGo->GetGUID(); break;
|
||||
case ACCESS_PANEL_MEK: AccessPanelMek = pGo->GetGUID(); break;
|
||||
case MAIN_CHAMBERS_DOOR: MainChambersDoor = go->GetGUID(); break;
|
||||
case ACCESS_PANEL_HYDRO: AccessPanelHydro = go->GetGUID(); break;
|
||||
case ACCESS_PANEL_MEK: AccessPanelMek = go->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,27 +82,27 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 18835: KigglerTheCrazed = pCreature->GetGUID(); break;
|
||||
case 18836: BlindeyeTheSeer = pCreature->GetGUID(); break;
|
||||
case 18834: OlmTheSummoner = pCreature->GetGUID(); break;
|
||||
case 18832: KroshFirehand = pCreature->GetGUID(); break;
|
||||
case 18831: Maulgar = pCreature->GetGUID(); break;
|
||||
case 18835: KigglerTheCrazed = creature->GetGUID(); break;
|
||||
case 18836: BlindeyeTheSeer = creature->GetGUID(); break;
|
||||
case 18834: OlmTheSummoner = creature->GetGUID(); break;
|
||||
case 18832: KroshFirehand = creature->GetGUID(); break;
|
||||
case 18831: Maulgar = creature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 184468:
|
||||
MaulgarDoor = pGo->GetGUID();
|
||||
if (m_auiEncounter[0] == DONE) HandleGameObject(NULL, true, pGo);
|
||||
MaulgarDoor = go->GetGUID();
|
||||
if (m_auiEncounter[0] == DONE) HandleGameObject(NULL, true, go);
|
||||
break;
|
||||
case 184662: GruulDoor = pGo->GetGUID(); break;
|
||||
case 184662: GruulDoor = go->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+34
-39
@@ -90,53 +90,48 @@ class instance_blood_furnace : public InstanceMapScript
|
||||
PrisonCell8GUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool add)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
if (!add)
|
||||
return;
|
||||
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 17381: The_MakerGUID = pCreature->GetGUID(); break;
|
||||
case 17380: BroggokGUID = pCreature->GetGUID(); break;
|
||||
case 17377: Kelidan_The_BreakerGUID = pCreature->GetGUID(); break;
|
||||
case 17381: The_MakerGUID = creature->GetGUID(); break;
|
||||
case 17380: BroggokGUID = creature->GetGUID(); break;
|
||||
case 17377: Kelidan_The_BreakerGUID = creature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool add)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
if (!add)
|
||||
return;
|
||||
|
||||
if (pGo->GetEntry() == 181766) //Final exit door
|
||||
Door1GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181811) //The Maker Front door
|
||||
Door2GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181812) //The Maker Rear door
|
||||
Door3GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181822) //Broggok Front door
|
||||
Door4GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181819) //Broggok Rear door
|
||||
Door5GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181823) //Kelidan exit door
|
||||
Door6GUID = pGo->GetGUID();
|
||||
if (go->GetEntry() == 181766) //Final exit door
|
||||
Door1GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181811) //The Maker Front door
|
||||
Door2GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181812) //The Maker Rear door
|
||||
Door3GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181822) //Broggok Front door
|
||||
Door4GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181819) //Broggok Rear door
|
||||
Door5GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181823) //Kelidan exit door
|
||||
Door6GUID = go->GetGUID();
|
||||
|
||||
if (pGo->GetEntry() == 181813) //The Maker prison cell front right
|
||||
PrisonCell1GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181814) //The Maker prison cell back right
|
||||
PrisonCell2GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181816) //The Maker prison cell front left
|
||||
PrisonCell3GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181815) //The Maker prison cell back left
|
||||
PrisonCell4GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181821) //Broggok prison cell front right
|
||||
PrisonCell5GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181818) //Broggok prison cell back right
|
||||
PrisonCell6GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181820) //Broggok prison cell front left
|
||||
PrisonCell7GUID = pGo->GetGUID();
|
||||
if (pGo->GetEntry() == 181817) //Broggok prison cell back left
|
||||
PrisonCell8GUID = pGo->GetGUID();
|
||||
if (go->GetEntry() == 181813) //The Maker prison cell front right
|
||||
PrisonCell1GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181814) //The Maker prison cell back right
|
||||
PrisonCell2GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181816) //The Maker prison cell front left
|
||||
PrisonCell3GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181815) //The Maker prison cell back left
|
||||
PrisonCell4GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181821) //Broggok prison cell front right
|
||||
PrisonCell5GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181818) //Broggok prison cell back right
|
||||
PrisonCell6GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181820) //Broggok prison cell front left
|
||||
PrisonCell7GUID = go->GetGUID();
|
||||
if (go->GetEntry() == 181817) //Broggok prison cell back left
|
||||
PrisonCell8GUID = go->GetGUID();
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
|
||||
+4
-4
@@ -51,15 +51,15 @@ class instance_ramparts : public InstanceMapScript
|
||||
m_uiChestHGUID = 0;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 185168:
|
||||
m_uiChestNGUID = pGo->GetGUID();
|
||||
m_uiChestNGUID = go->GetGUID();
|
||||
break;
|
||||
case 185169:
|
||||
m_uiChestHGUID = pGo->GetGUID();
|
||||
m_uiChestHGUID = go->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+15
-15
@@ -85,28 +85,28 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 17257:
|
||||
MagtheridonGUID = pCreature->GetGUID();
|
||||
MagtheridonGUID = creature->GetGUID();
|
||||
break;
|
||||
case 17256:
|
||||
ChannelerGUID.insert(pCreature->GetGUID());
|
||||
ChannelerGUID.insert(creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 181713:
|
||||
pGo->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
break;
|
||||
case 183847:
|
||||
DoorGUID = pGo->GetGUID();
|
||||
DoorGUID = go->GetGUID();
|
||||
break;
|
||||
case 184653: // hall
|
||||
case 184634: // six columns
|
||||
@@ -115,7 +115,7 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
case 184637:
|
||||
case 184638:
|
||||
case 184639:
|
||||
ColumnGUID.insert(pGo->GetGUID());
|
||||
ColumnGUID.insert(go->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,7 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
m_auiEncounter[1] = NOT_STARTED;
|
||||
for (std::set<uint64>::const_iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
|
||||
{
|
||||
if (Creature *Channeler = instance->GetCreature(*i))
|
||||
if (Creature* Channeler = instance->GetCreature(*i))
|
||||
{
|
||||
if (Channeler->isAlive())
|
||||
Channeler->AI()->EnterEvadeMode();
|
||||
@@ -169,12 +169,12 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
// Let all five channelers aggro.
|
||||
for (std::set<uint64>::const_iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
|
||||
{
|
||||
Creature *Channeler = instance->GetCreature(*i);
|
||||
Creature* Channeler = instance->GetCreature(*i);
|
||||
if (Channeler && Channeler->isAlive())
|
||||
Channeler->AI()->AttackStart(Channeler->SelectNearestTarget(999));
|
||||
}
|
||||
// Release Magtheridon after two minutes.
|
||||
Creature *Magtheridon = instance->GetCreature(MagtheridonGUID);
|
||||
Creature* Magtheridon = instance->GetCreature(MagtheridonGUID);
|
||||
if (Magtheridon && Magtheridon->isAlive())
|
||||
{
|
||||
Magtheridon->MonsterTextEmote(EMOTE_BONDS_WEAKEN, 0);
|
||||
@@ -186,7 +186,7 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
case DONE: // Add buff and check if all channelers are dead.
|
||||
for (std::set<uint64>::const_iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
|
||||
{
|
||||
Creature *Channeler = instance->GetCreature(*i);
|
||||
Creature* Channeler = instance->GetCreature(*i);
|
||||
if (Channeler && Channeler->isAlive())
|
||||
{
|
||||
//Channeler->CastSpell(Channeler, SPELL_SOUL_TRANSFER, true);
|
||||
@@ -221,7 +221,7 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
{
|
||||
if (CageTimer <= diff)
|
||||
{
|
||||
Creature *Magtheridon = instance->GetCreature(MagtheridonGUID);
|
||||
Creature* Magtheridon = instance->GetCreature(MagtheridonGUID);
|
||||
if (Magtheridon && Magtheridon->isAlive())
|
||||
{
|
||||
Magtheridon->clearUnitState(UNIT_STAT_STUNNED);
|
||||
@@ -237,7 +237,7 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
{
|
||||
for (std::set<uint64>::const_iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
|
||||
{
|
||||
if (Creature *Channeler = instance->GetCreature(*i))
|
||||
if (Creature* Channeler = instance->GetCreature(*i))
|
||||
{
|
||||
if (Channeler->isAlive())
|
||||
Channeler->AI()->EnterEvadeMode();
|
||||
|
||||
+6
-6
@@ -53,22 +53,22 @@ class instance_shattered_halls : public InstanceMapScript
|
||||
nethekurseDoorGUID = 0;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case DOOR_NETHEKURSE:
|
||||
nethekurseDoorGUID = pGo->GetGUID();
|
||||
nethekurseDoorGUID = go->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 16807:
|
||||
nethekurseGUID = pCreature->GetGUID();
|
||||
nethekurseGUID = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,30 +83,30 @@ class instance_the_eye : public InstanceMapScript
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 20064:
|
||||
ThaladredTheDarkener = pCreature->GetGUID();
|
||||
ThaladredTheDarkener = creature->GetGUID();
|
||||
break;
|
||||
case 20063:
|
||||
MasterEngineerTelonicus = pCreature->GetGUID();
|
||||
MasterEngineerTelonicus = creature->GetGUID();
|
||||
break;
|
||||
case 20062:
|
||||
GrandAstromancerCapernian = pCreature->GetGUID();
|
||||
GrandAstromancerCapernian = creature->GetGUID();
|
||||
break;
|
||||
case 20060:
|
||||
LordSanguinar = pCreature->GetGUID();
|
||||
LordSanguinar = creature->GetGUID();
|
||||
break;
|
||||
case 19622:
|
||||
Kaelthas = pCreature->GetGUID();
|
||||
Kaelthas = creature->GetGUID();
|
||||
break;
|
||||
case 18805:
|
||||
Astromancer = pCreature->GetGUID();
|
||||
Astromancer = creature->GetGUID();
|
||||
break;
|
||||
case 19514:
|
||||
Alar = pCreature->GetGUID();
|
||||
Alar = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,26 +100,26 @@ class instance_arcatraz : public InstanceMapScript
|
||||
}
|
||||
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
void OnGameObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_ALPHA: Containment_Core_Security_Field_AlphaGUID = pGo->GetGUID(); break;
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_BETA: Containment_Core_Security_Field_BetaGUID = pGo->GetGUID(); break;
|
||||
case POD_ALPHA: Pod_AlphaGUID = pGo->GetGUID(); break;
|
||||
case POD_GAMMA: Pod_GammaGUID = pGo->GetGUID(); break;
|
||||
case POD_BETA: Pod_BetaGUID = pGo->GetGUID(); break;
|
||||
case POD_DELTA: Pod_DeltaGUID = pGo->GetGUID(); break;
|
||||
case POD_OMEGA: Pod_OmegaGUID = pGo->GetGUID(); break;
|
||||
case SEAL_SPHERE: GoSphereGUID = pGo->GetGUID(); break;
|
||||
//case WARDENS_SHIELD: Wardens_ShieldGUID = pGo->GetGUID(); break;
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_ALPHA: Containment_Core_Security_Field_AlphaGUID = go->GetGUID(); break;
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_BETA: Containment_Core_Security_Field_BetaGUID = go->GetGUID(); break;
|
||||
case POD_ALPHA: Pod_AlphaGUID = go->GetGUID(); break;
|
||||
case POD_GAMMA: Pod_GammaGUID = go->GetGUID(); break;
|
||||
case POD_BETA: Pod_BetaGUID = go->GetGUID(); break;
|
||||
case POD_DELTA: Pod_DeltaGUID = go->GetGUID(); break;
|
||||
case POD_OMEGA: Pod_OmegaGUID = go->GetGUID(); break;
|
||||
case SEAL_SPHERE: GoSphereGUID = go->GetGUID(); break;
|
||||
//case WARDENS_SHIELD: Wardens_ShieldGUID = go->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
if (pCreature->GetEntry() == MELLICHAR)
|
||||
MellicharGUID = pCreature->GetGUID();
|
||||
if (creature->GetEntry() == MELLICHAR)
|
||||
MellicharGUID = creature->GetGUID();
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
@@ -132,16 +132,16 @@ class instance_arcatraz : public InstanceMapScript
|
||||
case TYPE_DALLIAH:
|
||||
if (data == DONE)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Containment_Core_Security_Field_BetaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
if (GameObject* go = instance->GetGameObject(Containment_Core_Security_Field_BetaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case TYPE_SOCCOTHRATES:
|
||||
if (data == DONE)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Containment_Core_Security_Field_AlphaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
if (GameObject* go = instance->GetGameObject(Containment_Core_Security_Field_AlphaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
@@ -158,47 +158,47 @@ class instance_arcatraz : public InstanceMapScript
|
||||
break;
|
||||
case TYPE_WARDEN_1:
|
||||
if (data == IN_PROGRESS)
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_AlphaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
if (GameObject* go = instance->GetGameObject(Pod_AlphaGUID))
|
||||
go->UseDoorOrButton();
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_2:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_BetaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
if (GameObject* go = instance->GetGameObject(Pod_BetaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_3:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_DeltaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
if (GameObject* go = instance->GetGameObject(Pod_DeltaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[6] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_4:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_GammaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
if (GameObject* go = instance->GetGameObject(Pod_GammaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[7] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_5:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_OmegaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
if (GameObject* go = instance->GetGameObject(Pod_OmegaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[8] = data;
|
||||
break;
|
||||
case TYPE_SHIELD_OPEN:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Wardens_ShieldGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
if (GameObject* go = instance->GetGameObject(Wardens_ShieldGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user