From 7baa1aede918de4ac2ffd8635ca84de4b30f76d5 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 24 Jul 2020 17:50:10 -0400 Subject: [PATCH] Combat/threat rewrite prep - merge RBAC/DB changes. Port From (https://github.com/TrinityCore/TrinityCore/commit/118e53f1b84fca238a6f1039471351afa61bd6c4) --- Source/Framework/Constants/AccountConst.cs | 2 +- Source/Game/Chat/Commands/DebugCommands.cs | 4 ++-- ...06_28_00_auth.sql => 2017_06_28_00_auth_master.sql} | 0 sql/updates/auth/master/2017_06_28_00_auth_rbac.sql | 2 ++ .../master/2020_07_16_07_world_2017_06_28_01_world.sql | 10 ++++++++++ 5 files changed, 15 insertions(+), 3 deletions(-) rename sql/old/7/auth/01_2018_02_19/{2017_06_28_00_auth.sql => 2017_06_28_00_auth_master.sql} (100%) create mode 100644 sql/updates/auth/master/2017_06_28_00_auth_rbac.sql create mode 100644 sql/updates/world/master/2020_07_16_07_world_2017_06_28_01_world.sql diff --git a/Source/Framework/Constants/AccountConst.cs b/Source/Framework/Constants/AccountConst.cs index ed0ad3114..65835f22d 100644 --- a/Source/Framework/Constants/AccountConst.cs +++ b/Source/Framework/Constants/AccountConst.cs @@ -214,7 +214,7 @@ namespace Framework.Constants CommandDebugGetitemstate = 306, CommandDebugGetitemvalue = 307, // DEPRECATED: DON'T REUSE CommandDebugGetvalue = 308, // DEPRECATED: DON'T REUSE - CommandDebugHostil = 309, + CommandDebugCombat = 309, CommandDebugItemexpire = 310, CommandDebugLootrecipient = 311, CommandDebugLos = 312, diff --git a/Source/Game/Chat/Commands/DebugCommands.cs b/Source/Game/Chat/Commands/DebugCommands.cs index 892bcf637..0f90d79a1 100644 --- a/Source/Game/Chat/Commands/DebugCommands.cs +++ b/Source/Game/Chat/Commands/DebugCommands.cs @@ -435,8 +435,8 @@ namespace Game.Chat return true; } - [Command("hostil", RBACPermissions.CommandDebugHostil)] - static bool HandleDebugHostileRefListCommand(StringArguments args, CommandHandler handler) + [Command("combat", RBACPermissions.CommandDebugCombat)] + static bool HandleDebugCombatListCommand(StringArguments args, CommandHandler handler) { Unit target = handler.GetSelectedUnit(); if (!target) diff --git a/sql/old/7/auth/01_2018_02_19/2017_06_28_00_auth.sql b/sql/old/7/auth/01_2018_02_19/2017_06_28_00_auth_master.sql similarity index 100% rename from sql/old/7/auth/01_2018_02_19/2017_06_28_00_auth.sql rename to sql/old/7/auth/01_2018_02_19/2017_06_28_00_auth_master.sql diff --git a/sql/updates/auth/master/2017_06_28_00_auth_rbac.sql b/sql/updates/auth/master/2017_06_28_00_auth_rbac.sql new file mode 100644 index 000000000..e854b1078 --- /dev/null +++ b/sql/updates/auth/master/2017_06_28_00_auth_rbac.sql @@ -0,0 +1,2 @@ +-- +UPDATE `rbac_permissions` SET `name`="Command: debug combat" WHERE `id`=309; diff --git a/sql/updates/world/master/2020_07_16_07_world_2017_06_28_01_world.sql b/sql/updates/world/master/2020_07_16_07_world_2017_06_28_01_world.sql new file mode 100644 index 000000000..487cd8acc --- /dev/null +++ b/sql/updates/world/master/2020_07_16_07_world_2017_06_28_01_world.sql @@ -0,0 +1,10 @@ +-- +UPDATE `command` SET `name`="debug combat", `help`="Syntax: .debug combat + +Lists the target's (or own) combat references." WHERE `name` IN ("debug hostil","debug combat"); +UPDATE `command` SET `help`="Syntax: .debug threat + +Lists the units threatened by target (or self). If target has a threat list, lists that threat list, too." WHERE `name`="debug threat"; + +DELETE FROM `spell_script_names` WHERE `ScriptName`="spell_warr_vigilance_redirect_threat"; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES (59665,"spell_warr_vigilance_redirect_threat");