Updated Shadowfang Keep Instancescript - original patch from SD2 737
--HG-- branch : trunk
This commit is contained in:
@@ -26,64 +26,41 @@ EndScriptData */
|
|||||||
|
|
||||||
#define ENCOUNTERS 4
|
#define ENCOUNTERS 4
|
||||||
|
|
||||||
//#define ENTRY_BOSS_RETHILGORE 3914
|
|
||||||
//#define ENTRY_BOSS_FENRUS 4274
|
|
||||||
//#define ENTRY_BOSS_NANDOS 3927
|
|
||||||
|
|
||||||
#define ENTRY_COURTYARD_DOOR 18895 //door to open when talking to NPC's
|
|
||||||
#define ENTRY_SORCERER_DOOR 18972 //door to open when Fenrus the Devourer
|
|
||||||
#define ENTRY_ARUGAL_DOOR 18971 //door to open when Wolf Master Nandos
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance
|
struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance
|
||||||
{
|
{
|
||||||
instance_shadowfang_keep(Map *Map) : ScriptedInstance(Map) {Initialize();};
|
instance_shadowfang_keep(Map *Map) : ScriptedInstance(Map) {Initialize();};
|
||||||
|
|
||||||
uint32 Encounter[ENCOUNTERS];
|
uint32 Encounter[ENCOUNTERS];
|
||||||
|
|
||||||
/*uint64 RethilgoreGUID;
|
uint64 DoorCourtyard;
|
||||||
uint64 FenrusGUID;
|
uint64 DoorSorcerer;
|
||||||
uint64 NandosGUID;*/
|
uint64 DoorArugal;
|
||||||
|
|
||||||
GameObject *DoorCourtyard;
|
|
||||||
GameObject *DoorSorcerer;
|
|
||||||
GameObject *DoorArugal;
|
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
/*RethilgoreGUID = 0;
|
DoorCourtyard = 0;
|
||||||
FenrusGUID = 0;
|
DoorSorcerer = 0;
|
||||||
NandosGUID = 0;*/
|
DoorArugal = 0;
|
||||||
|
|
||||||
DoorCourtyard = NULL;
|
for(uint8 i=0; i < ENCOUNTERS; ++i)
|
||||||
DoorSorcerer = NULL;
|
Encounter[i] = NOT_STARTED;
|
||||||
DoorArugal = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnObjectCreate(GameObject *go)
|
void OnObjectCreate(GameObject *go)
|
||||||
{
|
{
|
||||||
switch(go->GetEntry())
|
switch(go->GetEntry())
|
||||||
{
|
{
|
||||||
case ENTRY_COURTYARD_DOOR: DoorCourtyard = go; break;
|
case 18895: DoorCourtyard = go->GetGUID(); break;
|
||||||
case ENTRY_SORCERER_DOOR: DoorSorcerer = go; break;
|
case 18972: DoorSorcerer = go->GetGUID(); break;
|
||||||
case ENTRY_ARUGAL_DOOR: DoorArugal = go; break;
|
case 18971: DoorArugal = go->GetGUID(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void OnCreatureCreate(Creature *creature, uint32 creature_entry)
|
void OpenDoor(uint64 DoorGUID, bool open)
|
||||||
{
|
{
|
||||||
switch(creature_entry)
|
if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID))
|
||||||
{
|
Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1);
|
||||||
case ENTRY_BOSS_RETHILGORE:
|
|
||||||
RethilgoreGUID = creature->GetGUID();
|
|
||||||
break;
|
|
||||||
case ENTRY_BOSS_FENRUS:
|
|
||||||
FenrusGUID = creature->GetGUID();
|
|
||||||
break;
|
|
||||||
case ENTRY_BOSS_NANDOS:
|
|
||||||
NandosGUID = creature->GetGUID();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}*/
|
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 data)
|
void SetData(uint32 type, uint32 data)
|
||||||
{
|
{
|
||||||
@@ -91,10 +68,7 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance
|
|||||||
{
|
{
|
||||||
case TYPE_FREE_NPC:
|
case TYPE_FREE_NPC:
|
||||||
if(data == DONE)
|
if(data == DONE)
|
||||||
{
|
OpenDoor(DoorCourtyard, true);
|
||||||
if(DoorCourtyard)
|
|
||||||
DoorCourtyard->UseDoorOrButton();
|
|
||||||
}
|
|
||||||
Encounter[0] = data;
|
Encounter[0] = data;
|
||||||
break;
|
break;
|
||||||
case TYPE_RETHILGORE:
|
case TYPE_RETHILGORE:
|
||||||
@@ -102,18 +76,12 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance
|
|||||||
break;
|
break;
|
||||||
case TYPE_FENRUS:
|
case TYPE_FENRUS:
|
||||||
if(data == DONE)
|
if(data == DONE)
|
||||||
{
|
OpenDoor(DoorSorcerer, true);
|
||||||
if(DoorSorcerer)
|
|
||||||
DoorSorcerer->UseDoorOrButton();
|
|
||||||
}
|
|
||||||
Encounter[2] = data;
|
Encounter[2] = data;
|
||||||
break;
|
break;
|
||||||
case TYPE_NANDOS:
|
case TYPE_NANDOS:
|
||||||
if(data == DONE)
|
if(data == DONE)
|
||||||
{
|
OpenDoor(DoorArugal, true);
|
||||||
if(DoorArugal)
|
|
||||||
DoorArugal->UseDoorOrButton();
|
|
||||||
}
|
|
||||||
Encounter[3] = data;
|
Encounter[3] = data;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user