Exemple #1
0
        public void SetNewCluster(string name, string mapName, string clusterOwner)
        {
            if (!TryChangeCluster(name, mapName, clusterOwner))
            {
                return;
            }

            if (string.IsNullOrEmpty(mapName))
            {
                mapName = name;
            }

            CurrentCluster = GameData.World.GetClusterByName(mapName);
            ClusterOwner   = clusterOwner;

            EntityManager.RemoveAll();
            Console.WriteLine($"[StateHandler] Changed cluster to: '{CurrentCluster.Name}' ArcheType: '{CurrentCluster.ClusterType.ArcheType.Name}'");
            OnChangeCluster?.Invoke(CurrentCluster);
        }
        public void SetNewCluster(MapType mapType, Guid?mapGuid, string clusterIndex, string mainClusterIndex)
        {
            CurrentCluster = WorldData.GetClusterInfoByIndex(clusterIndex, mainClusterIndex, mapType, mapGuid);

            if (!TryChangeCluster(CurrentCluster.Index, CurrentCluster.UniqueName))
            {
                return;
            }

            if (_mainWindowViewModel.IsDamageMeterResetByMapChangeActive)
            {
                CombatController.ResetDamageMeter();
            }

            Debug.Print($"[StateHandler] Changed cluster to: Index: '{CurrentCluster.Index}' UniqueName: '{CurrentCluster.UniqueName}' ClusterType: '{CurrentCluster.ClusterType}' MapType: '{CurrentCluster.MapType}'");
            ConsoleManager.WriteLineForMessage(MethodBase.GetCurrentMethod().DeclaringType,
                                               $"[StateHandler] Changed cluster to: Index: '{CurrentCluster.Index}' UniqueName: '{CurrentCluster.UniqueName}' ClusterType: '{CurrentCluster.ClusterType}' MapType: '{CurrentCluster.MapType}'",
                                               ConsoleManager.EventMapChangeColor);

            OnChangeCluster?.Invoke(CurrentCluster);
        }