From b9c1e3876b1b5fcb2f0b459c5b6936f510f8bba8 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 12 Mar 2018 14:40:58 -0400 Subject: [PATCH] Core/Chat: fix RBAC_PERM_COMMANDS_NOTIFY_COMMAND_NOT_FOUND_ERROR for subcommands --- Source/Framework/Constants/SharedConst.cs | 1 - Source/Game/Chat/CommandHandler.cs | 3 +++ Source/Game/Entities/Unit/Unit.Combat.cs | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Framework/Constants/SharedConst.cs b/Source/Framework/Constants/SharedConst.cs index dae93190e..a08502109 100644 --- a/Source/Framework/Constants/SharedConst.cs +++ b/Source/Framework/Constants/SharedConst.cs @@ -967,7 +967,6 @@ namespace Framework.Constants AhbotUpdateInterval, AllTaxiPaths, AllowGmGroup, - AllowPlayerCommands, AllowTrackBothResources, AllowTwoSideInteractionAuction, AllowTwoSideInteractionCalendar, diff --git a/Source/Game/Chat/CommandHandler.cs b/Source/Game/Chat/CommandHandler.cs index b6473fa50..de98469ee 100644 --- a/Source/Game/Chat/CommandHandler.cs +++ b/Source/Game/Chat/CommandHandler.cs @@ -107,6 +107,9 @@ namespace Game.Chat string arg = args.NextString(""); if (!ExecuteCommandInTable(command.ChildCommands, arg, fullcmd)) { + if (_session != null && !_session.HasPermission(RBACPermissions.CommandsNotifyCommandNotFoundError)) + return false; + if (!arg.IsEmpty()) SendSysMessage(CypherStrings.NoSubcmd); else diff --git a/Source/Game/Entities/Unit/Unit.Combat.cs b/Source/Game/Entities/Unit/Unit.Combat.cs index f7b8e168f..ccfc81721 100644 --- a/Source/Game/Entities/Unit/Unit.Combat.cs +++ b/Source/Game/Entities/Unit/Unit.Combat.cs @@ -2668,10 +2668,10 @@ namespace Game.Entities float DoneTotalMod = 1.0f; // Some spells don't benefit from pct done mods - if (spellProto != null) + if (spellProto != null && !spellProto.HasAttribute(SpellAttr6.NoDonePctDamageMods)) { // mods for SPELL_SCHOOL_MASK_NORMAL are already factored in base melee damage calculation - if (!spellProto.HasAttribute(SpellAttr6.NoDonePctDamageMods) && !spellProto.GetSchoolMask().HasAnyFlag(SpellSchoolMask.Normal)) + if (!spellProto.GetSchoolMask().HasAnyFlag(SpellSchoolMask.Normal)) { float maxModDamagePercentSchool = 0.0f; for (var i = SpellSchools.Holy; i < SpellSchools.Max; ++i)