Core/Misc: Fix static analysis issues

(cherry picked from commit 06ea65b0e6)
This commit is contained in:
jackpoz
2017-11-12 15:21:10 +01:00
committed by Shauren
parent 852c9e9108
commit f5dcff32cb
5 changed files with 6 additions and 6 deletions

View File

@@ -1350,9 +1350,9 @@ public:
if (!me->IsWithinDist(me->GetVictim(), 20) || forcemove)
{
forcemove = false;
if (forcemove)
{
forcemove = false;
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
me->Attack(target, false);
}

View File

@@ -156,7 +156,7 @@ public:
m_auiEncounter[4] = NOT_STARTED;
m_auiEncounter[5] = NOT_STARTED;
}
else if (mThrallEventCount > 20)
else
{
m_auiEncounter[1] = data;
m_auiEncounter[2] = data;

View File

@@ -481,7 +481,7 @@ public:
Talk(SAY_TWIGGY_FLATHEAD_OVER);
Reset();
}
else if (creature) // Makes BIG WILL attackable.
else // Makes BIG WILL attackable.
{
creature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
creature->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);

View File

@@ -1191,7 +1191,7 @@ public:
else if (unit->GetTypeId() == TYPEID_PLAYER)
me->SetDisableGravity(true);
}
else if (!apply)
else
{
if (unit->GetTypeId() != TYPEID_PLAYER)
{
@@ -1294,7 +1294,7 @@ public:
if (unit->GetTypeId() == TYPEID_UNIT)
unit->CastSpell(unit, SPELL_TELEPORT_VISUAL_ONLY);
}
else if (!apply)
else
{
me->StopMoving();
me->SetDisableGravity(false);

View File

@@ -235,7 +235,7 @@ class instance_oculus : public InstanceMapScript
return KILL_NO_CONSTRUCT;
else if (CentrifugueConstructCounter == 1)
return KILL_ONE_CONSTRUCT;
else if (CentrifugueConstructCounter > 1)
else
return KILL_MORE_CONSTRUCT;
}