mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Gameobject: Rename GO_STATE_ACTIVE_ALTERNATIVE to GO_STATE_DESTROYED (#24062)
* Step 1: Rename GO_STATE_ACTIVE_ALTERNATIVE to GO_STATE_DESTROYED
* Update src/server/shared/SharedDefines.h
Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com>
Co-authored-by: Trond B. Krokli <38162891+illfated@users.noreply.github.com>
(cherry picked from commit 50d9d9196d)
This commit is contained in:
@@ -1615,7 +1615,7 @@ void GameObject::SwitchDoorOrButton(bool activate, bool alternative /* = false *
|
||||
RemoveFlag(GO_FLAG_IN_USE);
|
||||
|
||||
if (GetGoState() == GO_STATE_READY) //if closed -> open
|
||||
SetGoState(alternative ? GO_STATE_ACTIVE_ALTERNATIVE : GO_STATE_ACTIVE);
|
||||
SetGoState(alternative ? GO_STATE_DESTROYED : GO_STATE_ACTIVE);
|
||||
else //if open -> close
|
||||
SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -2809,7 +2809,7 @@ enum GOState : uint8
|
||||
{
|
||||
GO_STATE_ACTIVE = 0, // show in world as used and not reset (closed door open)
|
||||
GO_STATE_READY = 1, // show in world as ready (closed door close)
|
||||
GO_STATE_ACTIVE_ALTERNATIVE = 2, // show in world as used in alt way and not reset (closed door open by cannon fire)
|
||||
GO_STATE_DESTROYED = 2, // show the object in-game as already used and not yet reset (e.g. door opened by a cannon blast)
|
||||
GO_STATE_TRANSPORT_ACTIVE = 24,
|
||||
GO_STATE_TRANSPORT_STOPPED = 25
|
||||
};
|
||||
|
||||
@@ -169,7 +169,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
{
|
||||
if (GameObject* pIronCladDoor = instance->GetGameObject(IronCladDoorGUID))
|
||||
{
|
||||
pIronCladDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
pIronCladDoor->SetGoState(GO_STATE_DESTROYED);
|
||||
pIronCladDoor->PlayDirectSound(SOUND_DESTROYDOOR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ class instance_gundrak : public InstanceMapScript
|
||||
go->SetGoState(MoorabiStatueState);
|
||||
break;
|
||||
case GO_GAL_DARAH_STATUE:
|
||||
go->SetGoState(CheckRequiredBosses(DATA_GAL_DARAH) ? GO_STATE_ACTIVE_ALTERNATIVE : GO_STATE_READY);
|
||||
go->SetGoState(CheckRequiredBosses(DATA_GAL_DARAH) ? GO_STATE_DESTROYED : GO_STATE_READY);
|
||||
break;
|
||||
case GO_DRAKKARI_COLOSSUS_STATUE:
|
||||
go->SetGoState(DrakkariColossusStatueState);
|
||||
@@ -204,9 +204,9 @@ class instance_gundrak : public InstanceMapScript
|
||||
return false;
|
||||
break;
|
||||
case DATA_GAL_DARAH:
|
||||
if (SladRanStatueState != GO_STATE_ACTIVE_ALTERNATIVE
|
||||
|| DrakkariColossusStatueState != GO_STATE_ACTIVE_ALTERNATIVE
|
||||
|| MoorabiStatueState != GO_STATE_ACTIVE_ALTERNATIVE)
|
||||
if (SladRanStatueState != GO_STATE_DESTROYED
|
||||
|| DrakkariColossusStatueState != GO_STATE_DESTROYED
|
||||
|| MoorabiStatueState != GO_STATE_DESTROYED)
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
@@ -311,7 +311,7 @@ class instance_gundrak : public InstanceMapScript
|
||||
break;
|
||||
case DATA_BRIDGE:
|
||||
for (uint32 type = DATA_SLAD_RAN_STATUE; type <= DATA_GAL_DARAH_STATUE; ++type)
|
||||
ToggleGameObject(type, GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
ToggleGameObject(type, GO_STATE_DESTROYED);
|
||||
ToggleGameObject(DATA_TRAPDOOR, GO_STATE_READY);
|
||||
ToggleGameObject(DATA_COLLISION, GO_STATE_ACTIVE);
|
||||
SaveToDB();
|
||||
|
||||
@@ -1058,7 +1058,7 @@ struct go_empowering_blood_orb : public GameObjectAI
|
||||
{
|
||||
me->AddFlag(GO_FLAG_IN_USE);
|
||||
me->SetGoAnimProgress(255);
|
||||
me->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
me->SetGoState(GO_STATE_DESTROYED);
|
||||
if (Creature* trigger = ObjectAccessor::GetCreature(*me, _triggerGuid))
|
||||
trigger->DespawnOrUnsummon();
|
||||
_scheduler.Schedule(3s, [this](TaskContext /*context*/)
|
||||
|
||||
@@ -615,14 +615,14 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
case GO_SCIENTIST_AIRLOCK_DOOR_ORANGE:
|
||||
PutricideGateGUIDs[0] = go->GetGUID();
|
||||
if (GetBossState(DATA_FESTERGUT) == DONE && GetBossState(DATA_ROTFACE) == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
go->SetGoState(GO_STATE_DESTROYED);
|
||||
else if (GetBossState(DATA_FESTERGUT) == DONE)
|
||||
HandleGameObject(PutricideGateGUIDs[1], false, go);
|
||||
break;
|
||||
case GO_SCIENTIST_AIRLOCK_DOOR_GREEN:
|
||||
PutricideGateGUIDs[1] = go->GetGUID();
|
||||
if (GetBossState(DATA_ROTFACE) == DONE && GetBossState(DATA_FESTERGUT) == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
go->SetGoState(GO_STATE_DESTROYED);
|
||||
else if (GetBossState(DATA_ROTFACE) == DONE)
|
||||
HandleGameObject(PutricideGateGUIDs[1], false, go);
|
||||
break;
|
||||
@@ -932,9 +932,9 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
HandleGameObject(PutricideCollisionGUID, true);
|
||||
if (GameObject* go = instance->GetGameObject(PutricideGateGUIDs[0]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
go->SetGoState(GO_STATE_DESTROYED);
|
||||
if (GameObject* go = instance->GetGameObject(PutricideGateGUIDs[1]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
go->SetGoState(GO_STATE_DESTROYED);
|
||||
}
|
||||
else
|
||||
HandleGameObject(PutricideGateGUIDs[0], false);
|
||||
@@ -948,9 +948,9 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
HandleGameObject(PutricideCollisionGUID, true);
|
||||
if (GameObject* go = instance->GetGameObject(PutricideGateGUIDs[0]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
go->SetGoState(GO_STATE_DESTROYED);
|
||||
if (GameObject* go = instance->GetGameObject(PutricideGateGUIDs[1]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
go->SetGoState(GO_STATE_DESTROYED);
|
||||
}
|
||||
else
|
||||
HandleGameObject(PutricideGateGUIDs[1], false);
|
||||
|
||||
@@ -545,7 +545,7 @@ class boss_mimiron : public CreatureScript
|
||||
break;
|
||||
case EVENT_VX001_ACTIVATION_5:
|
||||
if (GameObject* elevator = instance->GetGameObject(DATA_MIMIRON_ELEVATOR))
|
||||
elevator->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
elevator->SetGoState(GO_STATE_DESTROYED);
|
||||
if (Creature* vx001 = me->SummonCreature(NPC_VX_001, VX001SummonPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000))
|
||||
vx001->CastSpell(vx001, SPELL_FREEZE_ANIM);
|
||||
events.ScheduleEvent(EVENT_VX001_ACTIVATION_6, 19000);
|
||||
|
||||
@@ -502,7 +502,7 @@ class instance_ulduar : public InstanceMapScript
|
||||
case GO_LEVIATHAN_GATE:
|
||||
LeviathanGateGUID = gameObject->GetGUID();
|
||||
if (GetBossState(BOSS_LEVIATHAN) == DONE)
|
||||
gameObject->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
gameObject->SetGoState(GO_STATE_DESTROYED);
|
||||
break;
|
||||
case GO_BRAIN_ROOM_DOOR_1:
|
||||
BrainRoomDoorGUIDs[0] = gameObject->GetGUID();
|
||||
@@ -1024,7 +1024,7 @@ class instance_ulduar : public InstanceMapScript
|
||||
if (Creature* leviathan = GetCreature(BOSS_LEVIATHAN))
|
||||
leviathan->AI()->DoAction(ACTION_MOVE_TO_CENTER_POSITION);
|
||||
if (GameObject* gameObject = instance->GetGameObject(LeviathanGateGUID))
|
||||
gameObject->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
gameObject->SetGoState(GO_STATE_DESTROYED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user