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)); }
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); } } }
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); } } }