private bool isReqIdComplete(List <int> mapinfo_ids)
        {
            Dictionary <int, Mem_mapclear> clearDict = Comm_UserDatas.Instance.User_mapclear;

            return(mapinfo_ids.TrueForAll(delegate(int x)
            {
                Mem_mapclear mem_mapclear = null;
                return clearDict.TryGetValue(x, ref mem_mapclear) && mem_mapclear.State == MapClearState.Cleard;
            }));
        }
Ejemplo n.º 2
0
        private bool isReqIdComplete(List <int> mapinfo_ids)
        {
            Dictionary <int, Mem_mapclear> clearDict = Comm_UserDatas.Instance.User_mapclear;

            return(mapinfo_ids.TrueForAll(delegate(int x)
            {
                Mem_mapclear value = null;
                return clearDict.TryGetValue(x, out value) && ((value.State == MapClearState.Cleard) ? true : false);
            }));
        }
        public User_MapinfoFmt GetUser_MapinfoData()
        {
            if (!this.IsOpenMapSys())
            {
                return(null);
            }
            Dictionary <int, Mem_mapclear> user_mapclear = Comm_UserDatas.Instance.User_mapclear;
            Mem_mapclear mem_mapclear  = null;
            Mem_mapclear mem_mapclear2 = null;
            int          num           = Mst_mapinfo.ConvertMapInfoId(this.Maparea_id, 1);

            if (user_mapclear.TryGetValue(num, ref mem_mapclear2) && mem_mapclear2.State == MapClearState.InvationClose)
            {
                return(null);
            }
            bool cleared = false;

            if (user_mapclear.TryGetValue(this.Id, ref mem_mapclear))
            {
                if (mem_mapclear.State == MapClearState.InvationClose)
                {
                    return(null);
                }
                cleared = (mem_mapclear.State == MapClearState.Cleard);
            }
            Mem_mapclear mem_mapclear3 = null;
            bool         flag          = false;

            if (this.No != 1)
            {
                int num2 = Mst_mapinfo.ConvertMapInfoId(this.Maparea_id, this.No - 1);
                user_mapclear.TryGetValue(num2, ref mem_mapclear3);
                if (mem_mapclear3 != null && mem_mapclear3.State != MapClearState.Cleard)
                {
                    return(null);
                }
                if (mem_mapclear != null && mem_mapclear.State == MapClearState.InvationOpen)
                {
                    flag = true;
                }
            }
            if (this.Required_ids.get_Count() != 0)
            {
                using (List <int> .Enumerator enumerator = this.Required_ids.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        int          current       = enumerator.get_Current();
                        Mem_mapclear mem_mapclear4 = null;
                        if (!user_mapclear.TryGetValue(current, ref mem_mapclear4))
                        {
                            User_MapinfoFmt result = null;
                            return(result);
                        }
                        if (!mem_mapclear4.Cleared)
                        {
                            User_MapinfoFmt result = null;
                            return(result);
                        }
                        if (flag && mem_mapclear4.State != MapClearState.Cleard)
                        {
                            User_MapinfoFmt result = null;
                            return(result);
                        }
                    }
                }
            }
            return(new User_MapinfoFmt
            {
                Id = this.Id,
                Cleared = cleared,
                IsGo = true
            });
        }
Ejemplo n.º 4
0
        public User_MapinfoFmt GetUser_MapinfoData()
        {
            if (!IsOpenMapSys())
            {
                return(null);
            }
            Dictionary <int, Mem_mapclear> user_mapclear = Comm_UserDatas.Instance.User_mapclear;
            Mem_mapclear value  = null;
            Mem_mapclear value2 = null;
            int          key    = ConvertMapInfoId(Maparea_id, 1);

            if (user_mapclear.TryGetValue(key, out value2) && value2.State == MapClearState.InvationClose)
            {
                return(null);
            }
            bool cleared = false;

            if (user_mapclear.TryGetValue(Id, out value))
            {
                if (value.State == MapClearState.InvationClose)
                {
                    return(null);
                }
                cleared = ((value.State == MapClearState.Cleard) ? true : false);
            }
            Mem_mapclear value3 = null;
            bool         flag   = false;

            if (No != 1)
            {
                int key2 = ConvertMapInfoId(Maparea_id, No - 1);
                user_mapclear.TryGetValue(key2, out value3);
                if (value3 != null && value3.State != 0)
                {
                    return(null);
                }
                if (value != null && value.State == MapClearState.InvationOpen)
                {
                    flag = true;
                }
            }
            if (Required_ids.Count != 0)
            {
                foreach (int required_id in Required_ids)
                {
                    Mem_mapclear value4 = null;
                    if (!user_mapclear.TryGetValue(required_id, out value4))
                    {
                        return(null);
                    }
                    if (!value4.Cleared)
                    {
                        return(null);
                    }
                    if (flag && value4.State != 0)
                    {
                        return(null);
                    }
                }
            }
            User_MapinfoFmt user_MapinfoFmt = new User_MapinfoFmt();

            user_MapinfoFmt.Id      = Id;
            user_MapinfoFmt.Cleared = cleared;
            user_MapinfoFmt.IsGo    = true;
            return(user_MapinfoFmt);
        }