From 89824c69a650ce2e8437da8df2825a0189fc0df0 Mon Sep 17 00:00:00 2001 From: sven-n Date: Fri, 16 Aug 2024 14:32:08 +0200 Subject: [PATCH] Fixed shifting of excellent option number in chat command. The numbers start at 1, so the first option should not cause a shift. --- src/GameLogic/PlugIns/ChatCommands/ItemChatCommandPlugIn.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GameLogic/PlugIns/ChatCommands/ItemChatCommandPlugIn.cs b/src/GameLogic/PlugIns/ChatCommands/ItemChatCommandPlugIn.cs index ba9058e49..2435da8d7 100644 --- a/src/GameLogic/PlugIns/ChatCommands/ItemChatCommandPlugIn.cs +++ b/src/GameLogic/PlugIns/ChatCommands/ItemChatCommandPlugIn.cs @@ -109,7 +109,7 @@ private static void AddExcellentOptions(TemporaryItem item, ItemChatCommandArgs var excellentOptions = item.Definition.PossibleItemOptions .SelectMany(o => o.PossibleOptions) .Where(o => o.OptionType == ItemOptionTypes.Excellent) - .Where(o => ((1 << o.Number) & arguments.ExcellentNumber) > default(byte)) + .Where(o => ((1 << (o.Number - 1)) & arguments.ExcellentNumber) > default(byte)) .ToList(); ushort appliedOptions = default;