コード例 #1
0
ファイル: Rifts.cs プロジェクト: tmasiff/FindersKeepersD3
        public void CloseRift()
        {
            CurrentRift  = null;
            RiftIsActive = false;
            StopTimer();

            try
            {
                foreach (var x in GameManager.Instance.Accounts)
                {
                    foreach (int Key in RiftLevels)
                    {
                        if (x.GameData().AreaLevels.ContainsKey(Key))
                        {
                            x.GameData().AreaLevels.Remove(Key);
                        }
                    }

                    //  x.LevelAreaContainer. Check if Area == Rift.Level
                }
            }

            catch (Exception e)
            {
                DebugWriter.Write(e);
            }
        }
コード例 #2
0
ファイル: Rifts.cs プロジェクト: tmasiff/FindersKeepersD3
        //  public static List<RiftStats> DisposedRifts = new List<RiftStats>();
        // public static RiftType RiftType;

        public void StartRift(Enigma.D3.Quest Quest)
        {
            RiftType     = (RiftType)Quest.x000_QuestSnoId;
            RiftIsActive = true;

            CurrentRift = new Rift.RiftStats
            {
                StartTick  = Quest.x004_CreationTick,
                Started    = DateTime.Now.AddSeconds(-((GameManager.Instance.GameTicks - Quest.x004_CreationTick) / 60)),
                RiftType   = this.RiftType,
                RiftLevel  = -1,
                Legendary  = new List <int>(),
                Levels     = 1,
                Boss       = -1,
                Difficulty = (Difficulty)GameManagerAccountHelper.Current.DiabloIII.ObjectManager.Storage.x004,
            };

            if (GameManagerAccountHelper.Current.DiabloIII.ObjectManager.Storage._x05C != -1) // GR
            {
                CurrentRift.RiftLevel  = (GameManagerAccountHelper.Current.DiabloIII.ObjectManager.Storage._x05C + 1);
                CurrentRift.Difficulty = Difficulty.GreaterRift;

                TownHelper.UpdateStash();

                //RiftType = RiftType.GreaterRift;
            }

            Account = GameManagerAccountHelper.Current;
            SetTimer();
        }