[7715] Provided way for scripts set alternative gameobject state for client show. Author: VladimirMangos
Also use enum for gsmeobject states. --HG-- branch : trunk
This commit is contained in:
@@ -207,7 +207,7 @@ float ethereum_NPC[2][7] =
|
||||
|
||||
bool GOHello_go_ethereum_prison(Player *player, GameObject* _GO)
|
||||
{
|
||||
_GO->SetGoState(0);
|
||||
_GO->SetGoState(GO_STATE_ACTIVE);
|
||||
switch(rand()%2){
|
||||
case 0:
|
||||
_GO->SummonCreature(ethereum_NPC[0][rand()%6],_GO->GetPositionX(),_GO->GetPositionY(),_GO->GetPositionZ()+0.3, 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000);
|
||||
|
||||
@@ -185,7 +185,7 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(0);
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
break;}
|
||||
case 13:
|
||||
m_creature->SummonCreature(3922, 3449.218018, -587.825073, 174.978867, 4.714445, TEMPSUMMON_DEAD_DESPAWN, 60000);
|
||||
@@ -215,7 +215,7 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(1);
|
||||
Cage->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
|
||||
{
|
||||
case DATA_IKISSDOOREVENT:
|
||||
if( IkissDoor )
|
||||
IkissDoor->SetGoState(0);
|
||||
IkissDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
{
|
||||
GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(i));
|
||||
if(Door)
|
||||
Door->SetGoState(0); // Open Doors
|
||||
Door->SetGoState(GO_STATE_ACTIVE); // Open Doors
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1005,10 +1005,10 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
DoorGUID[1] = pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_L);
|
||||
|
||||
if(GETGO(Gate, GateGUID))
|
||||
Gate->SetGoState(1);
|
||||
Gate->SetGoState(GO_STATE_READY);
|
||||
for(uint8 i = 0; i < 2; i++)
|
||||
if(GETGO(Door, DoorGUID[i]))
|
||||
Door->SetGoState(1);
|
||||
Door->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1078,7 +1078,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
|
||||
for(uint8 i = 0; i < 2; i++)
|
||||
if(GETGO(Door, DoorGUID[i]))
|
||||
Door->SetGoState(1);
|
||||
Door->SetGoState(GO_STATE_READY);
|
||||
|
||||
if(GETCRE(Illidan, IllidanGUID))
|
||||
{
|
||||
@@ -1244,7 +1244,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
Spirit[0]->InterruptNonMeleeSpells(true);
|
||||
Spirit[1]->InterruptNonMeleeSpells(true);
|
||||
if(GETGO(Gate, GateGUID))
|
||||
Gate->SetGoState(0);
|
||||
Gate->SetGoState(GO_STATE_ACTIVE);
|
||||
Timer = 2000;
|
||||
break;
|
||||
case 4:
|
||||
@@ -1275,7 +1275,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
case 6:
|
||||
for(uint8 i = 0; i < 2; i++)
|
||||
if(GETGO(Door, DoorGUID[i]))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case 8:
|
||||
if(Phase == PHASE_WALK)
|
||||
@@ -1678,7 +1678,7 @@ bool GOHello_cage_trap(Player* plr, GameObject* go)
|
||||
cell_lock->Visit(cell_lock, cSearcher, *(plr->GetMap()));
|
||||
|
||||
((cage_trap_triggerAI*)trigger->AI())->Active = true;
|
||||
go->SetGoState(0);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,8 +105,8 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
{
|
||||
if(GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_SUPREMUS_DOORS)))
|
||||
{
|
||||
if(close) Doors->SetGoState(1); // Closed
|
||||
else Doors->SetGoState(0); // Open
|
||||
if(close) Doors->SetGoState(GO_STATE_READY); // Closed
|
||||
else Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,14 +129,6 @@ struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI
|
||||
|
||||
void Aggro(Unit *who) { }
|
||||
|
||||
void DoGate(uint32 id, uint32 state)
|
||||
{
|
||||
if (GameObject *go = GameObject::GetGameObject(*m_creature,pInstance->GetData64(id)))
|
||||
go->SetGoState(state);
|
||||
|
||||
debug_log("TSCR: npc_grimstone, arena gate update state.");
|
||||
}
|
||||
|
||||
//TODO: move them to center
|
||||
void SummonRingMob()
|
||||
{
|
||||
@@ -257,7 +249,7 @@ struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI
|
||||
Event_Timer = 2000;
|
||||
break;
|
||||
case 3:
|
||||
DoGate(DATA_ARENA1,0);
|
||||
HandleGameObject(DATA_ARENA1, true);
|
||||
Event_Timer = 3000;
|
||||
break;
|
||||
case 4:
|
||||
@@ -277,13 +269,13 @@ struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI
|
||||
break;
|
||||
case 7:
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
DoGate(DATA_ARENA1,1);
|
||||
HandleGameObject(DATA_ARENA1, false);
|
||||
DoScriptText(-1000000, m_creature);//4
|
||||
CanWalk = true;
|
||||
Event_Timer = 0;
|
||||
break;
|
||||
case 8:
|
||||
DoGate(DATA_ARENA2,0);
|
||||
HandleGameObject(DATA_ARENA2, true);
|
||||
Event_Timer = 5000;
|
||||
break;
|
||||
case 9:
|
||||
@@ -293,9 +285,9 @@ struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI
|
||||
break;
|
||||
case 10:
|
||||
//if quest, complete
|
||||
DoGate(DATA_ARENA2,1);
|
||||
DoGate(DATA_ARENA3,0);
|
||||
DoGate(DATA_ARENA4,0);
|
||||
HandleGameObject(DATA_ARENA2, false);
|
||||
HandleGameObject(DATA_ARENA3, true);
|
||||
HandleGameObject(DATA_ARENA4, true);
|
||||
CanWalk = true;
|
||||
Event_Timer = 0;
|
||||
break;
|
||||
|
||||
@@ -101,16 +101,16 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
|
||||
case 182060:
|
||||
HordeGate = go->GetGUID();
|
||||
if(allianceRetreat)
|
||||
go->SetGoState(0);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
else
|
||||
go->SetGoState(1);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
break;
|
||||
case 182061:
|
||||
ElfGate = go->GetGUID();
|
||||
if(hordeRetreat)
|
||||
go->SetGoState(0);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
else
|
||||
go->SetGoState(1);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
void OpenDoor(uint64 DoorGUID, bool open)
|
||||
{
|
||||
if(GameObject *Door = instance->GetGameObject(DoorGUID))
|
||||
Door->SetGoState(open ? 0 : 1);
|
||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
|
||||
|
||||
+4
-4
@@ -141,12 +141,12 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
|
||||
if (data == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,AccessPanelHydro))
|
||||
_go->SetGoState(0);
|
||||
_go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,MainChambersDoor))
|
||||
_go->SetGoState(0);
|
||||
_go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
debug_log("TSCR: Instance Steamvault: Access panel used.");
|
||||
}
|
||||
@@ -156,12 +156,12 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
|
||||
if (data == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,AccessPanelMek))
|
||||
_go->SetGoState(0);
|
||||
_go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,MainChambersDoor))
|
||||
_go->SetGoState(0);
|
||||
_go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
debug_log("TSCR: Instance Steamvault: Access panel used.");
|
||||
}
|
||||
|
||||
@@ -120,13 +120,13 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance
|
||||
|
||||
void ShootCannon()
|
||||
{
|
||||
DefiasCannon->SetGoState(0);
|
||||
DefiasCannon->SetGoState(GO_STATE_ACTIVE);
|
||||
DoPlaySound(DefiasCannon, SOUND_CANNONFIRE);
|
||||
}
|
||||
|
||||
void BlastOutDoor()
|
||||
{
|
||||
IronCladDoor->SetGoState(2);
|
||||
IronCladDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
DoPlaySound(IronCladDoor, SOUND_DESTROYDOOR);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(0);
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
DoScriptText(SAY_START, m_creature, player);
|
||||
break;
|
||||
}
|
||||
@@ -220,7 +220,7 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
|
||||
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(1);
|
||||
Cage->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
|
||||
@@ -113,7 +113,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
|
||||
GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
||||
if (EncounterDoor)
|
||||
EncounterDoor->SetGoState(0); // Open the encounter door
|
||||
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -127,7 +127,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
|
||||
if(data != IN_PROGRESS)
|
||||
{
|
||||
if(GameObject *Door = instance->GetGameObject(DoorGUID))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
break;
|
||||
case DATA_CHANNELER_EVENT:
|
||||
@@ -149,7 +149,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
|
||||
}
|
||||
CageTimer = 0;
|
||||
if(GameObject *Door = instance->GetGameObject(DoorGUID))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}break;
|
||||
case IN_PROGRESS: // Event start.
|
||||
if(Encounters[1] != IN_PROGRESS)
|
||||
@@ -170,7 +170,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
|
||||
CageTimer = 120000;
|
||||
}
|
||||
if(GameObject *Door = instance->GetGameObject(DoorGUID))
|
||||
Door->SetGoState(1);
|
||||
Door->SetGoState(GO_STATE_READY);
|
||||
}break;
|
||||
case DONE: // Add buff and check if all channelers are dead.
|
||||
for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
|
||||
|
||||
+1
-1
@@ -244,7 +244,7 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI
|
||||
if (pInstance->GetData64(DATA_NETHEKURSE_DOOR))
|
||||
{
|
||||
if (GameObject *Door = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_NETHEKURSE_DOOR)))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,9 +134,9 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
void HandleTerraceDoors(bool open)
|
||||
{
|
||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1)))
|
||||
Door->SetGoState(open ? 0 : 1);
|
||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2)))
|
||||
Door->SetGoState(open ? 0 : 1);
|
||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
|
||||
@@ -212,7 +212,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
||||
GameObject* Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR));
|
||||
if(Door)
|
||||
{
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
||||
GameObject* Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR));
|
||||
if(Door)
|
||||
{
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,7 +258,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
||||
GameObject* Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR));
|
||||
if(Door)
|
||||
{
|
||||
Door->SetGoState(1);
|
||||
Door->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, NOT_STARTED);
|
||||
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, DONE);
|
||||
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
{
|
||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, IN_PROGRESS);
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
Door->SetGoState(1);
|
||||
Door->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
Door->SetGoState(1);
|
||||
Door->SetGoState(GO_STATE_READY);
|
||||
CloseDoorTimer = 0;
|
||||
}
|
||||
}else CloseDoorTimer -= diff;
|
||||
|
||||
@@ -574,9 +574,9 @@ struct TRINITY_DLL_DECL boss_croneAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
||||
|
||||
if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
lDoor->SetGoState(0);
|
||||
lDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
||||
rDoor->SetGoState(0);
|
||||
rDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
@@ -769,9 +769,9 @@ struct TRINITY_DLL_DECL boss_bigbadwolfAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
||||
|
||||
if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
lDoor->SetGoState(0);
|
||||
lDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
||||
rDoor->SetGoState(0);
|
||||
rDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
@@ -1016,9 +1016,9 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
||||
|
||||
if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
lDoor->SetGoState(0);
|
||||
lDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
||||
rDoor->SetGoState(0);
|
||||
rDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
@@ -1105,9 +1105,9 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
||||
|
||||
if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
lDoor->SetGoState(0);
|
||||
lDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
||||
rDoor->SetGoState(0);
|
||||
rDoor->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
@@ -149,10 +149,10 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
Event = pInstance->GetData(DATA_OPERA_PERFORMANCE);
|
||||
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
Door->SetGoState(1);
|
||||
Door->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (GameObject* Curtain = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_CURTAINS)))
|
||||
Curtain->SetGoState(1);
|
||||
Curtain->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
if(pInstance)
|
||||
{
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
Door->SetGoState(1);
|
||||
Door->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
IsBeingEscorted = false;
|
||||
PerformanceReady = true;
|
||||
@@ -262,7 +262,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
return;
|
||||
|
||||
if (GameObject* Curtain = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_CURTAINS)))
|
||||
Curtain->SetGoState(0);
|
||||
Curtain->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
CurtainTimer = 0;
|
||||
}else CurtainTimer -= diff;
|
||||
@@ -315,7 +315,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
pInstance->SetData(DATA_OPERA_EVENT, IN_PROGRESS);
|
||||
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
m_creature->CastSpell(m_creature, SPELL_TUXEDO, true);
|
||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
@@ -132,7 +132,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
|
||||
GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_DOOR));
|
||||
if (Door)
|
||||
Door->SetGoState(0); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
||||
Door->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
||||
// Small door opened after event are expected to be closed by default
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_KAEL_DOOR));
|
||||
if (EncounterDoor)
|
||||
EncounterDoor->SetGoState(0); // Open the encounter door
|
||||
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
@@ -156,7 +156,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
{
|
||||
GameObject* EncounterDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_DOOR));
|
||||
if (EncounterDoor)
|
||||
EncounterDoor->SetGoState(1); //Close the encounter door, open it in JustDied/Reset
|
||||
EncounterDoor->SetGoState(GO_STATE_READY); //Close the encounter door, open it in JustDied/Reset
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,9 +348,9 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
{
|
||||
GameObject* KaelLeft = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_STATUE_LEFT));
|
||||
if (KaelLeft) KaelLeft->SetGoState(0);
|
||||
if (KaelLeft) KaelLeft->SetGoState(GO_STATE_ACTIVE);
|
||||
GameObject* KaelRight = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_STATUE_RIGHT));
|
||||
if (KaelRight) KaelRight->SetGoState(0);
|
||||
if (KaelRight) KaelRight->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}else
|
||||
{
|
||||
|
||||
@@ -232,7 +232,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_DELRISSA_EVENT, DONE);
|
||||
|
||||
if (GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_DELRISSA_DOOR)))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
void CheckLootable()
|
||||
|
||||
@@ -107,7 +107,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
|
||||
GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR));
|
||||
if (Door)
|
||||
Door->SetGoState(0); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
||||
Door->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
||||
// Small door opened after event are expected to be closed by default
|
||||
// Set Inst data for encounter
|
||||
pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
|
||||
@@ -189,7 +189,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
{
|
||||
GameObject* EncounterDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR));
|
||||
if (EncounterDoor)
|
||||
EncounterDoor->SetGoState(1); //Close the encounter door, open it in JustDied/Reset
|
||||
EncounterDoor->SetGoState(GO_STATE_READY); //Close the encounter door, open it in JustDied/Reset
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,11 +238,11 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
|
||||
GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR));
|
||||
if (EncounterDoor)
|
||||
EncounterDoor->SetGoState(0); // Open the encounter door
|
||||
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
||||
|
||||
GameObject* ContinueDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_DOOR));
|
||||
if (ContinueDoor)
|
||||
ContinueDoor->SetGoState(0); // Open the door leading further in
|
||||
ContinueDoor->SetGoState(GO_STATE_ACTIVE); // Open the door leading further in
|
||||
|
||||
ShatterRemainingCrystals();
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
||||
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_VEXALLUS_DOOR)))
|
||||
Door->SetGoState(0);
|
||||
Door->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance
|
||||
{
|
||||
GameObject *Shrine = instance->GetGameObject(PumpkinShrineGUID);
|
||||
if(Shrine)
|
||||
Shrine->SetGoState(1);
|
||||
Shrine->SetGoState(GO_STATE_READY);
|
||||
}break;
|
||||
case DATA_HORSEMAN_EVENT:
|
||||
if (data == DONE)
|
||||
@@ -109,7 +109,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance
|
||||
HorsemanAdds.clear();
|
||||
GameObject *Shrine = instance->GetGameObject(PumpkinShrineGUID);
|
||||
if(Shrine)
|
||||
Shrine->SetGoState(1);
|
||||
Shrine->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -97,17 +97,17 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance
|
||||
case GO_COURTYARD_DOOR:
|
||||
DoorCourtyardGUID = go->GetGUID();
|
||||
if (Encounter[0] == DONE)
|
||||
go->SetGoState(0);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case GO_SORCERER_DOOR:
|
||||
DoorSorcererGUID = go->GetGUID();
|
||||
if (Encounter[2] == DONE)
|
||||
go->SetGoState(0);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case GO_ARUGAL_DOOR:
|
||||
DoorArugalGUID = go->GetGUID();
|
||||
if (Encounter[3] == DONE)
|
||||
go->SetGoState(0);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ struct TRINITY_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
|
||||
{
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS,IN_PROGRESS);
|
||||
if (GameObject* Sphere = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_SPHERE_SHIELD)))
|
||||
Sphere->SetGoState(1);
|
||||
Sphere->SetGoState(GO_STATE_READY);
|
||||
IsRunning = true;
|
||||
}
|
||||
}
|
||||
@@ -355,7 +355,7 @@ struct TRINITY_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
|
||||
DoCast(m_creature,SPELL_TARGET_ALPHA);
|
||||
pInstance->SetData(TYPE_WARDEN_1,IN_PROGRESS);
|
||||
if (GameObject *Sphere = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_SPHERE_SHIELD)))
|
||||
Sphere->SetGoState(1);
|
||||
Sphere->SetGoState(GO_STATE_READY);
|
||||
break;
|
||||
case 3:
|
||||
DoCast(m_creature,SPELL_TARGET_BETA);
|
||||
|
||||
@@ -163,7 +163,7 @@ struct TRINITY_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
|
||||
case 1:
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
if (GameObject* Sphere = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_SPHERE_SHIELD)))
|
||||
Sphere->SetGoState(0);
|
||||
Sphere->SetGoState(GO_STATE_ACTIVE);
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 25000;
|
||||
break;
|
||||
|
||||
@@ -389,7 +389,7 @@ struct TRINITY_DLL_DECL npc_isla_starmaneAI : public npc_escortAI
|
||||
{
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 10, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(0);
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
}break;
|
||||
case 2: DoScriptText(SAY_PROGRESS_1, m_creature, player); break;
|
||||
case 5: DoScriptText(SAY_PROGRESS_2, m_creature, player); break;
|
||||
|
||||
@@ -117,7 +117,7 @@ bool GOHello_go_mausoleum_door(Player *player, GameObject* _GO)
|
||||
|
||||
if (GameObject *trigger = SearchMausoleumGo(player, GO_TRIGGER, 30))
|
||||
{
|
||||
trigger->SetGoState(1);
|
||||
trigger->SetGoState(GO_STATE_READY);
|
||||
player->SummonCreature(C_ULAG, 2390.26, 336.47, 40.01, 2.26, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000);
|
||||
return false;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ bool GOHello_go_mausoleum_trigger(Player *player, GameObject* _GO)
|
||||
|
||||
if (GameObject *door = SearchMausoleumGo(player, GO_DOOR, 30))
|
||||
{
|
||||
_GO->SetGoState(0);
|
||||
_GO->SetGoState(GO_STATE_ACTIVE);
|
||||
door->RemoveFlag(GAMEOBJECT_FLAGS,GO_FLAG_INTERACT_COND);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
|
||||
break;
|
||||
|
||||
case ANCIENT_VAULT_DOOR:
|
||||
go->SetGoState(1);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 33);
|
||||
ancientVaultDoor = go->GetGUID();
|
||||
break;
|
||||
@@ -93,7 +93,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
|
||||
return;
|
||||
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 33);
|
||||
go->SetGoState(0);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
void ActivateStoneKeepers()
|
||||
|
||||
@@ -140,7 +140,7 @@ struct TRINITY_DLL_DECL instance_zulaman : public ScriptedInstance
|
||||
void OpenDoor(uint64 DoorGUID, bool open)
|
||||
{
|
||||
if(GameObject *Door = instance->GetGameObject(DoorGUID))
|
||||
Door->SetGoState(open ? 0 : 1);
|
||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
}
|
||||
|
||||
void SummonHostage(uint8 num)
|
||||
|
||||
Reference in New Issue
Block a user