Core/Pets: Fix stay command if pet is currently processing spline movement
This commit is contained in:
@@ -17400,7 +17400,11 @@ bool CharmInfo::IsCommandAttack()
|
||||
|
||||
void CharmInfo::SaveStayPosition()
|
||||
{
|
||||
m_unit->GetPosition(m_stayX, m_stayY, m_stayZ);
|
||||
//! At this point a new spline destination is enabled because of Unit::StopMoving()
|
||||
G3D::Vector3 const stayPos = m_unit->movespline->FinalDestination();
|
||||
m_stayX = stayPos.x;
|
||||
m_stayY = stayPos.y;
|
||||
m_stayZ = stayPos.z;
|
||||
}
|
||||
|
||||
void CharmInfo::GetStayPosition(float &x, float &y, float &z)
|
||||
|
||||
@@ -155,6 +155,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid
|
||||
case COMMAND_STAY: //flat=1792 //STAY
|
||||
pet->AttackStop();
|
||||
pet->InterruptNonMeleeSpells(false);
|
||||
StopMoving();
|
||||
pet->GetMotionMaster()->Clear(false);
|
||||
pet->GetMotionMaster()->MoveIdle();
|
||||
charmInfo->SetCommandState(COMMAND_STAY);
|
||||
|
||||
Reference in New Issue
Block a user