From 084cf658d27d0a4246ffcd419825b80d61c08f3b Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Mon, 28 Jun 2021 18:11:08 +1200 Subject: [PATCH] add %GIVE HORSE --- .../HorseIsleServer/Game/Chat/Command.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Horse Isle Server/HorseIsleServer/Game/Chat/Command.cs b/Horse Isle Server/HorseIsleServer/Game/Chat/Command.cs index 1ffc240..c31fa80 100755 --- a/Horse Isle Server/HorseIsleServer/Game/Chat/Command.cs +++ b/Horse Isle Server/HorseIsleServer/Game/Chat/Command.cs @@ -59,6 +59,30 @@ namespace HISP.Game.Chat return false; } } + if (args[0].ToUpper() == "HORSE") + { + int horseId = 0; + try + { + horseId = int.Parse(args[1]); + HorseInstance horse = new HorseInstance(HorseInfo.GetBreedById(horseId)); + + if (args.Length >= 3) + { + findNamePartial(args[2]).HorseInventory.AddHorse(horse); + } + else + { + user.HorseInventory.AddHorse(horse); + } + + + } + catch (Exception) + { + return false; + } + } else if (args[0].ToUpper() == "MONEY") { int money = 0;