Exemple #1
0
        public CBeastData GetBeastData(int beastTypeId)
        {
            CBeastData result     = null;
            CBeastInfo oBeastInfo = this.m_roleAllInfo.m_oBeastInfo;

            if (oBeastInfo != null)
            {
                oBeastInfo.m_oBeastMap.TryGetValue(beastTypeId, out result);
            }
            return(result);
        }
Exemple #2
0
        /// <summary>
        /// 是否玩家已经拥有该神兽
        /// </summary>
        /// <param name="unBeastId">神兽id</param>
        /// <param name="bIncludeTemp">是否包括玩家有期限的神兽列表</param>
        /// <param name="bContainFree">是否包括周免神兽</param>
        /// <returns></returns>
        public bool IsBeastActive(int unBeastId, bool bIncludeTemp, bool bContainFree)
        {
            bool flag = this.IsBeastActive(unBeastId, bIncludeTemp);

            if (!flag && bContainFree)
            {
                CBeastInfo info = this.m_roleAllInfo.m_oBeastInfo;
                if (info != null)
                {
                    flag = this.m_roleAllInfo.m_oBeastInfo.m_oWeekBeastMap.ContainsKey(unBeastId);
                }
            }
            return(flag);
        }
Exemple #3
0
        /// <summary>
        /// 取得玩家拥有的神兽信息,是否有包括周免
        /// </summary>
        /// <param name="beastTypeId"></param>
        /// <param name="bContainFree"></param>
        /// <returns></returns>
        public CBeastData GetBeastData(int beastTypeId, bool bContainFree)
        {
            CBeastData cBeastData = this.GetBeastData(beastTypeId);

            if (bContainFree)
            {
                CBeastInfo info = this.m_roleAllInfo.m_oBeastInfo;
                if (info != null && info.m_oWeekBeastMap.ContainsKey(beastTypeId))
                {
                    CBeastData cWeekBeastData = info.m_oWeekBeastMap[beastTypeId];
                    if (cBeastData == null)
                    {
                        cBeastData = cWeekBeastData;
                    }
                }
            }
            return(cBeastData);
        }
Exemple #4
0
        /// <summary>
        /// 是否是周免神兽
        /// </summary>
        /// <param name="beastId"></param>
        /// <returns></returns>
        public bool IsFreeBeast(int beastId)
        {
            CBeastInfo info = this.m_roleAllInfo.m_oBeastInfo;

            return(info != null && info.m_oWeekBeastMap.ContainsKey(beastId) && info.m_oWeekBeastMap[beastId].m_wLevel > 0);
        }
 public CRoleAllInfo()
 {
     this.m_oRoleBasicInfo = new CRoleBasicInfo();
     this.m_oBeastInfo     = new CBeastInfo();
     this.m_oTaskListInfo  = new CTaskListInfo();
 }