aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-08-31 20:12:47 +0200
committerjackpoz <giacomopoz@gmail.com>2014-08-31 20:42:02 +0200
commitdd4dbdcd16bb72b1b45c7971cb8b9e06030b6e16 (patch)
tree8bd974d003322df828efdf56059695c79da285ef /src/server/scripts/Outland
parent681cf8f27c341a8fadbadf1851b55b7b8a7e524a (diff)
Core/Misc: Refactor scripts to fix static analysis warnings
First batch of fixes targeting 100 issues reported by Coverity
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/zone_zangarmarsh.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp
index b9736c523c3..c7627d1aa04 100644
--- a/src/server/scripts/Outland/zone_zangarmarsh.cpp
+++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp
@@ -178,6 +178,12 @@ public:
npc_cooshcooshAI(Creature* creature) : ScriptedAI(creature)
{
m_uiNormFaction = creature->getFaction();
+ Initialize();
+ }
+
+ void Initialize()
+ {
+ LightningBolt_Timer = 2000;
}
uint32 m_uiNormFaction;
@@ -185,7 +191,7 @@ public:
void Reset() override
{
- LightningBolt_Timer = 2000;
+ Initialize();
if (me->getFaction() != m_uiNormFaction)
me->setFaction(m_uiNormFaction);
}