Core: Fix many "errors"/warnings and coding style (2)
Scripts; also reverted a change to AuthSocket Errors were found using Cppcheck, open-source static analysis tool
This commit is contained in:
1 parent
5f1977cb1d
commit
abbb896cfb
16 files changed
+70
-93
No files matched your search
@@ -1911,16 +1911,18 @@ class spell_gen_break_shield: public SpellScriptLoader
|
||||
Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
|
||||
for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
{
|
||||
Aura* aura = itr->second->GetBase();
|
||||
SpellInfo const* auraInfo = aura->GetSpellInfo();
|
||||
if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
|
||||
if (Aura* aura = itr->second->GetBase())
|
||||
{
|
||||
aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
// Remove dummys from rider (Necessary for updating visual shields)
|
||||
if (Unit* rider = target->GetCharmer())
|
||||
if (Aura* defend = rider->GetAura(aura->GetId()))
|
||||
defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
break;
|
||||
SpellInfo const* auraInfo = aura->GetSpellInfo();
|
||||
if (auraInfo && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
|
||||
{
|
||||
aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
// Remove dummys from rider (Necessary for updating visual shields)
|
||||
if (Unit* rider = target->GetCharmer())
|
||||
if (Aura* defend = rider->GetAura(aura->GetId()))
|
||||
defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2039,16 +2041,18 @@ class spell_gen_mounted_charge: public SpellScriptLoader
|
||||
Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
|
||||
for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
{
|
||||
Aura* aura = itr->second->GetBase();
|
||||
SpellInfo const* auraInfo = aura->GetSpellInfo();
|
||||
if (aura && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
|
||||
if (Aura* aura = itr->second->GetBase())
|
||||
{
|
||||
aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
// Remove dummys from rider (Necessary for updating visual shields)
|
||||
if (Unit* rider = target->GetCharmer())
|
||||
if (Aura* defend = rider->GetAura(aura->GetId()))
|
||||
defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
break;
|
||||
SpellInfo const* auraInfo = aura->GetSpellInfo();
|
||||
if (auraInfo && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
|
||||
{
|
||||
aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
// Remove dummys from rider (Necessary for updating visual shields)
|
||||
if (Unit* rider = target->GetCharmer())
|
||||
if (Aura* defend = rider->GetAura(aura->GetId()))
|
||||
defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1291,7 +1291,7 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad
|
||||
class spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12372_destabilize_azure_dragonshrine_dummy_SpellScript);
|
||||
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetHitCreature())
|
||||
|
||||
Reference in new issue
Block a user