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)