public static void EndFightCommand(string value, WorldClient client) { var map = int.Parse(value); var record = MapRecord.GetMap(map); var endFight = new EndFightActionRecord(EndFightActionRecord.EndFightActions.DynamicPop(x => x.Id), client.Character.Map.Id, map, record.RandomWalkableCell()); endFight.AddElement(); client.Character.Reply("EndFightAction has been added"); }
public static void EndFightCommand(string value, WorldClient client) { var split = value.Split(' '); int map = int.Parse(split[0]); MapRecord record = MapRecord.GetMap(map); ushort randomWalkableCell = split.Length > 1 ? ushort.Parse(split[1]) : record.RandomWalkableCell(); EndFightActionRecord endFight = new EndFightActionRecord(EndFightActionRecord.EndFightActions.DynamicPop(x => x.Id), client.Character.Map.Id, map, randomWalkableCell); endFight.AddInstantElement(); client.Character.Reply("EndFightAction has been added"); }