public void SpawnInitialZombies() { for (int i = 0; i <= ZombieEvent.CSOptions.MaxZombiesQuadrant1; i++) { var zombie = new ZombieZEvent(); zombie.MoveToWorld(GetValidLocation(_MainSpawnRectangle[0]), Map.ZombieLand); zombie.Home = zombie.Location; _ZombiesLoc1.Add(zombie); zombie.ZombieSerial = Uid; } for (int i = 0; i <= ZombieEvent.CSOptions.MaxZombiesQuadrant2; i++) { var zombie = new ZombieZEvent(); zombie.MoveToWorld(GetValidLocation(_MainSpawnRectangle[1]), Map.ZombieLand); zombie.Home = zombie.Location; _ZombiesLoc2.Add(zombie); zombie.ZombieSerial = Uid; } for (int i = 0; i <= ZombieEvent.CSOptions.MaxZombiesQuadrant3; i++) { var zombie = new ZombieZEvent(); zombie.MoveToWorld(GetValidLocation(_MainSpawnRectangle[2]), Map.ZombieLand); zombie.Home = zombie.Location; _ZombiesLoc3.Add(zombie); zombie.ZombieSerial = Uid; } for (int i = 0; i <= ZombieEvent.CSOptions.MaxZombiesQuadrant4; i++) { var zombie = new ZombieZEvent(); zombie.MoveToWorld(GetValidLocation(_MainSpawnRectangle[3]), Map.ZombieLand); zombie.Home = zombie.Location; _ZombiesLoc4.Add(zombie); zombie.ZombieSerial = Uid; } }
public void SpawnZombies() { //We want 2400 zombies in area 1 //int count = MainSpawnRectangle[0].GetMobiles(Map.ZombieLand).Count(x => x is ZombieZEvent); for (int i = _ZombiesLoc1.Count; i <= ZombieEvent.CSOptions.MaxZombiesQuadrant1; i++) { var zombie = new ZombieZEvent(); zombie.MoveToWorld(GetValidLocation(_MainSpawnRectangle[0]), Map.ZombieLand); zombie.Home = zombie.Location; _ZombiesLoc1.Add(zombie); zombie.ZombieSerial = Uid; } //We want 800 zombies in area 2 //count = MainSpawnRectangle[1].GetMobiles(Map.ZombieLand).Count(x => x is ZombieZEvent); for (int i = _ZombiesLoc2.Count; i <= ZombieEvent.CSOptions.MaxZombiesQuadrant2; i++) { var zombie = new ZombieZEvent(); zombie.MoveToWorld(GetValidLocation(_MainSpawnRectangle[1]), Map.ZombieLand); zombie.Home = zombie.Location; _ZombiesLoc2.Add(zombie); zombie.ZombieSerial = Uid; } //We want 800 zombies in area 3 //count = MainSpawnRectangle[2].GetMobiles(Map.ZombieLand).Count(x => x is ZombieZEvent); for (int i = _ZombiesLoc3.Count; i <= ZombieEvent.CSOptions.MaxZombiesQuadrant3; i++) { var zombie = new ZombieZEvent(); zombie.MoveToWorld(GetValidLocation(_MainSpawnRectangle[2]), Map.ZombieLand); zombie.Home = zombie.Location; _ZombiesLoc3.Add(zombie); zombie.ZombieSerial = Uid; } //We want 400 zombies in area 4 //count = MainSpawnRectangle[3].GetMobiles(Map.ZombieLand).Count(x => x is ZombieZEvent); for (int i = _ZombiesLoc4.Count; i <= ZombieEvent.CSOptions.MaxZombiesQuadrant4; i++) { var zombie = new ZombieZEvent(); zombie.MoveToWorld(GetValidLocation(_MainSpawnRectangle[3]), Map.ZombieLand); zombie.Home = zombie.Location; _ZombiesLoc4.Add(zombie); zombie.ZombieSerial = Uid; } }