public static Npc SpawnNpc(int npcId, LocationHolder location, int respawnDelay) { NpcHolder npcHolder = NpcData.GetNpcHolder(npcId); SpawnHolder spawn = new SpawnHolder(location, respawnDelay); Npc npc = null; switch (npcHolder.GetNpcType()) { case NpcType.NPC: npc = new Npc(npcHolder, spawn); break; case NpcType.MONSTER: npc = new Monster(npcHolder, spawn); break; } return(npc); }