private static NonPlayerCharacter CreateNpc(ModelEnums.NpcType type, Race race, string name, Location location = null, int level = 1) { var npc = new NonPlayerCharacter() { Name = name, Type = type, Level = level, Race = race, Creature = race.Creature }; npc.SetTag(); if (location != null) { var now = DateTime.Now; var entryLocation = new EntryLocationCharacter { EntryInto = now, Arrival = now, Location = location, Character = npc }; npc.EntryLocations.Add(entryLocation); } return npc; }
private Spawn CreateSpawn(Location location, Race race, int quantity, string npcName, int level = 1) { var mob = CreateSpawnableNpc(race, npcName, level); var result = new Spawn { Quantity = quantity, Location = location, NonPlayerCharacter = mob }; return result; }
private NonPlayerCharacter CreateSpawnableNpc(Race race, string name, int level = 1) { return CreateNpc(ModelEnums.NpcType.Monster, race, name, level: level); }