[11977] More uses of wrappers introduced in 11971

Also fix a typo that caused problems with Stances

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Schmoozerd 2012-04-23 22:48:27 +02:00
parent 8433b67599
commit e29e640341
7 changed files with 35 additions and 37 deletions

View file

@ -3532,7 +3532,7 @@ void Spell::EffectTriggerSpell(SpellEffectIndex effIndex)
if (spellInfo->EquippedItemClass >=0 && m_caster->GetTypeId()==TYPEID_PLAYER)
{
// main hand weapon required
if (spellInfo->AttributesEx3 & SPELL_ATTR_EX3_MAIN_HAND)
if (spellInfo->HasAttribute(SPELL_ATTR_EX3_MAIN_HAND))
{
Item* item = ((Player*)m_caster)->GetWeaponForAttack(BASE_ATTACK, true, false);
@ -3546,7 +3546,7 @@ void Spell::EffectTriggerSpell(SpellEffectIndex effIndex)
}
// offhand hand weapon required
if (spellInfo->AttributesEx3 & SPELL_ATTR_EX3_REQ_OFFHAND)
if (spellInfo->HasAttribute(SPELL_ATTR_EX3_REQ_OFFHAND))
{
Item* item = ((Player*)m_caster)->GetWeaponForAttack(OFF_ATTACK, true, false);
@ -4898,7 +4898,7 @@ void Spell::EffectDispel(SpellEffectIndex eff_idx)
if (!holder->IsPositive())
positive = false;
else
positive = (holder->GetSpellProto()->AttributesEx & SPELL_ATTR_EX_NEGATIVE)==0;
positive = !holder->GetSpellProto()->HasAttribute(SPELL_ATTR_EX_NEGATIVE);
// do not remove positive auras if friendly target
// negative auras if non-friendly target
@ -9234,7 +9234,7 @@ void Spell::EffectStealBeneficialBuff(SpellEffectIndex eff_idx)
if (holder && (1<<holder->GetSpellProto()->Dispel) & dispelMask)
{
// Need check for passive? this
if (holder->IsPositive() && !holder->IsPassive() && !(holder->GetSpellProto()->AttributesEx4 & SPELL_ATTR_EX4_NOT_STEALABLE))
if (holder->IsPositive() && !holder->IsPassive() && !holder->GetSpellProto()->HasAttribute(SPELL_ATTR_EX4_NOT_STEALABLE))
steal_list.push_back(holder);
}
}