public static void GenerateHorses() { Logger.InfoPrint("Generating horses."); while (wildHorses.Count < 40) { HorseInfo.Breed horseBreed = HorseInfo.Breeds[GameServer.RandomNumberGenerator.Next(0, HorseInfo.Breeds.Length)]; if (horseBreed.Swf == "") { continue; } if (horseBreed.SpawnInArea == "none") // no unipegs >_> { continue; } HorseInstance horseInst = new HorseInstance(horseBreed); WildHorse wildHorse = new WildHorse(horseInst); Logger.DebugPrint("Created " + horseBreed.Name + " at X:" + wildHorse.X + ", Y:" + wildHorse.Y); } }
public static void Despawn(WildHorse horse) { Database.RemoveWildHorse(horse.Instance.RandomId); wildHorses.Remove(horse); }