示例#1
0
 public WeihuaGames.ClientClass.QueryDiner GetQueryDiner(int qualityType, int dinerID)
 {
     WeihuaGames.ClientClass.DinerPackage dinerPackageByQualityType = this.GetDinerPackageByQualityType(qualityType);
     if (dinerPackageByQualityType == null)
     {
         return(null);
     }
     return(dinerPackageByQualityType.GetQueryDinerById(dinerID));
 }
示例#2
0
 public void ShallowCopy(WeihuaGames.ClientClass.DinerPackage package)
 {
     if (package != null)
     {
         this.qualityType = package.qualityType;
         this.normalRefreshAmount = package.normalRefreshAmount;
         this.specialRefreshAmonut = package.specialRefreshAmonut;
         this.nextRefreshTime = package.nextRefreshTime;
         this.lastRefreshTime = package.lastRefreshTime;
         this.refreshCountResetTime = package.refreshCountResetTime;
         this.dic_queryDiners.Clear();
         this.queryDiners.Clear();
         foreach (WeihuaGames.ClientClass.QueryDiner diner in package.queryDiners)
         {
             WeihuaGames.ClientClass.QueryDiner item = new WeihuaGames.ClientClass.QueryDiner();
             item.ShallowCopy(diner);
             this.queryDiners.Add(item);
             this.dic_queryDiners.Add(item.DinerId, item);
         }
     }
 }
示例#3
0
 public void SetDinerPackage(List <WeihuaGames.ClientClass.DinerPackage> packages)
 {
     if (packages != null)
     {
         if (this.dinerPackages != null)
         {
             this.dinerPackages.Clear();
         }
         else
         {
             this.dinerPackages = new List <WeihuaGames.ClientClass.DinerPackage>();
         }
         this.dic_packages.Clear();
         foreach (WeihuaGames.ClientClass.DinerPackage package in packages)
         {
             WeihuaGames.ClientClass.DinerPackage item = new WeihuaGames.ClientClass.DinerPackage();
             item.ShallowCopy(package);
             this.dinerPackages.Add(item);
             this.dic_packages.Add(item.QualityType, item);
         }
     }
 }