mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
feat(Core/GameObject): Gob flag helpers (#11287)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user