diff options
Diffstat (limited to 'src/server/scripts')
7 files changed, 20 insertions, 27 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp index 5ce9cd94b1a..00d33790d43 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm_the_fleshcrafter.cpp @@ -109,7 +109,7 @@ class boss_salramm : public CreatureScript break; case EVENT_EXPLODE_GHOUL2: events.ScheduleEvent(EVENT_SUMMON_GHOULS, Seconds(4)); - // intentional missing break + /* fallthrough */ case EVENT_EXPLODE_GHOUL1: Talk(SAY_EXPLODE_GHOUL); DoCastAOE(SPELL_EXPLODE_GHOUL, true); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index 1a783bff081..02dd358ed0e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -360,7 +360,7 @@ class npc_chromie_start : public CreatureScript break; case GOSSIP_OFFSET_SKIP_1: AdvanceDungeonFar(); - // intentional missing break + /* fallthrough */ case GOSSIP_OFFSET_TELEPORT: CloseGossipMenuFor(player); me->CastSpell(player, SPELL_TELEPORT_PLAYER); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp index 03b1e019b39..a166c9632d0 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp @@ -1095,28 +1095,17 @@ public: me->GetCreatureListWithEntryInGrid(nearbyVictims, urand(0, 1) ? NPC_CITIZEN : NPC_RESIDENT, 60.0f); if (!nearbyVictims.empty()) { - std::list<Creature*>::iterator it = nearbyVictims.begin(); - std::advance(it, urand(0, nearbyVictims.size()-1)); - Emote emote; - switch (urand(0, 3)) + Emote emotes[] = { - case 0: - emote = EMOTE_ONESHOT_TALK; - break; - case 1: - emote = EMOTE_ONESHOT_EXCLAMATION; - break; - case 2: - emote = EMOTE_ONESHOT_RUDE; - break; - case 3: - emote = EMOTE_ONESHOT_ROAR; - break; - default: - break; - } - if ((*it)->IsAlive()) - (*it)->HandleEmoteCommand(emote); + EMOTE_ONESHOT_TALK, + EMOTE_ONESHOT_EXCLAMATION, + EMOTE_ONESHOT_RUDE, + EMOTE_ONESHOT_ROAR + }; + + Creature* victim = Trinity::Containers::SelectRandomContainerElement(nearbyVictims); + if (victim->IsAlive()) + victim->HandleEmoteCommand(Trinity::Containers::SelectRandomContainerElement(emotes)); } break; } diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp index c93568fa253..48ce3c5e1a8 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp @@ -157,7 +157,7 @@ class instance_pit_of_saron : public InstanceMapScript case DATA_GARFROST: if (state == DONE) { - if (Creature* summoner = instance->GetCreature(_garfrostGUID)) + if (instance->GetCreature(_garfrostGUID)) { if (_teamInInstance == ALLIANCE) { @@ -175,7 +175,7 @@ class instance_pit_of_saron : public InstanceMapScript case DATA_TYRANNUS: if (state == DONE) { - if (Creature* summoner = instance->GetCreature(_tyrannusGUID)) + if (instance->GetCreature(_tyrannusGUID)) { if (_teamInInstance == ALLIANCE) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index 2001aefd3da..aaad0626077 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -402,6 +402,7 @@ struct boss_thaddius : public BossAI break; case EVENT_ENABLE_BALL_LIGHTNING: ballLightningUnlocked = true; + break; case EVENT_ENGAGE: me->SetReactState(REACT_AGGRESSIVE); break; diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index dd953b8a0e9..3c8e17ad829 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -947,7 +947,9 @@ public: } else if (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) { - memset(_surgeTargetGUID, 0, sizeof(_surgeTargetGUID)); + for (ObjectGuid& guid : _surgeTargetGUID) + guid.Clear(); + DoCastAOE(SPELL_SURGE_OF_POWER_WARNING_SELECTOR_25, true); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index 73ffde4f3f6..54851cb2a56 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -217,7 +217,8 @@ public: IsFinalForm = false; NeedThreatReset = false; EnrageUsed = false; - memset(InnderDemon, 0, sizeof(InnderDemon)); + for (ObjectGuid& guid : InnderDemon) + guid.Clear(); InnerDemon_Count = 0; } |
