It's still not working... plz help
Code:
bool ChatHandler::HandleFlyCommand(const char* args)
{
if(!args)
return false;
Unit *unit = getSelectedUnit();
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
unit = m_session->GetPlayer();
WorldPacket data(12);
/*
SMSG_MOVE_SET_CAN_FLY = 0x343,
SMSG_MOVE_UNSET_CAN_FLY = 0x344,
CMSG_MOVE_SET_CAN_FLY_ACK = 0x345,
CMSG_MOVE_SET_FLY = 0x346,
*/
if (strncmp(args, "on", 3) == 0)
data.SetOpcode(0x343);
else if (strncmp(args, "off", 4) == 0)
data.SetOpcode(0x344);
else
{
SendSysMessage("Must specify on or off not a mind reader!");
return false;
}
data.append(unit->GetPackGUID());
data << uint32(0); // unknown
unit->SendMessageToSet(&data, true);
PSendSysMessage("Flying mode for unit: %s is %s", unit->GetName(), args);
return true;
}
I have hacked this from trinity core zero and it still does not want to play ball, I must admit when I ran a pre-compiled trinity core zero flying did not work (nor did anything else) I have tried the client message and the server message but to no avail boo hoo boo hoo c'mon help a guy out