public Npc(NpcSpawnRecord spawnRecord) { this.SpawnRecord = spawnRecord; this.ActionsRecord = NpcActionRecord.GetActions(SpawnRecord.Id); this.Map = MapRecord.GetMap(spawnRecord.MapId); this.m_Id = this.Map.Instance.PopNextNPEntityId(); }
public static void ReloadNpcActions(string input) { DatabaseManager.GetInstance().Reload <NpcActionRecord>(); foreach (var map in MapRecord.Maps) { foreach (var npc in map.Instance.GetEntities <Npc>()) { npc.ActionsRecord = NpcActionRecord.GetActions(npc.SpawnRecord.Id); } } logger.White("Npc reloaded!"); }