Core/Misc: Fix static analysis issues
This commit is contained in:
1 parent
21cad46097
commit
5efa54d11c
12 files changed
+27
-27
No files matched your search
@@ -324,7 +324,7 @@ public:
|
||||
|
||||
if (Creature* fetchVesp = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_VESPERON)))
|
||||
{
|
||||
if (fetchVesp && fetchVesp->IsAlive() && !fetchVesp->GetVictim())
|
||||
if (fetchVesp->IsAlive() && !fetchVesp->GetVictim())
|
||||
{
|
||||
_canUseWill = true;
|
||||
if (!fetchVesp->IsInCombat())
|
||||
|
||||
+5
-5
@@ -224,7 +224,7 @@ public:
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 250, true))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
{
|
||||
DoCast(target, SPELL_HAMMER_JUSTICE);
|
||||
DoCast(target, SPELL_HAMMER_RIGHTEOUS);
|
||||
@@ -350,7 +350,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 250, true))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_HOLY_FIRE);
|
||||
}
|
||||
if (me->HasAura(SPELL_SHIELD))
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 250, true))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_SMITE);
|
||||
}
|
||||
if (me->HasAura(SPELL_SHIELD))
|
||||
@@ -456,7 +456,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_OLD_WOUNDS);
|
||||
}
|
||||
uiOldWoundsTimer = 12000;
|
||||
@@ -472,7 +472,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_SHADOWS_PAST);
|
||||
}
|
||||
uiShadowPastTimer = 5000;
|
||||
|
||||
+4
-4
@@ -197,7 +197,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_DEATH_RESPITE);
|
||||
}
|
||||
uiDeathRespiteTimer = urand(15000, 16000);
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_DESECRATION);
|
||||
}
|
||||
uiDesecration = urand(15000, 16000);
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_MARKED_DEATH);
|
||||
}
|
||||
uiMarkedDeathTimer = urand(5000, 7000);
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
{
|
||||
if (target && target->IsAlive())
|
||||
if (target->IsAlive())
|
||||
DoCast(target, (SPELL_LEAP));
|
||||
}
|
||||
uiAttackTimer = 3500;
|
||||
|
||||
@@ -998,7 +998,7 @@ class npc_ball_of_flame : public CreatureScript
|
||||
{
|
||||
// need to clear states now because this call is before AuraEffect is fully removed
|
||||
me->ClearUnitState(UNIT_STATE_CASTING | UNIT_STATE_STUNNED);
|
||||
if (target && me->Attack(target, true))
|
||||
if (me->Attack(target, true))
|
||||
me->GetMotionMaster()->MoveChase(target, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -928,7 +928,7 @@ class spell_q9874_liquid_fire : public SpellScriptLoader
|
||||
{
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
if (Creature* target = GetHitCreature())
|
||||
if (target && !target->HasAura(SPELL_FLAMES))
|
||||
if (!target->HasAura(SPELL_FLAMES))
|
||||
{
|
||||
caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT);
|
||||
target->CastSpell(target, SPELL_FLAMES, true);
|
||||
|
||||
Reference in new issue
Block a user