mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 17:13:47 +00:00
fix(Core): Fix waterwalking after dying in instance (#23593)
This commit is contained in:
@@ -4409,28 +4409,6 @@ void Player::DeleteOldRecoveryItems(uint32 keepDays)
|
||||
}
|
||||
}
|
||||
|
||||
void Player::SetMovement(PlayerMovementType pType)
|
||||
{
|
||||
WorldPacket data;
|
||||
const PackedGuid& guid = GetPackGUID();
|
||||
switch (pType)
|
||||
{
|
||||
case MOVE_WATER_WALK:
|
||||
data.Initialize(SMSG_MOVE_WATER_WALK, guid.size() + 4);
|
||||
break;
|
||||
case MOVE_LAND_WALK:
|
||||
data.Initialize(SMSG_MOVE_LAND_WALK, guid.size() + 4);
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("entities.player", "Player::SetMovement: Unsupported move type ({}), data not sent to client.", pType);
|
||||
return;
|
||||
}
|
||||
data << guid;
|
||||
data << GetSession()->GetOrderCounter(); // movement counter
|
||||
SendDirectMessage(&data);
|
||||
GetSession()->IncrementOrderCounter();
|
||||
}
|
||||
|
||||
/* Preconditions:
|
||||
- a resurrectable corpse must not be loaded for the player (only bones)
|
||||
- the player must be in world
|
||||
@@ -4466,7 +4444,6 @@ void Player::BuildPlayerRepop()
|
||||
}
|
||||
GetMap()->AddToMap(corpse);
|
||||
SetHealth(1); // convert player body to ghost
|
||||
SetMovement(MOVE_WATER_WALK);
|
||||
SetWaterWalking(true);
|
||||
|
||||
if (!IsImmobilizedState())
|
||||
@@ -4507,7 +4484,6 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
SetDynamicFlag(UNIT_DYNFLAG_REFER_A_FRIEND);
|
||||
|
||||
setDeathState(DeathState::Alive);
|
||||
SetMovement(MOVE_LAND_WALK);
|
||||
SendMoveRoot(false);
|
||||
SetWaterWalking(false);
|
||||
m_deathTimer = 0;
|
||||
@@ -11689,7 +11665,7 @@ void Player::SendInitialPacketsAfterAddToMap()
|
||||
GetSession()->IncrementOrderCounter();
|
||||
}
|
||||
|
||||
if (HasAuraType(SPELL_AURA_WATER_WALK))
|
||||
if (HasAuraType(SPELL_AURA_WATER_WALK) || HasAura(8326))
|
||||
{
|
||||
uint32 const counter = GetSession()->GetOrderCounter();
|
||||
setCompoundState << uint8(2 + GetPackGUID().size() + 4);
|
||||
@@ -12096,18 +12072,6 @@ void Player::GetAurasForTarget(Unit* target, bool force /*= false*/)
|
||||
if (!target || (!force && target->GetVisibleAuras()->empty())) // speedup things
|
||||
return;
|
||||
|
||||
/*! Blizz sends certain movement packets sometimes even before CreateObject
|
||||
These movement packets are usually found in SMSG_COMPRESSED_MOVES
|
||||
*/
|
||||
if (target->HasFeatherFallAura())
|
||||
target->SendMovementFeatherFall(this);
|
||||
|
||||
if (target->HasWaterWalkAura())
|
||||
target->SendMovementWaterWalking(this);
|
||||
|
||||
if (target->HasHoverAura())
|
||||
target->SendMovementHover(this);
|
||||
|
||||
WorldPacket data(SMSG_AURA_UPDATE_ALL);
|
||||
data<< target->GetPackGUID();
|
||||
|
||||
|
||||
@@ -2059,8 +2059,6 @@ public:
|
||||
}
|
||||
bool IsMirrorTimerActive(MirrorTimerType type) { return m_MirrorTimer[type] == getMaxTimer(type); }
|
||||
|
||||
void SetMovement(PlayerMovementType pType);
|
||||
|
||||
bool CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone);
|
||||
|
||||
void JoinedChannel(Channel* c);
|
||||
|
||||
Reference in New Issue
Block a user