Core/Util: Fixed flag128 and removed flag96 - previously if flag128 and flag96 were used in together the result was always a bool instead of expected flag result due to implicit boolean conversion

This commit is contained in:
Shauren
2015-04-27 00:33:27 +02:00
parent 800d5d8939
commit 675a2fcd3b
14 changed files with 107 additions and 101 deletions
+2 -2
View File
@@ -154,7 +154,7 @@ class spell_warl_banish : public SpellScriptLoader
/// Check if the target already has Banish, if so, do nothing.
if (Unit* target = GetHitUnit())
{
if (target->GetAuraEffect(SPELL_AURA_SCHOOL_IMMUNITY, SPELLFAMILY_WARLOCK, 0, 0x08000000, 0))
if (target->GetAuraEffect(SPELL_AURA_SCHOOL_IMMUNITY, SPELLFAMILY_WARLOCK, flag128(0, 0x08000000, 0)))
{
// No need to remove old aura since its removed due to not stack by current Banish aura
PreventHitDefaultEffect(EFFECT_0);
@@ -590,7 +590,7 @@ class spell_warl_everlasting_affliction : public SpellScriptLoader
Unit* caster = GetCaster();
if (Unit* target = GetHitUnit())
// Refresh corruption on target
if (AuraEffect* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, 0x2, 0, 0, caster->GetGUID()))
if (AuraEffect* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, flag128(0x2, 0, 0), caster->GetGUID()))
{
uint32 damage = std::max(aurEff->GetAmount(), 0);
sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage);