*Call stopmoving in moveidle.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-13 14:42:57 -06:00
parent bb7391f129
commit 146b2560aa
14 changed files with 11 additions and 24 deletions
@@ -166,7 +166,6 @@ void ScriptedAI::DoStartNoMovement(Unit* victim)
return;
m_creature->GetMotionMaster()->MoveIdle();
m_creature->StopMoving();
}
void ScriptedAI::DoStopAttack()
@@ -803,7 +803,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
else
{
m_creature->GetMotionMaster()->MoveIdle();
m_creature->StopMoving();
}
}
break;
@@ -1209,7 +1208,6 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
else
{
m_creature->GetMotionMaster()->MoveIdle();
m_creature->StopMoving();
}
}
}
@@ -350,9 +350,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
DoScriptText(SAY_RIZZLE_FINAL, m_creature);
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 1);
m_creature->setFaction(35);
m_creature->StopMoving();
m_creature->GetMotionMaster()->MovementExpired();
m_creature->GetMotionMaster()->Clear(true);
m_creature->GetMotionMaster()->MoveIdle();
m_creature->RemoveAurasDueToSpell(SPELL_PERIODIC_DEPTH_CHARGE);
Reached = true;
}
@@ -1079,8 +1079,8 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
Illidan->RemoveAurasDueToSpell(SPELL_KNEEL);
m_creature->SetInFront(Illidan);
Illidan->SetInFront(m_creature);
m_creature->StopMoving();
Illidan->StopMoving();
m_creature->GetMotionMaster()->MoveIdle();
Illidan->GetMotionMaster()->MoveIdle();
((boss_illidan_stormrageAI*)Illidan->AI())->AkamaGUID = m_creature->GetGUID();
((boss_illidan_stormrageAI*)Illidan->AI())->EnterPhase(PHASE_TALK_SEQUENCE);
}
@@ -1912,8 +1912,8 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); // onoz she looks like she teleported!
Maiev->SetInFront(m_creature); // Have her face us
m_creature->SetInFront(Maiev); // Face her, so it's not rude =P
Maiev->StopMoving();
m_creature->StopMoving();
Maiev->GetMotionMaster()->MoveIdle();
m_creature->GetMotionMaster()->MoveIdle();
}break;
case 14:
if(GETCRE(Maiev, MaievGUID))
@@ -895,7 +895,6 @@ void PretendToDie(Creature* _Creature)
{
_Creature->InterruptNonMeleeSpells(false);
_Creature->SetHealth(0);
_Creature->StopMoving();
_Creature->ClearComboPointHolders();
_Creature->RemoveAllAurasOnDeath();
_Creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
@@ -709,7 +709,6 @@ void mob_headAI::Disappear()
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->GetMotionMaster()->MoveIdle();
m_creature->StopMoving();
((boss_headless_horsemanAI*)body->AI())->returned = true;
}
}
@@ -228,7 +228,6 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI
m_creature->InterruptNonMeleeSpells(false);
m_creature->SetHealth(0);
m_creature->StopMoving();
m_creature->ClearComboPointHolders();
m_creature->RemoveAllAurasOnDeath();
m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
@@ -864,7 +863,6 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
DoScriptText(SAY_PHASE5_NUTS, m_creature);
m_creature->StopMoving();
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MoveIdle();
DoTeleportTo(GRAVITY_X, GRAVITY_Y, GRAVITY_Z);
@@ -928,7 +926,6 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
switch(GravityLapse_Phase)
{
case 0:
m_creature->StopMoving();
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MoveIdle();
DoTeleportTo(GRAVITY_X, GRAVITY_Y, GRAVITY_Z);
-3
View File
@@ -1620,9 +1620,6 @@ void Creature::setDeathState(DeathState s)
if (canFly() && FallGround())
return;
if(!IsStopped())
StopMoving();
}
Unit::setDeathState(s);
-1
View File
@@ -62,7 +62,6 @@ void GuardAI::EnterEvadeMode()
if( !i_creature.isAlive() )
{
DEBUG_LOG("Creature stopped attacking because he's dead [guid=%u]", i_creature.GetGUIDLow());
i_creature.StopMoving();
i_creature.GetMotionMaster()->MoveIdle();
i_state = STATE_NORMAL;
+5
View File
@@ -23,6 +23,11 @@
IdleMovementGenerator si_idleMovement;
void IdleMovementGenerator::Initialize(Unit &owner)
{
owner.StopMoving();
}
void
IdleMovementGenerator::Reset(Unit& /*owner*/)
{
+1 -1
View File
@@ -27,7 +27,7 @@ class TRINITY_DLL_SPEC IdleMovementGenerator : public MovementGenerator
{
public:
void Initialize(Unit &) { }
void Initialize(Unit &);
void Finalize(Unit &) { }
void Reset(Unit &);
bool Update(Unit &, const uint32 &) { return true; }
-1
View File
@@ -63,7 +63,6 @@ void PetAI::_stopAttack()
if( !i_pet.isAlive() )
{
DEBUG_LOG("Creature stoped attacking cuz his dead [guid=%u]", i_pet.GetGUIDLow());
i_pet.StopMoving();
i_pet.GetMotionMaster()->Clear();
i_pet.GetMotionMaster()->MoveIdle();
i_pet.CombatStop();
-1
View File
@@ -87,7 +87,6 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
case COMMAND_STAY: //flat=1792 //STAY
pet->AttackStop();
pet->InterruptNonMeleeSpells(false);
pet->StopMoving();
pet->GetMotionMaster()->MoveIdle();
charmInfo->SetCommandState( COMMAND_STAY );
break;
-2
View File
@@ -10394,7 +10394,6 @@ void Unit::setDeathState(DeathState s)
ClearDiminishings();
GetMotionMaster()->Clear(false);
GetMotionMaster()->MoveIdle();
StopMoving();
//without this when removing IncreaseMaxHealth aura player may stuck with 1 hp
//do not why since in IncreaseMaxHealth currenthealth is checked
SetHealth(0);
@@ -13138,7 +13137,6 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess)
if(GetTypeId() == TYPEID_UNIT)
{
((Creature*)this)->AI()->OnCharmed(true);
StopMoving();
GetMotionMaster()->Clear(false);
GetMotionMaster()->MoveIdle();
}