mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
Merge branch 'master' into 310
Conflicts: src/game/Chat.cpp src/game/Chat.h src/game/GameObject.cpp src/game/Level2.cpp
This commit is contained in:
commit
e5bde711ea
31 changed files with 1295 additions and 1109 deletions
|
|
@ -1048,7 +1048,7 @@ void BattleGround::Reset()
|
|||
m_Events = 0;
|
||||
|
||||
if (m_InvitedAlliance > 0 || m_InvitedHorde > 0)
|
||||
sLog.outError("BattleGround system ERROR: bad counter, m_InvitedAlliance: %d, m_InvitedHorde: %d", m_InvitedAlliance, m_InvitedHorde);
|
||||
sLog.outError("BattleGround system: bad counter, m_InvitedAlliance: %d, m_InvitedHorde: %d", m_InvitedAlliance, m_InvitedHorde);
|
||||
|
||||
m_InvitedAlliance = 0;
|
||||
m_InvitedHorde = 0;
|
||||
|
|
@ -1460,7 +1460,7 @@ Creature* BattleGround::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
|
|||
|
||||
if(!pCreature->IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Creature (guidlow %d, entry %d) not added to battleground. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
|
||||
sLog.outError("Creature (guidlow %d, entry %d) not added to battleground. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1240,7 +1240,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
|||
CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+1+1+1+1+1+1);
|
||||
|
||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair;
|
||||
recv_data >> gender >> skin >> face >> hairStyle >> hairColor >> facialHair;
|
||||
recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face;
|
||||
|
||||
QueryResult *result = CharacterDatabase.PQuery("SELECT at_login FROM characters WHERE guid ='%u'", GUID_LOPART(guid));
|
||||
if (!result)
|
||||
|
|
|
|||
|
|
@ -71,96 +71,6 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverSetCommandTable[] =
|
||||
{
|
||||
{ "loglevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogLevelCommand, "", NULL },
|
||||
{ "motd", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetMotdCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverIdleRestartCommandTable[] =
|
||||
{
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleRestartCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverIdleShutdownCommandTable[] =
|
||||
{
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleShutDownCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverRestartCommandTable[] =
|
||||
{
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerRestartCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverShutdownCommandTable[] =
|
||||
{
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverCommandTable[] =
|
||||
{
|
||||
{ "corpses", SEC_GAMEMASTER, true, &ChatHandler::HandleServerCorpsesCommand, "", NULL },
|
||||
{ "exit", SEC_CONSOLE, true, &ChatHandler::HandleServerExitCommand, "", NULL },
|
||||
{ "idlerestart", SEC_ADMINISTRATOR, true, NULL, "", serverIdleRestartCommandTable },
|
||||
{ "idleshutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
|
||||
{ "info", SEC_PLAYER, true, &ChatHandler::HandleServerInfoCommand, "", NULL },
|
||||
{ "motd", SEC_PLAYER, true, &ChatHandler::HandleServerMotdCommand, "", NULL },
|
||||
{ "restart", SEC_ADMINISTRATOR, true, NULL, "", serverRestartCommandTable },
|
||||
{ "shutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
|
||||
{ "set", SEC_ADMINISTRATOR, true, NULL, "", serverSetCommandTable },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand modifyCommandTable[] =
|
||||
{
|
||||
{ "hp", SEC_MODERATOR, false, &ChatHandler::HandleModifyHPCommand, "", NULL },
|
||||
{ "mana", SEC_MODERATOR, false, &ChatHandler::HandleModifyManaCommand, "", NULL },
|
||||
{ "rage", SEC_MODERATOR, false, &ChatHandler::HandleModifyRageCommand, "", NULL },
|
||||
{ "runicpower", SEC_MODERATOR, false, &ChatHandler::HandleModifyRunicPowerCommand, "", NULL },
|
||||
{ "energy", SEC_MODERATOR, false, &ChatHandler::HandleModifyEnergyCommand, "", NULL },
|
||||
{ "money", SEC_MODERATOR, false, &ChatHandler::HandleModifyMoneyCommand, "", NULL },
|
||||
{ "speed", SEC_MODERATOR, false, &ChatHandler::HandleModifySpeedCommand, "", NULL },
|
||||
{ "swim", SEC_MODERATOR, false, &ChatHandler::HandleModifySwimCommand, "", NULL },
|
||||
{ "scale", SEC_MODERATOR, false, &ChatHandler::HandleModifyScaleCommand, "", NULL },
|
||||
{ "bit", SEC_MODERATOR, false, &ChatHandler::HandleModifyBitCommand, "", NULL },
|
||||
{ "bwalk", SEC_MODERATOR, false, &ChatHandler::HandleModifyBWalkCommand, "", NULL },
|
||||
{ "fly", SEC_MODERATOR, false, &ChatHandler::HandleModifyFlyCommand, "", NULL },
|
||||
{ "aspeed", SEC_MODERATOR, false, &ChatHandler::HandleModifyASpeedCommand, "", NULL },
|
||||
{ "faction", SEC_MODERATOR, false, &ChatHandler::HandleModifyFactionCommand, "", NULL },
|
||||
{ "spell", SEC_MODERATOR, false, &ChatHandler::HandleModifySpellCommand, "", NULL },
|
||||
{ "tp", SEC_MODERATOR, false, &ChatHandler::HandleModifyTalentCommand, "", NULL },
|
||||
{ "titles", SEC_MODERATOR, false, &ChatHandler::HandleModifyKnownTitlesCommand, "", NULL },
|
||||
{ "mount", SEC_MODERATOR, false, &ChatHandler::HandleModifyMountCommand, "", NULL },
|
||||
{ "honor", SEC_MODERATOR, false, &ChatHandler::HandleModifyHonorCommand, "", NULL },
|
||||
{ "rep", SEC_MODERATOR, false, &ChatHandler::HandleModifyRepCommand, "", NULL },
|
||||
{ "arena", SEC_MODERATOR, false, &ChatHandler::HandleModifyArenaCommand, "", NULL },
|
||||
{ "drunk", SEC_MODERATOR, false, &ChatHandler::HandleDrunkCommand, "", NULL },
|
||||
{ "standstate", SEC_GAMEMASTER, false, &ChatHandler::HandleStandStateCommand, "", NULL },
|
||||
{ "morph", SEC_GAMEMASTER, false, &ChatHandler::HandleMorphCommand, "", NULL },
|
||||
{ "phase", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyPhaseCommand, "", NULL },
|
||||
{ "gender", SEC_ADMINISTRATOR, false, &ChatHandler::HandleModifyGenderCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand wpCommandTable[] =
|
||||
{
|
||||
{ "show", SEC_GAMEMASTER, false, &ChatHandler::HandleWpShowCommand, "", NULL },
|
||||
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleWpAddCommand, "", NULL },
|
||||
{ "modify", SEC_GAMEMASTER, false, &ChatHandler::HandleWpModifyCommand, "", NULL },
|
||||
{ "export", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWpExportCommand, "", NULL },
|
||||
{ "import", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWpImportCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand banCommandTable[] =
|
||||
{
|
||||
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanAccountCommand, "", NULL },
|
||||
|
|
@ -185,44 +95,46 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand unbanCommandTable[] =
|
||||
static ChatCommand castCommandTable[] =
|
||||
{
|
||||
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanAccountCommand, "", NULL },
|
||||
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanCharacterCommand, "", NULL },
|
||||
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanIPCommand, "", NULL },
|
||||
{ "back", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastBackCommand, "", NULL },
|
||||
{ "dist", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastDistCommand, "", NULL },
|
||||
{ "self", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastSelfCommand, "", NULL },
|
||||
{ "target", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastTargetCommand, "", NULL },
|
||||
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand debugCommandTable[] =
|
||||
{
|
||||
{ "inarc", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugInArcCommand, "", NULL },
|
||||
{ "spellfail", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpellFailCommand, "", NULL },
|
||||
{ "setpoi", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetPoiCommand, "", NULL },
|
||||
{ "qpartymsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendQuestPartyMsgCommand, "", NULL },
|
||||
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendQuestInvalidMsgCommand, "", NULL },
|
||||
{ "equiperr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleEquipErrorCommand, "", NULL },
|
||||
{ "sellerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSellErrorCommand, "", NULL },
|
||||
{ "buyerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleBuyErrorCommand, "", NULL },
|
||||
{ "sendopcode", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendOpcodeCommand, "", NULL },
|
||||
{ "spawnvehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSpawnVehicle, "", NULL },
|
||||
{ "uws", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUpdateWorldStateCommand, "", NULL },
|
||||
{ "ps", SEC_ADMINISTRATOR, false, &ChatHandler::HandlePlaySound2Command, "", NULL },
|
||||
{ "scn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendChannelNotifyCommand, "", NULL },
|
||||
{ "scm", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendChatMsgCommand, "", NULL },
|
||||
{ "sps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendSetPhaseShiftCommand, "", NULL },
|
||||
{ "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGetItemState, "", NULL },
|
||||
{ "playsound", SEC_MODERATOR, false, &ChatHandler::HandlePlaySoundCommand, "", NULL },
|
||||
{ "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUpdate, "", NULL },
|
||||
{ "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetValue, "", NULL },
|
||||
{ "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGetValue, "", NULL },
|
||||
{ "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleMod32Value, "", NULL },
|
||||
{ "anim", SEC_GAMEMASTER, false, &ChatHandler::HandleAnimCommand, "", NULL },
|
||||
{ "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleGetLootRecipient, "", NULL },
|
||||
{ "arena", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugArenaCommand, "", NULL },
|
||||
{ "bg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBattlegroundCommand, "", NULL },
|
||||
{ "sendlargepacket",SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendLargePacketCommand, "", NULL },
|
||||
{ "setitemflag", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetItemFlagCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
{ "inarc", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugInArcCommand, "", NULL },
|
||||
{ "spellfail", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpellFailCommand, "", NULL },
|
||||
{ "setpoi", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetPoiCommand, "", 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 },
|
||||
{ "ps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugPlaySound2Command, "", 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 },
|
||||
{ "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 },
|
||||
{ "setitemflag", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetItemFlagCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand eventCommandTable[] =
|
||||
|
|
@ -230,7 +142,71 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "activelist", SEC_GAMEMASTER, true, &ChatHandler::HandleEventActiveListCommand, "", NULL },
|
||||
{ "start", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStartCommand, "", NULL },
|
||||
{ "stop", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStopCommand, "", NULL },
|
||||
{ "", SEC_GAMEMASTER, true, &ChatHandler::HandleEventInfoCommand, "", NULL },
|
||||
{ "", SEC_GAMEMASTER, true, &ChatHandler::HandleEventInfoCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand gmCommandTable[] =
|
||||
{
|
||||
{ "chat", SEC_MODERATOR, false, &ChatHandler::HandleGMChatCommand, "", NULL },
|
||||
{ "ingame", SEC_PLAYER, true, &ChatHandler::HandleGMListIngameCommand, "", NULL },
|
||||
{ "list", SEC_ADMINISTRATOR, true, &ChatHandler::HandleGMListFullCommand, "", NULL },
|
||||
{ "visible", SEC_MODERATOR, false, &ChatHandler::HandleGMVisibleCommand, "", NULL },
|
||||
{ "fly", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGMFlyModeCommand, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGMmodeCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand goCommandTable[] =
|
||||
{
|
||||
{ "grid", SEC_MODERATOR, false, &ChatHandler::HandleGoGridCommand, "", NULL },
|
||||
{ "creature", SEC_MODERATOR, false, &ChatHandler::HandleGoCreatureCommand, "", NULL },
|
||||
{ "object", SEC_MODERATOR, false, &ChatHandler::HandleGoObjectCommand, "", NULL },
|
||||
{ "trigger", SEC_MODERATOR, false, &ChatHandler::HandleGoTriggerCommand, "", NULL },
|
||||
{ "graveyard", SEC_MODERATOR, false, &ChatHandler::HandleGoGraveyardCommand, "", NULL },
|
||||
{ "zonexy", SEC_MODERATOR, false, &ChatHandler::HandleGoZoneXYCommand, "", NULL },
|
||||
{ "xy", SEC_MODERATOR, false, &ChatHandler::HandleGoXYCommand, "", NULL },
|
||||
{ "xyz", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand gobjectCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectAddCommand, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectDeleteCommand, "", NULL },
|
||||
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectMoveCommand, "", NULL },
|
||||
{ "near", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectNearCommand, "", NULL },
|
||||
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectPhaseCommand, "", NULL },
|
||||
{ "target", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectTargetCommand, "", NULL },
|
||||
{ "turn", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectTurnCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand guildCommandTable[] =
|
||||
{
|
||||
{ "create", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildCreateCommand, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildDeleteCommand, "", NULL },
|
||||
{ "invite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildInviteCommand, "", NULL },
|
||||
{ "uninvite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildUninviteCommand, "", NULL },
|
||||
{ "rank", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildRankCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand honorCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddCommand, "", NULL },
|
||||
{ "addkill", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddKillCommand, "", NULL },
|
||||
{ "update", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorUpdateCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand instanceCommandTable[] =
|
||||
{
|
||||
{ "listbinds", SEC_ADMINISTRATOR, false, &ChatHandler::HandleInstanceListBindsCommand, "", NULL },
|
||||
{ "unbind", SEC_ADMINISTRATOR, false, &ChatHandler::HandleInstanceUnbindCommand, "", NULL },
|
||||
{ "stats", SEC_ADMINISTRATOR, true, &ChatHandler::HandleInstanceStatsCommand, "", NULL },
|
||||
{ "savedata", SEC_ADMINISTRATOR, false, &ChatHandler::HandleInstanceSaveDataCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
|
|
@ -249,9 +225,128 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand listCommandTable[] =
|
||||
{
|
||||
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListCreatureCommand, "", NULL },
|
||||
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListItemCommand, "", NULL },
|
||||
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListObjectCommand, "", NULL },
|
||||
{ "auras", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListAurasCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand lookupPlayerCommandTable[] =
|
||||
{
|
||||
{ "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerIpCommand, "", NULL },
|
||||
{ "account", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerAccountCommand, "", NULL },
|
||||
{ "email", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerEmailCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand lookupCommandTable[] =
|
||||
{
|
||||
{ "area", SEC_MODERATOR, true, &ChatHandler::HandleLookupAreaCommand, "", NULL },
|
||||
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupCreatureCommand, "", NULL },
|
||||
{ "event", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupEventCommand, "", NULL },
|
||||
{ "faction", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupFactionCommand, "", NULL },
|
||||
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemCommand, "", NULL },
|
||||
{ "itemset", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemSetCommand, "", NULL },
|
||||
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupObjectCommand, "", NULL },
|
||||
{ "quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupQuestCommand, "", NULL },
|
||||
{ "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
|
||||
{ "skill", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSkillCommand, "", NULL },
|
||||
{ "spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSpellCommand, "", NULL },
|
||||
{ "tele", SEC_MODERATOR, true, &ChatHandler::HandleLookupTeleCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand modifyCommandTable[] =
|
||||
{
|
||||
{ "hp", SEC_MODERATOR, false, &ChatHandler::HandleModifyHPCommand, "", NULL },
|
||||
{ "mana", SEC_MODERATOR, false, &ChatHandler::HandleModifyManaCommand, "", NULL },
|
||||
{ "rage", SEC_MODERATOR, false, &ChatHandler::HandleModifyRageCommand, "", NULL },
|
||||
{ "runicpower", SEC_MODERATOR, false, &ChatHandler::HandleModifyRunicPowerCommand, "", NULL },
|
||||
{ "energy", SEC_MODERATOR, false, &ChatHandler::HandleModifyEnergyCommand, "", NULL },
|
||||
{ "money", SEC_MODERATOR, false, &ChatHandler::HandleModifyMoneyCommand, "", NULL },
|
||||
{ "speed", SEC_MODERATOR, false, &ChatHandler::HandleModifySpeedCommand, "", NULL },
|
||||
{ "swim", SEC_MODERATOR, false, &ChatHandler::HandleModifySwimCommand, "", NULL },
|
||||
{ "scale", SEC_MODERATOR, false, &ChatHandler::HandleModifyScaleCommand, "", NULL },
|
||||
{ "bit", SEC_MODERATOR, false, &ChatHandler::HandleModifyBitCommand, "", NULL },
|
||||
{ "bwalk", SEC_MODERATOR, false, &ChatHandler::HandleModifyBWalkCommand, "", NULL },
|
||||
{ "fly", SEC_MODERATOR, false, &ChatHandler::HandleModifyFlyCommand, "", NULL },
|
||||
{ "aspeed", SEC_MODERATOR, false, &ChatHandler::HandleModifyASpeedCommand, "", NULL },
|
||||
{ "faction", SEC_MODERATOR, false, &ChatHandler::HandleModifyFactionCommand, "", NULL },
|
||||
{ "spell", SEC_MODERATOR, false, &ChatHandler::HandleModifySpellCommand, "", NULL },
|
||||
{ "tp", SEC_MODERATOR, false, &ChatHandler::HandleModifyTalentCommand, "", NULL },
|
||||
{ "titles", SEC_MODERATOR, false, &ChatHandler::HandleModifyKnownTitlesCommand, "", NULL },
|
||||
{ "mount", SEC_MODERATOR, false, &ChatHandler::HandleModifyMountCommand, "", NULL },
|
||||
{ "honor", SEC_MODERATOR, false, &ChatHandler::HandleModifyHonorCommand, "", NULL },
|
||||
{ "rep", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyRepCommand, "", NULL },
|
||||
{ "arena", SEC_MODERATOR, false, &ChatHandler::HandleModifyArenaCommand, "", NULL },
|
||||
{ "drunk", SEC_MODERATOR, false, &ChatHandler::HandleModifyDrunkCommand, "", NULL },
|
||||
{ "standstate", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyStandStateCommand, "", NULL },
|
||||
{ "morph", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyMorphCommand, "", NULL },
|
||||
{ "phase", SEC_ADMINISTRATOR, false, &ChatHandler::HandleModifyPhaseCommand, "", NULL },
|
||||
{ "gender", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyGenderCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand npcCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddCommand, "", NULL },
|
||||
{ "additem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddVendorItemCommand, "", NULL },
|
||||
{ "addmove", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddMoveCommand, "", NULL },
|
||||
{ "allowmove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAllowMovementCommand, "", NULL },
|
||||
{ "changeentry", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcChangeEntryCommand, "", NULL },
|
||||
{ "changelevel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcChangeLevelCommand, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcDeleteCommand, "", NULL },
|
||||
{ "delitem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcDelVendorItemCommand, "", NULL },
|
||||
{ "factionid", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFactionIdCommand, "", NULL },
|
||||
{ "flag", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFlagCommand, "", NULL },
|
||||
{ "follow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFollowCommand, "", NULL },
|
||||
{ "info", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcInfoCommand, "", NULL },
|
||||
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcMoveCommand, "", NULL },
|
||||
{ "playemote", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcPlayEmoteCommand, "", NULL },
|
||||
{ "setmodel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetModelCommand, "", NULL },
|
||||
{ "setmovetype", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetMoveTypeCommand, "", NULL },
|
||||
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetPhaseCommand, "", NULL },
|
||||
{ "spawndist", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnDistCommand, "", NULL },
|
||||
{ "spawntime", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnTimeCommand, "", NULL },
|
||||
{ "say", SEC_MODERATOR, false, &ChatHandler::HandleNpcSayCommand, "", NULL },
|
||||
{ "textemote", SEC_MODERATOR, false, &ChatHandler::HandleNpcTextEmoteCommand, "", NULL },
|
||||
{ "unfollow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcUnFollowCommand, "", NULL },
|
||||
{ "whisper", SEC_MODERATOR, false, &ChatHandler::HandleNpcWhisperCommand, "", NULL },
|
||||
{ "yell", SEC_MODERATOR, false, &ChatHandler::HandleNpcYellCommand, "", NULL },
|
||||
{ "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL },
|
||||
{ "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL },
|
||||
|
||||
//{ TODO: fix or remove this commands
|
||||
{ "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL },
|
||||
{ "name", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcNameCommand, "", NULL },
|
||||
{ "subname", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSubNameCommand, "", NULL },
|
||||
//}
|
||||
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand pdumpCommandTable[] =
|
||||
{
|
||||
{ "load", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePDumpLoadCommand, "", NULL },
|
||||
{ "write", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePDumpWriteCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand questCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestAdd, "", NULL },
|
||||
{ "complete", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestComplete, "", NULL },
|
||||
{ "remove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestRemove, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand reloadCommandTable[] =
|
||||
{
|
||||
{ "all", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllCommand, "", NULL },
|
||||
{ "all_area", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllAreaCommand, "", NULL },
|
||||
{ "all_loot", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllLootCommand, "", NULL },
|
||||
{ "all_npc", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllNpcCommand, "", NULL },
|
||||
{ "all_quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAllQuestCommand, "", NULL },
|
||||
|
|
@ -325,49 +420,6 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand honorCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleAddHonorCommand, "", NULL },
|
||||
{ "addkill", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddKillCommand, "", NULL },
|
||||
{ "update", SEC_GAMEMASTER, false, &ChatHandler::HandleUpdateHonorFieldsCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand guildCommandTable[] =
|
||||
{
|
||||
{ "create", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildCreateCommand, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildDeleteCommand, "", NULL },
|
||||
{ "invite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildInviteCommand, "", NULL },
|
||||
{ "uninvite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildUninviteCommand, "", NULL },
|
||||
{ "rank", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildRankCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand lookupPlayerCommandTable[] =
|
||||
{
|
||||
{ "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerIpCommand, "", NULL },
|
||||
{ "account", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerAccountCommand, "", NULL },
|
||||
{ "email", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerEmailCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand lookupCommandTable[] =
|
||||
{
|
||||
{ "area", SEC_MODERATOR, true, &ChatHandler::HandleLookupAreaCommand, "", NULL },
|
||||
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupCreatureCommand, "", NULL },
|
||||
{ "event", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupEventCommand, "", NULL },
|
||||
{ "faction", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupFactionCommand, "", NULL },
|
||||
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemCommand, "", NULL },
|
||||
{ "itemset", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemSetCommand, "", NULL },
|
||||
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupObjectCommand, "", NULL },
|
||||
{ "quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupQuestCommand, "", NULL },
|
||||
{ "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
|
||||
{ "skill", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSkillCommand, "", NULL },
|
||||
{ "spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSpellCommand, "", NULL },
|
||||
{ "tele", SEC_MODERATOR, true, &ChatHandler::HandleLookupTeleCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand resetCommandTable[] =
|
||||
{
|
||||
{ "achievements", SEC_ADMINISTRATOR, false, &ChatHandler::HandleResetAchievementsCommand, "", NULL },
|
||||
|
|
@ -380,129 +432,80 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand castCommandTable[] =
|
||||
static ChatCommand serverIdleRestartCommandTable[] =
|
||||
{
|
||||
{ "back", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastBackCommand, "", NULL },
|
||||
{ "dist", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastDistCommand, "", NULL },
|
||||
{ "self", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastSelfCommand, "", NULL },
|
||||
{ "target", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastTargetCommand, "", NULL },
|
||||
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastCommand, "", NULL },
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleRestartCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand pdumpCommandTable[] =
|
||||
static ChatCommand serverIdleShutdownCommandTable[] =
|
||||
{
|
||||
{ "load", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLoadPDumpCommand, "", NULL },
|
||||
{ "write", SEC_ADMINISTRATOR, true, &ChatHandler::HandleWritePDumpCommand, "", NULL },
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleShutDownCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand listCommandTable[] =
|
||||
static ChatCommand serverRestartCommandTable[] =
|
||||
{
|
||||
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListCreatureCommand, "", NULL },
|
||||
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListItemCommand, "", NULL },
|
||||
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListObjectCommand, "", NULL },
|
||||
{ "auras", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListAurasCommand, "", NULL },
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerRestartCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverShutdownCommandTable[] =
|
||||
{
|
||||
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
|
||||
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverSetCommandTable[] =
|
||||
{
|
||||
{ "loglevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogLevelCommand, "", NULL },
|
||||
{ "motd", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetMotdCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand serverCommandTable[] =
|
||||
{
|
||||
{ "corpses", SEC_GAMEMASTER, true, &ChatHandler::HandleServerCorpsesCommand, "", NULL },
|
||||
{ "exit", SEC_CONSOLE, true, &ChatHandler::HandleServerExitCommand, "", NULL },
|
||||
{ "idlerestart", SEC_ADMINISTRATOR, true, NULL, "", serverIdleRestartCommandTable },
|
||||
{ "idleshutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
|
||||
{ "info", SEC_PLAYER, true, &ChatHandler::HandleServerInfoCommand, "", NULL },
|
||||
{ "motd", SEC_PLAYER, true, &ChatHandler::HandleServerMotdCommand, "", NULL },
|
||||
{ "restart", SEC_ADMINISTRATOR, true, NULL, "", serverRestartCommandTable },
|
||||
{ "shutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
|
||||
{ "set", SEC_ADMINISTRATOR, true, NULL, "", serverSetCommandTable },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand teleCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddTeleCommand, "", NULL },
|
||||
{ "del", SEC_ADMINISTRATOR, true, &ChatHandler::HandleDelTeleCommand, "", NULL },
|
||||
{ "name", SEC_MODERATOR, true, &ChatHandler::HandleNameTeleCommand, "", NULL },
|
||||
{ "group", SEC_MODERATOR, false, &ChatHandler::HandleGroupTeleCommand, "", NULL },
|
||||
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleTeleAddCommand, "", NULL },
|
||||
{ "del", SEC_ADMINISTRATOR, true, &ChatHandler::HandleTeleDelCommand, "", NULL },
|
||||
{ "name", SEC_MODERATOR, true, &ChatHandler::HandleTeleNameCommand, "", NULL },
|
||||
{ "group", SEC_MODERATOR, false, &ChatHandler::HandleTeleGroupCommand, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, &ChatHandler::HandleTeleCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand npcCommandTable[] =
|
||||
static ChatCommand unbanCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddCommand, "", NULL },
|
||||
{ "additem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddVendorItemCommand, "", NULL },
|
||||
{ "addmove", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddMoveCommand, "", NULL },
|
||||
{ "changeentry", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcChangeEntryCommand, "", NULL },
|
||||
{ "changelevel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcChangeLevelCommand, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcDeleteCommand, "", NULL },
|
||||
{ "factionid", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFactionIdCommand, "", NULL },
|
||||
{ "flag", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFlagCommand, "", NULL },
|
||||
{ "follow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFollowCommand, "", NULL },
|
||||
{ "info", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcInfoCommand, "", NULL },
|
||||
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcMoveCommand, "", NULL },
|
||||
{ "playemote", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcPlayEmoteCommand, "", NULL },
|
||||
{ "setmodel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetModelCommand, "", NULL },
|
||||
{ "setmovetype", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetMoveTypeCommand, "", NULL },
|
||||
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetPhaseCommand, "", NULL },
|
||||
{ "spawndist", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnDistCommand, "", NULL },
|
||||
{ "spawntime", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnTimeCommand, "", NULL },
|
||||
{ "say", SEC_MODERATOR, false, &ChatHandler::HandleNpcSayCommand, "", NULL },
|
||||
{ "textemote", SEC_MODERATOR, false, &ChatHandler::HandleNpcTextEmoteCommand, "", NULL },
|
||||
{ "unfollow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcUnFollowCommand, "", NULL },
|
||||
{ "whisper", SEC_MODERATOR, false, &ChatHandler::HandleNpcWhisperCommand, "", NULL },
|
||||
{ "yell", SEC_MODERATOR, false, &ChatHandler::HandleNpcYellCommand, "", NULL },
|
||||
{ "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL },
|
||||
{ "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL },
|
||||
|
||||
//{ TODO: fix or remove this commands
|
||||
{ "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL },
|
||||
{ "name", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcNameCommand, "", NULL },
|
||||
{ "subname", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSubNameCommand, "", NULL },
|
||||
//}
|
||||
|
||||
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanAccountCommand, "", NULL },
|
||||
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanCharacterCommand, "", NULL },
|
||||
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanIPCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand goCommandTable[] =
|
||||
static ChatCommand wpCommandTable[] =
|
||||
{
|
||||
{ "grid", SEC_MODERATOR, false, &ChatHandler::HandleGoGridCommand, "", NULL },
|
||||
{ "creature", SEC_GAMEMASTER, false, &ChatHandler::HandleGoCreatureCommand, "", NULL },
|
||||
{ "object", SEC_GAMEMASTER, false, &ChatHandler::HandleGoObjectCommand, "", NULL },
|
||||
{ "trigger", SEC_GAMEMASTER, false, &ChatHandler::HandleGoTriggerCommand, "", NULL },
|
||||
{ "graveyard", SEC_GAMEMASTER, false, &ChatHandler::HandleGoGraveyardCommand, "", NULL },
|
||||
{ "zonexy", SEC_MODERATOR, false, &ChatHandler::HandleGoZoneXYCommand, "", NULL },
|
||||
{ "xy", SEC_MODERATOR, false, &ChatHandler::HandleGoXYCommand, "", NULL },
|
||||
{ "xyz", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand gobjectCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectCommand, "", NULL },
|
||||
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleDelObjectCommand, "", NULL },
|
||||
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleMoveObjectCommand, "", NULL },
|
||||
{ "near", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNearObjectCommand, "", NULL },
|
||||
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleGOPhaseCommand, "", NULL },
|
||||
{ "target", SEC_GAMEMASTER, false, &ChatHandler::HandleTargetObjectCommand, "", NULL },
|
||||
{ "turn", SEC_GAMEMASTER, false, &ChatHandler::HandleTurnObjectCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand questCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddQuest, "", NULL },
|
||||
{ "complete", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCompleteQuest, "", NULL },
|
||||
{ "remove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleRemoveQuest, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand gmCommandTable[] =
|
||||
{
|
||||
{ "chat", SEC_MODERATOR, false, &ChatHandler::HandleGMChatCommand, "", NULL },
|
||||
{ "ingame", SEC_PLAYER, true, &ChatHandler::HandleGMListIngameCommand, "", NULL },
|
||||
{ "list", SEC_ADMINISTRATOR, true, &ChatHandler::HandleGMListFullCommand, "", NULL },
|
||||
{ "visible", SEC_MODERATOR, false, &ChatHandler::HandleVisibleCommand, "", NULL },
|
||||
{ "fly", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlyModeCommand, "", NULL },
|
||||
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGMmodeCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand instanceCommandTable[] =
|
||||
{
|
||||
{ "listbinds", SEC_MODERATOR, false, &ChatHandler::HandleInstanceListBindsCommand, "", NULL },
|
||||
{ "unbind", SEC_MODERATOR, false, &ChatHandler::HandleInstanceUnbindCommand, "", NULL },
|
||||
{ "stats", SEC_MODERATOR, true, &ChatHandler::HandleInstanceStatsCommand, "", NULL },
|
||||
{ "savedata", SEC_MODERATOR, false, &ChatHandler::HandleInstanceSaveDataCommand, "", NULL },
|
||||
{ "show", SEC_GAMEMASTER, false, &ChatHandler::HandleWpShowCommand, "", NULL },
|
||||
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleWpAddCommand, "", NULL },
|
||||
{ "modify", SEC_GAMEMASTER, false, &ChatHandler::HandleWpModifyCommand, "", NULL },
|
||||
{ "export", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWpExportCommand, "", NULL },
|
||||
{ "import", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWpImportCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
|
|
@ -561,7 +564,6 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "plimit", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePLimitCommand, "", NULL },
|
||||
{ "start", SEC_PLAYER, false, &ChatHandler::HandleStartCommand, "", NULL },
|
||||
{ "taxicheat", SEC_MODERATOR, false, &ChatHandler::HandleTaxiCheatCommand, "", NULL },
|
||||
{ "allowmove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAllowMovementCommand, "", NULL },
|
||||
{ "linkgrave", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLinkGraveCommand, "", NULL },
|
||||
{ "neargrave", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNearGraveCommand, "", NULL },
|
||||
{ "explorecheat", SEC_ADMINISTRATOR, false, &ChatHandler::HandleExploreCheatCommand, "", NULL },
|
||||
|
|
@ -588,13 +590,13 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "rename", SEC_GAMEMASTER, true, &ChatHandler::HandleRenameCommand, "", NULL },
|
||||
{ "customize", SEC_GAMEMASTER, true, &ChatHandler::HandleCustomizeCommand, "", NULL },
|
||||
{ "loadscripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLoadScriptsCommand, "", NULL },
|
||||
{ "mute", SEC_GAMEMASTER, true, &ChatHandler::HandleMuteCommand, "", NULL },
|
||||
{ "unmute", SEC_GAMEMASTER, true, &ChatHandler::HandleUnmuteCommand, "", NULL },
|
||||
{ "mute", SEC_MODERATOR, true, &ChatHandler::HandleMuteCommand, "", NULL },
|
||||
{ "unmute", SEC_MODERATOR, true, &ChatHandler::HandleUnmuteCommand, "", NULL },
|
||||
{ "movegens", SEC_ADMINISTRATOR, false, &ChatHandler::HandleMovegensCommand, "", NULL },
|
||||
{ "cometome", SEC_ADMINISTRATOR, false, &ChatHandler::HandleComeToMeCommand, "", NULL },
|
||||
{ "damage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDamageCommand, "", NULL },
|
||||
{ "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL },
|
||||
{ "flusharenapoints", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
|
||||
{ "flusharenapoints",SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
|
||||
{ "chardelete", SEC_CONSOLE, true, &ChatHandler::HandleCharacterDeleteCommand, "", NULL },
|
||||
{ "sendmessage", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMessageCommand, "", NULL },
|
||||
{ "repairitems", SEC_GAMEMASTER, false, &ChatHandler::HandleRepairitemsCommand, "", NULL },
|
||||
|
|
@ -614,28 +616,9 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{
|
||||
Field *fields = result->Fetch();
|
||||
std::string name = fields[0].GetCppString();
|
||||
for(uint32 i = 0; commandTable[i].Name != NULL; i++)
|
||||
{
|
||||
if (name == commandTable[i].Name)
|
||||
{
|
||||
commandTable[i].SecurityLevel = (uint16)fields[1].GetUInt16();
|
||||
commandTable[i].Help = fields[2].GetCppString();
|
||||
}
|
||||
if(commandTable[i].ChildCommands != NULL)
|
||||
{
|
||||
ChatCommand *ptable = commandTable[i].ChildCommands;
|
||||
for(uint32 j = 0; ptable[j].Name != NULL; j++)
|
||||
{
|
||||
// first case for "" named subcommand
|
||||
if (ptable[j].Name[0]=='\0' && name == commandTable[i].Name ||
|
||||
name == fmtstring("%s %s", commandTable[i].Name, ptable[j].Name) )
|
||||
{
|
||||
ptable[j].SecurityLevel = (uint16)fields[1].GetUInt16();
|
||||
ptable[j].Help = fields[2].GetCppString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetDataForCommandInTable(commandTable, name.c_str(), fields[1].GetUInt16(), fields[2].GetCppString(), name);
|
||||
|
||||
} while(result->NextRow());
|
||||
delete result;
|
||||
}
|
||||
|
|
@ -860,6 +843,61 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, co
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ChatHandler::SetDataForCommandInTable(ChatCommand *table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand )
|
||||
{
|
||||
std::string cmd = "";
|
||||
|
||||
while (*text != ' ' && *text != '\0')
|
||||
{
|
||||
cmd += *text;
|
||||
++text;
|
||||
}
|
||||
|
||||
while (*text == ' ') ++text;
|
||||
|
||||
for(uint32 i = 0; table[i].Name != NULL; i++)
|
||||
{
|
||||
// for data fill use full explicit command names
|
||||
if( table[i].Name != cmd )
|
||||
continue;
|
||||
|
||||
// select subcommand from child commands list (including "")
|
||||
if(table[i].ChildCommands != NULL)
|
||||
{
|
||||
if(SetDataForCommandInTable(table[i].ChildCommands, text, security, help, fullcommand))
|
||||
return true;
|
||||
else if(*text)
|
||||
return false;
|
||||
|
||||
// fail with "" subcommands, then use normal level up command instead
|
||||
}
|
||||
// expected subcommand by full name DB content
|
||||
else if(*text)
|
||||
{
|
||||
sLog.outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.",text,fullcommand.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if(table[i].SecurityLevel != security)
|
||||
sLog.outDetail("Table `command` overwrite for command '%s' default security (%u) by %u",fullcommand.c_str(),table[i].SecurityLevel,security);
|
||||
|
||||
table[i].SecurityLevel = security;
|
||||
table[i].Help = help;
|
||||
return true;
|
||||
}
|
||||
|
||||
// in case "" command let process by caller
|
||||
if(!cmd.empty())
|
||||
{
|
||||
if(table==getCommandTable())
|
||||
sLog.outErrorDb("Table `command` have not existed command '%s', skip.",cmd.c_str());
|
||||
else
|
||||
sLog.outErrorDb("Table `command` have not existed subcommand '%s' in command '%s', skip.",cmd.c_str(),fullcommand.c_str());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int ChatHandler::ParseCommands(const char* text)
|
||||
{
|
||||
ASSERT(text);
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ class ChatHandler
|
|||
|
||||
void SendGlobalSysMessage(const char *str);
|
||||
|
||||
bool SetDataForCommandInTable(ChatCommand *table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand );
|
||||
bool ExecuteCommandInTable(ChatCommand *table, const char* text, const std::string& fullcommand);
|
||||
bool ShowHelpForCommand(ChatCommand *table, const char* cmd);
|
||||
bool ShowHelpForSubCommands(ChatCommand *table, char const* cmd, char const* subcmd);
|
||||
|
|
@ -110,13 +111,13 @@ class ChatHandler
|
|||
bool HandleNotifyCommand(const char* args);
|
||||
bool HandleGMmodeCommand(const char* args);
|
||||
bool HandleGMChatCommand(const char* args);
|
||||
bool HandleVisibleCommand(const char* args);
|
||||
bool HandleGMVisibleCommand(const char* args);
|
||||
bool HandleGPSCommand(const char* args);
|
||||
bool HandleTaxiCheatCommand(const char* args);
|
||||
bool HandleWhispersCommand(const char* args);
|
||||
bool HandleNameTeleCommand(const char* args);
|
||||
bool HandleGroupTeleCommand(const char* args);
|
||||
bool HandleDrunkCommand(const char* args);
|
||||
bool HandleTeleNameCommand(const char* args);
|
||||
bool HandleTeleGroupCommand(const char* args);
|
||||
bool HandleModifyDrunkCommand(const char* args);
|
||||
bool HandleSendItemsCommand(const char* args);
|
||||
bool HandleSendMailCommand(const char* args);
|
||||
bool HandleSendMoneyCommand(const char* args);
|
||||
|
|
@ -298,13 +299,13 @@ class ChatHandler
|
|||
bool HandleServerShutDownCommand(const char* args);
|
||||
bool HandleServerShutDownCancelCommand(const char* args);
|
||||
|
||||
bool HandleAddHonorCommand(const char* args);
|
||||
bool HandleHonorAddCommand(const char* args);
|
||||
bool HandleHonorAddKillCommand(const char* args);
|
||||
bool HandleUpdateHonorFieldsCommand(const char* args);
|
||||
bool HandleHonorUpdateCommand(const char* args);
|
||||
|
||||
bool HandleLoadScriptsCommand(const char* args);
|
||||
bool HandleSendQuestPartyMsgCommand(const char* args);
|
||||
bool HandleSendQuestInvalidMsgCommand(const char* args);
|
||||
bool HandleDebugSendQuestPartyMsgCommand(const char* args);
|
||||
bool HandleDebugSendQuestInvalidMsgCommand(const char* args);
|
||||
|
||||
bool HandleDebugInArcCommand(const char* args);
|
||||
bool HandleDebugSpellFailCommand(const char* args);
|
||||
|
|
@ -312,17 +313,17 @@ class ChatHandler
|
|||
bool HandleGUIDCommand(const char* args);
|
||||
bool HandleItemMoveCommand(const char* args);
|
||||
bool HandleDeMorphCommand(const char* args);
|
||||
bool HandleSetPoiCommand(const char* args);
|
||||
bool HandleEquipErrorCommand(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);
|
||||
bool HandleGoGraveyardCommand(const char* args);
|
||||
bool HandleTargetObjectCommand(const char* args);
|
||||
bool HandleDelObjectCommand(const char* args);
|
||||
bool HandleMoveObjectCommand(const char* args);
|
||||
bool HandleGOPhaseCommand(const char* args);
|
||||
bool HandleTurnObjectCommand(const char* args);
|
||||
bool HandleGameObjectTargetCommand(const char* args);
|
||||
bool HandleGameObjectDeleteCommand(const char* args);
|
||||
bool HandleGameObjectMoveCommand(const char* args);
|
||||
bool HandleGameObjectPhaseCommand(const char* args);
|
||||
bool HandleGameObjectTurnCommand(const char* args);
|
||||
bool HandlePInfoCommand(const char* args);
|
||||
bool HandlePLimitCommand(const char* args);
|
||||
bool HandleMuteCommand(const char* args);
|
||||
|
|
@ -346,20 +347,20 @@ class ChatHandler
|
|||
bool HandleGoXYZCommand(const char* args);
|
||||
bool HandleGoZoneXYCommand(const char* args);
|
||||
bool HandleGoGridCommand(const char* args);
|
||||
bool HandleAllowMovementCommand(const char* args);
|
||||
bool HandleNpcAllowMovementCommand(const char* args);
|
||||
bool HandleGoCommand(const char* args);
|
||||
|
||||
bool HandleCooldownCommand(const char* args);
|
||||
bool HandleUnLearnCommand(const char* args);
|
||||
bool HandleGetDistanceCommand(const char* args);
|
||||
bool HandleGameObjectCommand(const char* args);
|
||||
bool HandleAnimCommand(const char* args);
|
||||
bool HandlePlaySoundCommand(const char* args);
|
||||
bool HandleStandStateCommand(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);
|
||||
bool HandleReviveCommand(const char* args);
|
||||
bool HandleMorphCommand(const char* args);
|
||||
bool HandleModifyMorphCommand(const char* args);
|
||||
bool HandleAuraCommand(const char* args);
|
||||
bool HandleUnAuraCommand(const char* args);
|
||||
bool HandleLinkGraveCommand(const char* args);
|
||||
|
|
@ -377,13 +378,13 @@ class ChatHandler
|
|||
bool HandleGuildUninviteCommand(const char* args);
|
||||
bool HandleGuildRankCommand(const char* args);
|
||||
bool HandleGuildDeleteCommand(const char* args);
|
||||
bool HandleUpdate(const char* args);
|
||||
bool HandleDebugUpdate(const char* args);
|
||||
bool HandleBankCommand(const char* args);
|
||||
bool HandleChangeWeather(const char* args);
|
||||
bool HandleKickPlayerCommand(const char * args);
|
||||
bool HandleTeleCommand(const char * args);
|
||||
bool HandleAddTeleCommand(const char * args);
|
||||
bool HandleDelTeleCommand(const char * args);
|
||||
bool HandleTeleAddCommand(const char * args);
|
||||
bool HandleTeleDelCommand(const char * args);
|
||||
bool HandleListAurasCommand(const char * args);
|
||||
|
||||
bool HandleResetAchievementsCommand(const char * args);
|
||||
|
|
@ -402,7 +403,7 @@ class ChatHandler
|
|||
bool HandleListCreatureCommand(const char* args);
|
||||
bool HandleListItemCommand(const char* args);
|
||||
bool HandleListObjectCommand(const char* args);
|
||||
bool HandleNearObjectCommand(const char* args);
|
||||
bool HandleGameObjectNearCommand(const char* args);
|
||||
bool HandlePasswordCommand(const char* args);
|
||||
bool HandleLockAccountCommand(const char* args);
|
||||
bool HandleRespawnCommand(const char* args);
|
||||
|
|
@ -411,18 +412,18 @@ class ChatHandler
|
|||
bool HandleWpShowCommand(const char* args);
|
||||
bool HandleWpExportCommand(const char* args);
|
||||
bool HandleWpImportCommand(const char* args);
|
||||
bool HandleFlyModeCommand(const char* args);
|
||||
bool HandleSendOpcodeCommand(const char* args);
|
||||
bool HandleSellErrorCommand(const char* args);
|
||||
bool HandleBuyErrorCommand(const char* args);
|
||||
bool HandleUpdateWorldStateCommand(const char* args);
|
||||
bool HandlePlaySound2Command(const char* args);
|
||||
bool HandleSendChannelNotifyCommand(const char* args);
|
||||
bool HandleSendChatMsgCommand(const char* args);
|
||||
bool HandleGMFlyModeCommand(const char* args);
|
||||
bool HandleDebugSendOpcodeCommand(const char* args);
|
||||
bool HandleDebugSellErrorCommand(const char* args);
|
||||
bool HandleDebugBuyErrorCommand(const char* args);
|
||||
bool HandleDebugUpdateWorldStateCommand(const char* args);
|
||||
bool HandleDebugPlaySound2Command(const char* args);
|
||||
bool HandleDebugSendChannelNotifyCommand(const char* args);
|
||||
bool HandleDebugSendChatMsgCommand(const char* args);
|
||||
bool HandleRenameCommand(const char * args);
|
||||
bool HandleCustomizeCommand(const char * args);
|
||||
bool HandleLoadPDumpCommand(const char *args);
|
||||
bool HandleWritePDumpCommand(const char *args);
|
||||
bool HandlePDumpLoadCommand(const char *args);
|
||||
bool HandlePDumpWriteCommand(const char *args);
|
||||
bool HandleCastCommand(const char *args);
|
||||
bool HandleCastBackCommand(const char *args);
|
||||
bool HandleCastDistCommand(const char *args);
|
||||
|
|
@ -436,22 +437,22 @@ class ChatHandler
|
|||
bool HandleWaterwalkCommand(const char* args);
|
||||
|
||||
//! Development Commands
|
||||
bool HandleSetValue(const char* args);
|
||||
bool HandleGetValue(const char* args);
|
||||
bool HandleDebugSetValue(const char* args);
|
||||
bool HandleDebugGetValue(const char* args);
|
||||
bool HandleSet32Bit(const char* args);
|
||||
bool HandleMod32Value(const char* args);
|
||||
bool HandleAddQuest(const char * args);
|
||||
bool HandleRemoveQuest(const char * args);
|
||||
bool HandleCompleteQuest(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 HandleGetItemState(const char * args);
|
||||
bool HandleGetLootRecipient(const char * args);
|
||||
bool HandleDebugGetItemState(const char * args);
|
||||
bool HandleDebugGetLootRecipient(const char * args);
|
||||
bool HandleDebugArenaCommand(const char * args);
|
||||
bool HandleDebugBattlegroundCommand(const char * args);
|
||||
bool HandleSpawnVehicle(const char * args);
|
||||
bool HandleSendLargePacketCommand(const char * args);
|
||||
bool HandleSendSetPhaseShiftCommand(const char * args);
|
||||
bool HandleSetItemFlagCommand(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();
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ bool Corpse::Create( uint32 guidlow, Player *owner)
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
guidlow,owner->GetName(),owner->GetPositionX(), owner->GetPositionY());
|
||||
return false;
|
||||
}
|
||||
|
|
@ -149,7 +149,7 @@ bool Corpse::LoadFromDB(uint32 guid, QueryResult *result)
|
|||
|
||||
if( ! result )
|
||||
{
|
||||
sLog.outError("ERROR: Corpse (GUID: %u) not found in table `corpse`, can't load. ",guid);
|
||||
sLog.outError("Corpse (GUID: %u) not found in table `corpse`, can't load. ",guid);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
|
|||
|
||||
if(!LoadValues( fields[5].GetString() ))
|
||||
{
|
||||
sLog.outError("ERROR: Corpse #%d have broken data in `data` field. Can't be loaded.",guid);
|
||||
sLog.outError("Corpse #%d have broken data in `data` field. Can't be loaded.",guid);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
|
|||
m_type = CorpseType(fields[7].GetUInt32());
|
||||
if(m_type >= MAX_CORPSE_TYPE)
|
||||
{
|
||||
sLog.outError("ERROR: Corpse (guidlow %d, owner %d) have wrong corpse type, not load.",GetGUIDLow(),GUID_LOPART(GetOwnerGUID()));
|
||||
sLog.outError("Corpse (guidlow %d, owner %d) have wrong corpse type, not load.",GetGUIDLow(),GUID_LOPART(GetOwnerGUID()));
|
||||
return false;
|
||||
}
|
||||
uint32 instanceid = fields[8].GetUInt32();
|
||||
|
|
@ -202,7 +202,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
GetGUIDLow(),GUID_LOPART(GetOwnerGUID()),GetPositionX(),GetPositionY());
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 team, const
|
|||
CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(Entry);
|
||||
if(!cinfo)
|
||||
{
|
||||
sLog.outErrorDb("Error: creature entry %u does not exist.", Entry);
|
||||
sLog.outErrorDb("Creature entry %u does not exist.", Entry);
|
||||
return false;
|
||||
}
|
||||
m_originalEntry = Entry;
|
||||
|
|
@ -1295,7 +1295,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",GetGUIDLow(),GetEntry(),GetPositionX(),GetPositionY());
|
||||
sLog.outError("Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",GetGUIDLow(),GetEntry(),GetPositionX(),GetPositionY());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, uint32
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: DynamicObject (spell %u eff %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,effIndex,GetPositionX(),GetPositionY());
|
||||
sLog.outError("DynamicObject (spell %u eff %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,effIndex,GetPositionX(),GetPositionY());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Gameobject (GUID: %u Entry: %u ) not created. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,name_id,x,y);
|
||||
sLog.outError("Gameobject (GUID: %u Entry: %u ) not created. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,name_id,x,y);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
|
|||
|
||||
if( !data )
|
||||
{
|
||||
sLog.outErrorDb("ERROR: Gameobject (GUID: %u) not found in table `gameobject`, can't load. ",guid);
|
||||
sLog.outErrorDb("Gameobject (GUID: %u) not found in table `gameobject`, can't load. ",guid);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1300,11 +1300,13 @@ const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const
|
|||
|
||||
void GameObject::UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3 /*=0.0f*/)
|
||||
{
|
||||
int64 rotation = 0;
|
||||
static double const atan_pow = atan(pow(2.0f, -20.0f));
|
||||
|
||||
double f_rot1 = sin(GetOrientation() / 2.0f);
|
||||
int64 i_rot1 = int64(f_rot1 / atan(pow(2.0f, -20.0f)));
|
||||
rotation |= (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
|
||||
double f_rot2 = cos(GetOrientation() / 2.0f);
|
||||
|
||||
int64 i_rot1 = int64(f_rot1 / atan_pow *(f_rot2 >= 0 ? 1.0f : -1.0f));
|
||||
int64 rotation = (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
|
||||
|
||||
//float f_rot2 = sin(0.0f / 2.0f);
|
||||
//int64 i_rot2 = f_rot2 / atan(pow(2.0f, -20.0f));
|
||||
|
|
@ -1318,8 +1320,8 @@ void GameObject::UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3
|
|||
|
||||
if(rotation2==0.0f && rotation3==0.0f)
|
||||
{
|
||||
rotation2 = sin(GetOrientation()/2);
|
||||
rotation3 = cos(GetOrientation()/2);
|
||||
rotation2 = f_rot1;
|
||||
rotation3 = f_rot2;
|
||||
}
|
||||
|
||||
SetFloatValue(GAMEOBJECT_PARENTROTATION+2, rotation2);
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result)
|
|||
|
||||
if (!result)
|
||||
{
|
||||
sLog.outError("ERROR: Item (GUID: %u owner: %u) not found in table `item_instance`, can't load. ",guid,GUID_LOPART(owner_guid));
|
||||
sLog.outError("Item (GUID: %u owner: %u) not found in table `item_instance`, can't load. ",guid,GUID_LOPART(owner_guid));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -356,7 +356,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result)
|
|||
|
||||
if(!LoadValues(fields[0].GetString()))
|
||||
{
|
||||
sLog.outError("ERROR: Item #%d have broken data in `data` field. Can't be loaded.",guid);
|
||||
sLog.outError("Item #%d have broken data in `data` field. Can't be loaded.",guid);
|
||||
if (delete_result) delete result;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ bool ChatHandler::HandleGMChatCommand(const char* args)
|
|||
}
|
||||
|
||||
//Enable\Dissable Invisible mode
|
||||
bool ChatHandler::HandleVisibleCommand(const char* args)
|
||||
bool ChatHandler::HandleGMVisibleCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
{
|
||||
|
|
@ -1972,7 +1972,7 @@ bool ChatHandler::HandleWhispersCommand(const char* args)
|
|||
}
|
||||
|
||||
//Play sound
|
||||
bool ChatHandler::HandlePlaySoundCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugPlaySoundCommand(const char* args)
|
||||
{
|
||||
// USAGE: .debug playsound #soundid
|
||||
// #soundid - ID decimal number from SoundEntries.dbc (1st column)
|
||||
|
|
@ -2089,7 +2089,7 @@ bool ChatHandler::HandleSendMailCommand(const char* args)
|
|||
}
|
||||
|
||||
// teleport player to given game_tele.entry
|
||||
bool ChatHandler::HandleNameTeleCommand(const char * args)
|
||||
bool ChatHandler::HandleTeleNameCommand(const char * args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
|
@ -2166,7 +2166,7 @@ bool ChatHandler::HandleNameTeleCommand(const char * args)
|
|||
}
|
||||
|
||||
//Teleport group to given game_tele.entry
|
||||
bool ChatHandler::HandleGroupTeleCommand(const char * args)
|
||||
bool ChatHandler::HandleTeleGroupCommand(const char * args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
|
@ -2557,7 +2557,7 @@ bool ChatHandler::HandleGoGridCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDrunkCommand(const char* args)
|
||||
bool ChatHandler::HandleModifyDrunkCommand(const char* args)
|
||||
{
|
||||
if(!*args) return false;
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -882,21 +882,6 @@ bool ChatHandler::HandleAccountSetPasswordCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleAllowMovementCommand(const char* /*args*/)
|
||||
{
|
||||
if(sWorld.getAllowMovement())
|
||||
{
|
||||
sWorld.SetAllowMovement(false);
|
||||
SendSysMessage(LANG_CREATURE_MOVE_DISABLED);
|
||||
}
|
||||
else
|
||||
{
|
||||
sWorld.SetAllowMovement(true);
|
||||
SendSysMessage(LANG_CREATURE_MOVE_ENABLED);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleMaxSkillCommand(const char* /*args*/)
|
||||
{
|
||||
Player* SelectedPlayer = getSelectedPlayer();
|
||||
|
|
@ -2368,47 +2353,6 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleNearObjectCommand(const char* args)
|
||||
{
|
||||
float distance = (!*args) ? 10 : atol(args);
|
||||
uint32 count = 0;
|
||||
|
||||
Player* pl = m_session->GetPlayer();
|
||||
QueryResult *result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, map, "
|
||||
"(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ "
|
||||
"FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_",
|
||||
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),
|
||||
pl->GetMapId(),pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),distance*distance);
|
||||
|
||||
if (result)
|
||||
{
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
uint32 guid = fields[0].GetUInt32();
|
||||
uint32 entry = fields[1].GetUInt32();
|
||||
float x = fields[2].GetFloat();
|
||||
float y = fields[3].GetFloat();
|
||||
float z = fields[4].GetFloat();
|
||||
int mapid = fields[5].GetUInt16();
|
||||
|
||||
GameObjectInfo const * gInfo = objmgr.GetGameObjectInfo(entry);
|
||||
|
||||
if(!gInfo)
|
||||
continue;
|
||||
|
||||
PSendSysMessage(LANG_GO_LIST_CHAT, guid, guid, gInfo->name, x, y, z, mapid);
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
delete result;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE,distance,count);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleListCreatureCommand(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
|
|
@ -3228,7 +3172,7 @@ bool ChatHandler::HandleGuildDeleteCommand(const char* args)
|
|||
|
||||
bool ChatHandler::HandleGetDistanceCommand(const char* args)
|
||||
{
|
||||
WorldObject* obj;
|
||||
WorldObject* obj = NULL;
|
||||
|
||||
if (*args)
|
||||
{
|
||||
|
|
@ -3595,6 +3539,21 @@ bool ChatHandler::HandleNearGraveCommand(const char* args)
|
|||
}
|
||||
|
||||
//-----------------------Npc Commands-----------------------
|
||||
bool ChatHandler::HandleNpcAllowMovementCommand(const char* /*args*/)
|
||||
{
|
||||
if(sWorld.getAllowMovement())
|
||||
{
|
||||
sWorld.SetAllowMovement(false);
|
||||
SendSysMessage(LANG_CREATURE_MOVE_DISABLED);
|
||||
}
|
||||
else
|
||||
{
|
||||
sWorld.SetAllowMovement(true);
|
||||
SendSysMessage(LANG_CREATURE_MOVE_ENABLED);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleNpcChangeEntryCommand(const char *args)
|
||||
{
|
||||
if(!args)
|
||||
|
|
@ -3984,7 +3943,7 @@ bool ChatHandler::HandleHideAreaCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleUpdate(const char* args)
|
||||
bool ChatHandler::HandleDebugUpdate(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
|
@ -4084,7 +4043,7 @@ bool ChatHandler::HandleChangeWeather(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSetValue(const char* args)
|
||||
bool ChatHandler::HandleDebugSetValue(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
|
@ -4135,7 +4094,7 @@ bool ChatHandler::HandleSetValue(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGetValue(const char* args)
|
||||
bool ChatHandler::HandleDebugGetValue(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
|
@ -4208,7 +4167,7 @@ bool ChatHandler::HandleSet32Bit(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleMod32Value(const char* args)
|
||||
bool ChatHandler::HandleDebugMod32Value(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
|
@ -4240,7 +4199,7 @@ bool ChatHandler::HandleMod32Value(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleAddTeleCommand(const char * args)
|
||||
bool ChatHandler::HandleTeleAddCommand(const char * args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
|
@ -4280,7 +4239,7 @@ bool ChatHandler::HandleAddTeleCommand(const char * args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDelTeleCommand(const char * args)
|
||||
bool ChatHandler::HandleTeleDelCommand(const char * args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
|
@ -4878,7 +4837,7 @@ bool ChatHandler::HandleServerIdleShutDownCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleAddQuest(const char* args)
|
||||
bool ChatHandler::HandleQuestAdd(const char* args)
|
||||
{
|
||||
Player* player = getSelectedPlayer();
|
||||
if(!player)
|
||||
|
|
@ -4932,7 +4891,7 @@ bool ChatHandler::HandleAddQuest(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleRemoveQuest(const char* args)
|
||||
bool ChatHandler::HandleQuestRemove(const char* args)
|
||||
{
|
||||
Player* player = getSelectedPlayer();
|
||||
if(!player)
|
||||
|
|
@ -4982,7 +4941,7 @@ bool ChatHandler::HandleRemoveQuest(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleCompleteQuest(const char* args)
|
||||
bool ChatHandler::HandleQuestComplete(const char* args)
|
||||
{
|
||||
Player* player = getSelectedPlayer();
|
||||
if(!player)
|
||||
|
|
@ -5574,7 +5533,7 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleFlyModeCommand(const char* args)
|
||||
bool ChatHandler::HandleGMFlyModeCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -5600,7 +5559,7 @@ bool ChatHandler::HandleFlyModeCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleLoadPDumpCommand(const char *args)
|
||||
bool ChatHandler::HandlePDumpLoadCommand(const char *args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -5711,7 +5670,7 @@ bool ChatHandler::HandleLoadPDumpCommand(const char *args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleWritePDumpCommand(const char *args)
|
||||
bool ChatHandler::HandlePDumpWriteCommand(const char *args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1737,7 +1737,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const
|
|||
Cell xy_cell(xy_val);
|
||||
if(xy_cell != cur_cell)
|
||||
{
|
||||
sLog.outError("ERROR: %s (GUID: %u) X: %f Y: %f (%s) in grid[%u,%u]cell[%u,%u] instead grid[%u,%u]cell[%u,%u]",
|
||||
sLog.outError("%s (GUID: %u) X: %f Y: %f (%s) in grid[%u,%u]cell[%u,%u] instead grid[%u,%u]cell[%u,%u]",
|
||||
(c->GetTypeId()==TYPEID_PLAYER ? "Player" : "Creature"),c->GetGUIDLow(),
|
||||
c->GetPositionX(),c->GetPositionY(),(moved ? "final" : "original"),
|
||||
cur_cell.GridX(), cur_cell.GridY(), cur_cell.CellX(), cur_cell.CellY(),
|
||||
|
|
@ -1946,7 +1946,7 @@ void Map::RemoveAllObjectsInRemoveList()
|
|||
{
|
||||
Corpse* corpse = ObjectAccessor::Instance().GetCorpse(*obj, obj->GetGUID());
|
||||
if (!corpse)
|
||||
sLog.outError("ERROR: Try delete corpse/bones %u that not in map", obj->GetGUIDLow());
|
||||
sLog.outError("Try delete corpse/bones %u that not in map", obj->GetGUIDLow());
|
||||
else
|
||||
Remove(corpse,true);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1050,7 +1050,7 @@ void Object::RemoveByteFlag( uint16 index, uint8 offset, uint8 oldFlag )
|
|||
|
||||
bool Object::PrintIndexError(uint32 index, bool set) const
|
||||
{
|
||||
sLog.outError("ERROR: Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u",(set ? "set value to" : "get value from"),index,m_valuesCount,GetTypeId(),m_objectType);
|
||||
sLog.outError("Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u",(set ? "set value to" : "get value from"),index,m_valuesCount,GetTypeId(),m_objectType);
|
||||
|
||||
// assert must fail after function call
|
||||
return false;
|
||||
|
|
@ -1490,7 +1490,7 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa
|
|||
|
||||
if(!pCreature->IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Creature (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
|
||||
sLog.outError("Creature (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
|
||||
delete pCreature;
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia)
|
|||
{
|
||||
//in fact this function is called from several places
|
||||
//even when player doesn't have a corpse, not an error
|
||||
//sLog.outError("ERROR: Try remove corpse that not in map for GUID %ul", player_guid);
|
||||
//sLog.outError("Try remove corpse that not in map for GUID %ul", player_guid);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
|
||||
delete result;
|
||||
return false;
|
||||
|
|
@ -704,7 +704,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
|||
{
|
||||
if(!creature)
|
||||
{
|
||||
sLog.outError("CRITICAL ERROR: NULL pointer parsed into CreateBaseAtCreature()");
|
||||
sLog.outError("CRITICAL: NULL pointer parsed into CreateBaseAtCreature()");
|
||||
return false;
|
||||
}
|
||||
uint32 guid=objmgr.GenerateLowGuid(HIGHGUID_PET);
|
||||
|
|
@ -721,7 +721,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
|
||||
return false;
|
||||
}
|
||||
|
|
@ -729,7 +729,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
|||
CreatureInfo const *cinfo = GetCreatureInfo();
|
||||
if(!cinfo)
|
||||
{
|
||||
sLog.outError("ERROR: CreateBaseAtCreature() failed, creatureInfo is missing!");
|
||||
sLog.outError("CreateBaseAtCreature() failed, creatureInfo is missing!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -771,7 +771,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
|
|||
Unit* owner = GetOwner();
|
||||
if(!owner)
|
||||
{
|
||||
sLog.outError("ERROR: attempt to summon pet (Entry %u) without owner! Attempt terminated.", cinfo->Entry);
|
||||
sLog.outError("attempt to summon pet (Entry %u) without owner! Attempt terminated.", cinfo->Entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4216,7 +4216,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
|
|||
DurabilityCostsEntry const *dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel);
|
||||
if(!dcost)
|
||||
{
|
||||
sLog.outError("ERROR: RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
|
||||
sLog.outError("RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
|
||||
return TotalCost;
|
||||
}
|
||||
|
||||
|
|
@ -4224,7 +4224,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
|
|||
DurabilityQualityEntry const *dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId);
|
||||
if(!dQualitymodEntry)
|
||||
{
|
||||
sLog.outError("ERROR: RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
|
||||
sLog.outError("RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
|
||||
return TotalCost;
|
||||
}
|
||||
|
||||
|
|
@ -4467,7 +4467,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
|
|||
{
|
||||
if(modGroup >= BASEMOD_END || modType > MOD_END)
|
||||
{
|
||||
sLog.outError("ERROR: trial to access non existed BaseModGroup or wrong BaseModType!");
|
||||
sLog.outError("trial to access non existed BaseModGroup or wrong BaseModType!");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
|
@ -4481,7 +4481,7 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
|
|||
{
|
||||
if(modGroup >= BASEMOD_END)
|
||||
{
|
||||
sLog.outError("ERROR: wrong BaseModGroup in GetTotalBaseModValue()!");
|
||||
sLog.outError("wrong BaseModGroup in GetTotalBaseModValue()!");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
|
@ -5493,7 +5493,7 @@ void Player::CheckExploreSystem()
|
|||
|
||||
if(offset >= 128)
|
||||
{
|
||||
sLog.outError("ERROR: Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < 128 ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset);
|
||||
sLog.outError("Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < 128 ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -13890,7 +13890,7 @@ bool Player::MinimalLoadFromDB( QueryResult *result, uint32 guid )
|
|||
|
||||
if(!LoadValues( fields[1].GetString()))
|
||||
{
|
||||
sLog.outError("ERROR: Player #%d have broken data in `data` field. Can't be loaded for character list.",GUID_LOPART(guid));
|
||||
sLog.outError("Player #%d have broken data in `data` field. Can't be loaded for character list.",GUID_LOPART(guid));
|
||||
if(delete_result) delete result;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -14085,7 +14085,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
if(!result)
|
||||
{
|
||||
sLog.outError("ERROR: Player (GUID: %u) not found in table `characters`, can't load. ",guid);
|
||||
sLog.outError("Player (GUID: %u) not found in table `characters`, can't load. ",guid);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -14097,7 +14097,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
// player should be able to load/delete character only with correct account!
|
||||
if( dbAccountId != GetSession()->GetAccountId() )
|
||||
{
|
||||
sLog.outError("ERROR: Player (GUID: %u) loading from wrong account (is: %u, should be: %u)",guid,GetSession()->GetAccountId(),dbAccountId);
|
||||
sLog.outError("Player (GUID: %u) loading from wrong account (is: %u, should be: %u)",guid,GetSession()->GetAccountId(),dbAccountId);
|
||||
delete result;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -14116,7 +14116,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
if(!LoadValues( fields[2].GetString()))
|
||||
{
|
||||
sLog.outError("ERROR: Player #%d have broken data in `data` field. Can't be loaded.",GUID_LOPART(guid));
|
||||
sLog.outError("Player #%d have broken data in `data` field. Can't be loaded.",GUID_LOPART(guid));
|
||||
delete result;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -14194,7 +14194,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
|
||||
sLog.outError("Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
|
||||
RelocateToHomebind();
|
||||
|
||||
transGUID = 0;
|
||||
|
|
@ -14270,7 +14270,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
// transport size limited
|
||||
m_movementInfo.t_x > 50 || m_movementInfo.t_y > 50 || m_movementInfo.t_z > 50 )
|
||||
{
|
||||
sLog.outError("ERROR: Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",
|
||||
sLog.outError("Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",
|
||||
guid,GetPositionX()+m_movementInfo.t_x,GetPositionY()+m_movementInfo.t_y,
|
||||
GetPositionZ()+m_movementInfo.t_z,GetOrientation()+m_movementInfo.t_o);
|
||||
|
||||
|
|
@ -14308,7 +14308,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
|
||||
if(!m_transport)
|
||||
{
|
||||
sLog.outError("ERROR: Player (guidlow %d) have problems with transport guid (%u). Teleport to default race/class locations.",
|
||||
sLog.outError("Player (guidlow %d) have problems with transport guid (%u). Teleport to default race/class locations.",
|
||||
guid,transGUID);
|
||||
|
||||
RelocateToHomebind();
|
||||
|
|
|
|||
|
|
@ -3396,6 +3396,22 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
|
|||
data.append(m_target->GetPackGUID());
|
||||
data << uint32(0);
|
||||
m_target->SendMessageToSet(&data,true);
|
||||
|
||||
// Summon the Naj'entus Spine GameObject on target if spell is Impaling Spine
|
||||
if(GetId() == 39837)
|
||||
{
|
||||
GameObject* pObj = new GameObject;
|
||||
if(pObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 185584, m_target->GetMap(), m_target->GetPhaseMask(),
|
||||
m_target->GetPositionX(), m_target->GetPositionY(), m_target->GetPositionZ(), m_target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, 1))
|
||||
{
|
||||
pObj->SetRespawnTime(GetAuraDuration()/IN_MILISECONDS);
|
||||
pObj->SetSpellId(GetId());
|
||||
m_target->AddGameObject(pObj);
|
||||
m_target->GetMap()->Add(pObj);
|
||||
}
|
||||
else
|
||||
delete pObj;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4233,142 +4249,152 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
|||
bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading());
|
||||
|
||||
// Custom damage calculation after
|
||||
if (!apply || loading)
|
||||
return;
|
||||
|
||||
Unit *caster = GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
switch (m_spellProto->SpellFamilyName)
|
||||
if (apply)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
// Pounce Bleed
|
||||
if ( m_spellProto->SpellIconID == 147 && m_spellProto->SpellVisual[0] == 0 )
|
||||
{
|
||||
// $AP*0.18/6 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 3 / 100);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
// Rend
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000000020LL)
|
||||
{
|
||||
// $0.2*(($MWB+$mwb)/2+$AP/14*$MWS) bonus per tick
|
||||
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
int32 mws = caster->GetAttackTime(BASE_ATTACK);
|
||||
float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE);
|
||||
float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE);
|
||||
m_modifier.m_amount+=int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.2f);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Rake
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000001000LL)
|
||||
{
|
||||
// $AP*0.06 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100);
|
||||
return;
|
||||
}
|
||||
// Lacerate
|
||||
if (m_spellProto->SpellFamilyFlags & 0x000000010000000000LL)
|
||||
{
|
||||
// $AP*0.05/5 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
|
||||
return;
|
||||
}
|
||||
// Rip
|
||||
if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL)
|
||||
{
|
||||
// 0.01*$AP*cp
|
||||
if (caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
if(loading)
|
||||
return;
|
||||
|
||||
uint8 cp = ((Player*)caster)->GetComboPoints();
|
||||
Unit *caster = GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
// Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs
|
||||
Unit::AuraList const& dummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
||||
switch (m_spellProto->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
// Pounce Bleed
|
||||
if ( m_spellProto->SpellIconID == 147 && m_spellProto->SpellVisual[0] == 0 )
|
||||
{
|
||||
if((*itr)->GetId()==34241)
|
||||
{
|
||||
m_modifier.m_amount += cp * (*itr)->GetModifier()->m_amount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * cp / 100);
|
||||
return;
|
||||
}
|
||||
// Lock Jaw
|
||||
if (m_spellProto->SpellFamilyFlags & 0x1000000000000000LL)
|
||||
{
|
||||
// 0.15*$AP
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 15 / 100);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_ROGUE:
|
||||
{
|
||||
// Rupture
|
||||
if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL)
|
||||
{
|
||||
if (caster->GetTypeId() != TYPEID_PLAYER)
|
||||
// $AP*0.18/6 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 3 / 100);
|
||||
return;
|
||||
//1 point : ${($m1+$b1*1+0.015*$AP)*4} damage over 8 secs
|
||||
//2 points: ${($m1+$b1*2+0.024*$AP)*5} damage over 10 secs
|
||||
//3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
|
||||
//4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
|
||||
//5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
|
||||
float AP_per_combo[] = {0, 0.015f, 0.024, 0.03, 0.03428571, 0.0375};
|
||||
uint8 cp = ((Player*)caster)->GetComboPoints();
|
||||
if (cp > 5) cp = 5;
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Garrote
|
||||
if (m_spellProto->SpellFamilyFlags & 0x000000000000000100LL)
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
// $AP*0.07 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100);
|
||||
return;
|
||||
// Rend
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000000020LL)
|
||||
{
|
||||
// $0.2*(($MWB+$mwb)/2+$AP/14*$MWS) bonus per tick
|
||||
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
int32 mws = caster->GetAttackTime(BASE_ATTACK);
|
||||
float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE);
|
||||
float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE);
|
||||
m_modifier.m_amount+=int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.2f);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Deadly Poison
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000010000)
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// 0.08*$AP / 4 * amount of stack
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() / 100);
|
||||
return;
|
||||
// Rake
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000001000LL)
|
||||
{
|
||||
// $AP*0.06 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100);
|
||||
return;
|
||||
}
|
||||
// Lacerate
|
||||
if (m_spellProto->SpellFamilyFlags & 0x000000010000000000LL)
|
||||
{
|
||||
// $AP*0.05/5 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
|
||||
return;
|
||||
}
|
||||
// Rip
|
||||
if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL)
|
||||
{
|
||||
// 0.01*$AP*cp
|
||||
if (caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
uint8 cp = ((Player*)caster)->GetComboPoints();
|
||||
|
||||
// Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs
|
||||
Unit::AuraList const& dummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
||||
{
|
||||
if((*itr)->GetId()==34241)
|
||||
{
|
||||
m_modifier.m_amount += cp * (*itr)->GetModifier()->m_amount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * cp / 100);
|
||||
return;
|
||||
}
|
||||
// Lock Jaw
|
||||
if (m_spellProto->SpellFamilyFlags & 0x1000000000000000LL)
|
||||
{
|
||||
// 0.15*$AP
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 15 / 100);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_ROGUE:
|
||||
{
|
||||
// Rupture
|
||||
if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL)
|
||||
{
|
||||
if (caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
//1 point : ${($m1+$b1*1+0.015*$AP)*4} damage over 8 secs
|
||||
//2 points: ${($m1+$b1*2+0.024*$AP)*5} damage over 10 secs
|
||||
//3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
|
||||
//4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
|
||||
//5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
|
||||
float AP_per_combo[] = {0, 0.015f, 0.024, 0.03, 0.03428571, 0.0375};
|
||||
uint8 cp = ((Player*)caster)->GetComboPoints();
|
||||
if (cp > 5) cp = 5;
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]);
|
||||
return;
|
||||
}
|
||||
// Garrote
|
||||
if (m_spellProto->SpellFamilyFlags & 0x000000000000000100LL)
|
||||
{
|
||||
// $AP*0.07 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100);
|
||||
return;
|
||||
}
|
||||
// Deadly Poison
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000010000)
|
||||
{
|
||||
// 0.08*$AP / 4 * amount of stack
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() / 100);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_HUNTER:
|
||||
{
|
||||
// Serpent Sting
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000004000LL)
|
||||
{
|
||||
// $RAP*0.1/5 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
|
||||
return;
|
||||
}
|
||||
// Immolation Trap
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000000004LL && m_spellProto->SpellIconID == 678)
|
||||
{
|
||||
// $RAP*0.1/5 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_HUNTER:
|
||||
{
|
||||
// Serpent Sting
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000004000LL)
|
||||
{
|
||||
// $RAP*0.1/5 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
|
||||
return;
|
||||
}
|
||||
// Immolation Trap
|
||||
if (m_spellProto->SpellFamilyFlags & 0x0000000000000004LL && m_spellProto->SpellIconID == 678)
|
||||
{
|
||||
// $RAP*0.1/5 bonus per tick
|
||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// remove time effects
|
||||
else
|
||||
{
|
||||
// Parasitic Shadowfiend - handle summoning of two Shadowfiends on DoT expire
|
||||
if(m_spellProto->Id == 41917)
|
||||
m_target->CastSpell(m_target, 41915, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1367,6 +1367,20 @@ void Spell::EffectDummy(uint32 i)
|
|||
}
|
||||
break;
|
||||
case SPELLFAMILY_DRUID:
|
||||
// Starfall
|
||||
if (m_spellInfo->SpellFamilyFlags2 & 0x00000100LL)
|
||||
{
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 50286: m_caster->CastSpell(unitTarget, 50288, true); return;
|
||||
case 53196: m_caster->CastSpell(unitTarget, 53191, true); return;
|
||||
case 53197: m_caster->CastSpell(unitTarget, 53194, true); return;
|
||||
case 53198: m_caster->CastSpell(unitTarget, 53195, true); return;
|
||||
default:
|
||||
sLog.outError("Spell::EffectDummy: Unhandeled Starfall spell rank %u",m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_ROGUE:
|
||||
switch(m_spellInfo->Id )
|
||||
|
|
@ -3261,7 +3275,7 @@ void Spell::EffectSummon(uint32 i)
|
|||
|
||||
if(!spawnCreature->IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
spawnCreature->GetGUIDLow(), spawnCreature->GetEntry(), spawnCreature->GetPositionX(), spawnCreature->GetPositionY());
|
||||
delete spawnCreature;
|
||||
return;
|
||||
|
|
@ -3694,7 +3708,7 @@ void Spell::EffectSummonGuardian(uint32 i)
|
|||
|
||||
if(!spawnCreature->IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
spawnCreature->GetGUIDLow(), spawnCreature->GetEntry(), spawnCreature->GetPositionX(), spawnCreature->GetPositionY());
|
||||
delete spawnCreature;
|
||||
return;
|
||||
|
|
@ -4165,7 +4179,7 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
|
||||
if(!NewSummon->IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
NewSummon->GetGUIDLow(), NewSummon->GetEntry(), NewSummon->GetPositionX(), NewSummon->GetPositionY());
|
||||
delete NewSummon;
|
||||
return;
|
||||
|
|
@ -5935,7 +5949,7 @@ void Spell::EffectSummonCritter(uint32 i)
|
|||
|
||||
if(!critter->IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
critter->GetGUIDLow(), critter->GetEntry(), critter->GetPositionX(), critter->GetPositionY());
|
||||
delete critter;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
return SPELL_NORMAL;
|
||||
}
|
||||
|
||||
bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2)
|
||||
bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific spellSpec2)
|
||||
{
|
||||
switch(spellSpec1)
|
||||
{
|
||||
|
|
@ -255,6 +255,19 @@ bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2)
|
|||
}
|
||||
}
|
||||
|
||||
bool IsSingleFromSpellSpecificRanksPerTarget(SpellSpecific spellId_spec, SpellSpecific i_spellId_spec)
|
||||
{
|
||||
switch(spellId_spec)
|
||||
{
|
||||
case SPELL_BLESSING:
|
||||
case SPELL_AURA:
|
||||
case SPELL_CURSE:
|
||||
return spellId_spec==i_spellId_spec;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsPositiveTarget(uint32 targetA, uint32 targetB)
|
||||
{
|
||||
// non-positive targets
|
||||
|
|
|
|||
|
|
@ -145,7 +145,8 @@ inline bool IsLootCraftingSpell(SpellEntry const *spellInfo)
|
|||
}
|
||||
|
||||
int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2);
|
||||
bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2);
|
||||
bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific spellSpec2);
|
||||
bool IsSingleFromSpellSpecificRanksPerTarget(SpellSpecific spellId_spec, SpellSpecific i_spellId_spec);
|
||||
bool IsPassiveSpell(uint32 spellId);
|
||||
|
||||
inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto)
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z,
|
|||
|
||||
if(!IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
guidlow,x,y);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3549,6 +3549,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
SpellSpecific i_spellId_spec = GetSpellSpecific(i_spellId);
|
||||
|
||||
bool is_sspc = IsSingleFromSpellSpecificPerCaster(spellId_spec,i_spellId_spec);
|
||||
bool is_sspt = IsSingleFromSpellSpecificRanksPerTarget(spellId_spec,i_spellId_spec);
|
||||
|
||||
if( is_sspc && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() )
|
||||
{
|
||||
|
|
@ -3570,6 +3571,25 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
|
|||
else
|
||||
next = m_Auras.begin();
|
||||
}
|
||||
else if( is_sspt && Aur->GetCasterGUID() != (*i).second->GetCasterGUID() && spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId) )
|
||||
{
|
||||
// cannot remove higher rank
|
||||
if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0)
|
||||
return false;
|
||||
|
||||
// Its a parent aura (create this aura in ApplyModifier)
|
||||
if ((*i).second->IsInUse())
|
||||
{
|
||||
sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex());
|
||||
continue;
|
||||
}
|
||||
RemoveAurasDueToSpell(i_spellId);
|
||||
|
||||
if( m_Auras.empty() )
|
||||
break;
|
||||
else
|
||||
next = m_Auras.begin();
|
||||
}
|
||||
else if( !is_sspc && spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId) )
|
||||
{
|
||||
// Its a parent aura (create this aura in ApplyModifier)
|
||||
|
|
@ -4070,17 +4090,25 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
|
|||
{
|
||||
assert(gameObj && gameObj->GetOwnerGUID()==GetGUID());
|
||||
|
||||
// GO created by some spell
|
||||
if ( GetTypeId()==TYPEID_PLAYER && gameObj->GetSpellId() )
|
||||
{
|
||||
SpellEntry const* createBySpell = sSpellStore.LookupEntry(gameObj->GetSpellId());
|
||||
// Need activate spell use for owner
|
||||
if (createBySpell && createBySpell->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
|
||||
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
|
||||
((Player*)this)->SendCooldownEvent(createBySpell);
|
||||
}
|
||||
gameObj->SetOwnerGUID(0);
|
||||
|
||||
// GO created by some spell
|
||||
if (uint32 spellid = gameObj->GetSpellId())
|
||||
{
|
||||
RemoveAurasDueToSpell(spellid);
|
||||
|
||||
if (GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
SpellEntry const* createBySpell = sSpellStore.LookupEntry(spellid );
|
||||
// Need activate spell use for owner
|
||||
if (createBySpell && createBySpell->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
|
||||
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
|
||||
((Player*)this)->SendCooldownEvent(createBySpell);
|
||||
}
|
||||
}
|
||||
|
||||
m_gameObj.remove(gameObj);
|
||||
|
||||
if(del)
|
||||
{
|
||||
gameObj->SetRespawnTime(0);
|
||||
|
|
@ -5120,6 +5148,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
triggered_spell_id = 28810;
|
||||
break;
|
||||
}
|
||||
// Glyph of Dispel Magic
|
||||
case 55677:
|
||||
{
|
||||
if(!target->IsFriendlyTo(this))
|
||||
return false;
|
||||
|
||||
basepoints0 = int32(target->GetMaxHealth() * triggerAmount / 100);
|
||||
triggered_spell_id = 56131;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -9725,7 +9763,7 @@ float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) co
|
|||
{
|
||||
if( unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
|
||||
{
|
||||
sLog.outError("ERROR: trial to access non existed modifier value from UnitMods!");
|
||||
sLog.outError("trial to access non existed modifier value from UnitMods!");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
|
@ -9755,7 +9793,7 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const
|
|||
{
|
||||
if(unitMod >= UNIT_MOD_END)
|
||||
{
|
||||
sLog.outError("ERROR: trial to access non existed UnitMods in GetTotalAuraModValue()!");
|
||||
sLog.outError("trial to access non existed UnitMods in GetTotalAuraModValue()!");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
|
@ -11185,7 +11223,7 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
|
|||
|
||||
if(!pet->InitStatsForLevel(level))
|
||||
{
|
||||
sLog.outError("ERROR: Pet::InitStatsForLevel() failed for creature (Entry: %u)!",creatureTarget->GetEntry());
|
||||
sLog.outError("Pet::InitStatsForLevel() failed for creature (Entry: %u)!",creatureTarget->GetEntry());
|
||||
delete pet;
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,10 +108,10 @@ void WaypointManager::Load()
|
|||
{
|
||||
QueryResult *result1 = WorldDatabase.PQuery("SELECT id, map FROM creature WHERE guid = '%u'", id);
|
||||
if(result1)
|
||||
sLog.outErrorDb("ERROR: Creature (guidlow %d, entry %d) have invalid coordinates in his waypoint %d (X: %f, Y: %f).",
|
||||
sLog.outErrorDb("Creature (guidlow %d, entry %d) have invalid coordinates in his waypoint %d (X: %f, Y: %f).",
|
||||
id, result1->Fetch()[0].GetUInt32(), point, node.x, node.y);
|
||||
else
|
||||
sLog.outErrorDb("ERROR: Waypoint path %d, have invalid coordinates in his waypoint %d (X: %f, Y: %f).",
|
||||
sLog.outErrorDb("Waypoint path %d, have invalid coordinates in his waypoint %d (X: %f, Y: %f).",
|
||||
id, point, node.x, node.y);
|
||||
|
||||
MaNGOS::NormalizeMapCoord(node.x);
|
||||
|
|
@ -327,7 +327,7 @@ void WaypointManager::CheckTextsExistance(std::set<int32>& ids)
|
|||
{
|
||||
if (!objmgr.GetMangosStringLocale(be->textid[j]))
|
||||
{
|
||||
sLog.outErrorDb("ERROR: Some waypoint has textid%u with not existing %u text.", j, be->textid[j]);
|
||||
sLog.outErrorDb("Some waypoint has textid%u with not existing %u text.", j, be->textid[j]);
|
||||
be->textid[j] = 0;
|
||||
++zeroCount;
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ bool ChatHandler::HandleDebugSpellFailCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSetPoiCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSetPoiCommand(const char* args)
|
||||
{
|
||||
Player *pPlayer = m_session->GetPlayer();
|
||||
Unit* target = getSelectedUnit();
|
||||
|
|
@ -92,7 +92,7 @@ bool ChatHandler::HandleSetPoiCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleEquipErrorCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugEquipErrorCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -102,7 +102,7 @@ bool ChatHandler::HandleEquipErrorCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSellErrorCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSellErrorCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -112,7 +112,7 @@ bool ChatHandler::HandleSellErrorCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleBuyErrorCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugBuyErrorCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -122,7 +122,7 @@ bool ChatHandler::HandleBuyErrorCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
|
||||
bool ChatHandler::HandleDebugSendOpcodeCommand(const char* /*args*/)
|
||||
{
|
||||
Unit *unit = getSelectedUnit();
|
||||
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
|
||||
|
|
@ -199,7 +199,7 @@ bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleUpdateWorldStateCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugUpdateWorldStateCommand(const char* args)
|
||||
{
|
||||
char* w = strtok((char*)args, " ");
|
||||
char* s = strtok(NULL, " ");
|
||||
|
|
@ -213,7 +213,7 @@ bool ChatHandler::HandleUpdateWorldStateCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandlePlaySound2Command(const char* args)
|
||||
bool ChatHandler::HandleDebugPlaySound2Command(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -224,7 +224,7 @@ bool ChatHandler::HandlePlaySound2Command(const char* args)
|
|||
}
|
||||
|
||||
//Send notification in channel
|
||||
bool ChatHandler::HandleSendChannelNotifyCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendChannelNotifyCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -242,7 +242,7 @@ bool ChatHandler::HandleSendChannelNotifyCommand(const char* args)
|
|||
}
|
||||
|
||||
//Send notification in chat
|
||||
bool ChatHandler::HandleSendChatMsgCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendChatMsgCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -255,14 +255,14 @@ bool ChatHandler::HandleSendChatMsgCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSendQuestPartyMsgCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendQuestPartyMsgCommand(const char* args)
|
||||
{
|
||||
uint32 msg = atol((char*)args);
|
||||
m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGetLootRecipient(const char* /*args*/)
|
||||
bool ChatHandler::HandleDebugGetLootRecipient(const char* /*args*/)
|
||||
{
|
||||
Creature* target = getSelectedCreature();
|
||||
if(!target)
|
||||
|
|
@ -272,14 +272,14 @@ bool ChatHandler::HandleGetLootRecipient(const char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSendQuestInvalidMsgCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendQuestInvalidMsgCommand(const char* args)
|
||||
{
|
||||
uint32 msg = atol((char*)args);
|
||||
m_session->GetPlayer()->SendCanTakeQuestResponse(msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGetItemState(const char* args)
|
||||
bool ChatHandler::HandleDebugGetItemState(const char* args)
|
||||
{
|
||||
if (!args)
|
||||
return false;
|
||||
|
|
@ -525,7 +525,7 @@ bool ChatHandler::HandleDebugArenaCommand(const char * /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSpawnVehicle(const char* args)
|
||||
bool ChatHandler::HandleDebugSpawnVehicle(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -564,7 +564,7 @@ bool ChatHandler::HandleSpawnVehicle(const char* args)
|
|||
|
||||
if(!v->IsPositionValid())
|
||||
{
|
||||
sLog.outError("ERROR: Vehicle (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
sLog.outError("Vehicle (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
|
||||
v->GetGUIDLow(), v->GetEntry(), v->GetPositionX(), v->GetPositionY());
|
||||
delete v;
|
||||
return false;
|
||||
|
|
@ -575,7 +575,7 @@ bool ChatHandler::HandleSpawnVehicle(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSendLargePacketCommand(const char* /*args*/)
|
||||
bool ChatHandler::HandleDebugSendLargePacketCommand(const char* /*args*/)
|
||||
{
|
||||
const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. ";
|
||||
std::ostringstream ss;
|
||||
|
|
@ -585,7 +585,7 @@ bool ChatHandler::HandleSendLargePacketCommand(const char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSendSetPhaseShiftCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSendSetPhaseShiftCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
@ -595,7 +595,7 @@ bool ChatHandler::HandleSendSetPhaseShiftCommand(const char* args)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSetItemFlagCommand(const char* args)
|
||||
bool ChatHandler::HandleDebugSetItemFlagCommand(const char* args)
|
||||
{
|
||||
if(!args)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7490"
|
||||
#define REVISION_NR "7507"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue