*Call stopmoving in moveidle.
--HG-- branch : trunk
This commit is contained in:
@@ -1620,9 +1620,6 @@ void Creature::setDeathState(DeathState s)
|
||||
|
||||
if (canFly() && FallGround())
|
||||
return;
|
||||
|
||||
if(!IsStopped())
|
||||
StopMoving();
|
||||
}
|
||||
Unit::setDeathState(s);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
|
||||
IdleMovementGenerator si_idleMovement;
|
||||
|
||||
void IdleMovementGenerator::Initialize(Unit &owner)
|
||||
{
|
||||
owner.StopMoving();
|
||||
}
|
||||
|
||||
void
|
||||
IdleMovementGenerator::Reset(Unit& /*owner*/)
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user