Scripts/AhnKahet: Fix some uninitialized values

Initialize all class fields in the constructor, even if they are set in Reset() and they shouldn't be accessed before Reset() is called.
This fixes 2 Coverity reports.
This commit is contained in:
jackpoz committed 2014-03-15 20:04:59 +01:00
1 parent 3b247f6bca
commit e30b471f8e
1 file changed
+7 -1
@@ -88,6 +88,9 @@ class boss_prince_taldaram : public CreatureScript
boss_prince_taldaramAI(Creature* creature) : BossAI(creature, DATA_PRINCE_TALDARAM)
{
me->SetDisableGravity(true);
_flameSphereTargetGUID = 0;
_embraceTargetGUID = 0;
_embraceTakenDamage = 0;
}
void Reset() OVERRIDE
@@ -283,7 +286,10 @@ class npc_prince_taldaram_flame_sphere : public CreatureScript
struct npc_prince_taldaram_flame_sphereAI : public ScriptedAI
{
npc_prince_taldaram_flame_sphereAI(Creature* creature) : ScriptedAI(creature) { }
npc_prince_taldaram_flame_sphereAI(Creature* creature) : ScriptedAI(creature)
{
_flameSphereTargetGUID = 0;
}
void Reset() OVERRIDE
{