aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-14 09:18:55 -0600
committermegamage <none@none>2009-03-14 09:18:55 -0600
commit25720e5a9034ae5d50a9bf3d9a3b854035558ff9 (patch)
tree6bb0d278a32a3f14c6b817fe00f70ecddaac79b1 /src
parente82dd549b881609dc736837012f5daf71d941bb9 (diff)
*Move creature spell init from updateentry to initentry. This allows pet have spells defined in db.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Creature.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 8a5e6e52018..51f24389c95 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -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);