mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts: Fix static analysis issues CID 1381648, 1379869, 1377302 and… (#20748)
* Scripts: Fix static analysis issues CID 1381648, 1379869, 1377302 and 1377300
This commit is contained in:
@@ -715,8 +715,8 @@ class spell_baleroc_torment_AuraScript : public AuraScript
|
||||
if (healer->HasAura(SPELL_VITAL_FLAME))
|
||||
return;
|
||||
|
||||
bool Is25ManHeroic = healer->GetMap()->IsHeroic() && healer->GetMap()->Is25ManRaid();
|
||||
uint32 stacks = healer->GetAuraCount(SPELL_VITAL_SPARK) + std::min(uint8(ceil(GetStackAmount() / (Is25ManHeroic ? 5 : 3))), uint8(255));
|
||||
bool is25ManHeroic = healer->GetMap()->IsHeroic() && healer->GetMap()->Is25ManRaid();
|
||||
uint32 stacks = healer->GetAuraCount(SPELL_VITAL_SPARK) + std::min(uint8(ceil(GetStackAmount() / (is25ManHeroic ? 5.0 : 3.0))), uint8(255));
|
||||
|
||||
healer->SetAuraStack(SPELL_VITAL_SPARK, healer, stacks);
|
||||
if (Aura* aura = healer->GetAura(SPELL_VITAL_SPARK))
|
||||
|
||||
@@ -589,8 +589,9 @@ class spell_marrowgar_coldflame_damage : public SpellScriptLoader
|
||||
if (target->HasAura(SPELL_IMPALED))
|
||||
return false;
|
||||
|
||||
if (target->GetExactDist2d(GetOwner()) > GetSpellInfo()->GetEffect(target->GetMap()->GetDifficultyID(), EFFECT_0)->CalcRadius())
|
||||
return false;
|
||||
if (SpellEffectInfo const* effect = GetSpellInfo()->GetEffect(target->GetMap()->GetDifficultyID(), EFFECT_0))
|
||||
if (target->GetExactDist2d(GetOwner()) > effect->CalcRadius())
|
||||
return false;
|
||||
|
||||
if (Aura* aur = target->GetAura(GetId()))
|
||||
if (aur->GetOwner() != GetOwner())
|
||||
|
||||
@@ -1549,7 +1549,8 @@ class spell_frostwarden_handler_focus_fire : public SpellScriptLoader
|
||||
PreventDefaultAction();
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
caster->AddThreat(GetTarget(), -float(GetSpellInfo()->GetEffect(caster->GetMap()->GetDifficultyID(), EFFECT_1)->CalcValue()));
|
||||
if (SpellEffectInfo const* effect = GetSpellInfo()->GetEffect(caster->GetMap()->GetDifficultyID(), EFFECT_1))
|
||||
caster->AddThreat(GetTarget(), -float(effect->CalcValue()));
|
||||
caster->GetAI()->SetData(DATA_WHELP_MARKER, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user