fix(Core/Auras): Always process hover/waterwalking movement flags on aura removal. (#9416)

Fixes #9056
This commit is contained in:
UltraNix
2021-12-09 22:06:53 +01:00
committed by GitHub
parent 02636e79f5
commit 0300cef119

View File

@@ -15015,8 +15015,12 @@ bool Player::SetCanFly(bool apply, bool packetOnly /*= false*/)
bool Player::SetHover(bool apply, bool packetOnly /*= false*/)
{
if (!packetOnly && !Unit::SetHover(apply))
return false;
// moved inside, flag can be removed on landing and wont send appropriate packet to client when aura is removed
if (!packetOnly /* && !Unit::SetHover(apply)*/)
{
Unit::SetHover(apply);
// return false;
}
WorldPacket data(apply ? SMSG_MOVE_SET_HOVER : SMSG_MOVE_UNSET_HOVER, 12);
data << GetPackGUID();
@@ -15032,8 +15036,12 @@ bool Player::SetHover(bool apply, bool packetOnly /*= false*/)
bool Player::SetWaterWalking(bool apply, bool packetOnly /*= false*/)
{
if (!packetOnly && !Unit::SetWaterWalking(apply))
return false;
// moved inside, flag can be removed on landing and wont send appropriate packet to client when aura is removed
if (!packetOnly /* && !Unit::SetWaterWalking(apply)*/)
{
Unit::SetWaterWalking(apply);
// return false;
}
WorldPacket data(apply ? SMSG_MOVE_WATER_WALK : SMSG_MOVE_LAND_WALK, 12);
data << GetPackGUID();