Ejemplo n.º 1
0
 public void OnGetActivityShopDataEvent(MS2C_GetActivityShopData data)
 {
     if (data == null)
     {
         return;
     }
     if (this.ActivityShop == null)
     {
         global::Debug.LogError(new object[]
         {
             "Data error!"
         });
         return;
     }
     if (this.ActivityShop.Base.ID != data.ActivityID)
     {
         global::Debug.LogError(new object[]
         {
             "Data error!"
         });
         return;
     }
     this.ASData = data;
     this.mActivityShopGrid.ClearData();
     this.mActivityShopGrid.repositionNow = true;
     int num = Globals.Instance.Player.Data.Gender + 1;
     int i = 0;
     while (i < data.Data.Count)
     {
         ActivityShopItem activityShopItem = data.Data[i];
         if (activityShopItem.Type != 12)
         {
             goto IL_DD;
         }
         FashionInfo info = Globals.Instance.AttDB.FashionDict.GetInfo(activityShopItem.Value1);
         if (info != null && info.Gender == num)
         {
             goto IL_DD;
         }
         IL_F4:
         i++;
         continue;
         IL_DD:
         this.mActivityShopGrid.AddData(new ActivityShopDataEx(this.ActivityShop, activityShopItem));
         goto IL_F4;
     }
 }
Ejemplo n.º 2
0
 public virtual void Refresh(ActivityShopData activityShop)
 {
     if (activityShop == null)
     {
         return;
     }
     if (this.ActivityShop != null && this.ActivityShop.Base.ID == activityShop.Base.ID)
     {
         this.mActivityShopGrid.repositionNow = true;
     }
     else
     {
         this.ActivityShop = activityShop;
         LocalPlayer player = Globals.Instance.Player;
         this.ASData = player.ActivitySystem.GetActivityShopData(this.ActivityShop.Base.ID);
         MC2S_GetActivityShopData mC2S_GetActivityShopData = new MC2S_GetActivityShopData();
         mC2S_GetActivityShopData.Version = ((this.ASData != null) ? this.ASData.Version : 0u);
         mC2S_GetActivityShopData.ActivityID = this.ActivityShop.Base.ID;
         Globals.Instance.CliSession.Send(751, mC2S_GetActivityShopData);
         this.mActivityShopGrid.SetDragAmount(0f, 0f);
         this.mActivityShopGrid.ClearData();
         this.mActivityShopGrid.repositionNow = true;
     }
 }