Core/Misc: Fix some static analysis issues

Fix some static analysis issues about uninitialized values.
This commit is contained in:
jackpoz
2013-12-09 21:10:42 +01:00
parent b6f4ab491f
commit 822755ca87
7 changed files with 8 additions and 2 deletions

View File

@@ -57,7 +57,6 @@ class PetAI : public CreatureAI
void UpdateAllies();
TimeTracker i_tracker;
bool inCombat;
std::set<uint64> m_AllySet;
uint32 m_updateAlliesTimer;

View File

@@ -807,6 +807,7 @@ public:
me->GetPosition(x, y, z); //this visual aura some under ground
me->SetPosition(x, y, z + 0.35f, 0.0f);
Despawn();
debuffGUID = 0;
Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
if (debuff)
{

View File

@@ -186,6 +186,7 @@ public:
{
npc_towering_infernalAI(Creature* creature) : ScriptedAI(creature)
{
AnetheronGUID = 0;
instance = creature->GetInstanceScript();
if (instance)
AnetheronGUID = instance->GetData64(DATA_ANETHERON);

View File

@@ -193,6 +193,7 @@ public:
{
npc_lesser_doomguardAI(Creature* creature) : hyjal_trashAI(creature)
{
AzgalorGUID = 0;
instance = creature->GetInstanceScript();
if (instance)
AzgalorGUID = instance->GetData64(DATA_AZGALOR);

View File

@@ -431,7 +431,6 @@ public:
bool meteor;
bool CanMove;
bool WpEnabled;
bool go;
uint32 spawnTimer;
uint32 FlameBuffetTimer;

View File

@@ -176,6 +176,7 @@ public:
void Reset() OVERRIDE
{
IsMovementActive = false;
TargetTubberGUID = 0;
}
void MovementInform(uint32 type, uint32 id) OVERRIDE

View File

@@ -922,6 +922,7 @@ public:
{
eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -999,6 +1000,7 @@ public:
{
SetCombatMovement(false);
Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -1109,6 +1111,7 @@ public:
{
SetCombatMovement(false);
Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
@@ -1228,6 +1231,7 @@ public:
{
SetCombatMovement(false);
Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);