[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

@ -506,8 +506,7 @@ void LoadDBCStores(const std::string& dataPath)
continue;
SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId);
if(spellInfo && (spellInfo->Attributes & 0x1D0) == 0x1D0)
if (spellInfo && (spellInfo->Attributes & (SPELL_ATTR_UNK4 | SPELL_ATTR_PASSIVE | SPELL_ATTR_UNK7 | SPELL_ATTR_UNK8)) == (SPELL_ATTR_UNK4 | SPELL_ATTR_PASSIVE | SPELL_ATTR_UNK7 | SPELL_ATTR_UNK8))
{
for (unsigned int i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i)
{