mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7614] Sort/rename debug commands, Move packet send commands to new ".debug send " subcommands list.
Also drop not implemented .debug inarc Add to .debug send spellfail support for up to 2 additional args for spell fail packet.
This commit is contained in:
parent
8fe9008132
commit
db2027feb0
5 changed files with 84 additions and 80 deletions
|
|
@ -105,34 +105,39 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand debugCommandTable[] =
|
||||
static ChatCommand debugSendCommandTable[] =
|
||||
{
|
||||
{ "inarc", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugInArcCommand, "", NULL },
|
||||
{ "spellfail", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpellFailCommand, "", NULL },
|
||||
{ "setpoi", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetPoiCommand, "", NULL },
|
||||
{ "buyerror", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendBuyErrorCommand, "", NULL },
|
||||
{ "channelnotify", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendChannelNotifyCommand, "", NULL },
|
||||
{ "chatmmessage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendChatMsgCommand, "", NULL },
|
||||
{ "equiperror", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendEquipErrorCommand, "", NULL },
|
||||
{ "largepacket", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendLargePacketCommand, "", NULL },
|
||||
{ "opcode", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendOpcodeCommand, "", NULL },
|
||||
{ "poi", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendPoiCommand, "", NULL },
|
||||
{ "qpartymsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendQuestPartyMsgCommand, "", NULL },
|
||||
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendQuestInvalidMsgCommand, "", NULL },
|
||||
{ "equiperr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugEquipErrorCommand, "", NULL },
|
||||
{ "sellerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSellErrorCommand, "", NULL },
|
||||
{ "buyerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBuyErrorCommand, "", NULL },
|
||||
{ "sendopcode", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendOpcodeCommand, "", NULL },
|
||||
{ "spawnvehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpawnVehicle, "", NULL },
|
||||
{ "uws", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdateWorldStateCommand, "", NULL },
|
||||
{ "scn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendChannelNotifyCommand, "", NULL },
|
||||
{ "scm", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendChatMsgCommand, "", NULL },
|
||||
{ "sps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendSetPhaseShiftCommand, "", NULL },
|
||||
{ "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetItemState, "", NULL },
|
||||
{ "playsound", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlaySoundCommand, "", NULL },
|
||||
{ "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdate, "", NULL },
|
||||
{ "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetValue, "", NULL },
|
||||
{ "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetValue, "", NULL },
|
||||
{ "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugMod32Value, "", NULL },
|
||||
{ "sellerror", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendSellErrorCommand, "", NULL },
|
||||
{ "setphaseshift", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendSetPhaseShiftCommand, "", NULL },
|
||||
{ "spellfail", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendSpellFailCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand debugCommandTable[] =
|
||||
{
|
||||
{ "anim", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugAnimCommand, "", NULL },
|
||||
{ "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugGetLootRecipient, "", NULL },
|
||||
{ "arena", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugArenaCommand, "", NULL },
|
||||
{ "bg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBattlegroundCommand, "", NULL },
|
||||
{ "sendlargepacket",SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendLargePacketCommand, "", NULL },
|
||||
{ "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetItemState, "", NULL },
|
||||
{ "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugGetLootRecipient, "", NULL },
|
||||
{ "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetValue, "", NULL },
|
||||
{ "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugMod32Value, "", NULL },
|
||||
{ "playsound", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlaySoundCommand, "", NULL },
|
||||
{ "send", SEC_ADMINISTRATOR, false, NULL, "", debugSendCommandTable },
|
||||
{ "setitemflag", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetItemFlagCommand, "", NULL },
|
||||
{ "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetValue, "", NULL },
|
||||
{ "spawnvehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpawnVehicle, "", NULL },
|
||||
{ "uws", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdateWorldStateCommand, "", NULL },
|
||||
{ "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdate, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -117,6 +117,33 @@ class ChatHandler
|
|||
bool HandleSendMailCommand(const char* args);
|
||||
bool HandleSendMoneyCommand(const char* args);
|
||||
|
||||
bool HandleDebugAnimCommand(const char* args);
|
||||
bool HandleDebugArenaCommand(const char * args);
|
||||
bool HandleDebugBattlegroundCommand(const char * args);
|
||||
bool HandleDebugGetItemState(const char * args);
|
||||
bool HandleDebugGetLootRecipient(const char * args);
|
||||
bool HandleDebugGetValue(const char* args);
|
||||
bool HandleDebugMod32Value(const char* args);
|
||||
bool HandleDebugPlaySoundCommand(const char* args);
|
||||
bool HandleDebugSetValue(const char* args);
|
||||
bool HandleDebugSetItemFlagCommand(const char * args);
|
||||
bool HandleDebugSpawnVehicle(const char * args);
|
||||
bool HandleDebugUpdate(const char* args);
|
||||
bool HandleDebugUpdateWorldStateCommand(const char* args);
|
||||
|
||||
bool HandleDebugSendBuyErrorCommand(const char* args);
|
||||
bool HandleDebugSendChannelNotifyCommand(const char* args);
|
||||
bool HandleDebugSendChatMsgCommand(const char* args);
|
||||
bool HandleDebugSendEquipErrorCommand(const char* args);
|
||||
bool HandleDebugSendLargePacketCommand(const char * args);
|
||||
bool HandleDebugSendOpcodeCommand(const char* args);
|
||||
bool HandleDebugSendPoiCommand(const char* args);
|
||||
bool HandleDebugSendQuestPartyMsgCommand(const char* args);
|
||||
bool HandleDebugSendQuestInvalidMsgCommand(const char* args);
|
||||
bool HandleDebugSendSellErrorCommand(const char* args);
|
||||
bool HandleDebugSendSetPhaseShiftCommand(const char * args);
|
||||
bool HandleDebugSendSpellFailCommand(const char* args);
|
||||
|
||||
bool HandleEventActiveListCommand(const char* args);
|
||||
bool HandleEventStartCommand(const char* args);
|
||||
bool HandleEventStopCommand(const char* args);
|
||||
|
|
@ -307,17 +334,10 @@ class ChatHandler
|
|||
bool HandleHonorUpdateCommand(const char* args);
|
||||
|
||||
bool HandleLoadScriptsCommand(const char* args);
|
||||
bool HandleDebugSendQuestPartyMsgCommand(const char* args);
|
||||
bool HandleDebugSendQuestInvalidMsgCommand(const char* args);
|
||||
|
||||
bool HandleDebugInArcCommand(const char* args);
|
||||
bool HandleDebugSpellFailCommand(const char* args);
|
||||
|
||||
bool HandleGUIDCommand(const char* args);
|
||||
bool HandleItemMoveCommand(const char* args);
|
||||
bool HandleDeMorphCommand(const char* args);
|
||||
bool HandleDebugSetPoiCommand(const char* args);
|
||||
bool HandleDebugEquipErrorCommand(const char* args);
|
||||
bool HandleGoCreatureCommand(const char* args);
|
||||
bool HandleGoObjectCommand(const char* args);
|
||||
bool HandleGoTriggerCommand(const char* args);
|
||||
|
|
@ -357,8 +377,6 @@ class ChatHandler
|
|||
bool HandleUnLearnCommand(const char* args);
|
||||
bool HandleGetDistanceCommand(const char* args);
|
||||
bool HandleGameObjectAddCommand(const char* args);
|
||||
bool HandleDebugAnimCommand(const char* args);
|
||||
bool HandleDebugPlaySoundCommand(const char* args);
|
||||
bool HandleModifyStandStateCommand(const char* args);
|
||||
bool HandleDieCommand(const char* args);
|
||||
bool HandleDamageCommand(const char *args);
|
||||
|
|
@ -381,7 +399,6 @@ class ChatHandler
|
|||
bool HandleGuildUninviteCommand(const char* args);
|
||||
bool HandleGuildRankCommand(const char* args);
|
||||
bool HandleGuildDeleteCommand(const char* args);
|
||||
bool HandleDebugUpdate(const char* args);
|
||||
bool HandleBankCommand(const char* args);
|
||||
bool HandleChangeWeather(const char* args);
|
||||
bool HandleKickPlayerCommand(const char * args);
|
||||
|
|
@ -414,12 +431,6 @@ class ChatHandler
|
|||
bool HandleWpShowCommand(const char* args);
|
||||
bool HandleWpExportCommand(const char* args);
|
||||
bool HandleWpImportCommand(const char* args);
|
||||
bool HandleDebugSendOpcodeCommand(const char* args);
|
||||
bool HandleDebugSellErrorCommand(const char* args);
|
||||
bool HandleDebugBuyErrorCommand(const char* args);
|
||||
bool HandleDebugUpdateWorldStateCommand(const char* args);
|
||||
bool HandleDebugSendChannelNotifyCommand(const char* args);
|
||||
bool HandleDebugSendChatMsgCommand(const char* args);
|
||||
bool HandleRenameCommand(const char * args);
|
||||
bool HandleCustomizeCommand(const char * args);
|
||||
bool HandlePDumpLoadCommand(const char *args);
|
||||
|
|
@ -437,22 +448,11 @@ class ChatHandler
|
|||
bool HandleWaterwalkCommand(const char* args);
|
||||
|
||||
//! Development Commands
|
||||
bool HandleDebugSetValue(const char* args);
|
||||
bool HandleDebugGetValue(const char* args);
|
||||
bool HandleSet32Bit(const char* args);
|
||||
bool HandleDebugMod32Value(const char* args);
|
||||
bool HandleQuestAdd(const char * args);
|
||||
bool HandleQuestRemove(const char * args);
|
||||
bool HandleQuestComplete(const char * args);
|
||||
bool HandleSaveAllCommand(const char* args);
|
||||
bool HandleDebugGetItemState(const char * args);
|
||||
bool HandleDebugGetLootRecipient(const char * args);
|
||||
bool HandleDebugArenaCommand(const char * args);
|
||||
bool HandleDebugBattlegroundCommand(const char * args);
|
||||
bool HandleDebugSpawnVehicle(const char * args);
|
||||
bool HandleDebugSendLargePacketCommand(const char * args);
|
||||
bool HandleDebugSendSetPhaseShiftCommand(const char * args);
|
||||
bool HandleDebugSetItemFlagCommand(const char * args);
|
||||
|
||||
Player* getSelectedPlayer();
|
||||
Creature* getSelectedCreature();
|
||||
|
|
|
|||
|
|
@ -3774,17 +3774,6 @@ bool ChatHandler::HandleCustomizeCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
//show animation
|
||||
bool ChatHandler::HandleDebugAnimCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 anim_id = atoi((char*)args);
|
||||
m_session->GetPlayer()->HandleEmoteCommand(anim_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
//change standstate
|
||||
bool ChatHandler::HandleModifyStandStateCommand(const char* args)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,22 +31,7 @@
|
|||
#include <fstream>
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
bool ChatHandler::HandleDebugInArcCommand(const char* /*args*/)
|
||||
{
|
||||
Object *obj = getSelectedUnit();
|
||||
|
||||
if(!obj)
|
||||
{
|
||||
SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
|
||||
return true;
|
||||
}
|
||||
|
||||
SendSysMessage(LANG_NOT_IMPLEMENTED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDebugSpellFailCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendSpellFailCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -56,17 +41,31 @@ bool ChatHandler::HandleDebugSpellFailCommand(const char* args)
|
|||
return false;
|
||||
|
||||
uint8 failnum = (uint8)atoi(px);
|
||||
if(failnum==0 && *px!='0')
|
||||
return false;
|
||||
|
||||
char* p1 = strtok(NULL, " ");
|
||||
uint8 failarg1 = p1 ? (uint8)atoi(p1) : 0;
|
||||
|
||||
char* p2 = strtok(NULL, " ");
|
||||
uint8 failarg2 = p2 ? (uint8)atoi(p2) : 0;
|
||||
|
||||
|
||||
WorldPacket data(SMSG_CAST_FAILED, 5);
|
||||
data << uint8(0);
|
||||
data << uint32(133);
|
||||
data << uint8(failnum);
|
||||
if(p1 || p2)
|
||||
data << uint32(failarg1);
|
||||
if(p2)
|
||||
data << uint32(failarg2);
|
||||
|
||||
m_session->SendPacket(&data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDebugSetPoiCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendPoiCommand(const char* args)
|
||||
{
|
||||
Player *pPlayer = m_session->GetPlayer();
|
||||
Unit* target = getSelectedUnit();
|
||||
|
|
@ -92,7 +91,7 @@ bool ChatHandler::HandleDebugSetPoiCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDebugEquipErrorCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendEquipErrorCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -102,7 +101,7 @@ bool ChatHandler::HandleDebugEquipErrorCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDebugSellErrorCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendSellErrorCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -112,7 +111,7 @@ bool ChatHandler::HandleDebugSellErrorCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDebugBuyErrorCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendBuyErrorCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -646,3 +645,14 @@ bool ChatHandler::HandleDebugSetItemFlagCommand(const char* args)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
//show animation
|
||||
bool ChatHandler::HandleDebugAnimCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 anim_id = atoi((char*)args);
|
||||
m_session->GetPlayer()->HandleEmoteCommand(anim_id);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7613"
|
||||
#define REVISION_NR "7614"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue