Advertisement
Combreal

EnableFlyCmdMangosZero01.cpp

Apr 20th, 2020
809
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. //src\game\object\Player.cpp
  2. void Player::SetCanFly(bool enable)
  3. {
  4.     WorldPacket data;
  5.     if (enable)
  6.         data.Initialize(MSG_MOVE_START_SWIM, 12);
  7.     else
  8.         data.Initialize(MSG_MOVE_STOP_SWIM, 12);
  9.  
  10.     data << GetPackGUID();
  11.     data << uint32(0);                                    
  12.     SendMessageToSet(&data, true);
  13.  
  14.     /*data.Initialize(MSG_MOVE_UPDATE_CAN_FLY, 64); //hope we can skip this
  15.     data << GetPackGUID();
  16.     m_movementInfo.Write(data);
  17.     SendMessageToSet(&data, false);*/
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement