aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-03-22 14:54:32 +0100
committerjackpoz <giacomopoz@gmail.com>2014-03-22 14:54:32 +0100
commit6dcd8c8545a65a7bfbd0daaa16f650d8c3a90262 (patch)
tree522298afe00a5e52f0013de09b740818112f06d5 /src/server/scripts/Kalimdor
parent409f4bffd59af41e1d75b4fb4d2bef038eea9552 (diff)
Core/Misc: Fix some static analysis issues
Fix some static analysis issues about: - uninitialized values, most of which are false positives, always initialized before being accessed - unchecked return values - dead code never executed - bad formatting leading to wrong behavior Please ensure EventMap is never used with event id set to 0 or those events will never execute.
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp3
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp6
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp14
4 files changed, 24 insertions, 1 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
index c7803f23e1b..e5ddcd1c2ef 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
@@ -185,6 +185,8 @@ public:
{
npc_towering_infernalAI(Creature* creature) : ScriptedAI(creature)
{
+ ImmolationTimer = 5000;
+ CheckTimer = 5000;
instance = creature->GetInstanceScript();
AnetheronGUID = instance->GetData64(DATA_ANETHERON);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
index 4decce7482f..16002b59f1a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
@@ -191,6 +191,9 @@ public:
{
npc_lesser_doomguardAI(Creature* creature) : hyjal_trashAI(creature)
{
+ CrippleTimer = 50000;
+ WarstompTimer = 10000;
+ CheckTimer = 5000;
instance = creature->GetInstanceScript();
AzgalorGUID = instance->GetData64(DATA_AZGALOR);
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index f04b71d1da9..1dc37e063ba 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -171,7 +171,11 @@ public:
struct npc_snufflenose_gopherAI : public PetAI
{
- npc_snufflenose_gopherAI(Creature* creature) : PetAI(creature) { }
+ npc_snufflenose_gopherAI(Creature* creature) : PetAI(creature)
+ {
+ IsMovementActive = false;
+ TargetTubberGUID = 0;
+ }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 9e3244cccdb..988436066b6 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -898,6 +898,9 @@ public:
{
eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
+ MindflayTimer = 500;
+ KillSelfTimer = 35000;
+
Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
@@ -974,6 +977,10 @@ public:
{
claw_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
+ GroundRuptureTimer = 500;
+ HamstringTimer = 2000;
+ EvadeTimer = 5000;
+
SetCombatMovement(false);
Portal = 0;
@@ -1085,6 +1092,11 @@ public:
{
giant_claw_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
+ GroundRuptureTimer = 500;
+ HamstringTimer = 2000;
+ ThrashTimer = 5000;
+ EvadeTimer = 5000;
+
SetCombatMovement(false);
Portal = 0;
@@ -1205,6 +1217,8 @@ public:
{
giant_eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
+ BeamTimer = 500;
+
SetCombatMovement(false);
Portal = 0;