diff options
Diffstat (limited to 'src/server/scripts')
9 files changed, 27 insertions, 39 deletions
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 39ad786cf83..3e4b46804ff 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -500,7 +500,7 @@ public: stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_INFO); stmt->setUInt32(0, targetGuid.GetCounter()); - PreparedQueryResult queryResult = CharacterDatabase.Query(stmt); + queryResult = CharacterDatabase.Query(stmt); if (queryResult) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 92c3f83034d..f3c59654295 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -552,11 +552,11 @@ public: YellTimer = 10000; } - uint32 NextStep(uint32 Step) + uint32 NextStep(uint32 step) { Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID); Map* map = me->GetMap(); - switch (Step) + switch (step) { case 0: return 9999999; case 1: diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 5c9a57acec7..388834d1eff 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -465,13 +465,13 @@ public: SayTimer = 8000; } - uint32 NextStep(uint8 Step) + uint32 NextStep(uint8 step) { Creature* Spark = ObjectAccessor::GetCreature(*me, SparkGUID); if (!Spark) return 99999999; - switch (Step) + switch (step) { case 0: Spark->GetMotionMaster()->MovePoint(0, -5080.70f, -11253.61f, 0.56f); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 705d15081c1..3ef6a7c15e3 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -221,12 +221,12 @@ public: } } - void MovementInform(uint32 type, uint32 id) override + void MovementInform(uint32 type, uint32 point) override { if (type != POINT_MOTION_TYPE) return; - if (id == 2 || id == 5 || id == 8 || id == 11) + if (point == 2 || point == 5 || point == 8 || point == 11) { movementCompleted = true; me->SetReactState(REACT_AGGRESSIVE); @@ -251,7 +251,7 @@ public: } nextMovementStarted = false; - nextWP = id + 1; + nextWP = point + 1; } // switch to "who" if nearer than current target. diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 7a76e8b8217..dd67f2b1ac0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -176,8 +176,6 @@ class boss_gothik : public CreatureScript } uint32 waveCount; - typedef std::vector<Creature*> TriggerVct; - TriggerVct liveTrigger, deadTrigger; bool mergedSides; bool phaseTwo; bool thirtyPercentReached; diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index e38544315ee..fef04ac5c07 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -220,11 +220,14 @@ public: DoCast(SPELL_SUMMON_ETHEREAL_SPHERE_2); break; case EVENT_SUMMON_PLAYERS: - if (Creature* sphere = me->FindNearestCreature(NPC_ETHEREAL_SPHERE, 150.0f)) - sphere->GetAI()->DoAction(ACTION_SUMMON); - else if (Creature* sphere = me->FindNearestCreature(NPC_ETHEREAL_SPHERE2, 150.0f)) - sphere->GetAI()->DoAction(ACTION_SUMMON); - break; + { + Creature* sphere = me->FindNearestCreature(NPC_ETHEREAL_SPHERE, 150.0f); + if (!sphere) + sphere = me->FindNearestCreature(NPC_ETHEREAL_SPHERE2, 150.0f); + if (sphere) + sphere->GetAI()->DoAction(ACTION_SUMMON); + break; + } default: break; } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index a6c00c05dce..749f5cbf88b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -364,21 +364,21 @@ class boss_vazruden_the_herald : public CreatureScript } } - void JustSummoned(Creature* summoned) override + void JustSummoned(Creature* summon) override { - if (!summoned) + if (!summon) return; Unit* victim = me->GetVictim(); - if (summoned->GetEntry() == NPC_NAZAN) + if (summon->GetEntry() == NPC_NAZAN) { - summoned->SetDisableGravity(true); - summoned->SetSpeed(MOVE_FLIGHT, 2.5f); + summon->SetDisableGravity(true); + summon->SetSpeed(MOVE_FLIGHT, 2.5f); if (victim) AttackStartNoMove(victim); } else if (victim) - summoned->AI()->AttackStart(victim); + summon->AI()->AttackStart(victim); } void SentryDownBy(Unit* killer) diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index 7f2e08b39ca..9f7592a9ee4 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -127,18 +127,18 @@ class boss_warchief_kargath_bladefist : public CreatureScript Talk(SAY_AGGRO); } - void JustSummoned(Creature* summoned) override + void JustSummoned(Creature* summon) override { - switch (summoned->GetEntry()) + switch (summon->GetEntry()) { case NPC_HEARTHEN_GUARD: case NPC_SHARPSHOOTER_GUARD: case NPC_REAVER_GUARD: - summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0)); - adds.push_back(summoned->GetGUID()); + summon->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0)); + adds.push_back(summon->GetGUID()); break; case NPC_SHATTERED_ASSASSIN: - assassins.push_back(summoned->GetGUID()); + assassins.push_back(summon->GetGUID()); break; } } diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index d1a31906d58..fcfa77bc2e0 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -165,7 +165,6 @@ public: void Reset() override { - ryga = NULL; } // Override Evade Mode event, recast buff that was removed by standard handler @@ -175,15 +174,6 @@ public: DoCast(me, SPELL_ANCESTRAL_WOLF_BUFF, true); } - void MoveInLineOfSight(Unit* who) override - { - if (!ryga && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f)) - if (Creature* temp = who->ToCreature()) - ryga = temp; - - npc_escortAI::MoveInLineOfSight(who); - } - void WaypointReached(uint32 waypointId) override { switch (waypointId) @@ -238,9 +228,6 @@ public: break; } } - - private: - Creature* ryga; }; CreatureAI* GetAI(Creature* creature) const override |
