From 8f627853dfaab8bfecd24bfd96ad02c6503d517e Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 20 Mar 2009 14:01:46 -0600 Subject: *More work on summon system. --HG-- branch : trunk --- src/game/Creature.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/game/Creature.cpp') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 03f5740fd1c..34ca8bb31e0 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -136,10 +136,10 @@ Unit(), lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLeaderGUID(0), m_lootMoney(0), m_lootRecipient(0), m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f), -m_gossipOptionLoaded(false), m_emoteState(0), m_isPet(false), m_isVehicle(false), m_isTotem(false), +m_gossipOptionLoaded(false), m_emoteState(0), m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), -m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formationID(0), m_isSummon(false) +m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formationID(0), m_summonMask(SUMMON_MASK_NONE) { m_regenTimer = 200; m_valuesCount = UNIT_END; @@ -597,9 +597,10 @@ bool Creature::AIM_Initialize(CreatureAI* ai) return false; } - if(i_AI) delete i_AI; + UnitAI *oldAI = i_AI; i_motionMaster.Initialize(); i_AI = ai ? ai : FactorySelector::selectAI(this); + if(oldAI) delete oldAI; IsAIEnabled = true; return true; } -- cgit v1.2.3