Skip to content

Commit a969942

Browse files
ShaurenXenphis
authored andcommitted
Scripts/Misc: Remove unneccessary GameObjectActions casts
1 parent 8084661 commit a969942

7 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ struct boss_hodir : public BossAI
465465
std::vector<GameObject*> firesObjects;
466466
GetGameObjectListWithEntryInGrid(firesObjects, me, GO_TOASTY_FIRE, 100.0f);
467467
for (GameObject* fire : firesObjects)
468-
fire->ActivateObject(GameObjectActions(GameObjectActions::Despawn));
468+
fire->ActivateObject(GameObjectActions::Despawn);
469469

470470
events.ScheduleEvent(EVENT_FLASH_FREEZE_FINISHED_3, 1s);
471471
break;
@@ -751,7 +751,7 @@ struct npc_toasty_fire : public ScriptedAI
751751
if (spellInfo->Id == SPELL_ICE_SHARDS_DAMAGE_1 || spellInfo->Id == SPELL_ICE_SHARDS_DAMAGE_2)
752752
{
753753
if (GameObject* fire = me->FindNearestGameObject(GO_TOASTY_FIRE, 1.0f))
754-
fire->ActivateObject(GameObjectActions(GameObjectActions::Despawn));
754+
fire->ActivateObject(GameObjectActions::Despawn);
755755

756756
me->DespawnOrUnsummon();
757757
}

src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ class instance_ulduar : public InstanceMapScript
586586
if (Creature* hodir = GetCreature(DATA_HODIR))
587587
hodir->AI()->DoAction(ACTION_CACHE_SHATTERED);
588588
if (GameObject* hodirRareCache = instance->GetGameObject(HodirRareCacheGUID))
589-
hodirRareCache->ActivateObject(GameObjectActions(GameObjectActions::Despawn));
589+
hodirRareCache->ActivateObject(GameObjectActions::Despawn);
590590
break;
591591
case EVENT_FLASH_FREEZE_FINISHED:
592592
if (Creature* hodir = GetCreature(DATA_HODIR))
@@ -654,9 +654,9 @@ class instance_ulduar : public InstanceMapScript
654654
if (state == DONE)
655655
{
656656
if (GameObject* hodirRareCache = instance->GetGameObject(HodirRareCacheGUID))
657-
hodirRareCache->ActivateObject(GameObjectActions(GameObjectActions::MakeActive));
657+
hodirRareCache->ActivateObject(GameObjectActions::MakeActive);
658658
if (GameObject* hodirChest = instance->GetGameObject(HodirChestGUID))
659-
hodirChest->ActivateObject(GameObjectActions(GameObjectActions::MakeActive));
659+
hodirChest->ActivateObject(GameObjectActions::MakeActive);
660660

661661
instance->SummonCreature(NPC_HODIR_OBSERVATION_RING, ObservationRingKeepersPos[1]);
662662
}

src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ struct boss_lady_vashj : public BossAI
265265
{
266266
for (uint32 data : ShieldGeneratorData)
267267
if (GameObject* generator = instance->GetGameObject(data))
268-
generator->ActivateObject(GameObjectActions(GameObjectActions::MakeInert));
268+
generator->ActivateObject(GameObjectActions::MakeInert);
269269

270270
DoDespawnSummons();
271271
DoCleanupTriggers();
@@ -460,7 +460,7 @@ struct boss_lady_vashj : public BossAI
460460

461461
for (uint32 data : ShieldGeneratorData)
462462
if (GameObject* generator = instance->GetGameObject(data))
463-
generator->ActivateObject(GameObjectActions(GameObjectActions::MakeActive));
463+
generator->ActivateObject(GameObjectActions::MakeActive);
464464

465465
me->SetReactState(REACT_AGGRESSIVE);
466466

@@ -703,7 +703,7 @@ struct go_shield_generator : public GameObjectAI
703703
if (Creature* vashj = _instance->GetCreature(BOSS_LADY_VASHJ))
704704
vashj->AI()->DoAction(ACTION_SHIELD_GENERATOR_DEACTIVATED);
705705

706-
me->ActivateObject(GameObjectActions(GameObjectActions::MakeInert));
706+
me->ActivateObject(GameObjectActions::MakeInert);
707707

708708
return false;
709709
}

src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ struct go_strange_pool : public GameObjectAI
434434
if (Creature* trigger = GetClosestCreatureWithEntry(me, NPC_WORLD_TRIGGER_NOT_IMMUNE_PC, 50.0f))
435435
trigger->CastSpell(player, SPELL_LURKER_SPAWN_TRIGGER);
436436

437-
me->ActivateObject(GameObjectActions(GameObjectActions::Despawn));
437+
me->ActivateObject(GameObjectActions::Despawn);
438438

439439
me->GetMap()->SummonCreature(NPC_THE_LURKER_BELOW, LurkerSpawnPosition);
440440
if (InstanceScript* instance = me->GetInstanceScript())

src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class instance_steam_vault : public InstanceMapScript
6262
if (GetBossState(DATA_HYDROMANCER_THESPIA) == DONE && GetBossState(DATA_MEKGINEER_STEAMRIGGER) == DONE)
6363
{
6464
HandleGameObject(ObjectGuid::Empty, true, go);
65-
go->ActivateObject(GameObjectActions(GameObjectActions::MakeInert));
65+
go->ActivateObject(GameObjectActions::MakeInert);
6666
}
6767
}
6868
}
@@ -77,12 +77,12 @@ class instance_steam_vault : public InstanceMapScript
7777
case DATA_HYDROMANCER_THESPIA:
7878
if (state == DONE)
7979
if (GameObject* panel = GetGameObject(DATA_ACCESS_PANEL_THESPIA))
80-
panel->ActivateObject(GameObjectActions(GameObjectActions::MakeActive));
80+
panel->ActivateObject(GameObjectActions::MakeActive);
8181
break;
8282
case DATA_MEKGINEER_STEAMRIGGER:
8383
if (state == DONE)
8484
if (GameObject* panel = GetGameObject(DATA_ACCESS_PANEL_STEAMRIGGER))
85-
panel->ActivateObject(GameObjectActions(GameObjectActions::MakeActive));
85+
panel->ActivateObject(GameObjectActions::MakeActive);
8686
break;
8787
default:
8888
break;

src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct go_main_chambers_access_panel : public GameObjectAI
3636

3737
bool OnGossipHello(Player* /*player*/) override
3838
{
39-
me->ActivateObject(GameObjectActions(GameObjectActions::MakeInert));
39+
me->ActivateObject(GameObjectActions::MakeInert);
4040

4141
if (Creature* controller = _instance->GetCreature(DATA_DOOR_CONTROLLER))
4242
controller->AI()->Talk(EMOTE_PANEL_USED);
@@ -49,7 +49,7 @@ struct go_main_chambers_access_panel : public GameObjectAI
4949
if (GameObject* go = _instance->GetGameObject(DATA_MAIN_CHAMBERS_DOOR))
5050
{
5151
_instance->HandleGameObject(ObjectGuid::Empty, true, go);
52-
go->ActivateObject(GameObjectActions(GameObjectActions::MakeInert));
52+
go->ActivateObject(GameObjectActions::MakeInert);
5353
}
5454
}
5555

src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class instance_ramparts : public InstanceMapScript
8989
if (state == DONE)
9090
{
9191
if (GameObject* chest = GetGameObject(DATA_FEL_IRON_CHEST))
92-
chest->ActivateObject(GameObjectActions(GameObjectActions::MakeActive));
92+
chest->ActivateObject(GameObjectActions::MakeActive);
9393
}
9494
else if (state == FAIL)
9595
Events.ScheduleEvent(EVENT_RESET_VAZRUDEN, 30s);

0 commit comments

Comments
 (0)