public HorseInstance(HorseInfo.Breed breed, int randomId = -1, string loadName = null, string loadDescription = "", int loadSpoiled = 0, string loadCategory = "KEEPER", int loadMagicUsed = 0, int loadAutoSell = 0, int leaseTimer = 0, bool loadHidden = false, int loadOwner = 0) { RandomId = RandomID.NextRandomId(randomId); owner = loadOwner; if (loadName == null) { if (breed.Type == "camel") { name = "Wild Camel"; } else if (breed.Type == "llama") { name = "Jungle Llama"; } else if (breed.Type == "zebra") { name = "Wild Zebra"; } else { name = "Wild Horse"; } } else { name = loadName; } if (GameServer.RandomNumberGenerator.Next(0, 100) > 50) { Gender = breed.GenderTypes()[1]; } else { Gender = breed.GenderTypes()[0]; } description = loadDescription; Breed = breed; Color = breed.Colors[GameServer.RandomNumberGenerator.Next(0, breed.Colors.Length)]; BasicStats = new HorseInfo.BasicStats(this, 1000, 0, 1000, 1000, 500, 200, 1000, 0); int inteligence = (GameServer.RandomNumberGenerator.Next(breed.BaseStats.Inteligence, (breed.BaseStats.Inteligence * 2)) - breed.BaseStats.Inteligence); int personality = (GameServer.RandomNumberGenerator.Next(breed.BaseStats.Personality, (breed.BaseStats.Personality * 2)) - breed.BaseStats.Personality); int height = GameServer.RandomNumberGenerator.Next(breed.BaseStats.MinHeight, breed.BaseStats.MaxHeight); AdvancedStats = new HorseInfo.AdvancedStats(this, 0, 0, 0, 0, inteligence, 0, personality, height); Equipment = new HorseInfo.HorseEquips(); autosell = loadAutoSell; category = loadCategory; spoiled = loadSpoiled; magicUsed = loadMagicUsed; leaseTime = leaseTimer; hidden = loadHidden; Leaser = 0; }
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); } }