fix(Core/Spells): Properly handle client-side orientation on stun. (#10107)
Fixes #9738
This commit is contained in:
@@ -17485,7 +17485,7 @@ void Unit::SetStunned(bool apply)
|
|||||||
SetStandState(UNIT_STAND_STATE_STAND);
|
SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetRooted(true);
|
SetRooted(true, true);
|
||||||
|
|
||||||
CastStop();
|
CastStop();
|
||||||
}
|
}
|
||||||
@@ -17511,12 +17511,12 @@ void Unit::SetStunned(bool apply)
|
|||||||
|
|
||||||
if (!HasUnitState(UNIT_STATE_ROOT)) // prevent moving if it also has root effect
|
if (!HasUnitState(UNIT_STATE_ROOT)) // prevent moving if it also has root effect
|
||||||
{
|
{
|
||||||
SetRooted(false);
|
SetRooted(false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::SetRooted(bool apply)
|
void Unit::SetRooted(bool apply, bool isStun)
|
||||||
{
|
{
|
||||||
if (apply)
|
if (apply)
|
||||||
{
|
{
|
||||||
@@ -17540,7 +17540,14 @@ void Unit::SetRooted(bool apply)
|
|||||||
// Creature specific
|
// Creature specific
|
||||||
if (GetTypeId() != TYPEID_PLAYER)
|
if (GetTypeId() != TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
StopMoving();
|
if (isStun && movespline->Finalized())
|
||||||
|
{
|
||||||
|
StopMovingOnCurrentPos();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StopMoving();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_movedByPlayer)
|
if (m_movedByPlayer)
|
||||||
|
|||||||
@@ -2480,7 +2480,7 @@ protected:
|
|||||||
void SetFeared(bool apply);
|
void SetFeared(bool apply);
|
||||||
void SetConfused(bool apply);
|
void SetConfused(bool apply);
|
||||||
void SetStunned(bool apply);
|
void SetStunned(bool apply);
|
||||||
void SetRooted(bool apply);
|
void SetRooted(bool apply, bool isStun = false);
|
||||||
|
|
||||||
uint32 m_rootTimes;
|
uint32 m_rootTimes;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user