Core/Misc: Fix static analysis issues

This commit is contained in:
jackpoz authored and Aokromes committed 2017-12-08 15:24:13 +01:00
1 parent 2e0f2ee3fb
commit 21cad46097
5 files changed
+6 -6

No files matched your search

@@ -1343,9 +1343,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);
}
@@ -165,7 +165,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;
@@ -486,7 +486,7 @@ public:
Talk(SAY_TWIGGY_FLATHEAD_OVER);
Reset();
}
else if (creature) // Makes BIG WILL attackable.
else // Makes BIG WILL attackable.
{
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -1182,7 +1182,7 @@ public:
else if (unit->GetTypeId() == TYPEID_PLAYER)
me->SetDisableGravity(true);
}
else if (!apply)
else
{
if (unit->GetTypeId() != TYPEID_PLAYER)
{
@@ -1285,7 +1285,7 @@ public:
if (unit->GetTypeId() == TYPEID_UNIT)
unit->CastSpell(unit, SPELL_TELEPORT_VISUAL_ONLY);
}
else if (!apply)
else
{
me->StopMoving();
me->SetDisableGravity(false);
@@ -237,7 +237,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;
}