Exemple #1
0
 public InGameAidData(int id, InGameAidType startType, List <int> startValue, InGameAidType showType, List <int> showValue, InGameAidType complateType, List <int> complateValue, int contentID)
 {
     this.ID            = id;
     this.StartType     = startType;
     this.StartValue    = startValue;
     this.ShowType      = showType;
     this.ShowValue     = showValue;
     this.ComplateType  = complateType;
     this.ComplateValue = complateValue;
     this.CountentID    = contentID;
 }
Exemple #2
0
    public static void CheckValue(InGameAidType type, int value)
    {
        if (PeGameMgr.sceneMode != PeGameMgr.ESceneMode.Story)
        {
            return;
        }

        //先检测完成,如果完成满足,就不用检测开始地图、检测显示地图、当前检测显示列表中移除
        if (AllCompleteTypeMap.ContainsKey(type))
        {
            List <int> checkCompIDs = AllCompleteTypeMap[type];
            if (null == checkCompIDs || checkCompIDs.Count <= 0)
            {
                AllCompleteTypeMap.Remove(type);
            }
            else
            {
                List <int> checkCompValueIds = new List <int>();
                for (int i = 0; i < checkCompIDs.Count; i++)
                {
                    int id = checkCompIDs[i];
                    checkCompValueIds = AllData[id].ComplateValue;
                    //lz-2016.08.22 如果只有一个值是-1,表示任意id都可以
                    if ((checkCompValueIds.Count == 1 && checkCompValueIds[0] == -1) || checkCompValueIds.Contains(value))
                    {
                        AddCompleteID(id);
                        checkCompIDs.RemoveAt(i);
                        i--;
                        if (AllStartTypeMap.ContainsKey(type) && AllStartTypeMap[type].Contains(id))
                        {
                            AllStartTypeMap[type].Remove(id);
                        }
                        if (AllShowTypeMap.ContainsKey(type) && AllShowTypeMap[type].Contains(id))
                        {
                            AllShowTypeMap[type].Remove(id);
                        }
                    }
                }
            }
        }

        //检测开始,如果开始满足加入到显示检测列表,并从全部的开始检测地图中移除
        if (AllStartTypeMap.ContainsKey(type))
        {
            List <int> checkStartIDs = AllStartTypeMap[type];
            if (null == checkStartIDs || checkStartIDs.Count <= 0)
            {
                AllStartTypeMap.Remove(type);
            }
            else
            {
                List <int> checkStartValuses = new List <int>();
                for (int i = 0; i < checkStartIDs.Count; i++)
                {
                    int id = checkStartIDs[i];
                    checkStartValuses = AllData[id].StartValue;
                    //lz-2016.08.22 如果只有一个值是-1,表示任意id都可以
                    if ((checkStartValuses.Count == 1 && checkStartValuses[0] == -1) || checkStartValuses.Contains(value))
                    {
                        AddCurCheckShowList(id);
                        checkStartIDs.RemoveAt(i);
                        i--;
                    }
                }
            }
        }

        //检测显示,如果显示满足,就添加到显示队列,并从检测显示列表和全部的检测显示地图中移除
        if (AllShowTypeMap.ContainsKey(type))
        {
            List <int> checkShowIDs = AllShowTypeMap[type];
            if (null == checkShowIDs || checkShowIDs.Count <= 0)
            {
                AllShowTypeMap.Remove(type);
            }
            else
            {
                List <int> checkShowValues = new List <int>();
                for (int i = 0; i < checkShowIDs.Count; i++)
                {
                    int id = checkShowIDs[i];
                    checkShowValues = AllData[id].ShowValue;
                    //lz-2016.08.22 如果只有一个值是-1,表示任意id都可以
                    if ((checkShowValues.Count == 1 && checkShowValues[0] == -1 || checkShowValues.Contains(value)))
                    {
                        if (CurCheckShowIDs.Contains(id))
                        {
                            AddShowID(id);
                            checkShowIDs.RemoveAt(i);
                            i--;
                        }
                    }
                }
            }
        }
    }