*Init spells for vehicles.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-03-14 09:49:10 -06:00
1 parent d90d0002e3
commit 5d440f2898
3 files changed
+36 -24

No files matched your search

+2 -9
View File
@@ -11435,20 +11435,13 @@ void CharmInfo::InitPossessCreateSpells()
InitEmptyActionBar();
if(m_unit->GetTypeId() == TYPEID_UNIT)
{
/*for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
uint32 spellid = ((Creature*)m_unit)->m_spells[i];
if(IsPassiveSpell(spellid))
m_unit->CastSpell(m_unit, spellid, true);
else
AddSpellToAB(0, spellid, ACT_CAST);
}*/
for(uint32 x = 0; x < CREATURE_MAX_SPELLS; ++x)
{
if (IsPassiveSpell(((Creature*)m_unit)->m_spells[x]))
m_unit->CastSpell(m_unit, ((Creature*)m_unit)->m_spells[x], true);
else
AddSpellToAB(0, ((Creature*)m_unit)->m_spells[x], ACT_PASSIVE);
AddSpellToAB(0, spellid, ACT_DISABLED);
}
}
}