diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-09-07 20:08:05 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-09-07 20:12:54 +0200 |
| commit | df7f188cfe1b407520549f7374bfd070d83140e5 (patch) | |
| tree | c21f0eb0120682d2bbae9714223958a65a6985ae /src/server/scripts/Kalimdor | |
| parent | 62cfca23cec79e9804bb02111c722d8b566a9e5a (diff) | |
Core/Misc: Refactor scripts to fix static analysis warnings
Fourth batch of fixes targeting 100 issues reported by Coverity
Diffstat (limited to 'src/server/scripts/Kalimdor')
3 files changed, 5 insertions, 10 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 34b55da72de..a7fa54b12e1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -335,6 +335,7 @@ hyjalAI::hyjalAI(Creature* creature) : npc_escortAI(creature), Summons(me) DoRespawn = false; MassTeleportTimer = 0; DoMassTeleport = false; + DummyGuid = 0; } void hyjalAI::Initialize() diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp index a98f3843d97..b916f93aef7 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp @@ -69,9 +69,6 @@ public: uint32 SpawnHatchlings_Timer; uint32 SpawnSpawns_Timer; - Creature* Hatchling; - Creature* Spawn; - void Reset() override { Initialize(); @@ -99,7 +96,7 @@ public: case 1: RandY = 0.0f + Rand; break; } Rand = 0; - Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + Creature* Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); if (Spawn) Spawn->AI()->AttackStart(victim); } @@ -155,6 +152,7 @@ public: if (DoGetThreat(target)) DoModifyThreatPercent(target, -100); + Creature* Hatchling = nullptr; switch (urand(0, 2)) { case 0: @@ -174,7 +172,7 @@ public: break; case 1: DoTeleportPlayer(target, -7990.135354f, 1155.1907f, -78.849319f, 2.608f); - Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling = me->SummonCreature(15962, target->GetPositionX() - 3, target->GetPositionY() - 3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) Hatchling->AI()->AttackStart(target); Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); @@ -189,7 +187,7 @@ public: break; case 2: DoTeleportPlayer(target, -8159.7753f, 1127.9064f, -76.868660f, 0.675f); - Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + Hatchling = me->SummonCreature(15962, target->GetPositionX() - 3, target->GetPositionY() - 3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); if (Hatchling) Hatchling->AI()->AttackStart(target); Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index cd250a50fb7..e65dbacc1f2 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -417,8 +417,6 @@ public: uint32 UnbalancingStrike_Timer; uint32 Scarabs_Timer; - Creature* Summoned; - void Reset() override { TwinReset(); @@ -509,8 +507,6 @@ public: uint32 ArcaneBurst_Timer; uint32 Scorpions_Timer; - Creature* Summoned; - void Reset() override { TwinReset(); |
