Пример #1
0
 public override void Process()
 {
     for (int i = 0; i < count; i++)
     {
         S_SPAWN_NPC spawnNpc = new S_SPAWN_NPC(this.Connection.player, huntingZone, templateid, count, val4);
         spawnNpc.Send(this.Connection);
     }
 }
Пример #2
0
 private void AddOrUpdateNpc(S_SPAWN_NPC spawn, Monster npcData)
 {
     Dispatcher.InvokeAsync(() =>
     {
         var visibility = npcData.IsBoss && TccUtils.IsFieldBoss(npcData.ZoneId, npcData.TemplateId);
         var boss       = GetOrAddNpc(spawn.EntityId, npcData.ZoneId, npcData.TemplateId, npcData.IsBoss, visibility);
         SetHP(boss, npcData.MaxHP, npcData.MaxHP, HpChangeSource.CreatureChangeHp);
         SetEnrageTime(spawn.EntityId, spawn.RemainingEnrageTime);
         if (boss.Visible == visibility)
         {
             return;
         }
         boss.Visible = visibility;
         NpcListChanged?.Invoke();
     });
 }
Пример #3
0
 private void OnSpawnNpc(S_SPAWN_NPC p)
 {
     if (p.Villager)
     {
         return;
     }
     CheckHarrowholdPhase(p.HuntingZoneId, p.TemplateId);
     if (!Game.DB.MonsterDatabase.TryGetMonster(p.TemplateId, p.HuntingZoneId, out var m))
     {
         return;
     }
     if (App.Settings.NpcWindowSettings.HideAdds && !m.IsBoss)
     {
         return;
     }
     AddOrUpdateNpc(p, m);
 }
Пример #4
0
 public static void HandleSpawnNpc(S_SPAWN_NPC p)
 {
     EntitiesManager.CheckHarrowholdMode(p.HuntingZoneId, p.TemplateId);
     EntitiesManager.SpawnNPC(p.HuntingZoneId, p.TemplateId, p.EntityId, System.Windows.Visibility.Collapsed);
 }
        public static void UpdateEntityTracker()
        {
            var entityTrackerProcessing = new Dictionary <Type, Delegate>
            {
                { typeof(Tera.Game.Messages.S_BOSS_GAGE_INFO), new Action <Tera.Game.Messages.S_BOSS_GAGE_INFO>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.S_USER_LOCATION), new Action <Tera.Game.Messages.S_USER_LOCATION>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.SNpcLocation), new Action <Tera.Game.Messages.SNpcLocation>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.S_CREATURE_ROTATE), new Action <Tera.Game.Messages.S_CREATURE_ROTATE>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.S_INSTANT_MOVE), new Action <Tera.Game.Messages.S_INSTANT_MOVE>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.S_INSTANT_DASH), new Action <Tera.Game.Messages.S_INSTANT_DASH>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.S_ACTION_END), new Action <Tera.Game.Messages.S_ACTION_END>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.S_ACTION_STAGE), new Action <Tera.Game.Messages.S_ACTION_STAGE>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.S_CHANGE_DESTPOS_PROJECTILE), new Action <Tera.Game.Messages.S_CHANGE_DESTPOS_PROJECTILE>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.C_PLAYER_LOCATION), new Action <Tera.Game.Messages.C_PLAYER_LOCATION>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.S_MOUNT_VEHICLE_EX), new Action <Tera.Game.Messages.S_MOUNT_VEHICLE_EX>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.StartUserProjectileServerMessage), new Action <Tera.Game.Messages.StartUserProjectileServerMessage>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.SpawnProjectileServerMessage), new Action <Tera.Game.Messages.SpawnProjectileServerMessage>((x) => NetworkController.Instance.EntityTracker.Update(x)) },
                { typeof(Tera.Game.Messages.SpawnNpcServerMessage), new Action <Tera.Game.Messages.SpawnNpcServerMessage>((x) => S_SPAWN_NPC.Process(x)) },
            };

            entityTrackerProcessing.ToList().ForEach(x => MainProcessor[x.Key] = x.Value);
        }
Пример #6
0
 public static void HandleSpawnNpc(S_SPAWN_NPC p)
 {
     EntityManager.CheckHarrowholdMode(p.HuntingZoneId, p.TemplateId);
     EntityManager.SpawnNPC(p.HuntingZoneId, p.TemplateId, p.EntityId, false, p.Villager);
 }