mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
fix(Core/Movement): rework root protocol with ack in mind (#23147)
This commit is contained in:
@@ -4431,12 +4431,6 @@ void Player::SetMovement(PlayerMovementType pType)
|
||||
const PackedGuid& guid = GetPackGUID();
|
||||
switch (pType)
|
||||
{
|
||||
case MOVE_ROOT:
|
||||
data.Initialize(SMSG_FORCE_MOVE_ROOT, guid.size() + 4);
|
||||
break;
|
||||
case MOVE_UNROOT:
|
||||
data.Initialize(SMSG_FORCE_MOVE_UNROOT, guid.size() + 4);
|
||||
break;
|
||||
case MOVE_WATER_WALK:
|
||||
data.Initialize(SMSG_MOVE_WATER_WALK, guid.size() + 4);
|
||||
break;
|
||||
@@ -4490,10 +4484,10 @@ void Player::BuildPlayerRepop()
|
||||
SetHealth(1); // convert player body to ghost
|
||||
SetMovement(MOVE_WATER_WALK);
|
||||
SetWaterWalking(true);
|
||||
if (!GetSession()->isLogingOut())
|
||||
{
|
||||
SetMovement(MOVE_UNROOT);
|
||||
}
|
||||
|
||||
if (!IsImmobilizedState())
|
||||
SendMoveRoot(false);
|
||||
|
||||
RemoveUnitFlag(UNIT_FLAG_SKINNABLE); // BG - remove insignia related
|
||||
int32 corpseReclaimDelay = CalculateCorpseReclaimDelay();
|
||||
if (corpseReclaimDelay >= 0)
|
||||
@@ -4530,7 +4524,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
|
||||
setDeathState(DeathState::Alive);
|
||||
SetMovement(MOVE_LAND_WALK);
|
||||
SetMovement(MOVE_UNROOT);
|
||||
SendMoveRoot(false);
|
||||
SetWaterWalking(false);
|
||||
m_deathTimer = 0;
|
||||
|
||||
@@ -4594,7 +4588,7 @@ void Player::KillPlayer()
|
||||
if (IsFlying() && !GetTransport())
|
||||
GetMotionMaster()->MoveFall();
|
||||
|
||||
SetMovement(MOVE_ROOT);
|
||||
SendMoveRoot(true);
|
||||
|
||||
StopMirrorTimers(); //disable timers(bars)
|
||||
|
||||
@@ -11703,9 +11697,6 @@ void Player::SendInitialPacketsAfterAddToMap()
|
||||
GetZoneAndAreaId(newzone, newarea);
|
||||
UpdateZone(newzone, newarea); // also call SendInitWorldStates();
|
||||
|
||||
if (HasStunAura())
|
||||
SetMovement(MOVE_ROOT);
|
||||
|
||||
WorldPacket setCompoundState(SMSG_MULTIPLE_MOVES, 100);
|
||||
setCompoundState << uint32(0); // size placeholder
|
||||
|
||||
|
||||
Reference in New Issue
Block a user