1eca51b follow-up, nuke command.permission from orbit; it was only duplicating data already stored in the core.

Port From (https://github.com/TrinityCore/TrinityCore/commit/46d4e2fa8378eed414c07eb161a19b772c474735)
This commit is contained in:
hondacrx
2022-06-09 16:27:15 -04:00
parent 8edba61e49
commit ed79f93c7b
48 changed files with 223 additions and 276 deletions
+41 -82
View File
@@ -112,6 +112,11 @@ namespace Framework.Constants
// Free Space For Core Permissions (Till 149) // Free Space For Core Permissions (Till 149)
// Roles (Permissions With Delegated Permissions) Use 199 And Descending // Roles (Permissions With Delegated Permissions) Use 199 And Descending
RoleAdministrator = 196,
RoleGamemaster = 197,
RoleModerator = 198,
RolePlayer = 199,
CommandRbac = 200, CommandRbac = 200,
CommandRbacAcc = 201, CommandRbacAcc = 201,
CommandRbacAccPermList = 202, CommandRbacAccPermList = 202,
@@ -124,7 +129,7 @@ namespace Framework.Constants
CommandBnetAccountLockCountry = 209, CommandBnetAccountLockCountry = 209,
CommandBnetAccountLockIp = 210, CommandBnetAccountLockIp = 210,
CommandBnetAccountPassword = 211, CommandBnetAccountPassword = 211,
CommandBnetAccountSet = 212, // 212 previously used, do not reuse
CommandBnetAccountSetPassword = 213, CommandBnetAccountSetPassword = 213,
CommandBnetAccountLink = 214, CommandBnetAccountLink = 214,
CommandBnetAccountUnlink = 215, CommandBnetAccountUnlink = 215,
@@ -142,41 +147,41 @@ namespace Framework.Constants
CommandAccountSetAddon = 227, CommandAccountSetAddon = 227,
CommandAccountSetSecLevel = 228, CommandAccountSetSecLevel = 228,
CommandAccountSetPassword = 229, CommandAccountSetPassword = 229,
CommandAchievement = 230, // 230 previously used, do not reuse
CommandAchievementAdd = 231, CommandAchievementAdd = 231,
CommandArena = 232, // 232 previously used, do not reuse
CommandArenaCaptain = 233, CommandArenaCaptain = 233,
CommandArenaCreate = 234, CommandArenaCreate = 234,
CommandArenaDisband = 235, CommandArenaDisband = 235,
CommandArenaInfo = 236, CommandArenaInfo = 236,
CommandArenaLookup = 237, CommandArenaLookup = 237,
CommandArenaRename = 238, CommandArenaRename = 238,
CommandBan = 239, // 239 previously used, do not reuse
CommandBanAccount = 240, CommandBanAccount = 240,
CommandBanCharacter = 241, CommandBanCharacter = 241,
CommandBanIp = 242, CommandBanIp = 242,
CommandBanPlayeraccount = 243, CommandBanPlayeraccount = 243,
CommandBaninfo = 244, // 244 previously used, do not reuse
CommandBaninfoAccount = 245, CommandBaninfoAccount = 245,
CommandBaninfoCharacter = 246, CommandBaninfoCharacter = 246,
CommandBaninfoIp = 247, CommandBaninfoIp = 247,
CommandBanlist = 248, // 248 previously used, do not reuse
CommandBanlistAccount = 249, CommandBanlistAccount = 249,
CommandBanlistCharacter = 250, CommandBanlistCharacter = 250,
CommandBanlistIp = 251, CommandBanlistIp = 251,
CommandUnban = 252, // 252 previously used, do not reuse
CommandUnbanAccount = 253, CommandUnbanAccount = 253,
CommandUnbanCharacter = 254, CommandUnbanCharacter = 254,
CommandUnbanIp = 255, CommandUnbanIp = 255,
CommandUnbanPlayeraccount = 256, CommandUnbanPlayeraccount = 256,
CommandBf = 257, // 257 previously used, do not reuse
CommandBfStart = 258, CommandBfStart = 258,
CommandBfStop = 259, CommandBfStop = 259,
CommandBfSwitch = 260, CommandBfSwitch = 260,
CommandBfTimer = 261, CommandBfTimer = 261,
CommandBfEnable = 262, CommandBfEnable = 262,
CommandAccountEmail = 263, CommandAccountEmail = 263,
CommandAccountSetSec = 264, // 264 previously used, do not reuse
CommandAccountSetSecEmail = 265, CommandAccountSetSecEmail = 265,
CommandAccountSetSecRegmail = 266, CommandAccountSetSecRegmail = 266,
CommandCast = 267, CommandCast = 267,
@@ -185,11 +190,11 @@ namespace Framework.Constants
CommandCastSelf = 270, CommandCastSelf = 270,
CommandCastTarget = 271, CommandCastTarget = 271,
CommandCastDest = 272, CommandCastDest = 272,
CommandCharacter = 273, // 273 previously used, do not reuse
CommandCharacterCustomize = 274, CommandCharacterCustomize = 274,
CommandCharacterChangefaction = 275, CommandCharacterChangefaction = 275,
CommandCharacterChangerace = 276, CommandCharacterChangerace = 276,
CommandCharacterDeleted = 277, // 277 previously used, do not reuse
CommandCharacterDeletedDelete = 278, CommandCharacterDeletedDelete = 278,
CommandCharacterDeletedList = 279, CommandCharacterDeletedList = 279,
CommandCharacterDeletedRestore = 280, CommandCharacterDeletedRestore = 280,
@@ -200,10 +205,10 @@ namespace Framework.Constants
CommandCharacterReputation = 285, CommandCharacterReputation = 285,
CommandCharacterTitles = 286, CommandCharacterTitles = 286,
CommandLevelup = 287, CommandLevelup = 287,
CommandPdump = 288, // 288 previously used, do not reuse
CommandPdumpLoad = 289, CommandPdumpLoad = 289,
CommandPdumpWrite = 290, CommandPdumpWrite = 290,
CommandCheat = 291, // 291 previously used, do not reuse
CommandCheatCasttime = 292, CommandCheatCasttime = 292,
CommandCheatCooldown = 293, CommandCheatCooldown = 293,
CommandCheatExplore = 294, CommandCheatExplore = 294,
@@ -213,55 +218,13 @@ namespace Framework.Constants
CommandCheatTaxi = 298, CommandCheatTaxi = 298,
CommandCheatWaterwalk = 299, CommandCheatWaterwalk = 299,
CommandDebug = 300, CommandDebug = 300,
CommandDebugAnim = 301, // 301-342 previously used, do not reuse
CommandDebugAreatriggers = 302,
CommandDebugArena = 303,
CommandDebugBg = 304,
CommandDebugEntervehicle = 305,
CommandDebugGetitemstate = 306,
CommandDebugGetitemvalue = 307, // DEPRECATED: DON'T REUSE
CommandDebugGetvalue = 308, // DEPRECATED: DON'T REUSE
CommandDebugCombat = 309,
CommandDebugItemexpire = 310,
CommandDebugLootrecipient = 311,
CommandDebugLos = 312,
CommandDebugMod32value = 313, // DEPRECATED: DON'T REUSE
CommandDebugMoveflags = 314,
CommandDebugPlay = 315,
CommandDebugPlayCinematic = 316,
CommandDebugPlayMovie = 317,
CommandDebugPlaySound = 318,
CommandDebugSend = 319,
CommandDebugSendBuyerror = 320,
CommandDebugSendChannelnotify = 321,
CommandDebugSendChatmessage = 322,
CommandDebugSendEquiperror = 323,
CommandDebugSendLargepacket = 324,
CommandDebugSendOpcode = 325,
CommandDebugSendQinvalidmsg = 326,
CommandDebugSendQpartymsg = 327,
CommandDebugSendSellerror = 328,
CommandDebugSendSetphaseshift = 329,
CommandDebugSendSpellfail = 330,
CommandDebugSetaurastate = 331,
CommandDebugSetbit = 332, // DEPRECATED: DON'T REUSE
CommandDebugSetitemvalue = 333, // DEPRECATED: DON'T REUSE
CommandDebugSetvalue = 334, // DEPRECATED: DON'T REUSE
CommandDebugSetvid = 335,
CommandDebugSpawnvehicle = 336,
CommandDebugThreat = 337,
CommandDebugUpdate = 338, // DEPRECATED: DON'T REUSE
CommandDebugWorldState = 339,
CommandWpgps = 340,
CommandDeserter = 341,
CommandDeserterBg = 342,
CommandDeserterBgAdd = 343, CommandDeserterBgAdd = 343,
CommandDeserterBgRemove = 344, CommandDeserterBgRemove = 344,
CommandDeserterInstance = 345, // 345 previously used, do not reuse
CommandDeserterInstanceAdd = 346, CommandDeserterInstanceAdd = 346,
CommandDeserterInstanceRemove = 347, CommandDeserterInstanceRemove = 347,
CommandDisable = 348, // 348-349 previously used, do not reuse
CommandDisableAdd = 349,
CommandDisableAddCriteria = 350, CommandDisableAddCriteria = 350,
CommandDisableAddBattleground = 351, CommandDisableAddBattleground = 351,
CommandDisableAddMap = 352, CommandDisableAddMap = 352,
@@ -270,7 +233,7 @@ namespace Framework.Constants
CommandDisableAddQuest = 355, CommandDisableAddQuest = 355,
CommandDisableAddSpell = 356, CommandDisableAddSpell = 356,
CommandDisableAddVmap = 357, CommandDisableAddVmap = 357,
CommandDisableRemove = 358, // 358 previously used, do not reuse
CommandDisableRemoveCriteria = 359, CommandDisableRemoveCriteria = 359,
CommandDisableRemoveBattleground = 360, CommandDisableRemoveBattleground = 360,
CommandDisableRemoveMap = 361, CommandDisableRemoveMap = 361,
@@ -279,7 +242,7 @@ namespace Framework.Constants
CommandDisableRemoveQuest = 364, CommandDisableRemoveQuest = 364,
CommandDisableRemoveSpell = 365, CommandDisableRemoveSpell = 365,
CommandDisableRemoveVmap = 366, CommandDisableRemoveVmap = 366,
CommandEvent = 367, CommandEventInfo = 367,
CommandEventActivelist = 368, CommandEventActivelist = 368,
CommandEventStart = 369, CommandEventStart = 369,
CommandEventStop = 370, CommandEventStop = 370,
@@ -299,7 +262,7 @@ namespace Framework.Constants
// = 384, // DEPRECATED: DON'T REUSE // = 384, // DEPRECATED: DON'T REUSE
// = 385, // DEPRECATED: DON'T REUSE // = 385, // DEPRECATED: DON'T REUSE
// = 386, // DEPRECATED: DON'T REUSE // = 386, // DEPRECATED: DON'T REUSE
CommandGobject = 387, // 387 previously used, do not reuse
CommandGobjectActivate = 388, CommandGobjectActivate = 388,
CommandGobjectAdd = 389, CommandGobjectAdd = 389,
CommandGobjectAddTemp = 390, CommandGobjectAddTemp = 390,
@@ -307,12 +270,12 @@ namespace Framework.Constants
CommandGobjectInfo = 392, CommandGobjectInfo = 392,
CommandGobjectMove = 393, CommandGobjectMove = 393,
CommandGobjectNear = 394, CommandGobjectNear = 394,
CommandGobjectSet = 395, // 395 previously used, do not reuse
CommandGobjectSetPhase = 396, CommandGobjectSetPhase = 396,
CommandGobjectSetState = 397, CommandGobjectSetState = 397,
CommandGobjectTarget = 398, CommandGobjectTarget = 398,
CommandGobjectTurn = 399, CommandGobjectTurn = 399,
CommandDebugTransport = 400, // 400 previously used, do not reuse
CommandGuild = 401, CommandGuild = 401,
CommandGuildCreate = 402, CommandGuildCreate = 402,
CommandGuildDelete = 403, CommandGuildDelete = 403,
@@ -330,7 +293,7 @@ namespace Framework.Constants
CommandInstanceStats = 415, CommandInstanceStats = 415,
CommandInstanceSavedata = 416, CommandInstanceSavedata = 416,
CommandLearn = 417, CommandLearn = 417,
CommandLearnAll = 418, // 418 previously used, do not reuse
CommandLearnAllMy = 419, CommandLearnAllMy = 419,
CommandLearnAllMyClass = 420, CommandLearnAllMyClass = 420,
CommandLearnAllMyPettalents = 421, CommandLearnAllMyPettalents = 421,
@@ -342,13 +305,13 @@ namespace Framework.Constants
CommandLearnAllLang = 427, CommandLearnAllLang = 427,
CommandLearnAllRecipes = 428, CommandLearnAllRecipes = 428,
CommandUnlearn = 429, CommandUnlearn = 429,
CommandLfg = 430, // 430 previously used, do not reuse
CommandLfgPlayer = 431, CommandLfgPlayer = 431,
CommandLfgGroup = 432, CommandLfgGroup = 432,
CommandLfgQueue = 433, CommandLfgQueue = 433,
CommandLfgClean = 434, CommandLfgClean = 434,
CommandLfgOptions = 435, CommandLfgOptions = 435,
CommandList = 436, // 436 previously used, do not reuse
CommandListCreature = 437, CommandListCreature = 437,
CommandListItem = 438, CommandListItem = 438,
CommandListObject = 439, CommandListObject = 439,
@@ -482,7 +445,7 @@ namespace Framework.Constants
CommandModifySpell = 567, CommandModifySpell = 567,
CommandModifyStandstate = 568, CommandModifyStandstate = 568,
CommandModifyTalentpoints = 569, CommandModifyTalentpoints = 569,
CommandNpc = 570, // 570 previously used, do not reuse
CommandNpcAdd = 571, CommandNpcAdd = 571,
CommandNpcAddFormation = 572, CommandNpcAddFormation = 572,
CommandNpcAddItem = 573, CommandNpcAddItem = 573,
@@ -540,7 +503,7 @@ namespace Framework.Constants
CommandReloadAreatriggerTeleport = 625, CommandReloadAreatriggerTeleport = 625,
CommandReloadAuctions = 626, CommandReloadAuctions = 626,
CommandReloadAutobroadcast = 627, CommandReloadAutobroadcast = 627,
CommandReloadCommand = 628, // 628 previously used, do not reuse
CommandReloadConditions = 629, CommandReloadConditions = 629,
CommandReloadConfig = 630, CommandReloadConfig = 630,
CommandReloadBattlegroundTemplate = 631, CommandReloadBattlegroundTemplate = 631,
@@ -617,7 +580,7 @@ namespace Framework.Constants
CommandReloadSpellThreats = 702, CommandReloadSpellThreats = 702,
CommandReloadSpellGroupStackRules = 703, CommandReloadSpellGroupStackRules = 703,
CommandReloadCypherString = 704, CommandReloadCypherString = 704,
CommandReloadWardenAction = 705, // 705 previously used, do not reuse
CommandReloadWaypointScripts = 706, CommandReloadWaypointScripts = 706,
CommandReloadWaypointData = 707, CommandReloadWaypointData = 707,
CommandReloadVehicleAccesory = 708, CommandReloadVehicleAccesory = 708,
@@ -688,9 +651,9 @@ namespace Framework.Constants
CommandWpReload = 773, CommandWpReload = 773,
CommandWpShow = 774, CommandWpShow = 774,
CommandModifyCurrency = 775, CommandModifyCurrency = 775,
CommandDebugPhase = 776, // 776 previously used, do not reuse
CommandMailbox = 777, CommandMailbox = 777,
CommandAhbot = 778, // 778 previously used, do not reuse
CommandAhbotItems = 779, CommandAhbotItems = 779,
CommandAhbotItemsGray = 780, CommandAhbotItemsGray = 780,
CommandAhbotItemsWhite = 781, CommandAhbotItemsWhite = 781,
@@ -747,8 +710,7 @@ namespace Framework.Constants
CommandTicketResetComplaint = 832, CommandTicketResetComplaint = 832,
CommandTicketResetSuggestion = 833, CommandTicketResetSuggestion = 833,
// = 834, // DEPRECATED: DON'T REUSE // = 834, // DEPRECATED: DON'T REUSE
CommandDebugLoadcells = 835, // 835-836 previously used, do not reuse
CommandDebugBoundary = 836,
CommandNpcEvade = 837, CommandNpcEvade = 837,
CommandPetLevel = 838, CommandPetLevel = 838,
CommandServerShutdownForce = 839, CommandServerShutdownForce = 839,
@@ -764,10 +726,9 @@ namespace Framework.Constants
CommandListScenes = 849, CommandListScenes = 849,
CommandReloadSceneTemplate = 850, CommandReloadSceneTemplate = 850,
CommandReloadAreatriggerTemplate = 851, CommandReloadAreatriggerTemplate = 851,
CommandDebugDummy = 852, // 852 previously used, do not reuse
CommandReloadConversationTemplate = 853, CommandReloadConversationTemplate = 853,
CommandDebugConversation = 854, // 854-855 previously used, do not reuse
CommandDebugPlayMusic = 855,
CommandNpcSpawngroup = 856, CommandNpcSpawngroup = 856,
CommandNpcDespawngroup = 857, CommandNpcDespawngroup = 857,
CommandGobjectSpawngroup = 858, CommandGobjectSpawngroup = 858,
@@ -781,17 +742,15 @@ namespace Framework.Constants
CommandListSpawnpoints = 866, CommandListSpawnpoints = 866,
CommandReloadQuestGreetingLocale = 867, // Reserved CommandReloadQuestGreetingLocale = 867, // Reserved
CommandModifyPower = 868, CommandModifyPower = 868,
CommandDebugSendPlayerChoice = 869, // 869 previously used, do not reuse
CommandDebugThreatinfo = 870, // 870-871 previously used, do not reuse
CommandDebugInstancespawn = 871,
CommandServerDebug = 872, CommandServerDebug = 872,
CommandReloadCreatureMovementOverride = 873, CommandReloadCreatureMovementOverride = 873,
// = 874, // DEPRECATED: DON'T REUSE // 874 previously used, do not reuse
CommandLookupMapId = 875, CommandLookupMapId = 875,
CommandLookupItemId = 876, CommandLookupItemId = 876,
CommandLookupQuestId = 877, CommandLookupQuestId = 877,
CommandDebugQuestreset = 878, // 878-879 previously used, do not reuse
// 879 previously used, do not reuse
CommandPdumpCopy = 880, CommandPdumpCopy = 880,
CommandReloadVehicleTemplate = 881, CommandReloadVehicleTemplate = 881,
// Custom Permissions 1000+ // Custom Permissions 1000+
+19
View File
@@ -984,6 +984,25 @@ namespace Framework.Constants
DisallowTicketsConfig = 1218, DisallowTicketsConfig = 1218,
// 1219-1499 - free // 1219-1499 - free
CmdparserEither = 1500,
CmdparserOr = 1501,
CmdparserStringValueInvalid = 1502,
CmdparserInvalidUtf8 = 1503,
CmdparserLinkdataInvalid = 1504,
CmdparserAccountNameNoExist = 1505,
CmdparserAccountIdNoExist = 1506,
CmdparserCharGuidNoExist = 1507,
CmdparserCharNameNoExist = 1508,
CmdparserCharNameInvalid = 1509,
CmdparserAchievementNoExist = 1510,
CmdparserGameTeleIdNoExist = 1511,
CmdparserGameTeleNoExist = 1512,
CmdparserItemNoExist = 1513,
CmdparserSpellNoExist = 1514,
CmdparserExactSeqMismatch = 1515,
CmdparserCurrencyNoExist = 1516,
// 1516-1998 - free
DebugAreatriggerLeft = 1999, DebugAreatriggerLeft = 1999,
// Ticket Strings 2003-2028 // Ticket Strings 2003-2028
CommandTicketclosed = 2003, CommandTicketclosed = 2003,
@@ -74,7 +74,7 @@ namespace Framework.Database
PrepareStatement(WorldStatements.UPD_WAYPOINT_SCRIPT_O, "UPDATE waypoint_scripts SET o = ? WHERE guid = ?"); PrepareStatement(WorldStatements.UPD_WAYPOINT_SCRIPT_O, "UPDATE waypoint_scripts SET o = ? WHERE guid = ?");
PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?"); PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?");
PrepareStatement(WorldStatements.DEL_CREATURE, "DELETE FROM creature WHERE guid = ?"); PrepareStatement(WorldStatements.DEL_CREATURE, "DELETE FROM creature WHERE guid = ?");
PrepareStatement(WorldStatements.SEL_COMMANDS, "SELECT name, permission, help FROM command"); PrepareStatement(WorldStatements.SEL_COMMANDS, "SELECT name, help FROM command");
PrepareStatement(WorldStatements.SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, name, femaleName, subname, TitleAlt, IconName, gossip_menu_id, minlevel, maxlevel, HealthScalingExpansion, RequiredExpansion, VignetteID, faction, npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, unit_flags3, dynamicflags, family, trainer_class, type, type_flags, type_flags2, lootid, pickpocketloot, skinloot, VehicleId, mingold, maxgold, AIName, MovementType, ctm.Ground, ctm.Swim, ctm.Flight, ctm.Rooted, ctm.Chase, ctm.Random, ctm.InteractionPauseTimer, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, CreatureDifficultyID, WidgetSetID, WidgetSetUnitConditionID, RegenHealth, mechanic_immune_mask, spell_school_immune_mask, flags_extra, ScriptName FROM creature_template ct LEFT JOIN creature_template_movement ctm ON ct.entry = ctm.CreatureId WHERE entry = ? OR 1 = ?"); PrepareStatement(WorldStatements.SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, name, femaleName, subname, TitleAlt, IconName, gossip_menu_id, minlevel, maxlevel, HealthScalingExpansion, RequiredExpansion, VignetteID, faction, npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, unit_flags3, dynamicflags, family, trainer_class, type, type_flags, type_flags2, lootid, pickpocketloot, skinloot, VehicleId, mingold, maxgold, AIName, MovementType, ctm.Ground, ctm.Swim, ctm.Flight, ctm.Rooted, ctm.Chase, ctm.Random, ctm.InteractionPauseTimer, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, CreatureDifficultyID, WidgetSetID, WidgetSetUnitConditionID, RegenHealth, mechanic_immune_mask, spell_school_immune_mask, flags_extra, ScriptName FROM creature_template ct LEFT JOIN creature_template_movement ctm ON ct.entry = ctm.CreatureId WHERE entry = ? OR 1 = ?");
PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?"); PrepareStatement(WorldStatements.SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?");
PrepareStatement(WorldStatements.SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?"); PrepareStatement(WorldStatements.SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?");
+3 -4
View File
@@ -61,12 +61,12 @@ namespace Game.Chat
{ {
value = default; value = default;
if (Hyperlink.TryParse(out value, type, args))
return true;
if (args.IsAtEnd()) if (args.IsAtEnd())
return false; return false;
if (Hyperlink.TryParse(out value, type, args))
return true;
if (type.IsEnum) if (type.IsEnum)
type = type.GetEnumUnderlyingType(); type = type.GetEnumUnderlyingType();
@@ -269,6 +269,5 @@ namespace Game.Chat
return null; return null;
} }
} }
} }
+2 -1
View File
@@ -55,7 +55,8 @@ namespace Game.Chat
[AttributeUsage(AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Class)]
public class CommandGroupAttribute : CommandAttribute public class CommandGroupAttribute : CommandAttribute
{ {
public CommandGroupAttribute(string command, RBACPermissions rbac, bool allowConsole = false) : base(command, rbac, allowConsole) { } //todo fix me.
public CommandGroupAttribute(string command) : base(command, RBACPermissions.Max, true) { }
} }
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
+1
View File
@@ -692,6 +692,7 @@ namespace Game.Chat
return true; return true;
} }
public bool IsConsole() { return _session == null; }
public WorldSession GetSession() public WorldSession GetSession()
{ {
return _session; return _session;
+3 -7
View File
@@ -60,7 +60,7 @@ namespace Game.Chat
do do
{ {
string name = result.Read<string>(0); string name = result.Read<string>(0);
SetDataForCommandInTable(GetCommands(), name, result.Read<uint>(1), result.Read<string>(2), name); SetDataForCommandInTable(GetCommands(), name, result.Read<string>(1), name);
} }
while (result.NextRow()); while (result.NextRow());
} }
@@ -94,7 +94,7 @@ namespace Game.Chat
command.SortChildCommands(); command.SortChildCommands();
} }
static bool SetDataForCommandInTable(ICollection<ChatCommand> table, string text, uint permission, string help, string fullcommand) static bool SetDataForCommandInTable(ICollection<ChatCommand> table, string text, string help, string fullcommand)
{ {
StringArguments args = new(text); StringArguments args = new(text);
string cmd = args.NextString().ToLower(); string cmd = args.NextString().ToLower();
@@ -109,7 +109,7 @@ namespace Game.Chat
if (!command.ChildCommands.Empty()) if (!command.ChildCommands.Empty())
{ {
var arg = args.NextString(""); var arg = args.NextString("");
if (SetDataForCommandInTable(command.ChildCommands, arg, permission, help, fullcommand)) if (SetDataForCommandInTable(command.ChildCommands, arg, help, fullcommand))
return true; return true;
else if (!arg.IsEmpty()) else if (!arg.IsEmpty())
return false; return false;
@@ -123,10 +123,6 @@ namespace Game.Chat
return false; return false;
} }
if (command.Permission != (RBACPermissions)permission)
Log.outInfo(LogFilter.Misc, "Table `command` overwrite for command '{0}' default permission ({1}) by {2}", fullcommand, command.Permission, permission);
command.Permission = (RBACPermissions)permission;
command.Help = help; command.Help = help;
return true; return true;
} }
+4 -4
View File
@@ -22,7 +22,7 @@ using System;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("account", RBACPermissions.CommandAccount, true)] [CommandGroup("account")]
class AccountCommands class AccountCommands
{ {
[Command("", RBACPermissions.CommandAccount)] [Command("", RBACPermissions.CommandAccount)]
@@ -322,7 +322,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("set", RBACPermissions.CommandAccountSet, true)] [CommandGroup("set")]
class SetCommands class SetCommands
{ {
[Command("addon", RBACPermissions.CommandAccountSetAddon, true)] [Command("addon", RBACPermissions.CommandAccountSetAddon, true)]
@@ -495,7 +495,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("sec", RBACPermissions.CommandAccountSetSec, true)] [CommandGroup("sec")]
class SetSecCommands class SetSecCommands
{ {
[Command("email", RBACPermissions.CommandAccountSetSecEmail, true)] [Command("email", RBACPermissions.CommandAccountSetSecEmail, true)]
@@ -584,7 +584,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("lock", RBACPermissions.CommandAccountLock)] [CommandGroup("lock")]
class LockCommands class LockCommands
{ {
[Command("country", RBACPermissions.CommandAccountLockCountry)] [Command("country", RBACPermissions.CommandAccountLockCountry)]
@@ -23,7 +23,7 @@ using System.Collections.Generic;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("achievement", RBACPermissions.CommandAchievement)] [CommandGroup("achievement")]
class AchievementCommand class AchievementCommand
{ {
[Command("add", RBACPermissions.CommandAchievementAdd)] [Command("add", RBACPermissions.CommandAchievementAdd)]
+3 -3
View File
@@ -21,7 +21,7 @@ using Framework.IO;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
//Holder for now. //Holder for now.
[CommandGroup("ahbot", RBACPermissions.CommandAhbot)] [CommandGroup("ahbot")]
class AhBotCommands class AhBotCommands
{ {
[Command("rebuild", RBACPermissions.CommandAhbotRebuild, true)] [Command("rebuild", RBACPermissions.CommandAhbotRebuild, true)]
@@ -113,7 +113,7 @@ namespace Game.Chat.Commands
return true; return true;
} }
[CommandGroup("items", RBACPermissions.CommandAhbotItems)] [CommandGroup("items")]
class ItemsCommands class ItemsCommands
{ {
[Command("", RBACPermissions.CommandAhbotItems, true)] [Command("", RBACPermissions.CommandAhbotItems, true)]
@@ -174,7 +174,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("ratio", RBACPermissions.CommandAhbotRatio)] [CommandGroup("ratio")]
class RatioCommands class RatioCommands
{ {
[Command("", RBACPermissions.CommandAhbotRatio, true)] [Command("", RBACPermissions.CommandAhbotRatio, true)]
+1 -1
View File
@@ -21,7 +21,7 @@ using System;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("arena", RBACPermissions.CommandArena)] [CommandGroup("arena")]
class ArenaCommands class ArenaCommands
{ {
[Command("create", RBACPermissions.CommandArenaCreate, true)] [Command("create", RBACPermissions.CommandArenaCreate, true)]
@@ -22,7 +22,7 @@ using System;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("bnetaccount", RBACPermissions.CommandBnetAccount, true)] [CommandGroup("bnetaccount")]
class BNetAccountCommands class BNetAccountCommands
{ {
[Command("create", RBACPermissions.CommandBnetAccountCreate, true)] [Command("create", RBACPermissions.CommandBnetAccountCreate, true)]
@@ -273,7 +273,7 @@ namespace Game.Chat.Commands
return true; return true;
} }
[CommandGroup("lock", RBACPermissions.CommandBnetAccount, true)] [CommandGroup("lock")]
class LockCommands class LockCommands
{ {
[Command("country", RBACPermissions.CommandBnetAccountLockCountry, true)] [Command("country", RBACPermissions.CommandBnetAccountLockCountry, true)]
@@ -360,7 +360,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("set", RBACPermissions.CommandBnetAccountSet, true)] [CommandGroup("set")]
class SetCommands class SetCommands
{ {
[Command("password", RBACPermissions.CommandBnetAccountSetPassword, true)] [Command("password", RBACPermissions.CommandBnetAccountSetPassword, true)]
+4 -4
View File
@@ -24,7 +24,7 @@ using System.Net;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("ban", RBACPermissions.CommandBan, true)] [CommandGroup("ban")]
class BanCommands class BanCommands
{ {
[Command("account", RBACPermissions.CommandBanAccount, true)] [Command("account", RBACPermissions.CommandBanAccount, true)]
@@ -182,7 +182,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("baninfo", RBACPermissions.CommandBaninfo, true)] [CommandGroup("baninfo")]
class BanInfoCommands class BanInfoCommands
{ {
[Command("account", RBACPermissions.CommandBaninfoAccount, true)] [Command("account", RBACPermissions.CommandBaninfoAccount, true)]
@@ -311,7 +311,7 @@ namespace Game.Chat.Commands
} }
[CommandGroup("banlist", RBACPermissions.CommandBanlist, true)] [CommandGroup("banlist")]
class BanListCommands class BanListCommands
{ {
[Command("account", RBACPermissions.CommandBanlistAccount, true)] [Command("account", RBACPermissions.CommandBanlistAccount, true)]
@@ -591,7 +591,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("unban", RBACPermissions.CommandUnban, true)] [CommandGroup("unban")]
class UnBanCommands class UnBanCommands
{ {
[Command("account", RBACPermissions.CommandUnbanAccount, true)] [Command("account", RBACPermissions.CommandUnbanAccount, true)]
@@ -21,7 +21,7 @@ using Game.BattleFields;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("bf", RBACPermissions.CommandBf)] [CommandGroup("bf")]
class BattleFieldCommands class BattleFieldCommands
{ {
[Command("enable", RBACPermissions.CommandBfEnable)] [Command("enable", RBACPermissions.CommandBfEnable)]
+1 -1
View File
@@ -23,7 +23,7 @@ using System;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("cast", RBACPermissions.CommandCast)] [CommandGroup("cast")]
class CastCommands class CastCommands
{ {
[Command("", RBACPermissions.CommandCast)] [Command("", RBACPermissions.CommandCast)]
@@ -27,7 +27,7 @@ using System.Text;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("character", RBACPermissions.CommandCharacter, true)] [CommandGroup("character")]
class CharacterCommands class CharacterCommands
{ {
[Command("titles", RBACPermissions.CommandCharacterTitles, true)] [Command("titles", RBACPermissions.CommandCharacterTitles, true)]
@@ -448,7 +448,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("deleted", RBACPermissions.CommandCharacterDeleted, true)] [CommandGroup("deleted")]
class DeletedCommands class DeletedCommands
{ {
[Command("delete", RBACPermissions.CommandCharacterDeletedDelete, true)] [Command("delete", RBACPermissions.CommandCharacterDeletedDelete, true)]
@@ -729,7 +729,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("pdump", RBACPermissions.CommandPdump, true)] [CommandGroup("pdump")]
class PdumpCommand class PdumpCommand
{ {
[Command("load", RBACPermissions.CommandPdumpLoad, true)] [Command("load", RBACPermissions.CommandPdumpLoad, true)]
+1 -1
View File
@@ -21,7 +21,7 @@ using Game.Entities;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("cheat", RBACPermissions.CommandCheat)] [CommandGroup("cheat")]
class CheatCommands class CheatCommands
{ {
[Command("casttime", RBACPermissions.CommandCheatCasttime)] [Command("casttime", RBACPermissions.CommandCheatCasttime)]
+47 -47
View File
@@ -32,10 +32,10 @@ using System.Text;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("debug", RBACPermissions.CommandDebug, true)] [CommandGroup("debug")]
class DebugCommands class DebugCommands
{ {
[Command("anim", RBACPermissions.CommandDebugAnim)] [Command("anim", RBACPermissions.CommandDebug)]
static bool HandleDebugAnimCommand(CommandHandler handler, Emote emote) static bool HandleDebugAnimCommand(CommandHandler handler, Emote emote)
{ {
Unit unit = handler.GetSelectedUnit(); Unit unit = handler.GetSelectedUnit();
@@ -46,7 +46,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("areatriggers", RBACPermissions.CommandDebugAreatriggers)] [Command("areatriggers", RBACPermissions.CommandDebug)]
static bool HandleDebugAreaTriggersCommand(CommandHandler handler) static bool HandleDebugAreaTriggersCommand(CommandHandler handler)
{ {
Player player = handler.GetPlayer(); Player player = handler.GetPlayer();
@@ -63,21 +63,21 @@ namespace Game.Chat
return true; return true;
} }
[Command("arena", RBACPermissions.CommandDebugArena, true)] [Command("arena", RBACPermissions.CommandDebug, true)]
static bool HandleDebugArenaCommand(CommandHandler handler) static bool HandleDebugArenaCommand(CommandHandler handler)
{ {
Global.BattlegroundMgr.ToggleArenaTesting(); Global.BattlegroundMgr.ToggleArenaTesting();
return true; return true;
} }
[Command("bg", RBACPermissions.CommandDebugBg, true)] [Command("bg", RBACPermissions.CommandDebug, true)]
static bool HandleDebugBattlegroundCommand(CommandHandler handler) static bool HandleDebugBattlegroundCommand(CommandHandler handler)
{ {
Global.BattlegroundMgr.ToggleTesting(); Global.BattlegroundMgr.ToggleTesting();
return true; return true;
} }
[Command("boundary", RBACPermissions.CommandDebugBoundary)] [Command("boundary", RBACPermissions.CommandDebug)]
static bool HandleDebugBoundaryCommand(CommandHandler handler, string fill, uint durationArg) static bool HandleDebugBoundaryCommand(CommandHandler handler, string fill, uint durationArg)
{ {
Player player = handler.GetPlayer(); Player player = handler.GetPlayer();
@@ -99,7 +99,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("combat", RBACPermissions.CommandDebugCombat)] [Command("combat", RBACPermissions.CommandDebug)]
static bool HandleDebugCombatListCommand(CommandHandler handler) static bool HandleDebugCombatListCommand(CommandHandler handler)
{ {
Unit target = handler.GetSelectedUnit(); Unit target = handler.GetSelectedUnit();
@@ -121,7 +121,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("conversation", RBACPermissions.CommandDebugConversation)] [Command("conversation", RBACPermissions.CommandDebug)]
static bool HandleDebugConversationCommand(CommandHandler handler, uint conversationEntry) static bool HandleDebugConversationCommand(CommandHandler handler, uint conversationEntry)
{ {
Player target = handler.GetSelectedPlayerOrSelf(); Player target = handler.GetSelectedPlayerOrSelf();
@@ -134,14 +134,14 @@ namespace Game.Chat
return Conversation.CreateConversation(conversationEntry, target, target, target.GetGUID()) != null; return Conversation.CreateConversation(conversationEntry, target, target, target.GetGUID()) != null;
} }
[Command("dummy", RBACPermissions.CommandDebugDummy)] [Command("dummy", RBACPermissions.CommandDebug)]
static bool HandleDebugDummyCommand(CommandHandler handler) static bool HandleDebugDummyCommand(CommandHandler handler)
{ {
handler.SendSysMessage("This command does nothing right now. Edit your local core (DebugCommands.cs) to make it do whatever you need for testing."); handler.SendSysMessage("This command does nothing right now. Edit your local core (DebugCommands.cs) to make it do whatever you need for testing.");
return true; return true;
} }
[Command("entervehicle", RBACPermissions.CommandDebugEntervehicle)] [Command("entervehicle", RBACPermissions.CommandDebug)]
static bool HandleDebugEnterVehicleCommand(CommandHandler handler, uint entry, sbyte seatId = -1) static bool HandleDebugEnterVehicleCommand(CommandHandler handler, uint entry, sbyte seatId = -1)
{ {
Unit target = handler.GetSelectedUnit(); Unit target = handler.GetSelectedUnit();
@@ -165,7 +165,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("getitemstate", RBACPermissions.CommandDebugGetitemstate)] [Command("getitemstate", RBACPermissions.CommandDebug)]
static bool HandleDebugGetItemStateCommand(CommandHandler handler, string itemState) static bool HandleDebugGetItemStateCommand(CommandHandler handler, string itemState)
{ {
ItemUpdateState state = ItemUpdateState.Unchanged; ItemUpdateState state = ItemUpdateState.Unchanged;
@@ -452,7 +452,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("instancespawn", RBACPermissions.CommandDebugInstancespawn)] [Command("instancespawn", RBACPermissions.CommandDebug)]
static bool HandleDebugInstanceSpawns(CommandHandler handler, string optArg) static bool HandleDebugInstanceSpawns(CommandHandler handler, string optArg)
{ {
Player player = handler.GetPlayer(); Player player = handler.GetPlayer();
@@ -559,7 +559,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("itemexpire", RBACPermissions.CommandDebugItemexpire)] [Command("itemexpire", RBACPermissions.CommandDebug)]
static bool HandleDebugItemExpireCommand(CommandHandler handler, ulong guid) static bool HandleDebugItemExpireCommand(CommandHandler handler, ulong guid)
{ {
Item item = handler.GetPlayer().GetItemByGuid(ObjectGuid.Create(HighGuid.Item, guid)); Item item = handler.GetPlayer().GetItemByGuid(ObjectGuid.Create(HighGuid.Item, guid));
@@ -572,7 +572,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("loadcells", RBACPermissions.CommandDebugLoadcells)] [Command("loadcells", RBACPermissions.CommandDebug)]
static bool HandleDebugLoadCellsCommand(CommandHandler handler, uint mapId = 0xFFFFFFFF) static bool HandleDebugLoadCellsCommand(CommandHandler handler, uint mapId = 0xFFFFFFFF)
{ {
Player player = handler.GetPlayer(); Player player = handler.GetPlayer();
@@ -592,7 +592,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("lootrecipient", RBACPermissions.CommandDebugLootrecipient)] [Command("lootrecipient", RBACPermissions.CommandDebug)]
static bool HandleDebugGetLootRecipientCommand(CommandHandler handler) static bool HandleDebugGetLootRecipientCommand(CommandHandler handler)
{ {
Creature target = handler.GetSelectedCreature(); Creature target = handler.GetSelectedCreature();
@@ -604,7 +604,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("los", RBACPermissions.CommandDebugLos)] [Command("los", RBACPermissions.CommandDebug)]
static bool HandleDebugLoSCommand(CommandHandler handler) static bool HandleDebugLoSCommand(CommandHandler handler)
{ {
Unit unit = handler.GetSelectedUnit(); Unit unit = handler.GetSelectedUnit();
@@ -620,7 +620,7 @@ namespace Game.Chat
return false; return false;
} }
[Command("moveflags", RBACPermissions.CommandDebugMoveflags)] [Command("moveflags", RBACPermissions.CommandDebug)]
static bool HandleDebugMoveflagsCommand(CommandHandler handler, uint? moveFlags, uint? moveFlagsExtra) static bool HandleDebugMoveflagsCommand(CommandHandler handler, uint? moveFlags, uint? moveFlagsExtra)
{ {
Unit target = handler.GetSelectedUnit(); Unit target = handler.GetSelectedUnit();
@@ -656,7 +656,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("neargraveyard", RBACPermissions.CommandNearGraveyard)] [Command("neargraveyard", RBACPermissions.CommandDebug)]
static bool HandleDebugNearGraveyard(CommandHandler handler, string linked) static bool HandleDebugNearGraveyard(CommandHandler handler, string linked)
{ {
Player player = handler.GetPlayer(); Player player = handler.GetPlayer();
@@ -740,7 +740,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("phase", RBACPermissions.CommandDebugPhase)] [Command("phase", RBACPermissions.CommandDebug)]
static bool HandleDebugPhaseCommand(CommandHandler handler) static bool HandleDebugPhaseCommand(CommandHandler handler)
{ {
Unit target = handler.GetSelectedUnit(); Unit target = handler.GetSelectedUnit();
@@ -759,7 +759,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("questreset", RBACPermissions.CommandDebugQuestreset)] [Command("questreset", RBACPermissions.CommandDebug)]
static bool HandleDebugQuestResetCommand(CommandHandler handler, string arg) static bool HandleDebugQuestResetCommand(CommandHandler handler, string arg)
{ {
bool daily = false, weekly = false, monthly = false; bool daily = false, weekly = false, monthly = false;
@@ -794,7 +794,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("raidreset", RBACPermissions.CommandInstanceUnbind)] [Command("raidreset", RBACPermissions.CommandDebug)]
static bool HandleDebugRaidResetCommand(CommandHandler handler, uint mapId, uint difficulty) static bool HandleDebugRaidResetCommand(CommandHandler handler, uint mapId, uint difficulty)
{ {
MapRecord mEntry = CliDB.MapStorage.LookupByKey(mapId); MapRecord mEntry = CliDB.MapStorage.LookupByKey(mapId);
@@ -847,7 +847,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("setaurastate", RBACPermissions.CommandDebugSetaurastate)] [Command("setaurastate", RBACPermissions.CommandDebug)]
static bool HandleDebugSetAuraStateCommand(CommandHandler handler, AuraStateType? state, bool apply) static bool HandleDebugSetAuraStateCommand(CommandHandler handler, AuraStateType? state, bool apply)
{ {
Unit unit = handler.GetSelectedUnit(); Unit unit = handler.GetSelectedUnit();
@@ -869,7 +869,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("spawnvehicle", RBACPermissions.CommandDebugSpawnvehicle)] [Command("spawnvehicle", RBACPermissions.CommandDebug)]
static bool HandleDebugSpawnVehicleCommand(CommandHandler handler, uint entry, uint id) static bool HandleDebugSpawnVehicleCommand(CommandHandler handler, uint entry, uint id)
{ {
float x, y, z, o = handler.GetPlayer().GetOrientation(); float x, y, z, o = handler.GetPlayer().GetOrientation();
@@ -897,7 +897,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("threat", RBACPermissions.CommandDebugThreat)] [Command("threat", RBACPermissions.CommandDebug)]
static bool HandleDebugThreatListCommand(CommandHandler handler) static bool HandleDebugThreatListCommand(CommandHandler handler)
{ {
Unit target = handler.GetSelectedUnit(); Unit target = handler.GetSelectedUnit();
@@ -957,7 +957,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("threatinfo", RBACPermissions.CommandDebugThreatinfo)] [Command("threatinfo", RBACPermissions.CommandDebug)]
static bool HandleDebugThreatInfoCommand(CommandHandler handler) static bool HandleDebugThreatInfoCommand(CommandHandler handler)
{ {
Unit target = handler.GetSelectedUnit(); Unit target = handler.GetSelectedUnit();
@@ -1033,7 +1033,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("transport", RBACPermissions.CommandDebugTransport)] [Command("transport", RBACPermissions.CommandDebug)]
static bool HandleDebugTransportCommand(CommandHandler handler, string operation) static bool HandleDebugTransportCommand(CommandHandler handler, string operation)
{ {
Transport transport = handler.GetPlayer().GetTransport<Transport>(); Transport transport = handler.GetPlayer().GetTransport<Transport>();
@@ -1060,7 +1060,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("worldstate", RBACPermissions.CommandDebugWorldState)] [Command("worldstate", RBACPermissions.CommandDebug)]
static bool HandleDebugUpdateWorldStateCommand(CommandHandler handler, uint variable, uint value) static bool HandleDebugUpdateWorldStateCommand(CommandHandler handler, uint variable, uint value)
{ {
handler.GetPlayer().SendUpdateWorldState(variable, value); handler.GetPlayer().SendUpdateWorldState(variable, value);
@@ -1088,7 +1088,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandNonGroup("wpgps", RBACPermissions.CommandWpgps)] [CommandNonGroup("wpgps", RBACPermissions.CommandDebug)]
static bool HandleWPGPSCommand(CommandHandler handler) static bool HandleWPGPSCommand(CommandHandler handler)
{ {
Player player = handler.GetPlayer(); Player player = handler.GetPlayer();
@@ -1121,10 +1121,10 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("play", RBACPermissions.CommandDebugPlay)] [CommandGroup("play")]
class PlayCommands class PlayCommands
{ {
[Command("cinematic", RBACPermissions.CommandDebugPlayCinematic)] [Command("cinematic", RBACPermissions.CommandDebug)]
static bool HandleDebugPlayCinematicCommand(CommandHandler handler, uint cinematicId) static bool HandleDebugPlayCinematicCommand(CommandHandler handler, uint cinematicId)
{ {
CinematicSequencesRecord cineSeq = CliDB.CinematicSequencesStorage.LookupByKey(cinematicId); CinematicSequencesRecord cineSeq = CliDB.CinematicSequencesStorage.LookupByKey(cinematicId);
@@ -1152,7 +1152,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("movie", RBACPermissions.CommandDebugPlayMovie)] [Command("movie", RBACPermissions.CommandDebug)]
static bool HandleDebugPlayMovieCommand(CommandHandler handler, uint movieId) static bool HandleDebugPlayMovieCommand(CommandHandler handler, uint movieId)
{ {
if (!CliDB.MovieStorage.ContainsKey(movieId)) if (!CliDB.MovieStorage.ContainsKey(movieId))
@@ -1165,7 +1165,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("music", RBACPermissions.CommandDebugPlayMusic)] [Command("music", RBACPermissions.CommandDebug)]
static bool HandleDebugPlayMusicCommand(CommandHandler handler, uint musicId) static bool HandleDebugPlayMusicCommand(CommandHandler handler, uint musicId)
{ {
if (!CliDB.SoundKitStorage.ContainsKey(musicId)) if (!CliDB.SoundKitStorage.ContainsKey(musicId))
@@ -1182,7 +1182,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("sound", RBACPermissions.CommandDebugPlaySound)] [Command("sound", RBACPermissions.CommandDebug)]
static bool HandleDebugPlaySoundCommand(CommandHandler handler, uint soundId, uint broadcastTextId) static bool HandleDebugPlaySoundCommand(CommandHandler handler, uint soundId, uint broadcastTextId)
{ {
if (!CliDB.SoundKitStorage.ContainsKey(soundId)) if (!CliDB.SoundKitStorage.ContainsKey(soundId))
@@ -1210,7 +1210,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("pvp", RBACPermissions.CommandDebug)] [CommandGroup("pvp")]
class PvpCommands class PvpCommands
{ {
[Command("warmode", RBACPermissions.CommandDebug)] [Command("warmode", RBACPermissions.CommandDebug)]
@@ -1245,17 +1245,17 @@ namespace Game.Chat
} }
[CommandGroup("send", RBACPermissions.CommandDebugSend)] [CommandGroup("send")]
class SendCommands class SendCommands
{ {
[Command("buyerror", RBACPermissions.CommandDebugSendBuyerror)] [Command("buyerror", RBACPermissions.CommandDebug)]
static bool HandleDebugSendBuyErrorCommand(CommandHandler handler, BuyResult error) static bool HandleDebugSendBuyErrorCommand(CommandHandler handler, BuyResult error)
{ {
handler.GetPlayer().SendBuyError(error, null, 0); handler.GetPlayer().SendBuyError(error, null, 0);
return true; return true;
} }
[Command("channelnotify", RBACPermissions.CommandDebugSendChannelnotify)] [Command("channelnotify", RBACPermissions.CommandDebug)]
static bool HandleDebugSendChannelNotifyCommand(CommandHandler handler, ChatNotify type) static bool HandleDebugSendChannelNotifyCommand(CommandHandler handler, ChatNotify type)
{ {
ChannelNotify packet = new(); ChannelNotify packet = new();
@@ -1265,7 +1265,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("chatmessage", RBACPermissions.CommandDebugSendChatmessage)] [Command("chatmessage", RBACPermissions.CommandDebug)]
static bool HandleDebugSendChatMsgCommand(CommandHandler handler, ChatMsg type) static bool HandleDebugSendChatMsgCommand(CommandHandler handler, ChatMsg type)
{ {
ChatPkt data = new(); ChatPkt data = new();
@@ -1274,14 +1274,14 @@ namespace Game.Chat
return true; return true;
} }
[Command("equiperror", RBACPermissions.CommandDebugSendEquiperror)] [Command("equiperror", RBACPermissions.CommandDebug)]
static bool HandleDebugSendEquipErrorCommand(CommandHandler handler, InventoryResult error) static bool HandleDebugSendEquipErrorCommand(CommandHandler handler, InventoryResult error)
{ {
handler.GetPlayer().SendEquipError(error); handler.GetPlayer().SendEquipError(error);
return true; return true;
} }
[Command("largepacket", RBACPermissions.CommandDebugSendLargepacket)] [Command("largepacket", RBACPermissions.CommandDebug)]
static bool HandleDebugSendLargePacketCommand(CommandHandler handler) static bool HandleDebugSendLargePacketCommand(CommandHandler handler)
{ {
StringBuilder ss = new(); StringBuilder ss = new();
@@ -1291,14 +1291,14 @@ namespace Game.Chat
return true; return true;
} }
[Command("opcode", RBACPermissions.CommandDebugSendOpcode)] [Command("opcode", RBACPermissions.CommandDebug)]
static bool HandleDebugSendOpcodeCommand(CommandHandler handler) static bool HandleDebugSendOpcodeCommand(CommandHandler handler)
{ {
handler.SendSysMessage(CypherStrings.NoCmd); handler.SendSysMessage(CypherStrings.NoCmd);
return true; return true;
} }
[Command("playerchoice", RBACPermissions.CommandDebugSendPlayerChoice)] [Command("playerchoice", RBACPermissions.CommandDebug)]
static bool HandleDebugSendPlayerChoiceCommand(CommandHandler handler, int choiceId) static bool HandleDebugSendPlayerChoiceCommand(CommandHandler handler, int choiceId)
{ {
Player player = handler.GetPlayer(); Player player = handler.GetPlayer();
@@ -1306,28 +1306,28 @@ namespace Game.Chat
return true; return true;
} }
[Command("qpartymsg", RBACPermissions.CommandDebugSendQpartymsg)] [Command("qpartymsg", RBACPermissions.CommandDebug)]
static bool HandleDebugSendQuestPartyMsgCommand(CommandHandler handler, QuestPushReason msg) static bool HandleDebugSendQuestPartyMsgCommand(CommandHandler handler, QuestPushReason msg)
{ {
handler.GetPlayer().SendPushToPartyResponse(handler.GetPlayer(), msg); handler.GetPlayer().SendPushToPartyResponse(handler.GetPlayer(), msg);
return true; return true;
} }
[Command("qinvalidmsg", RBACPermissions.CommandDebugSendQinvalidmsg)] [Command("qinvalidmsg", RBACPermissions.CommandDebug)]
static bool HandleDebugSendQuestInvalidMsgCommand(CommandHandler handler, QuestFailedReasons msg) static bool HandleDebugSendQuestInvalidMsgCommand(CommandHandler handler, QuestFailedReasons msg)
{ {
handler.GetPlayer().SendCanTakeQuestResponse(msg); handler.GetPlayer().SendCanTakeQuestResponse(msg);
return true; return true;
} }
[Command("sellerror", RBACPermissions.CommandDebugSendSellerror)] [Command("sellerror", RBACPermissions.CommandDebug)]
static bool HandleDebugSendSellErrorCommand(CommandHandler handler, SellResult error) static bool HandleDebugSendSellErrorCommand(CommandHandler handler, SellResult error)
{ {
handler.GetPlayer().SendSellError(error, null, ObjectGuid.Empty); handler.GetPlayer().SendSellError(error, null, ObjectGuid.Empty);
return true; return true;
} }
[Command("setphaseshift", RBACPermissions.CommandDebugSendSetphaseshift)] [Command("setphaseshift", RBACPermissions.CommandDebug)]
static bool HandleDebugSendSetPhaseShiftCommand(CommandHandler handler, uint phaseId, uint visibleMapId, uint uiMapPhaseId) static bool HandleDebugSendSetPhaseShiftCommand(CommandHandler handler, uint phaseId, uint visibleMapId, uint uiMapPhaseId)
{ {
PhaseShift phaseShift = new(); PhaseShift phaseShift = new();
@@ -1345,7 +1345,7 @@ namespace Game.Chat
return true; return true;
} }
[Command("spellfail", RBACPermissions.CommandDebugSendSpellfail)] [Command("spellfail", RBACPermissions.CommandDebug)]
static bool HandleDebugSendSpellFailCommand(CommandHandler handler, SpellCastResult result, int? failArg1, int? failArg2) static bool HandleDebugSendSpellFailCommand(CommandHandler handler, SpellCastResult result, int? failArg1, int? failArg2)
{ {
CastFailed castFailed = new(); CastFailed castFailed = new();
@@ -28,10 +28,10 @@ namespace Game.Chat.Commands
public const uint BGDeserter = 26013; public const uint BGDeserter = 26013;
} }
[CommandGroup("deserter", RBACPermissions.CommandDeserter)] [CommandGroup("deserter")]
class DeserterCommands class DeserterCommands
{ {
[CommandGroup("instance", RBACPermissions.CommandDeserterInstance)] [CommandGroup("instance")]
class DeserterInstanceCommands class DeserterInstanceCommands
{ {
[Command("add", RBACPermissions.CommandDeserterInstanceAdd)] [Command("add", RBACPermissions.CommandDeserterInstanceAdd)]
@@ -47,7 +47,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("bg", RBACPermissions.CommandDeserterBg)] [CommandGroup("bg")]
class DeserterBGCommands class DeserterBGCommands
{ {
[Command("add", RBACPermissions.CommandDeserterBgAdd)] [Command("add", RBACPermissions.CommandDeserterBgAdd)]
+3 -3
View File
@@ -22,10 +22,10 @@ using Game.DataStorage;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("disable", RBACPermissions.CommandDisable)] [CommandGroup("disable")]
class DisableCommands class DisableCommands
{ {
[CommandGroup("add", RBACPermissions.CommandDisableAdd, true)] [CommandGroup("add")]
class DisableAddCommands class DisableAddCommands
{ {
static bool HandleAddDisables(StringArguments args, CommandHandler handler, DisableType disableType) static bool HandleAddDisables(StringArguments args, CommandHandler handler, DisableType disableType)
@@ -222,7 +222,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("remove", RBACPermissions.CommandDisableRemove, true)] [CommandGroup("remove")]
class DisableRemoveCommands class DisableRemoveCommands
{ {
static bool HandleRemoveDisables(StringArguments args, CommandHandler handler, DisableType disableType) static bool HandleRemoveDisables(StringArguments args, CommandHandler handler, DisableType disableType)
+2 -2
View File
@@ -20,10 +20,10 @@ using Framework.IO;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("event", RBACPermissions.CommandEvent)] [CommandGroup("event")]
class EventCommands class EventCommands
{ {
[Command("info", RBACPermissions.CommandEvent, true)] [Command("info", RBACPermissions.CommandEventInfo, true)]
static bool HandleEventInfoCommand(CommandHandler handler, ushort eventId) static bool HandleEventInfoCommand(CommandHandler handler, ushort eventId)
{ {
var events = Global.GameEventMgr.GetEventMap(); var events = Global.GameEventMgr.GetEventMap();
+19 -28
View File
@@ -22,36 +22,9 @@ using Game.Entities;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("gm", RBACPermissions.CommandGm)] [CommandGroup("gm")]
class GMCommands class GMCommands
{ {
[Command("", RBACPermissions.CommandGm)]
static bool HandleGMCommand(CommandHandler handler, bool? enableArg)
{
Player _player = handler.GetSession().GetPlayer();
if (!enableArg.HasValue)
{
handler.SendNotification(_player.IsGameMaster() ? CypherStrings.GmOn : CypherStrings.GmOff);
return true;
}
if (enableArg.Value)
{
_player.SetGameMaster(true);
handler.SendNotification(CypherStrings.GmOn);
_player.UpdateTriggerVisibility();
}
else
{
_player.SetGameMaster(false);
handler.SendNotification(CypherStrings.GmOff);
_player.UpdateTriggerVisibility();
}
return true;
}
[Command("chat", RBACPermissions.CommandGmChat)] [Command("chat", RBACPermissions.CommandGmChat)]
static bool HandleGMChatCommand(CommandHandler handler, bool? enableArg) static bool HandleGMChatCommand(CommandHandler handler, bool? enableArg)
{ {
@@ -182,6 +155,24 @@ namespace Game.Chat
return true; return true;
} }
[Command("off", RBACPermissions.CommandGm)]
static bool HandleGMOffCommand(CommandHandler handler)
{
handler.GetPlayer().SetGameMaster(false);
handler.GetPlayer().UpdateTriggerVisibility();
handler.GetSession().SendNotification(CypherStrings.GmOff);
return true;
}
[Command("on", RBACPermissions.CommandGm)]
static bool HandleGMOnCommand(CommandHandler handler)
{
handler.GetPlayer().SetGameMaster(true);
handler.GetPlayer().UpdateTriggerVisibility();
handler.GetSession().SendNotification(CypherStrings.GmOn);
return true;
}
[Command("visible", RBACPermissions.CommandGmVisible)] [Command("visible", RBACPermissions.CommandGmVisible)]
static bool HandleGMVisibleCommand(CommandHandler handler, bool? visibleArg) static bool HandleGMVisibleCommand(CommandHandler handler, bool? visibleArg)
{ {
@@ -28,7 +28,7 @@ using System.Text;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("gobject", RBACPermissions.CommandGobject)] [CommandGroup("gobject")]
class GameObjectCommands class GameObjectCommands
{ {
[Command("activate", RBACPermissions.CommandGobjectActivate)] [Command("activate", RBACPermissions.CommandGobjectActivate)]
@@ -478,7 +478,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("add", RBACPermissions.CommandGobjectAdd)] [CommandGroup("add")]
class AddCommands class AddCommands
{ {
[Command("", RBACPermissions.CommandGobjectAdd)] [Command("", RBACPermissions.CommandGobjectAdd)]
@@ -548,7 +548,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("set", RBACPermissions.CommandGobjectSet)] [CommandGroup("set")]
class SetCommands class SetCommands
{ {
[Command("phase", RBACPermissions.CommandGobjectSetPhase)] [Command("phase", RBACPermissions.CommandGobjectSetPhase)]
+3 -3
View File
@@ -27,7 +27,7 @@ using System.Linq;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("go", RBACPermissions.CommandGo)] [CommandGroup("go")]
class GoCommands class GoCommands
{ {
[Command("areatrigger", RBACPermissions.CommandGo)] [Command("areatrigger", RBACPermissions.CommandGo)]
@@ -497,7 +497,7 @@ namespace Game.Chat.Commands
return true; return true;
} }
[CommandGroup("creature", RBACPermissions.CommandGo)] [CommandGroup("creature")]
class GoCommandCreature class GoCommandCreature
{ {
[Command("", RBACPermissions.CommandGo)] [Command("", RBACPermissions.CommandGo)]
@@ -541,7 +541,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("gameobject", RBACPermissions.CommandGo)] [CommandGroup("gameobject")]
class GoCommandGameobject class GoCommandGameobject
{ {
[Command("", RBACPermissions.CommandGo)] [Command("", RBACPermissions.CommandGo)]
+2 -2
View File
@@ -28,7 +28,7 @@ using System.Collections.Generic;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("group", RBACPermissions.CommandGroup)] [CommandGroup("group")]
class GroupCommands class GroupCommands
{ {
// Summon group of player // Summon group of player
@@ -343,7 +343,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("set", RBACPermissions.CommandGroupSet)] [CommandGroup("set")]
class GroupSetCommands class GroupSetCommands
{ {
[Command("assistant", RBACPermissions.CommandGroupAssistant)] [Command("assistant", RBACPermissions.CommandGroupAssistant)]
+1 -1
View File
@@ -22,7 +22,7 @@ using Game.Guilds;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("guild", RBACPermissions.CommandGuild, true)] [CommandGroup("guild")]
class GuildCommands class GuildCommands
{ {
[Command("create", RBACPermissions.CommandGuildCreate, true)] [Command("create", RBACPermissions.CommandGuildCreate, true)]
+2 -2
View File
@@ -21,7 +21,7 @@ using Game.Entities;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("honor", RBACPermissions.CommandHonor)] [CommandGroup("honor")]
class HonorCommands class HonorCommands
{ {
[Command("update", RBACPermissions.CommandHonorUpdate)] [Command("update", RBACPermissions.CommandHonorUpdate)]
@@ -42,7 +42,7 @@ namespace Game.Chat.Commands
return true; return true;
} }
[CommandGroup("add", RBACPermissions.CommandHonorAdd)] [CommandGroup("add")]
class HonorAddCommands class HonorAddCommands
{ {
[Command("", RBACPermissions.CommandHonorAdd)] [Command("", RBACPermissions.CommandHonorAdd)]
@@ -24,7 +24,7 @@ using Game.DataStorage;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("instance", RBACPermissions.CommandInstance, true)] [CommandGroup("instance")]
class InstanceCommands class InstanceCommands
{ {
[Command("listbinds", RBACPermissions.CommandInstanceListbinds)] [Command("listbinds", RBACPermissions.CommandInstanceListbinds)]
+1 -2
View File
@@ -17,7 +17,6 @@
using Framework.Constants; using Framework.Constants;
using Framework.Database; using Framework.Database;
using Framework.IO;
using Game.DungeonFinding; using Game.DungeonFinding;
using Game.Entities; using Game.Entities;
using Game.Groups; using Game.Groups;
@@ -25,7 +24,7 @@ using System;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("lfg", RBACPermissions.CommandLfg, true)] [CommandGroup("lfg")]
class LFGCommands class LFGCommands
{ {
[Command("player", RBACPermissions.CommandLfgPlayer, true)] [Command("player", RBACPermissions.CommandLfgPlayer, true)]
+3 -3
View File
@@ -25,7 +25,7 @@ using System.Collections.Generic;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("learn", RBACPermissions.CommandLearn)] [CommandGroup("learn")]
class LearnCommands class LearnCommands
{ {
[Command("", RBACPermissions.CommandLearn)] [Command("", RBACPermissions.CommandLearn)]
@@ -72,7 +72,7 @@ namespace Game.Chat.Commands
return true; return true;
} }
[CommandGroup("all", RBACPermissions.CommandLearnAll)] [CommandGroup("all")]
class LearnAllCommands class LearnAllCommands
{ {
[Command("gm", RBACPermissions.CommandLearnAllGm)] [Command("gm", RBACPermissions.CommandLearnAllGm)]
@@ -239,7 +239,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("my", RBACPermissions.CommandLearnAllMy)] [CommandGroup("my")]
class LearnAllMyCommands class LearnAllMyCommands
{ {
[Command("class", RBACPermissions.CommandLearnAllMyClass)] [Command("class", RBACPermissions.CommandLearnAllMyClass)]
+1 -1
View File
@@ -26,7 +26,7 @@ using System.Collections.Generic;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("list", RBACPermissions.CommandList, true)] [CommandGroup("list")]
class ListCommands class ListCommands
{ {
[Command("auras", RBACPermissions.CommandListAuras)] [Command("auras", RBACPermissions.CommandListAuras)]
+6 -6
View File
@@ -27,7 +27,7 @@ using System.Collections.Generic;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("lookup", RBACPermissions.CommandLookup, true)] [CommandGroup("lookup")]
class LookupCommands class LookupCommands
{ {
static int maxResults = 50; static int maxResults = 50;
@@ -643,7 +643,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("item", RBACPermissions.CommandLookupItem, true)] [CommandGroup("item")]
class ItemCommandGroup class ItemCommandGroup
{ {
[Command("", RBACPermissions.CommandLookupItem, true)] [Command("", RBACPermissions.CommandLookupItem, true)]
@@ -710,7 +710,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("map", RBACPermissions.CommandLookupMap, true)] [CommandGroup("map")]
class MapCommandGroup class MapCommandGroup
{ {
[Command("", RBACPermissions.CommandLookupMap, true)] [Command("", RBACPermissions.CommandLookupMap, true)]
@@ -833,7 +833,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("player", RBACPermissions.CommandLookupPlayer, true)] [CommandGroup("player")]
class PlayerCommandGroup class PlayerCommandGroup
{ {
[Command("ip", RBACPermissions.CommandLookupPlayerIp)] [Command("ip", RBACPermissions.CommandLookupPlayerIp)]
@@ -921,7 +921,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("quest", RBACPermissions.CommandLookupQuest, true)] [CommandGroup("quest")]
class QuestCommandGroup class QuestCommandGroup
{ {
[Command("", RBACPermissions.CommandLookupQuest, true)] [Command("", RBACPermissions.CommandLookupQuest, true)]
@@ -1133,7 +1133,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("spell",RBACPermissions.CommandLookupSpell)] [CommandGroup("spell")]
class SpellCommandGroup class SpellCommandGroup
{ {
[Command("", RBACPermissions.CommandLookupSpell)] [Command("", RBACPermissions.CommandLookupSpell)]
+1 -1
View File
@@ -25,7 +25,7 @@ using System.Collections.Generic;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("mmap", RBACPermissions.CommandMmap, true)] [CommandGroup("mmap")]
class MMapsCommands class MMapsCommands
{ {
[Command("path", RBACPermissions.CommandMmapPath)] [Command("path", RBACPermissions.CommandMmapPath)]
+2 -2
View File
@@ -131,10 +131,10 @@ namespace Game.Chat
} }
} }
[CommandGroup("channel", RBACPermissions.CommandChannel, true)] [CommandGroup("channel")]
class ChannelCommands class ChannelCommands
{ {
[CommandGroup("set", RBACPermissions.CommandChannelSet, true)] [CommandGroup("set")]
class ChannelSetCommands class ChannelSetCommands
{ {
[Command("ownership", RBACPermissions.CommandChannelSetOwnership)] [Command("ownership", RBACPermissions.CommandChannelSetOwnership)]
+2 -2
View File
@@ -25,7 +25,7 @@ using System.Collections.Generic;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("modify", RBACPermissions.CommandModify)] [CommandGroup("modify")]
class ModifyCommand class ModifyCommand
{ {
[Command("hp", RBACPermissions.CommandModifyHp)] [Command("hp", RBACPermissions.CommandModifyHp)]
@@ -740,7 +740,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("speed", RBACPermissions.CommandModifySpeed)] [CommandGroup("speed")]
class ModifySpeed class ModifySpeed
{ {
[Command("", RBACPermissions.CommandModifySpeed)] [Command("", RBACPermissions.CommandModifySpeed)]
+5 -5
View File
@@ -30,7 +30,7 @@ using Game.Loots;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("npc", RBACPermissions.CommandNpc)] [CommandGroup("npc")]
class NPCCommands class NPCCommands
{ {
[Command("despawngroup", RBACPermissions.CommandNpcDespawngroup)] [Command("despawngroup", RBACPermissions.CommandNpcDespawngroup)]
@@ -572,7 +572,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("add", RBACPermissions.CommandNpcAdd)] [CommandGroup("add")]
class AddCommands class AddCommands
{ {
[Command("", RBACPermissions.CommandNpcAdd)] [Command("", RBACPermissions.CommandNpcAdd)]
@@ -763,7 +763,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("delete", RBACPermissions.CommandNpcDelete)] [CommandGroup("delete")]
class DeleteCommands class DeleteCommands
{ {
[Command("", RBACPermissions.CommandNpcDelete)] [Command("", RBACPermissions.CommandNpcDelete)]
@@ -826,7 +826,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("follow", RBACPermissions.CommandNpcFollow)] [CommandGroup("follow")]
class FollowCommands class FollowCommands
{ {
[Command("", RBACPermissions.CommandNpcFollow)] [Command("", RBACPermissions.CommandNpcFollow)]
@@ -882,7 +882,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("set", RBACPermissions.CommandNpcSet, true)] [CommandGroup("set")]
class SetCommands class SetCommands
{ {
[Command("allowmove", RBACPermissions.CommandNpcSetAllowmove)] [Command("allowmove", RBACPermissions.CommandNpcSetAllowmove)]
+1 -1
View File
@@ -22,7 +22,7 @@ using Game.Spells;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("pet", RBACPermissions.CommandPet)] [CommandGroup("pet")]
class PetCommands class PetCommands
{ {
[Command("create", RBACPermissions.CommandPetCreate)] [Command("create", RBACPermissions.CommandPetCreate)]
+1 -1
View File
@@ -24,7 +24,7 @@ using System.Linq;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("quest", RBACPermissions.CommandQuest)] [CommandGroup("quest")]
class QuestCommands class QuestCommands
{ {
[Command("add", RBACPermissions.CommandQuestAdd)] [Command("add", RBACPermissions.CommandQuestAdd)]
+2 -2
View File
@@ -23,7 +23,7 @@ using System.Collections.Generic;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("rbac", RBACPermissions.CommandRbac, true)] [CommandGroup("rbac")]
class RbacComands class RbacComands
{ {
[Command("list", RBACPermissions.CommandRbacList, true)] [Command("list", RBACPermissions.CommandRbacList, true)]
@@ -62,7 +62,7 @@ namespace Game.Chat.Commands
return true; return true;
} }
[CommandGroup("account", RBACPermissions.CommandRbacAcc, true)] [CommandGroup("account")]
class RbacAccountCommands class RbacAccountCommands
{ {
[Command("grant", RBACPermissions.CommandRbacAccPermGrant, true)] [Command("grant", RBACPermissions.CommandRbacAccPermGrant, true)]
+2 -20
View File
@@ -24,7 +24,7 @@ using Game.Spells;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("reload", RBACPermissions.CommandReload, true)] [CommandGroup("reload")]
class ReloadCommand class ReloadCommand
{ {
[Command("access_requirement", RBACPermissions.CommandReloadAccessRequirement, true)] [Command("access_requirement", RBACPermissions.CommandReloadAccessRequirement, true)]
@@ -118,9 +118,6 @@ namespace Game.Chat
return true; return true;
} }
[Command("command", RBACPermissions.CommandReloadCommand, true)]
static bool HandleReloadCommandCommand(CommandHandler handler, StringArguments args) { return true; }
[Command("conditions", RBACPermissions.CommandReloadConditions, true)] [Command("conditions", RBACPermissions.CommandReloadConditions, true)]
static bool HandleReloadConditions(CommandHandler handler, StringArguments args) static bool HandleReloadConditions(CommandHandler handler, StringArguments args)
{ {
@@ -921,21 +918,6 @@ namespace Game.Chat
return true; return true;
} }
[Command("warden_action", RBACPermissions.CommandReloadWardenAction, true)]
static bool HandleReloadWardenactionCommand(CommandHandler handler, StringArguments args)
{
if (!WorldConfig.GetBoolValue(WorldCfg.WardenEnabled))
{
handler.SendSysMessage("Warden system disabled by config - reloading warden_action skipped.");
return false;
}
//Log.outInfo(LogFilter.Misc, "Re-Loading warden_action Table!");
//Global.WardenCheckMgr.LoadWardenOverrides();
//handler.SendGlobalGMSysMessage("DB table `warden_action` reloaded.");
return true;
}
[Command("waypoint_data", RBACPermissions.CommandReloadWaypointData, true)] [Command("waypoint_data", RBACPermissions.CommandReloadWaypointData, true)]
static bool HandleReloadWpCommand(CommandHandler handler, StringArguments args) static bool HandleReloadWpCommand(CommandHandler handler, StringArguments args)
{ {
@@ -970,7 +952,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("all", RBACPermissions.CommandReloadAll, true)] [CommandGroup("all")]
class AllCommand class AllCommand
{ {
[Command("", RBACPermissions.CommandReloadAll, true)] [Command("", RBACPermissions.CommandReloadAll, true)]
+1 -1
View File
@@ -25,7 +25,7 @@ using System.Collections.Generic;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("reset", RBACPermissions.CommandReset, true)] [CommandGroup("reset")]
class ResetCommands class ResetCommands
{ {
[Command("achievements", RBACPermissions.CommandResetAchievements, true)] [Command("achievements", RBACPermissions.CommandResetAchievements, true)]
+1 -1
View File
@@ -22,7 +22,7 @@ using Game.Entities;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("scene", RBACPermissions.CommandScene)] [CommandGroup("scene")]
class SceneCommands class SceneCommands
{ {
[Command("cancel", RBACPermissions.CommandSceneCancel)] [Command("cancel", RBACPermissions.CommandSceneCancel)]
+1 -1
View File
@@ -24,7 +24,7 @@ using System.Collections.Generic;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("send", RBACPermissions.CommandSend, false)] [CommandGroup("send")]
class SendCommands class SendCommands
{ {
[Command("mail", RBACPermissions.CommandSendMail, true)] [Command("mail", RBACPermissions.CommandSendMail, true)]
+6 -6
View File
@@ -22,7 +22,7 @@ using System;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("server", RBACPermissions.CommandServer, true)] [CommandGroup("server")]
class ServerCommands class ServerCommands
{ {
[Command("corpses", RBACPermissions.CommandServerCorpses, true)] [Command("corpses", RBACPermissions.CommandServerCorpses, true)]
@@ -230,7 +230,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("idleRestart", RBACPermissions.CommandServerIdlerestart, true)] [CommandGroup("idleRestart")]
class IdleRestartCommands class IdleRestartCommands
{ {
[Command("", RBACPermissions.CommandServerIdlerestart, true)] [Command("", RBACPermissions.CommandServerIdlerestart, true)]
@@ -249,7 +249,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("idleshutdown", RBACPermissions.CommandServerIdleshutdown, true)] [CommandGroup("idleshutdown")]
class IdleshutdownCommands class IdleshutdownCommands
{ {
[Command("", RBACPermissions.CommandServerIdleshutdown, true)] [Command("", RBACPermissions.CommandServerIdleshutdown, true)]
@@ -269,7 +269,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("restart", RBACPermissions.CommandServerInfo, true)] [CommandGroup("restart")]
class RestartCommands class RestartCommands
{ {
[Command("", RBACPermissions.CommandServerRestart, true)] [Command("", RBACPermissions.CommandServerRestart, true)]
@@ -295,7 +295,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("shutdown", RBACPermissions.CommandServerMotd, true)] [CommandGroup("shutdown")]
class ShutdownCommands class ShutdownCommands
{ {
[Command("", RBACPermissions.CommandServerShutdown, true)] [Command("", RBACPermissions.CommandServerShutdown, true)]
@@ -321,7 +321,7 @@ namespace Game.Chat
} }
} }
[CommandGroup("set", RBACPermissions.CommandServerSet, true)] [CommandGroup("set")]
class SetCommands class SetCommands
{ {
[Command("difftime", RBACPermissions.CommandServerSetDifftime, true)] [Command("difftime", RBACPermissions.CommandServerSetDifftime, true)]
+1 -1
View File
@@ -26,7 +26,7 @@ using System.Collections.Generic;
namespace Game.Chat namespace Game.Chat
{ {
[CommandGroup("tele", RBACPermissions.CommandTele)] [CommandGroup("tele")]
class TeleCommands class TeleCommands
{ {
[Command("", RBACPermissions.CommandTele)] [Command("", RBACPermissions.CommandTele)]
+5 -5
View File
@@ -22,7 +22,7 @@ using Game.SupportSystem;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("ticket", RBACPermissions.CommandTicket, true)] [CommandGroup("ticket")]
class TicketCommands class TicketCommands
{ {
[Command("togglesystem", RBACPermissions.CommandTicketTogglesystem, true)] [Command("togglesystem", RBACPermissions.CommandTicketTogglesystem, true)]
@@ -40,7 +40,7 @@ namespace Game.Chat.Commands
return true; return true;
} }
[CommandGroup("bug", RBACPermissions.CommandTicketBug, true)] [CommandGroup("bug")]
class TicketBugCommands class TicketBugCommands
{ {
[Command("assign", RBACPermissions.CommandTicketBugAssign, true)] [Command("assign", RBACPermissions.CommandTicketBugAssign, true)]
@@ -92,7 +92,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("complaint", RBACPermissions.CommandTicketComplaint, true)] [CommandGroup("complaint")]
class TicketComplaintCommands class TicketComplaintCommands
{ {
[Command("assign", RBACPermissions.CommandTicketComplaintAssign, true)] [Command("assign", RBACPermissions.CommandTicketComplaintAssign, true)]
@@ -144,7 +144,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("suggestion", RBACPermissions.CommandTicketSuggestion, true)] [CommandGroup("suggestion")]
class TicketSuggestionCommands class TicketSuggestionCommands
{ {
[Command("assign", RBACPermissions.CommandTicketSuggestionAssign, true)] [Command("assign", RBACPermissions.CommandTicketSuggestionAssign, true)]
@@ -196,7 +196,7 @@ namespace Game.Chat.Commands
} }
} }
[CommandGroup("reset", RBACPermissions.CommandTicketReset, true)] [CommandGroup("reset")]
class TicketResetCommands class TicketResetCommands
{ {
[Command("all", RBACPermissions.CommandTicketResetAll, true)] [Command("all", RBACPermissions.CommandTicketResetAll, true)]
+2 -2
View File
@@ -24,7 +24,7 @@ using System;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("titles", RBACPermissions.CommandTitles)] [CommandGroup("titles")]
class TitleCommands class TitleCommands
{ {
[Command("current", RBACPermissions.CommandTitlesCurrent)] [Command("current", RBACPermissions.CommandTitlesCurrent)]
@@ -159,7 +159,7 @@ namespace Game.Chat.Commands
return true; return true;
} }
[CommandGroup("set", RBACPermissions.CommandTitlesSet)] [CommandGroup("set")]
class TitleSetCommands class TitleSetCommands
{ {
//Edit Player KnownTitles //Edit Player KnownTitles
+1 -1
View File
@@ -25,7 +25,7 @@ using System.Collections.Generic;
namespace Game.Chat.Commands namespace Game.Chat.Commands
{ {
[CommandGroup("wp", RBACPermissions.CommandWp)] [CommandGroup("wp")]
class WPCommands class WPCommands
{ {
[Command("add", RBACPermissions.CommandWpAdd)] [Command("add", RBACPermissions.CommandWpAdd)]