From cbf539f69158f1402d2bed858b45e37f94312cfd Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 11 Mar 2023 09:09:23 -0500 Subject: [PATCH] Fixes some commands. --- Source/Game/Chat/Commands/GoCommands.cs | 2 +- Source/Game/Chat/Commands/LearnCommands.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Game/Chat/Commands/GoCommands.cs b/Source/Game/Chat/Commands/GoCommands.cs index 81c253b46..44dd1da6f 100644 --- a/Source/Game/Chat/Commands/GoCommands.cs +++ b/Source/Game/Chat/Commands/GoCommands.cs @@ -388,7 +388,7 @@ namespace Game.Chat.Commands z = Math.Max(terrain.GetStaticHeight(PhasingHandler.EmptyPhaseShift, mapId, x, y, MapConst.MaxHeight), terrain.GetWaterLevel(PhasingHandler.EmptyPhaseShift, mapId, x, y)); } - return DoTeleport(handler, new Position(x, y, z.Value, o.Value), mapId); + return DoTeleport(handler, new Position(x, y, z.Value, o.GetValueOrDefault()), mapId); } //teleport at coordinates diff --git a/Source/Game/Chat/Commands/LearnCommands.cs b/Source/Game/Chat/Commands/LearnCommands.cs index bc64a6037..606976c05 100644 --- a/Source/Game/Chat/Commands/LearnCommands.cs +++ b/Source/Game/Chat/Commands/LearnCommands.cs @@ -15,7 +15,7 @@ namespace Game.Chat.Commands class LearnCommands { [Command("", CypherStrings.CommandLearnHelp, RBACPermissions.CommandLearn)] - static bool HandleLearnCommand(CommandHandler handler, uint spellId, string allRanksStr) + static bool HandleLearnCommand(CommandHandler handler, uint spellId, [OptionalArg] string allRanksStr) { Player targetPlayer = handler.GetSelectedPlayerOrSelf(); if (!targetPlayer) @@ -314,7 +314,7 @@ namespace Game.Chat.Commands } [CommandNonGroup("unlearn", CypherStrings.CommandUnlearnHelp, RBACPermissions.CommandUnlearn)] - static bool HandleUnLearnCommand(CommandHandler handler, uint spellId, string allRanksStr) + static bool HandleUnLearnCommand(CommandHandler handler, uint spellId, [OptionalArg] string allRanksStr) { Player target = handler.GetSelectedPlayer(); if (!target)