Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //src\game\object\Player.cpp
- void Player::SetCanFly(bool enable)
- {
- WorldPacket data;
- if (enable)
- data.Initialize(MSG_MOVE_START_SWIM, 12);
- else
- data.Initialize(MSG_MOVE_STOP_SWIM, 12);
- data << GetPackGUID();
- data << uint32(0);
- SendMessageToSet(&data, true);
- /*data.Initialize(MSG_MOVE_UPDATE_CAN_FLY, 64); //hope we can skip this
- data << GetPackGUID();
- m_movementInfo.Write(data);
- SendMessageToSet(&data, false);*/
- }
- //src\game\chatCommands\Level3.cpp It's already present in MangosZero
- #include "Opcodes.h"
- bool ChatHandler::HandleGMFlyCommand(char* args)
- {
- bool value;
- if (!ExtractOnOff(&args, value))
- {
- SendSysMessage(LANG_USE_BOL);
- SetSentErrorMessage(true);
- return false;
- }
- Player* target = getSelectedPlayer();
- if (!target)
- {
- target = m_session->GetPlayer();
- }
- /* [-ZERO] Need reimplement in another way //hope we can skip this
- {
- SendSysMessage(LANG_USE_BOL);
- return false;
- }*/
- target->SetCanFly(value);
- PSendSysMessage(LANG_COMMAND_FLYMODE_STATUS, GetNameLink(target).c_str(), args); //not sure LANG_COMMAND_FLYMODE_STATUS exists in MangosZero, might need fix here
- return true;
- }
Add Comment
Please, Sign In to add comment