Example #1
0
 public CLicenseItem(uint cfgId)
 {
     this.m_licenseId      = cfgId;
     this.m_resLicenseInfo = GameDataMgr.licenseDatabin.GetDataByKey(cfgId);
     if (this.m_resLicenseInfo != null)
     {
         this.m_getSecond = 0;
     }
 }
Example #2
0
 public void InitLicenseCfgInfo()
 {
     this.m_licenseList.Clear();
     Dictionary <long, object> .Enumerator enumerator = GameDataMgr.licenseDatabin.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <long, object> current = enumerator.get_Current();
         ResLicenseInfo resLicenseInfo       = (ResLicenseInfo)current.get_Value();
         CLicenseItem   cLicenseItem         = new CLicenseItem(resLicenseInfo.dwLicenseID);
         this.m_licenseList.Add(cLicenseItem);
     }
 }
Example #3
0
        public bool CheckGetLicense(uint cfgId)
        {
            ResLicenseInfo dataByKey = GameDataMgr.licenseDatabin.GetDataByKey(cfgId);
            bool           flag      = false;

            if (dataByKey != null)
            {
                for (int i = 0; i < dataByKey.UnlockArray.Length; i++)
                {
                    if (dataByKey.UnlockArray[i] > 0u)
                    {
                        if (dataByKey.bIsAnd > 0)
                        {
                            flag &= Singleton <CFunctionUnlockSys> .GetInstance().CheckUnlock(dataByKey.UnlockArray[i]);
                        }
                        else
                        {
                            flag |= Singleton <CFunctionUnlockSys> .GetInstance().CheckUnlock(dataByKey.UnlockArray[i]);
                        }
                    }
                }
            }
            return(flag);
        }