*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
-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();
}