Scripts/Pit of Saron: Unlock passage to Tyrannus after first 2 bosses are down.

This commit is contained in:
Shauren
2012-05-11 13:12:09 +02:00
parent 24308cc80a
commit d8a1a0e05a
2 changed files with 28 additions and 0 deletions

View File

@@ -23,6 +23,12 @@ Position const SlaveLeaderPos = {689.7158f, -104.8736f, 513.7360f, 0.0f};
// position for Jaina and Sylvanas
Position const EventLeaderPos2 = {1054.368f, 107.14620f, 628.4467f, 0.0f};
DoorData const Doors[] =
{
{GO_ICE_WALL, DATA_GARFROST, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
{GO_ICE_WALL, DATA_ICK, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
};
class instance_pit_of_saron : public InstanceMapScript
{
public:
@@ -33,6 +39,7 @@ class instance_pit_of_saron : public InstanceMapScript
instance_pit_of_saron_InstanceScript(Map* map) : InstanceScript(map)
{
SetBossNumber(MAX_ENCOUNTER);
LoadDoorData(Doors);
_garfrostGUID = 0;
_krickGUID = 0;
_ickGUID = 0;
@@ -154,6 +161,26 @@ class instance_pit_of_saron : public InstanceMapScript
}
}
void OnGameObjectCreate(GameObject* go)
{
switch (go->GetEntry())
{
case GO_ICE_WALL:
AddDoor(go, true);
break;
}
}
void OnGameObjectRemove(GameObject* go)
{
switch (go->GetEntry())
{
case GO_ICE_WALL:
AddDoor(go, false);
break;
}
}
bool SetBossState(uint32 type, EncounterState state)
{
if (!InstanceScript::SetBossState(type, state))

View File

@@ -90,6 +90,7 @@ enum CreatureIds
enum GameObjectIds
{
GO_SARONITE_ROCK = 196485,
GO_ICE_WALL = 201885,
};
#endif