Jump to content

[11210][fix] HandleMoveSetCanFlyAckOpcode


Guest Vinolentus

Recommended Posts

@@ -1509,7 +1509,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
    DEBUG_LOG("WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
    //recv_data.hexlike();

-    ObjectGuid guid;                                        // guid - unused
+    ObjectGuid guid;
    MovementInfo movementInfo;

    recv_data >> guid.ReadAsPacked();
@@ -1517,7 +1517,22 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
    recv_data >> movementInfo;
    recv_data >> Unused<float>();                           // unk2

-    _player->m_movementInfo.SetMovementFlags(movementInfo.GetMovementFlags());
+    Unit * target;
+    if (_player->GetObjectGuid() == guid)
+        target = _player;
+
+    else if (!_player->IsSelfMover() && _player->GetMover()->GetObjectGuid() == guid)
+        target = _player->GetMover();
+
+    else
+    {
+        DEBUG_LOG("WorldSession::HandleMoveSetCanFlyAckOpcode: player %s, "
+            "mover %s, received %s", _player->GetGuidStr().c_str(),
+            _player->GetMover()->GetGuidStr().c_str(), guid.GetString().c_str());
+        return;
+    }
+
+    target->m_movementInfo.SetMovementFlags(movementInfo.GetMovementFlags());
}
void WorldSession::HandleRequestPetInfoOpcode( WorldPacket & /*recv_data */)

Should also fix unexpected Spell::cancel() for channeled spells.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use