[11971] Add wrapper HasAttribute to check if a spell has an attribute

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Schmoozerd 2012-04-21 02:02:23 +02:00
parent 85c694b53e
commit 7fd1f64319
12 changed files with 382 additions and 352 deletions

View file

@ -7526,7 +7526,7 @@ bool PlayerCondition::Meets(Player const * player) const
{
Unit::SpellAuraHolderMap const& auras = player->GetSpellAuraHolderMap();
for (Unit::SpellAuraHolderMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
if ((itr->second->GetSpellProto()->Attributes & 0x1000010) && itr->second->GetSpellProto()->SpellVisual[0]==3580)
if ((itr->second->GetSpellProto()->HasAttribute(SPELL_ATTR_CASTABLE_WHILE_MOUNTED) || itr->second->GetSpellProto()->HasAttribute(SPELL_ATTR_UNK4)) && itr->second->GetSpellProto()->SpellVisual[0]==3580)
return true;
return false;
}