少年修仙传客户端代码仓库
client_linchunjie
2018-12-24 cba0f34cacddb395271f04d29ac7263f05ab39ec
System/GatheringSoul/GatheringSoulModel.cs
@@ -20,6 +20,7 @@
        public Dictionary<int, List<int>> gatherSoulPropertys { get; private set; }
        public List<int> packIndexs { get; private set; }
        public List<int> topBestSoulIndexs = new List<int>();
        public List<GatherSoulItem> resolveItems { get; private set; }
        public int holeCount
@@ -46,6 +47,11 @@
        public int coreHole { get; private set; }
        public int autoResolveRemainCount { get; private set; }
        public bool serverInited { get; private set; }
        public event Action<PackType, int> prepareResolveEvent;
        public event Action<int> gatherSoulHoleRefresh;
        public event Action gatherSoulHolesRefresh;
@@ -88,12 +94,15 @@
        public void OnBeforePlayerDataInitialize()
        {
            serverInited = false;
            packIndexs.Clear();
            topBestSoulIndexs.Clear();
            gatherSoulHoleDict.Clear();
        }
        public void OnPlayerLoginOk()
        {
            serverInited = true;
            CheckAutoResolve();
            UpdateRedpoint();
        }
@@ -234,6 +243,7 @@
        public void RefreshGatherSoulPack()
        {
            packIndexs.Clear();
            topBestSoulIndexs.Clear();
            List<int> emptyHoles;
            if (ExistEmptyHole(out emptyHoles))
            {
@@ -359,6 +369,7 @@
            {
                packIndexs.RemoveAt(removeList[i]);
            }
            topBestSoulIndexs.AddRange(packIndexs);
        }
        public bool ExistEmptyHole(out List<int> list)
@@ -784,6 +795,11 @@
            {
                return;
            }
            if (prepareResolveEvent != null)
            {
                prepareResolveEvent(item.placeType == 0 ? PackType.rptGatherSoul : PackType.rptInterimPack,
                    item.index);
            }
            SendResolvePack(new ushort[1] { (ushort)item.index }, false);
        }