Example #1
0
        public static CampInfo InitInfo(int campID)
        {
            CampInfo info  = new CampInfo();
            var      _meta = CampModule.GetCampDataByKey(campID);

            if (_meta != null)
            {
                info.CampID   = _meta.CampID;
                info.campName = MultiLanguage.Instance.GetTextValue(_meta.CampName);
                info.campDesc = MultiLanguage.Instance.GetTextValue(_meta.CampDesc);

                info.campIconPath    = _meta.CampIcon;
                info.campBGSmallPath = _meta.CampBGSmall;

                info.hardLevel             = _meta.HardLevel;
                info.defualtHardLevelValue = _meta.DefaultHardLevel;

                info.creedInfo     = CampCreedInfo.InitInfo(_meta.CreedID);
                info.attributeInfo = CampModule.GetCampAttribueInfoList(_meta.CampID);

                ///Init DefaultLeader
                info.campLeaderList = CampModule.GetCampDefaultLeaderList(_meta.CampID);

                return(info);
            }
            DebugPlus.LogError("[CampInfo] : Init Fail! campID=" + campID);
            return(null);
        }
Example #2
0
        public List <BaseDataModel> GetCampLeaderSelectModelList(int campID)
        {
            List <BaseDataModel> result = new List <BaseDataModel>();
            var list = CampModule.GetCampLeaderSelectPresetList(campID);

            for (int i = 0; i < gamePrepareData.currentLeaderInfoList.Count; i++)
            {
                ///Remove AlreadySelect
                if (gamePrepareData.currentLeaderInfoList[i].forceSelcet)
                {
                    continue;
                }
                for (int j = 0; j < list.Count; j++)
                {
                    if (list[j].leaderID == gamePrepareData.currentLeaderInfoList[i].leaderID)
                    {
                        list.RemoveAt(j);
                    }
                }
            }

            for (int i = 0; i < list.Count; i++)
            {
                LeaderDataModel model = new LeaderDataModel();
                if (model.CreateLeaderModel(list[i].leaderID))
                {
                    result.Add(model);
                }
            }
            return(result);
        }
Example #3
0
 public bool Create(int campID)
 {
     if (CampModule.GetCampDataByKey(campID) == null)
     {
         return(false);
     }
     _id = campID;
     return(true);
 }
Example #4
0
        public static CampCreedInfo InitInfo(int creedID)
        {
            CampCreedInfo info = new CampCreedInfo();
            var           meta = CampModule.GetCampCreedDataByKey(creedID);

            if (meta != null)
            {
                info.creedID       = creedID;
                info.creedName     = MultiLanguage.Instance.GetTextValue(meta.CreedName);
                info.creedDesc     = MultiLanguage.Instance.GetTextValue(meta.CreedDesc);
                info.creedIconPath = meta.CreedIcon;
                return(info);
            }
            DebugPlus.LogError("[CampCreedInfo] : Init Fail! creedID=" + creedID);
            return(null);
        }
Example #5
0
        public static CampAttributeInfo InitInfo(int attributeID)
        {
            CampAttributeInfo info = new CampAttributeInfo();
            var meta = CampModule.GetCampAttributeDataByKey(attributeID);

            if (meta != null)
            {
                info.attributeID   = meta.AttributeID;
                info.attributeName = MultiLanguage.Instance.GetTextValue(meta.Name);
                info.attributeDesc = MultiLanguage.Instance.GetTextValue(meta.Desc);
                info.iconPath      = meta.Icon;
                return(info);
            }
            DebugPlus.LogError("[CampAttributeInfo] : Init Fail!  attributeID=" + attributeID);
            return(null);
        }
Example #6
0
        public bool DataCheck()
        {
            bool result = true;

            foreach (var creedData in leaderCreedDataDic)
            {
                if (CampModule.GetCampCreedDataByKey(creedData.Key) == null)
                {
                    DebugPlus.LogError("[LeaderCreedData] : Can not Find CampCreedID , LeaderCreedID=" + creedData.Key);
                    result = false;
                    continue;
                }
            }

            return(result);
        }
Example #7
0
 private void InitCampPrepareData()
 {
     campPrepareInfoList = CampModule.GetAllCampInfo();
 }
Example #8
0
 /// <summary>
 /// SelectLeaderInfo
 /// </summary>
 /// <param name="selectCampID"></param>
 public void RefreshSelectLeaderInfo(int selectCampID)
 {
     currentLeaderInfoList.Clear();
     currentLeaderInfoList = CampModule.GetCampDefaultLeaderList(selectCampID);
 }