예제 #1
0
 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();
 }
예제 #2
0
        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!");
        }