public static void SpawnMonsters(DelayedAction action) { ushort[] monsterIds = Array.ConvertAll(action.Record.Value1.Split(','), x => ushort.Parse(x)); MonsterRecord[] templates = new MonsterRecord[monsterIds.Length]; for (int i = 0; i < monsterIds.Length; i++) { templates[i] = MonsterRecord.GetMonster(monsterIds[i]); } MapRecord targetedMap; if (action.Record.Value2 != string.Empty) { targetedMap = MapRecord.GetMap(int.Parse(action.Record.Value2)); } else { targetedMap = MapRecord.RandomOutdoorMap(); } if (!MonsterSpawnManager.Instance.GroupExist(targetedMap.Instance, templates)) { MonsterSpawnManager.Instance.AddFixedMonsterGroup(targetedMap.Instance, templates, false); } }