Exemplo n.º 1
0
        private void AreaChanged(AreaInstance area)
        {
            try
            {
                entityCollectSettingsContainer.Break = true;
                var dataLocalPlayer = gameController.Game.IngameState.Data.LocalPlayer;
                if (player == null)
                {
                    if (dataLocalPlayer.Path.StartsWith("Meta"))
                    {
                        player         = dataLocalPlayer;
                        player.IsValid = true;
                        PlayerUpdate?.Invoke(this, player);
                    }
                }
                else
                {
                    if (player.Address != dataLocalPlayer.Address)
                    {
                        if (dataLocalPlayer.Path.StartsWith("Meta"))
                        {
                            player         = dataLocalPlayer;
                            player.IsValid = true;
                            PlayerUpdate?.Invoke(this, player);
                        }
                    }
                }

                entityCache.Clear();
                OnlyValidEntities.Clear();
                NotOnlyValidEntities.Clear();
                foreach (var e in ValidEntitiesByType)
                {
                    e.Value.Clear();
                }
                //  foreach (var e in NotValidEntitiesByType) e.Value.Clear();
            }
            catch (Exception e)
            {
                DebugWindow.LogError($"{nameof(EntityListWrapper)} -> {e}");
            }
        }
Exemplo n.º 2
0
 public virtual void AreaChange(AreaInstance area)
 {
 }