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); }
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); } }
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); } }
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); } }
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); } }
public NpcEntity(SpawnNpcServerMessage message) : base(message.Id) { }
public void Update(SpawnNpcServerMessage message) { _dictionary[message.Id] = new Npc(message); }
public Npc(SpawnNpcServerMessage message) : base(message.Id) { }