From 4c5126e5da5ad5ddd61687b1acdadbaf7624e9fb Mon Sep 17 00:00:00 2001 From: Lucca Faria Ferri Date: Mon, 30 Jan 2023 15:43:01 -0800 Subject: [PATCH] Updated !quest command --- src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs b/src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs index a9d8faf..7377b6c 100644 --- a/src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs +++ b/src/DiIiS-NA/D3-GameServer/CommandManager/GameCommands.cs @@ -819,7 +819,6 @@ public class ModifySpeedCommand : CommandGroup playerSpeed[GameAttribute.Running_Rate] = baseSpeed; return $"Speed reset to Base Speed ({baseSpeed:0.000})."; } - playerSpeed.FixedMap.Add(FixedAttribute.Speed, attr => attr[GameAttribute.Running_Rate] = speedValue); playerSpeed.BroadcastChangedIfRevealed(); return $"Speed changed to {speedValue}"; @@ -838,7 +837,7 @@ public class ModifySpeedCommand : CommandGroup if (invokerClient.InGameClient == null) return "You can only invoke this command while in-game."; - return ""; + return Info(@params, invokerClient); } [Command("advance", "Advances a quest by a single step\n Usage: advance")] @@ -912,7 +911,9 @@ public class ModifySpeedCommand : CommandGroup [Command("info", "Retrieves information about quest states.\n Usage: info")] public string Info(string[] @params, BattleClient invokerClient) { - var questManager = invokerClient.InGameClient.Game.QuestManager; + if (invokerClient?.InGameClient?.Game?.QuestManager is not {} questManager) + return "You can only invoke this command while in-game."; + var act = questManager.CurrentAct; var quest = questManager.Game.CurrentQuest; var questStep = questManager.Game.CurrentStep;