mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
*Move creature spell init from updateentry to initentry. This allows pet have spells defined in db.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user