*Move creature spell init from updateentry to initentry. This allows pet have spells defined in db.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-14 09:18:55 -06:00
parent e82dd549b8
commit 25720e5a90

View File

@@ -297,6 +297,11 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
if(!m_respawnradius && m_defaultMovementType==RANDOM_MOTION_TYPE)
m_defaultMovementType = IDLE_MOTION_TYPE;
m_spells[0] = GetCreatureInfo()->spell1;
m_spells[1] = GetCreatureInfo()->spell2;
m_spells[2] = GetCreatureInfo()->spell3;
m_spells[3] = GetCreatureInfo()->spell4;
return true;
}
@@ -353,11 +358,6 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data )
SetPvP(true);
}
m_spells[0] = GetCreatureInfo()->spell1;
m_spells[1] = GetCreatureInfo()->spell2;
m_spells[2] = GetCreatureInfo()->spell3;
m_spells[3] = GetCreatureInfo()->spell4;
// HACK: trigger creature is always not selectable
if(isTrigger())
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);