예제 #1
0
        public void Update(SpawnNpcServerMessage m)
        {
            var newEntity = new NpcEntity(m.Id, m.OwnerId, GetOrPlaceholder(m.OwnerId),
                                          _npcDatabase.GetOrPlaceholder(m.NpcArea, m.NpcId), m.Position, m.Heading);

            Register(newEntity);
        }
예제 #2
0
        internal static void Process(SpawnNpcServerMessage message)
        {
            PacketProcessor.Instance.EntityTracker.Update(message);
            DamageTracker.Instance.UpdateEntities(message);
            if (message.NpcArea == 950 && message.NpcId == 9501)
            {
                var bosses            = Database.Database.Instance.AllEntity().Select(x => PacketProcessor.Instance.EntityTracker.GetOrNull(x)).OfType <NpcEntity>().ToList();
                var vergosPhase2Part1 = bosses.FirstOrDefault(x => x.Info.HuntingZoneId == 950 && x.Info.TemplateId == 1000);
                var vergosPhase2Part2 = bosses.FirstOrDefault(x => x.Info.HuntingZoneId == 950 && x.Info.TemplateId == 2000);
                DataExporter.AutomatedExport(vergosPhase2Part1, PacketProcessor.Instance.AbnormalityStorage);
                DataExporter.AutomatedExport(vergosPhase2Part2, PacketProcessor.Instance.AbnormalityStorage);
            }
            if (message.NpcArea == 950 && message.NpcId == 9502)
            {
                var bosses       = Database.Database.Instance.AllEntity().Select(x => PacketProcessor.Instance.EntityTracker.GetOrNull(x)).OfType <NpcEntity>();
                var vergosPhase3 = bosses.FirstOrDefault(x => x.Info.HuntingZoneId == 950 && x.Info.TemplateId == 3000);
                DataExporter.AutomatedExport(vergosPhase3, PacketProcessor.Instance.AbnormalityStorage);
            }

            if ((message.NpcArea == 26 && message.NpcId == 5001) ||
                (message.NpcArea == 39 && message.NpcId == 501) ||
                (message.NpcArea == 51 && message.NpcId == 4001))
            {
                PacketProcessor.Instance.InvokeGeneralDataDisplayChanged(true, message.Id);
            }
        }
예제 #3
0
        public void UpdateEntities(SpawnNpcServerMessage message)
        {
            var entity = PacketProcessor.Instance.EntityTracker.GetOrNull(message.Id);

            if (entity is NpcEntity npcEntity && PacketProcessor.Instance.Encounter == npcEntity)
            {
                _toDelete.Add(entity);
            }
        }
예제 #4
0
        public void UpdateEntities(SpawnNpcServerMessage message)
        {
            var entity    = NetworkController.Instance.EntityTracker.GetOrNull(message.Id);
            var npcEntity = entity as NpcEntity;

            if (npcEntity != null && NetworkController.Instance.Encounter == npcEntity)
            {
                _toDelete.Add(entity);
            }
        }
예제 #5
0
 internal static void Process(SpawnNpcServerMessage message)
 {
     NetworkController.Instance.EntityTracker.Update(message);
     DamageTracker.Instance.UpdateEntities(message);
     if (message.NpcArea == 950 && message.NpcId == 9501)
     {
         var bosses            = Database.Database.Instance.AllEntity().Select(x => NetworkController.Instance.EntityTracker.GetOrNull(x)).OfType <NpcEntity>().ToList();
         var vergosPhase2Part1 = bosses.FirstOrDefault(x => x.Info.HuntingZoneId == 950 && x.Info.TemplateId == 1000);
         var vergosPhase2Part2 = bosses.FirstOrDefault(x => x.Info.HuntingZoneId == 950 && x.Info.TemplateId == 2000);
         DataExporter.AutomatedExport(vergosPhase2Part1, NetworkController.Instance.AbnormalityStorage);
         DataExporter.AutomatedExport(vergosPhase2Part2, NetworkController.Instance.AbnormalityStorage);
     }
     if (message.NpcArea == 950 && message.NpcId == 9502)
     {
         var bosses       = Database.Database.Instance.AllEntity().Select(x => NetworkController.Instance.EntityTracker.GetOrNull(x)).OfType <NpcEntity>();
         var vergosPhase3 = bosses.FirstOrDefault(x => x.Info.HuntingZoneId == 950 && x.Info.TemplateId == 3000);
         DataExporter.AutomatedExport(vergosPhase3, NetworkController.Instance.AbnormalityStorage);
     }
 }
예제 #6
0
 public NpcEntity(SpawnNpcServerMessage message)
     : base(message.Id)
 {
 }
예제 #7
0
 public void Update(SpawnNpcServerMessage message)
 {
     _dictionary[message.Id] = new Npc(message);
 }
예제 #8
0
 public Npc(SpawnNpcServerMessage message)
     : base(message.Id)
 {
 }