mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
feat(Core/GameObject): Gob flag helpers (#11287)
This commit is contained in:
@@ -2680,7 +2680,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsGameObject(*itr))
|
||||
(*itr)->ToGameObject()->SetUInt32Value(GAMEOBJECT_FLAGS, e.action.goFlag.flag);
|
||||
(*itr)->ToGameObject()->ReplaceAllGameObjectFlags((GameObjectFlags)e.action.goFlag.flag);
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -2693,7 +2693,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsGameObject(*itr))
|
||||
(*itr)->ToGameObject()->SetFlag(GAMEOBJECT_FLAGS, e.action.goFlag.flag);
|
||||
(*itr)->ToGameObject()->SetGameObjectFlag((GameObjectFlags)e.action.goFlag.flag);
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -2706,7 +2706,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsGameObject(*itr))
|
||||
(*itr)->ToGameObject()->RemoveFlag(GAMEOBJECT_FLAGS, e.action.goFlag.flag);
|
||||
(*itr)->ToGameObject()->RemoveGameObjectFlag((GameObjectFlags)e.action.goFlag.flag);
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
|
||||
@@ -225,7 +225,7 @@ void BattlefieldWG::OnBattleStart()
|
||||
// Update faction of relic, only attacker can click on
|
||||
go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetAttackerTeam()]);
|
||||
// Set in use (not allow to click on before last door is broken)
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
// save guid
|
||||
m_titansRelic = go->GetGUID();
|
||||
|
||||
@@ -1208,7 +1208,7 @@ struct BfWGGameObjectBuilding
|
||||
case BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST:
|
||||
m_WG->SetRelicInteractible(true);
|
||||
if (GameObject* go = m_WG->GetRelic())
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
else
|
||||
LOG_ERROR("bg.battlefield", "BattlefieldWG: Relic not found.");
|
||||
break;
|
||||
|
||||
@@ -293,7 +293,7 @@ void BattlegroundIC::StartingEventOpenDoors()
|
||||
DoorOpen(BG_IC_GO_DOODAD_VR_PORTCULLIS01_2);
|
||||
|
||||
for (uint8 i = 0; i < MAX_FORTRESS_TELEPORTERS_SPAWNS; ++i)
|
||||
GetBGObject(BG_IC_Teleporters[i].type)->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
GetBGObject(BG_IC_Teleporters[i].type)->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
for (uint8 i = 0; i < MAX_FORTRESS_TELEPORTER_EFFECTS_SPAWNS; ++i)
|
||||
GetBGObject(BG_IC_TeleporterEffects[i].type)->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
@@ -125,7 +125,7 @@ void BattlegroundRV::PostUpdateImpl(uint32 diff)
|
||||
uint32 objects[2] = { BG_RV_OBJECT_ELEVATOR_1, BG_RV_OBJECT_ELEVATOR_2 };
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
if (GameObject* go = GetBGObject(objects[i]))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_TRANSPORT);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_TRANSPORT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -853,9 +853,9 @@ void BattlegroundSA::UpdateObjectInteractionFlags(uint32 objectId)
|
||||
if (GameObject* go = GetBGObject(objectId))
|
||||
{
|
||||
if (CanInteractWithObject(objectId))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE | GO_FLAG_INTERACT_COND | GO_FLAG_IN_USE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE | GO_FLAG_INTERACT_COND | GO_FLAG_IN_USE);
|
||||
else
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u
|
||||
if (GameObjectTemplateAddon const* templateAddon = GetTemplateAddon())
|
||||
{
|
||||
SetUInt32Value(GAMEOBJECT_FACTION, templateAddon->faction);
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, templateAddon->flags);
|
||||
ReplaceAllGameObjectFlags((GameObjectFlags)templateAddon->flags);
|
||||
}
|
||||
|
||||
SetEntry(goinfo->entry);
|
||||
@@ -479,7 +479,7 @@ void GameObject::Update(uint32 diff)
|
||||
if (caster && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
SetGoState(GO_STATE_ACTIVE);
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
|
||||
ReplaceAllGameObjectFlags(GO_FLAG_NODESPAWN);
|
||||
|
||||
UpdateData udata;
|
||||
WorldPacket packet;
|
||||
@@ -721,7 +721,7 @@ void GameObject::Update(uint32 diff)
|
||||
case GAMEOBJECT_TYPE_GOOBER:
|
||||
if (GameTime::GetGameTimeMS().count() >= m_cooldownTime)
|
||||
{
|
||||
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
RemoveGameObjectFlag(GO_FLAG_IN_USE);
|
||||
|
||||
SetLootState(GO_JUST_DEACTIVATED);
|
||||
}
|
||||
@@ -826,7 +826,7 @@ void GameObject::Update(uint32 diff)
|
||||
SendObjectDeSpawnAnim(GetGUID());
|
||||
//reset flags
|
||||
if (GameObjectTemplateAddon const* addon = GetTemplateAddon())
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, addon->flags);
|
||||
ReplaceAllGameObjectFlags((GameObjectFlags)addon->flags);
|
||||
}
|
||||
|
||||
if (!m_respawnDelayTime)
|
||||
@@ -908,7 +908,7 @@ void GameObject::DespawnOrUnsummon(Milliseconds delay, Seconds forceRespawnTime)
|
||||
|
||||
if (GameObjectTemplateAddon const* addon = GetTemplateAddon())
|
||||
{
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, addon->flags);
|
||||
ReplaceAllGameObjectFlags((GameObjectFlags)addon->flags);
|
||||
}
|
||||
|
||||
uint32 poolid = m_spawnId ? sPoolMgr->IsPartOfAPool<GameObject>(m_spawnId) : 0;
|
||||
@@ -930,7 +930,7 @@ void GameObject::Delete()
|
||||
SetGoState(GO_STATE_READY);
|
||||
|
||||
if (GameObjectTemplateAddon const* addon = GetTemplateAddon())
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, addon->flags);
|
||||
ReplaceAllGameObjectFlags((GameObjectFlags)addon->flags);
|
||||
|
||||
// Xinef: if ritual gameobject is removed, clear anim spells
|
||||
if (GetGOInfo()->type == GAMEOBJECT_TYPE_SUMMONING_RITUAL)
|
||||
@@ -1096,7 +1096,7 @@ bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, boo
|
||||
|
||||
if (!GetGOInfo()->GetDespawnPossibility() && !GetGOInfo()->IsDespawnAtAction())
|
||||
{
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
|
||||
SetGameObjectFlag(GO_FLAG_NODESPAWN);
|
||||
m_respawnDelayTime = 0;
|
||||
m_respawnTime = 0;
|
||||
}
|
||||
@@ -1410,9 +1410,9 @@ void GameObject::SetGoArtKit(uint8 artkit, GameObject* go, ObjectGuid::LowType l
|
||||
void GameObject::SwitchDoorOrButton(bool activate, bool alternative /* = false */)
|
||||
{
|
||||
if (activate)
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
SetGameObjectFlag(GO_FLAG_IN_USE);
|
||||
else
|
||||
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
RemoveGameObjectFlag(GO_FLAG_IN_USE);
|
||||
|
||||
if (GetGoState() == GO_STATE_READY) //if closed -> open
|
||||
SetGoState(alternative ? GO_STATE_ACTIVE_ALTERNATIVE : GO_STATE_ACTIVE);
|
||||
@@ -1423,7 +1423,7 @@ void GameObject::SwitchDoorOrButton(bool activate, bool alternative /* = false *
|
||||
void GameObject::Use(Unit* user)
|
||||
{
|
||||
// Xinef: we cannot use go with not selectable flags
|
||||
if (HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE))
|
||||
if (HasGameObjectFlag(GO_FLAG_NOT_SELECTABLE))
|
||||
return;
|
||||
|
||||
// by default spell caster is user
|
||||
@@ -1577,7 +1577,7 @@ void GameObject::Use(Unit* user)
|
||||
GameObjectTemplate const* info = GetGOInfo();
|
||||
|
||||
// xinef: Goober cannot be used with this flag, skip
|
||||
if (HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE))
|
||||
if (HasGameObjectFlag(GO_FLAG_IN_USE))
|
||||
return;
|
||||
|
||||
if (user->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -1638,7 +1638,7 @@ void GameObject::Use(Unit* user)
|
||||
|
||||
if (info->GetAutoCloseTime())
|
||||
{
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
SetGameObjectFlag(GO_FLAG_IN_USE);
|
||||
SetLootState(GO_ACTIVATED, user);
|
||||
if (!info->goober.customAnim)
|
||||
SetGoState(GO_STATE_ACTIVE);
|
||||
@@ -2282,7 +2282,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
|
||||
switch (state)
|
||||
{
|
||||
case GO_DESTRUCTIBLE_INTACT:
|
||||
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_DESTROYED);
|
||||
RemoveGameObjectFlag(GO_FLAG_DAMAGED | GO_FLAG_DESTROYED);
|
||||
SetDisplayId(m_goInfo->displayId);
|
||||
if (setHealth)
|
||||
{
|
||||
@@ -2301,8 +2301,8 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
|
||||
if (Battleground* bg = bgMap->GetBG())
|
||||
bg->EventPlayerDamagedGO(eventInvoker, this, m_goInfo->building.damagedEvent);
|
||||
|
||||
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
|
||||
RemoveGameObjectFlag(GO_FLAG_DESTROYED);
|
||||
SetGameObjectFlag(GO_FLAG_DAMAGED);
|
||||
|
||||
uint32 modelId = m_goInfo->building.damagedDisplayId;
|
||||
if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData))
|
||||
@@ -2336,8 +2336,8 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
|
||||
}
|
||||
}
|
||||
|
||||
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
|
||||
RemoveGameObjectFlag(GO_FLAG_DAMAGED);
|
||||
SetGameObjectFlag(GO_FLAG_DESTROYED);
|
||||
|
||||
uint32 modelId = m_goInfo->building.destroyedDisplayId;
|
||||
if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData))
|
||||
@@ -2356,7 +2356,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
|
||||
case GO_DESTRUCTIBLE_REBUILDING:
|
||||
{
|
||||
EventInform(m_goInfo->building.rebuildingEvent);
|
||||
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_DESTROYED);
|
||||
RemoveGameObjectFlag(GO_FLAG_DAMAGED | GO_FLAG_DESTROYED);
|
||||
|
||||
uint32 modelId = m_goInfo->displayId;
|
||||
if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData))
|
||||
|
||||
@@ -856,6 +856,12 @@ public:
|
||||
void SetPhaseMask(uint32 newPhaseMask, bool update) override;
|
||||
void EnableCollision(bool enable);
|
||||
|
||||
GameObjectFlags GetGameObjectFlags() const { return GameObjectFlags(GetUInt32Value(GAMEOBJECT_FLAGS)); }
|
||||
bool HasGameObjectFlag(GameObjectFlags flags) const { return HasFlag(GAMEOBJECT_FLAGS, flags) != 0; }
|
||||
void SetGameObjectFlag(GameObjectFlags flags) { SetFlag(GAMEOBJECT_FLAGS, flags); }
|
||||
void RemoveGameObjectFlag(GameObjectFlags flags) { RemoveFlag(GAMEOBJECT_FLAGS, flags); }
|
||||
void ReplaceAllGameObjectFlags(GameObjectFlags flags) { SetUInt32Value(GAMEOBJECT_FLAGS, flags); }
|
||||
|
||||
void Use(Unit* user);
|
||||
|
||||
[[nodiscard]] LootState getLootState() const { return m_lootState; }
|
||||
@@ -932,9 +938,9 @@ public:
|
||||
void SetDestructibleState(GameObjectDestructibleState state, Player* eventInvoker = nullptr, bool setHealth = false);
|
||||
[[nodiscard]] GameObjectDestructibleState GetDestructibleState() const
|
||||
{
|
||||
if (HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED))
|
||||
if (HasGameObjectFlag(GO_FLAG_DESTROYED))
|
||||
return GO_DESTRUCTIBLE_DESTROYED;
|
||||
if (HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED))
|
||||
if (HasGameObjectFlag(GO_FLAG_DAMAGED))
|
||||
return GO_DESTRUCTIBLE_DAMAGED;
|
||||
return GO_DESTRUCTIBLE_INTACT;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ bool MotionTransport::CreateMoTrans(ObjectGuid::LowType guidlow, uint32 entry, u
|
||||
if (GameObjectTemplateAddon const* addon = GetTemplateAddon())
|
||||
{
|
||||
SetUInt32Value(GAMEOBJECT_FACTION, addon->faction);
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, addon->flags);
|
||||
ReplaceAllGameObjectFlags((GameObjectFlags)addon->flags);
|
||||
}
|
||||
|
||||
SetObjectScale(goinfo->size);
|
||||
@@ -727,7 +727,7 @@ bool StaticTransport::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* m
|
||||
if (GameObjectTemplateAddon const* addon = GetTemplateAddon())
|
||||
{
|
||||
SetUInt32Value(GAMEOBJECT_FACTION, addon->faction);
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, addon->flags);
|
||||
ReplaceAllGameObjectFlags((GameObjectFlags)addon->flags);
|
||||
}
|
||||
|
||||
SetEntry(goinfo->entry);
|
||||
|
||||
@@ -1492,6 +1492,7 @@ public:
|
||||
else
|
||||
RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP);
|
||||
}
|
||||
|
||||
[[nodiscard]] uint32 GetCreatureType() const;
|
||||
[[nodiscard]] uint32 GetCreatureTypeMask() const
|
||||
{
|
||||
|
||||
@@ -220,7 +220,7 @@ class go_suppression_device : public GameObjectScript
|
||||
if (me->GetGoState() == GO_STATE_ACTIVE)
|
||||
me->SetGoState(GO_STATE_READY);
|
||||
me->SetLootState(GO_READY);
|
||||
me->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
_events.ScheduleEvent(EVENT_SUPPRESSION_CAST, 5000);
|
||||
me->Respawn();
|
||||
}
|
||||
@@ -231,7 +231,7 @@ class go_suppression_device : public GameObjectScript
|
||||
return;
|
||||
_active = false;
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
_events.CancelEvent(EVENT_SUPPRESSION_CAST);
|
||||
}
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ class go_chromaggus_lever : public GameObjectScript
|
||||
_instance->HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
}
|
||||
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE | GO_FLAG_IN_USE);
|
||||
me->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE | GO_FLAG_IN_USE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
case GO_PORTCULLIS_CHROMAGGUS:
|
||||
AddDoor(go, true);
|
||||
chromaggusDoorGUID = go->GetGUID();
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
HandleGameObject(m_uiStageDoorLeftGUID, true);
|
||||
HandleGameObject(m_uiStageDoorRightGUID, true);
|
||||
if (GameObject* sideEntrance = instance->GetGameObject(m_uiSideEntranceDoor))
|
||||
sideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
sideEntrance->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, 16812, nullptr);
|
||||
}
|
||||
break;
|
||||
@@ -187,9 +187,9 @@ public:
|
||||
case GO_MASSIVE_DOOR:
|
||||
m_uiMassiveDoor = go->GetGUID();
|
||||
if (GetBossState(DATA_ARAN) != IN_PROGRESS)
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
go->SetGameObjectFlag(GO_FLAG_LOCKED);
|
||||
else
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
break;
|
||||
case GO_GAMESMAN_HALL_DOOR:
|
||||
m_uiGamesmansDoor = go->GetGUID();
|
||||
@@ -200,9 +200,9 @@ public:
|
||||
case GO_NETHERSPACE_DOOR:
|
||||
m_uiNetherspaceDoor = go->GetGUID();
|
||||
if (GetBossState(DATA_PRINCE) != IN_PROGRESS)
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
go->SetGameObjectFlag(GO_FLAG_LOCKED);
|
||||
else
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
break;
|
||||
case GO_MASTERS_TERRACE_DOOR:
|
||||
MastersTerraceDoor[0] = go->GetGUID();
|
||||
@@ -213,9 +213,9 @@ public:
|
||||
case GO_SIDE_ENTRANCE_DOOR:
|
||||
m_uiSideEntranceDoor = go->GetGUID();
|
||||
if (GetBossState(DATA_OPERA_PERFORMANCE) == DONE)
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
go->SetGameObjectFlag(GO_FLAG_LOCKED);
|
||||
else
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
break;
|
||||
case GO_DUST_COVERED_CHEST:
|
||||
DustCoveredChest = go->GetGUID();
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
HandleGameObject(KaelDoorGUID, data != IN_PROGRESS);
|
||||
if (data == DONE)
|
||||
if (GameObject* escapeOrb = instance->GetGameObject(EscapeOrbGUID))
|
||||
escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
escapeOrb->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
Encounter[identifier] = data;
|
||||
break;
|
||||
}
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
break;
|
||||
case GO_ESCAPE_ORB:
|
||||
if (GetData(DATA_KAELTHAS_EVENT) == DONE)
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
EscapeOrbGUID = go->GetGUID();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
if (gameobject->GetEntry() < GO_ATALAI_STATUE1 + _statuePhase)
|
||||
{
|
||||
instance->SummonGameObject(GO_ATALAI_LIGHT2, gameobject->GetPositionX(), gameobject->GetPositionY(), gameobject->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
gameobject->SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameobject->ReplaceAllGameObjectFlags(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case GO_ATALAI_IDOL:
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
break;
|
||||
case GO_IDOL_OF_HAKKAR:
|
||||
if (_encounters[TYPE_ATAL_ALARION] == DONE)
|
||||
gameobject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameobject->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_FORCEFIELD:
|
||||
_forcefieldGUID = gameobject->GetGUID();
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (GameObject* orb = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1 + i)))
|
||||
orb->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
orb->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -643,9 +643,9 @@ public:
|
||||
{
|
||||
if (GameObject* orb = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1 + i)))
|
||||
{
|
||||
if (orb->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE))
|
||||
if (orb->HasGameObjectFlag(GO_FLAG_NOT_SELECTABLE))
|
||||
{
|
||||
orb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
orb->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
if (Creature* trigger = me->SummonTrigger(orb->GetPositionX(), orb->GetPositionY(), orb->GetPositionZ(), 0, 10 * MINUTE * IN_MILLISECONDS))
|
||||
{
|
||||
trigger->CastSpell(trigger, SPELL_RING_OF_BLUE_FLAMES, true, nullptr, nullptr, trigger->GetGUID());
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
if (_encounters[DATA_IRONAYA_DOORS] == DONE)
|
||||
{
|
||||
HandleGameObject(ObjectGuid::Empty, true, gameobject);
|
||||
gameobject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameobject->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case GO_TEMPLE_DOOR:
|
||||
|
||||
@@ -671,14 +671,14 @@ public:
|
||||
break;
|
||||
case GONG_EVENT_3:
|
||||
if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetGuidData(GO_STRANGE_GONG)))
|
||||
gong->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gong->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
_gongEvent = GONG_EVENT_4;
|
||||
_gongTimer = 105000;
|
||||
break;
|
||||
case GONG_EVENT_4:
|
||||
me->RemoveAura(SPELL_BANGING_THE_GONG);
|
||||
if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetGuidData(GO_STRANGE_GONG)))
|
||||
gong->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gong->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
// trigger or gong will need to be scripted to set IN_PROGRESS after enough hits.
|
||||
// This is temp workaround.
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
{
|
||||
BossAI::EnterEvadeMode();
|
||||
if (GameObject* object = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_GONG_OF_BETHEKK)))
|
||||
object->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
object->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->DespawnOrUnsummon(4000);
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ public:
|
||||
{
|
||||
if (go->GetInstanceScript() && !go->FindNearestCreature(NPC_ARLOKK, 25.0f))
|
||||
{
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SendCustomAnim(0);
|
||||
go->SummonCreature(NPC_ARLOKK, PosSummonArlokk[0], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 600000);
|
||||
}
|
||||
|
||||
@@ -83,9 +83,9 @@ public:
|
||||
case GO_GONG_OF_BETHEKK:
|
||||
_goGongOfBethekkGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_ARLOKK) == DONE)
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
else
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -611,7 +611,7 @@ public:
|
||||
if (Creature* c = me->FindNearestCreature(NPC_SUNWELL_VISUAL_BUNNY, 60.0f, true))
|
||||
c->DespawnOrUnsummon(1);
|
||||
if (GameObject* go = me->FindNearestGameObject(GO_QUEL_DELAR, 60.0f))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetWalk(true);
|
||||
if (me->GetCreatureData())
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetCreatureData()->posX, me->GetCreatureData()->posY, me->GetCreatureData()->posZ);
|
||||
|
||||
@@ -72,17 +72,17 @@ public:
|
||||
case GO_FIRE_OF_AKU_MAI_4:
|
||||
if (_encounters[TYPE_AKU_MAI_EVENT] == DONE)
|
||||
{
|
||||
gameobject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
gameobject->SetGameObjectFlag(GO_FLAG_IN_USE);
|
||||
gameobject->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
break;
|
||||
case GO_SHRINE_OF_GELIHAST:
|
||||
if (_encounters[TYPE_GELIHAST] == DONE)
|
||||
gameobject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameobject->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_ALTAR_OF_THE_DEEPS:
|
||||
if (_encounters[TYPE_AKU_MAI] == DONE)
|
||||
gameobject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameobject->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_AKU_MAI_DOOR:
|
||||
if (IsFireEventDone() && _encounters[TYPE_AKU_MAI_EVENT] == DONE)
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
{
|
||||
case GO_BARREL:
|
||||
if (_encounterProgress >= ENCOUNTER_PROGRESS_BARRELS)
|
||||
gameobject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameobject->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_PRISON_DOOR:
|
||||
if (_encounterProgress >= ENCOUNTER_PROGRESS_THRALL_ARMORED)
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
break;
|
||||
case GO_GONG:
|
||||
if (_gongPhase == DONE)
|
||||
gameobject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameobject->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
|
||||
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_NAGA_BRAZIER, INTERACTION_DISTANCE * 2))
|
||||
{
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
SetEscortPaused(true);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1031,7 +1031,7 @@ public:
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
me->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player, bool reportUse) override
|
||||
@@ -1164,7 +1164,7 @@ public:
|
||||
}
|
||||
|
||||
me->DespawnOrUnsummon(5000ms, respawnTimer); // Despawn in 5 Seconds for respawnTimer value
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
CloseGossipMenuFor(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -354,13 +354,13 @@ public:
|
||||
{
|
||||
if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_ELUNE_ALTAR, 10.0f))
|
||||
{
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetFacingToObject(go);
|
||||
_altarGUID = go->GetGUID();
|
||||
}
|
||||
}
|
||||
else if (GameObject* go = GetClosestGameObjectWithEntry(me, GO_ELUNE_FIRE, 10.0f))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
// Yell and set escort to pause
|
||||
Talk(SAY_REACH_TORCH);
|
||||
@@ -610,7 +610,7 @@ public:
|
||||
escortAI->DoContinueEscort(isAltar);
|
||||
}
|
||||
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
uint32 const objectIndex = go->GetEntry() == GO_TELDARAM_SPHERE1 ? DATA_TELDRAM_SPHERE1 : DATA_TELDRAM_SPHERE2;
|
||||
|
||||
@@ -77,11 +77,11 @@ public:
|
||||
if (teldaramSpheres.at(pGo->GetEntry() == GO_TELDARAM_SPHERE1 ? 0 : 1) == DONE || GetBossState(DATA_PRINCE_TALDARAM) == DONE)
|
||||
{
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGo->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGo->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -1153,7 +1153,7 @@ public:
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (StairsPos[index][i].GetPositionX())
|
||||
if (GameObject* go = leader->SummonGameObject(TeamIdInInstance == TEAM_ALLIANCE ? GO_STAIRS_ALLIANCE : GO_STAIRS_HORDE, StairsPos[index][i].GetPositionX(), StairsPos[index][i].GetPositionY(), StairsPos[index][i].GetPositionZ(), StairsPos[index][i].GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 86400, false))
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
//Position pos = TeamIdInInstance == TEAM_ALLIANCE ? AllyPortalPos : HordePortalPos;
|
||||
//leader->SummonGameObject(GO_PORTAL_TO_DALARAN, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 86400);
|
||||
|
||||
@@ -176,15 +176,15 @@ public:
|
||||
{
|
||||
case DATA_SLAD_RAN:
|
||||
if (GameObject* altar = instance->GetGameObject(_sladRanAltarGUID))
|
||||
altar->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
altar->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case DATA_MOORABI:
|
||||
if (GameObject* altar = instance->GetGameObject(_moorabiAltarGUID))
|
||||
altar->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
altar->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case DATA_DRAKKARI_COLOSSUS:
|
||||
if (GameObject* altar = instance->GetGameObject(_drakkariAltarGUID))
|
||||
altar->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
altar->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case DATA_ECK_THE_FEROCIOUS_INIT:
|
||||
{
|
||||
|
||||
@@ -568,7 +568,7 @@ public:
|
||||
if (GameObject* teleporter = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(GO_SCOURGE_TRANSPORTER_SAURFANG)))
|
||||
{
|
||||
_instance->HandleGameObject(ObjectGuid::Empty, false, teleporter);
|
||||
teleporter->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
teleporter->SetGameObjectFlag(GO_FLAG_IN_USE);
|
||||
}
|
||||
|
||||
deathbringer->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -830,7 +830,7 @@ public:
|
||||
if (GameObject* teleporter = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(GO_SCOURGE_TRANSPORTER_SAURFANG)))
|
||||
{
|
||||
_instance->HandleGameObject(ObjectGuid::Empty, false, teleporter);
|
||||
teleporter->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
teleporter->SetGameObjectFlag(GO_FLAG_IN_USE);
|
||||
}
|
||||
|
||||
deathbringer->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -758,12 +758,12 @@ public:
|
||||
case GO_GAS_RELEASE_VALVE:
|
||||
GasReleaseValveGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_FESTERGUT) != DONE)
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_OOZE_RELEASE_VALVE:
|
||||
OozeReleaseValveGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_ROTFACE) != DONE)
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_DRINK_ME:
|
||||
PutricideTableGUID = go->GetGUID();
|
||||
@@ -774,7 +774,7 @@ public:
|
||||
case GO_CACHE_OF_THE_DREAMWALKER_25H:
|
||||
if (Creature* valithria = instance->GetCreature(ValithriaDreamwalkerGUID))
|
||||
go->SetLootRecipient(valithria);
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
break;
|
||||
case GO_SCOURGE_TRANSPORTER_LK:
|
||||
TheLichKingTeleportGUID = go->GetGUID();
|
||||
@@ -819,7 +819,7 @@ public:
|
||||
AddDoor(go, true);
|
||||
ScourgeTransporterFirstGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_LORD_MARROWGAR) == DONE)
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1029,7 +1029,7 @@ public:
|
||||
WeeklyQuestId10 = RAND(QUEST_BLOOD_QUICKENING_10, QUEST_RESIDUE_RENDEZVOUS_10, QUEST_RESPITE_FOR_A_TORMENTED_SOUL_10, QUEST_DEPROGRAMMING_10, QUEST_SECURING_THE_RAMPARTS_10);
|
||||
SetData(DATA_WEEKLY_QUEST_ID, 0); // show required hidden npcs
|
||||
if (GameObject* transporter = instance->GetGameObject(ScourgeTransporterFirstGUID))
|
||||
transporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
transporter->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
SaveToDB();
|
||||
}
|
||||
break;
|
||||
@@ -1043,7 +1043,7 @@ public:
|
||||
if (GameObject* loot = instance->GetGameObject(GunshipArmoryGUID))
|
||||
{
|
||||
loot->SetLootRecipient(instance);
|
||||
loot->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
loot->RemoveGameObjectFlag(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
}
|
||||
}
|
||||
else if (state == FAIL)
|
||||
@@ -1057,14 +1057,14 @@ public:
|
||||
{
|
||||
if (Creature* deathbringer = instance->GetCreature(DeathbringerSaurfangGUID))
|
||||
loot->SetLootRecipient(deathbringer);
|
||||
loot->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
loot->RemoveGameObjectFlag(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
}
|
||||
[[fallthrough]];
|
||||
case NOT_STARTED:
|
||||
if (GameObject* teleporter = instance->GetGameObject(SaurfangTeleportGUID))
|
||||
{
|
||||
HandleGameObject(SaurfangTeleportGUID, true, teleporter);
|
||||
teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
teleporter->RemoveGameObjectFlag(GO_FLAG_IN_USE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -1075,7 +1075,7 @@ public:
|
||||
if (state == DONE)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(GasReleaseValveGUID))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
if (GetBossState(DATA_ROTFACE) == DONE)
|
||||
HandleDropAttempt(false);
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ public:
|
||||
if (state == DONE)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(OozeReleaseValveGUID))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
|
||||
if (GetBossState(DATA_FESTERGUT) == DONE)
|
||||
HandleDropAttempt(false);
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ public:
|
||||
if (GetBossState(BOSS_LOATHEB) == DONE)
|
||||
{
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGo->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case GO_THADDIUS_PORTAL:
|
||||
@@ -411,7 +411,7 @@ public:
|
||||
if (GetBossState(BOSS_THADDIUS) == DONE)
|
||||
{
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGo->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case GO_MAEXXNA_PORTAL:
|
||||
@@ -419,7 +419,7 @@ public:
|
||||
if (GetBossState(BOSS_MAEXXNA) == DONE)
|
||||
{
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGo->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case GO_HORSEMAN_PORTAL:
|
||||
@@ -427,7 +427,7 @@ public:
|
||||
if (GetBossState(BOSS_HORSEMAN) == DONE)
|
||||
{
|
||||
pGo->SetGoState(GO_STATE_ACTIVE);
|
||||
pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGo->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -844,7 +844,7 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(_loathebPortalGUID))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
if (GameObject* go = instance->GetGameObject(_plagueEyePortalGUID))
|
||||
{
|
||||
@@ -884,7 +884,7 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(_maexxnaPortalGUID))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
if (GameObject* go = instance->GetGameObject(_spiderEyePortalGUID))
|
||||
{
|
||||
@@ -917,7 +917,7 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(_thaddiusPortalGUID))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
if (GameObject* go = instance->GetGameObject(_abomEyePortalGUID))
|
||||
{
|
||||
@@ -933,7 +933,7 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(_horsemanPortalGUID))
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
if (GameObject* go = instance->GetGameObject(_deathknightEyePortalGUID))
|
||||
{
|
||||
|
||||
@@ -91,17 +91,17 @@ public:
|
||||
{
|
||||
case GO_TELESTRA_SPHERE:
|
||||
if (GetBossState(DATA_TELESTRA_ORB) != DONE && GetBossState(DATA_MAGUS_TELESTRA_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameObject->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_ANOMALUS_SPHERE:
|
||||
if (GetBossState(DATA_ANOMALUS_ORB) != DONE && GetBossState(DATA_ANOMALUS_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameObject->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_ORMOROK_SPHERE:
|
||||
if (GetBossState(DATA_ORMOROK_ORB) != DONE && GetBossState(DATA_ORMOROK_EVENT) == DONE)
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gameObject->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
|
||||
BossInfo const* bossInfo = GetBossInfo(id + DATA_TELESTRA_ORB);
|
||||
for (DoorSet::const_iterator i = bossInfo->door[DOOR_TYPE_PASSAGE].begin(); i != bossInfo->door[DOOR_TYPE_PASSAGE].end(); ++i)
|
||||
(*i)->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
(*i)->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -513,7 +513,7 @@ public:
|
||||
{
|
||||
plr->RemoveGameObject(go, false);
|
||||
go->SetLootMode(1);
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
|
||||
}
|
||||
|
||||
plr->GroupEventHappens(QUEST_HALLS_OF_STONE, me);
|
||||
|
||||
@@ -752,7 +752,7 @@ public:
|
||||
// Summon Chest
|
||||
if (GameObject* go = me->SummonGameObject(RAID_MODE(GO_ALGALON_CHEST, GO_ALGALON_CHEST_HERO), 1632.1f, -306.561f, 417.321f, 4.69494f, 0, 0, 0, 1, 0))
|
||||
{
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
|
||||
go->SetLootRecipient(me);
|
||||
}
|
||||
break;
|
||||
@@ -1132,7 +1132,7 @@ public:
|
||||
return false;
|
||||
_locked = true;
|
||||
// Start Algalon event
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
me->SetGameObjectFlag(GO_FLAG_IN_USE);
|
||||
events.ScheduleEvent(EVENT_DESPAWN_CONSOLE, 5000);
|
||||
if (Creature* brann = me->SummonCreature(NPC_BRANN_BRONZBEARD_ALG, BrannIntroSpawnPos))
|
||||
brann->AI()->DoAction(ACTION_START_INTRO);
|
||||
|
||||
@@ -371,7 +371,7 @@ public:
|
||||
me->DespawnOrUnsummon(5000);
|
||||
if (GameObject* go = me->SummonGameObject(chestId, 2345.61f, -71.20f, 425.104f, 3.0f, 0, 0, 0, 0, 0))
|
||||
{
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
|
||||
go->SetLootRecipient(me->GetMap());
|
||||
}
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
{
|
||||
me->RemoveGameObject(go, false);
|
||||
go->SetSpellId(1); // hack to make it despawn
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
|
||||
go->SetLootRecipient(me);
|
||||
}
|
||||
if (Creature* arm = ObjectAccessor::GetCreature(*me, _left))
|
||||
|
||||
@@ -822,7 +822,7 @@ public:
|
||||
{
|
||||
if (GameObject* go = me->SummonGameObject(chestId, 2744.65f, 2569.46f, 364.397f, 0, 0, 0, 0, 0, 0))
|
||||
{
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
|
||||
go->SetLootRecipient(me->GetMap());
|
||||
}
|
||||
}
|
||||
@@ -906,7 +906,7 @@ public:
|
||||
{
|
||||
button->SetLootState(GO_READY);
|
||||
button->UseDoorOrButton(0, false);
|
||||
button->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
button->RemoveGameObjectFlag(GO_FLAG_IN_USE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -420,7 +420,7 @@ public:
|
||||
GameObject* go;
|
||||
if ((go = GetThorimObject(DATA_THORIM_LEVER)))
|
||||
{
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 48);
|
||||
go->ReplaceAllGameObjectFlags((GameObjectFlags)48);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
if ((go = GetThorimObject(DATA_THORIM_FIRST_DOORS)))
|
||||
@@ -485,7 +485,7 @@ public:
|
||||
if (_trashCounter >= 6)
|
||||
{
|
||||
if (GameObject* go = GetThorimObject(DATA_THORIM_LEVER))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, 48);
|
||||
go->RemoveGameObjectFlag((GameObjectFlags)48);
|
||||
|
||||
events.SetPhase(EVENT_PHASE_START);
|
||||
events.ScheduleEvent(EVENT_THORIM_START_PHASE1, 20000);
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
|
||||
if ((go = me->SummonGameObject(chestId, 2134.73f, -286.32f, 419.51f, 0.0f, 0, 0, 0, 0, 0)))
|
||||
{
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
|
||||
go->SetLootRecipient(me->GetMap());
|
||||
}
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
normalChestPosition.GetOrientation(), 0, 0, 0, 0, 0))
|
||||
{
|
||||
m_hodirNormalChest = go->GetGUID();
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
if (!m_hodirHardmodeChest)
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
hardChestPosition.GetOrientation(), 0, 0, 0, 0, 0))
|
||||
{
|
||||
m_hodirHardmodeChest = go->GetGUID();
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
hmHodir = true;
|
||||
}
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
normalChestPosition.GetOrientation(), 0, 0, 0, 0, 0))
|
||||
{
|
||||
m_hodirNormalChest = go->GetGUID();
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
if (!m_hodirHardmodeChest)
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
hardChestPosition.GetOrientation(), 0, 0, 0, 0, 0))
|
||||
{
|
||||
m_hodirHardmodeChest = go->GetGUID();
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
hmHodir = true;
|
||||
}
|
||||
}
|
||||
@@ -543,7 +543,7 @@ public:
|
||||
if (GetData(TYPE_MIMIRON) == DONE && GetData(TYPE_FREYA) == DONE && GetData(TYPE_HODIR) == DONE && GetData(TYPE_THORIM) == DONE)
|
||||
{
|
||||
instance->LoadGrid(1903.0f, 248.0f);
|
||||
gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
gameObject->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
m_keepersgateGUID = gameObject->GetGUID();
|
||||
@@ -590,7 +590,7 @@ public:
|
||||
case GO_CELESTIAL_PLANETARIUM_ACCESS_10:
|
||||
case GO_CELESTIAL_PLANETARIUM_ACCESS_25:
|
||||
if (m_algalonTimer)
|
||||
gameObject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
gameObject->SetGameObjectFlag(GO_FLAG_IN_USE);
|
||||
break;
|
||||
case GO_DOODAD_UL_SIGILDOOR_01:
|
||||
m_algalonSigilDoorGUID[0] = gameObject->GetGUID();
|
||||
@@ -640,13 +640,13 @@ public:
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(m_hodirHardmodeChest))
|
||||
{
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetLootRecipient(instance);
|
||||
}
|
||||
}
|
||||
if (GameObject* go = instance->GetGameObject(m_hodirNormalChest))
|
||||
{
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetLootRecipient(instance);
|
||||
}
|
||||
break;
|
||||
@@ -694,7 +694,7 @@ public:
|
||||
if (GetData(TYPE_MIMIRON) == DONE && GetData(TYPE_FREYA) == DONE && GetData(TYPE_HODIR) == DONE && GetData(TYPE_THORIM) == DONE)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(m_keepersgateGUID))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
}
|
||||
if (type == TYPE_MIMIRON && data == IN_PROGRESS) // after reaching him without tram and starting the fight
|
||||
m_mimironTramUsed = true;
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
// Reset statue
|
||||
if (GameObject* statisGenerator = m_pInstance->instance->GetGameObject(m_pInstance->GetGuidData(STATIS_GENERATOR)))
|
||||
{
|
||||
statisGenerator->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
statisGenerator->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
statisGenerator->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -802,7 +802,7 @@ public:
|
||||
if (pPalehoof && pPalehoof->IsAlive())
|
||||
{
|
||||
// maybe these are hacks :(
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
pPalehoof->AI()->DoAction(ACTION_START_EVENT);
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
{
|
||||
case GO_ACTIVATION_CRYSTAL:
|
||||
HandleGameObject(ObjectGuid::Empty, false, go); // make go not used yet
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); // not useable at the beginning
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); // not useable at the beginning
|
||||
GO_ActivationCrystalGUID.push_back(go->GetGUID());
|
||||
break;
|
||||
case GO_MAIN_DOOR:
|
||||
@@ -451,7 +451,7 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(guid))
|
||||
{
|
||||
HandleGameObject(ObjectGuid::Empty, false, go); // not used yet
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); // make it useable
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE); // make it useable
|
||||
}
|
||||
events.RescheduleEvent(EVENT_SUMMON_PORTAL, 4000);
|
||||
}
|
||||
@@ -545,7 +545,7 @@ public:
|
||||
if (GameObject* go = instance->GetGameObject(guid))
|
||||
{
|
||||
HandleGameObject(ObjectGuid::Empty, false, go); // not used yet
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); // not useable at the beginning
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); // not useable at the beginning
|
||||
}
|
||||
|
||||
// reset positions of Sinclari and Guards
|
||||
|
||||
@@ -848,7 +848,7 @@ public:
|
||||
c->RemoveAllAuras();
|
||||
c->CastSpell(c, SPELL_SAC_HOLY_ZONE_AURA, true);
|
||||
if (GameObject* go = me->FindNearestGameObject(GO_SAC_LIGHTS_VENGEANCE_3, 150.0f))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
playerGUID.Clear();
|
||||
events.RescheduleEvent(2, 60000);
|
||||
}
|
||||
@@ -967,7 +967,7 @@ public:
|
||||
c->CastSpell(c, SPELL_SAC_VEGARD_SUMMON_GHOULS_AURA, false);
|
||||
}
|
||||
if (GameObject* go = me->FindNearestGameObject(GO_SAC_LIGHTS_VENGEANCE_1, 150.0f))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case 15: // remove light
|
||||
if (Creature* x = me->FindNearestCreature(NPC_SAC_LIGHTS_VENGEANCE_VEH_2, 150.0f, true))
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
{
|
||||
DoUseDoorOrButton(m_uiIkissDoorGUID, DAY * IN_MILLISECONDS);
|
||||
if (GameObject* coffer = instance->GetGameObject(_talonKingsCofferGUID))
|
||||
coffer->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE | GO_FLAG_INTERACT_COND);
|
||||
coffer->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE | GO_FLAG_INTERACT_COND);
|
||||
}
|
||||
break;
|
||||
case TYPE_ANZU_ENCOUNTER:
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
if (type == DATA_LADY_VASHJ)
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (GameObject* gobject = instance->GetGameObject(ShieldGeneratorGUID[i]))
|
||||
gobject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gobject->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (GameObject* gobject = instance->GetGameObject(ShieldGeneratorGUID[i]))
|
||||
{
|
||||
gobject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
gobject->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
vashj->SummonTrigger(gobject->GetPositionX(), gobject->GetPositionY(), gobject->GetPositionZ(), 0.0f, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -33,14 +33,14 @@ public:
|
||||
if (go->GetEntry() == GO_ACCESS_PANEL_HYDRO)
|
||||
if (instance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE)
|
||||
{
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
instance->SetData(TYPE_HYDROMANCER_THESPIA, SPECIAL);
|
||||
}
|
||||
|
||||
if (go->GetEntry() == GO_ACCESS_PANEL_MEK)
|
||||
if (instance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE)
|
||||
{
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, SPECIAL);
|
||||
}
|
||||
|
||||
@@ -105,14 +105,14 @@ public:
|
||||
case GO_ACCESS_PANEL_HYDRO:
|
||||
AccessPanelHydro = go->GetGUID();
|
||||
if (GetData(TYPE_HYDROMANCER_THESPIA) == DONE)
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
else if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL)
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_ACCESS_PANEL_MEK:
|
||||
AccessPanelMek = go->GetGUID();
|
||||
if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE)
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
else if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL)
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
else if (data == DONE)
|
||||
{
|
||||
if (GameObject* panel = instance->GetGameObject(AccessPanelHydro))
|
||||
panel->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
panel->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
m_auiEncounter[type] = data;
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
else if (data == DONE)
|
||||
{
|
||||
if (GameObject* panel = instance->GetGameObject(AccessPanelMek))
|
||||
panel->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
panel->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
m_auiEncounter[type] = data;
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
if (type == DATA_VAZRUDEN && state == DONE)
|
||||
if (GameObject* chest = instance->GetGameObject(felIronChestGUID))
|
||||
chest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
chest->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
{
|
||||
for (ObjectGuid const& guid : _cubesSet)
|
||||
if (GameObject* cube = instance->GetGameObject(guid))
|
||||
cube->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
cube->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
if (state == NOT_STARTED)
|
||||
SetData(DATA_COLLAPSE, GO_READY);
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
case DATA_ACTIVATE_CUBES:
|
||||
for (ObjectGuid const& guid : _cubesSet)
|
||||
if (GameObject* cube = instance->GetGameObject(guid))
|
||||
cube->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
cube->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case DATA_COLLAPSE:
|
||||
for (ObjectGuid const& guid : _columnSet)
|
||||
|
||||
@@ -772,7 +772,7 @@ public:
|
||||
_events.ScheduleEvent(EVENT_SIMON_PERIODIC_PLAYER_CHECK, 2000);
|
||||
|
||||
if (GameObject* relic = me->FindNearestGameObject(large ? GO_APEXIS_MONUMENT : GO_APEXIS_RELIC, searchDistance))
|
||||
relic->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
relic->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
// Called when despawning the bunny. Sets all the node GOs to their default states.
|
||||
@@ -782,14 +782,14 @@ public:
|
||||
|
||||
for (uint32 clusterId = SIMON_BLUE; clusterId < SIMON_MAX_COLORS; clusterId++)
|
||||
if (GameObject* cluster = me->FindNearestGameObject(clusterIds[clusterId], searchDistance))
|
||||
cluster->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
cluster->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
for (uint32 auraId = GO_AURA_BLUE; auraId <= GO_AURA_YELLOW; auraId++)
|
||||
if (GameObject* auraGo = me->FindNearestGameObject(auraId, searchDistance))
|
||||
auraGo->RemoveFromWorld();
|
||||
|
||||
if (GameObject* relic = me->FindNearestGameObject(large ? GO_APEXIS_MONUMENT : GO_APEXIS_RELIC, searchDistance))
|
||||
relic->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
relic->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
me->DespawnOrUnsummon(1000);
|
||||
}
|
||||
@@ -832,7 +832,7 @@ public:
|
||||
{
|
||||
for (uint32 clusterId = SIMON_BLUE; clusterId < SIMON_MAX_COLORS; clusterId++)
|
||||
if (GameObject* cluster = me->FindNearestGameObject(clusterIds[clusterId], searchDistance))
|
||||
cluster->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
cluster->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
if (clustersOnly)
|
||||
return;
|
||||
@@ -886,7 +886,7 @@ public:
|
||||
{
|
||||
if (GameObject* cluster = me->FindNearestGameObject(clusterIds[clusterId], 2.0f * searchDistance))
|
||||
{
|
||||
cluster->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
cluster->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
// break since we don't need glowing auras for large clusters
|
||||
if (large)
|
||||
|
||||
@@ -895,7 +895,7 @@ public:
|
||||
if (player->GetQuestStatus(QUEST_THE_FIRST_TRIAL) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
_playerGUID = player->GetGUID();
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, 1);
|
||||
me->SetGameObjectFlag((GameObjectFlags)1);
|
||||
me->RemoveByteFlag(GAMEOBJECT_BYTES_1, 0, 1);
|
||||
_events.ScheduleEvent(EVENT_STILLBLADE_SPAWN, 1000);
|
||||
}
|
||||
@@ -922,7 +922,7 @@ public:
|
||||
}
|
||||
case EVENT_RESET_BRAZIER:
|
||||
{
|
||||
me->RemoveFlag(GAMEOBJECT_FLAGS, 1);
|
||||
me->RemoveGameObjectFlag((GameObjectFlags)1);
|
||||
me->SetByteFlag(GAMEOBJECT_BYTES_1, 0, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include "DetourNavMesh.h"
|
||||
#include "EnumFlag.h"
|
||||
#include <cassert>
|
||||
|
||||
float const GROUND_HEIGHT_TOLERANCE = 0.05f; // Extra tolerance to z position to check if it is in air or on ground.
|
||||
@@ -1570,7 +1571,7 @@ enum GameobjectTypes
|
||||
#define MAX_GAMEOBJECT_TYPE 36 // sending to client this or greater value can crash client.
|
||||
#define MAX_GAMEOBJECT_DATA 24 // Max number of uint32 vars in gameobject_template data field
|
||||
|
||||
enum GameObjectFlags
|
||||
enum GameObjectFlags : uint32
|
||||
{
|
||||
GO_FLAG_IN_USE = 0x00000001, // disables interaction while animated
|
||||
GO_FLAG_LOCKED = 0x00000002, // require key, spell, event, etc to be opened. Makes "Locked" appear in tooltip
|
||||
@@ -1583,6 +1584,8 @@ enum GameObjectFlags
|
||||
GO_FLAG_DESTROYED = 0x00000400,
|
||||
};
|
||||
|
||||
DEFINE_ENUM_FLAG(GameObjectFlags);
|
||||
|
||||
enum GameObjectDynamicLowFlags
|
||||
{
|
||||
GO_DYNFLAG_LO_ACTIVATE = 0x01, // enables interaction with GO
|
||||
|
||||
Reference in New Issue
Block a user