public static void RequestShopBuyItem(ShopInfo shopInfo, EShopType shopType, int count)
 {
     if (shopInfo == null)
     {
         return;
     }
     LocalPlayer player = Globals.Instance.Player;
     if (shopInfo.Type == 1 && (player.GuildSystem.Guild == null || player.GuildSystem.Guild.Level < shopInfo.Value))
     {
         GameUIManager.mInstance.ShowMessageTip(string.Format(Singleton<StringManager>.Instance.GetString("ShopT4"), shopInfo.Value), 0f, 0f);
         return;
     }
     if (shopInfo.Type == 2 && player.Data.TrialMaxWave < shopInfo.Value)
     {
         GameUIManager.mInstance.ShowMessageTip(string.Format(Singleton<StringManager>.Instance.GetString("ShopT41"), shopInfo.Value), 0f, 0f);
         return;
     }
     if (shopInfo.Type == 3 && (player.Data.ArenaHighestRank == 0 || player.Data.ArenaHighestRank > shopInfo.Value))
     {
         GameUIManager.mInstance.ShowMessageTip(string.Format(Singleton<StringManager>.Instance.GetString("ShopT42"), shopInfo.Value), 0f, 0f);
         return;
     }
     int buyCount = player.GetBuyCount(shopInfo);
     if (shopInfo.Times != 0)
     {
         int num = Tools.GetShopBuyTimes(shopInfo) - buyCount;
         if (num <= 0)
         {
             GameUIManager.mInstance.ShowMessageTip(Singleton<StringManager>.Instance.GetString("ShopT3"), 0f, 0f);
             return;
         }
     }
     int num2 = 0;
     int num3 = 0;
     if (shopInfo.IsFashion != 0)
     {
         if (Tools.GetCurrencyMoney((ECurrencyType)shopInfo.CurrencyType2, 0) < shopInfo.Price2)
         {
             Tools.MoneyNotEnough((ECurrencyType)shopInfo.CurrencyType2, shopInfo.Price2, 0);
             return;
         }
         num2 = count * shopInfo.Price;
         if (Tools.GetCurrencyMoney((ECurrencyType)shopInfo.CurrencyType, 0) < num2)
         {
             Tools.MoneyNotEnough((ECurrencyType)shopInfo.CurrencyType, num2, 0);
             return;
         }
         MC2S_ShopBuyFashion mC2S_ShopBuyFashion = new MC2S_ShopBuyFashion();
         mC2S_ShopBuyFashion.ID = shopInfo.ID;
         Globals.Instance.CliSession.Send(534, mC2S_ShopBuyFashion);
     }
     else
     {
         ItemInfo info = Globals.Instance.AttDB.ItemDict.GetInfo(shopInfo.InfoID);
         while (count - num3 > 0)
         {
             num2 += Tools.GetItemBuyConst(info, buyCount + ++num3, shopInfo);
         }
         if (Tools.GetCurrencyMoney((ECurrencyType)shopInfo.CurrencyType, 0) < num2)
         {
             Tools.MoneyNotEnough((ECurrencyType)shopInfo.CurrencyType, num2, 0);
             return;
         }
         if (shopInfo.Price2 > 0 && Tools.MoneyNotEnough((ECurrencyType)shopInfo.CurrencyType2, num3 * shopInfo.Price2, 0))
         {
             return;
         }
         MC2S_ShopBuyItem mC2S_ShopBuyItem = new MC2S_ShopBuyItem();
         mC2S_ShopBuyItem.ID = shopInfo.ID;
         mC2S_ShopBuyItem.Price = (uint)shopInfo.Price;
         mC2S_ShopBuyItem.ShopType = (int)shopType;
         mC2S_ShopBuyItem.Count = count;
         Globals.Instance.CliSession.Send(514, mC2S_ShopBuyItem);
     }
 }
 public static void RequestShopBuyRTItem(RTShopGridData data, EShopType shopType)
 {
     if (data == null || data.shopData == null)
     {
         return;
     }
     if (data.shopData.BuyCount != 0u)
     {
         GameUIManager.mInstance.ShowMessageTip(Singleton<StringManager>.Instance.GetString("ShopT3"), 0f, 0f);
         return;
     }
     int num = data.GetPrice();
     if (Tools.GetCurrencyMoney((ECurrencyType)data.shopData.Type, 0) < num)
     {
         Tools.MoneyNotEnough((ECurrencyType)data.shopData.Type, num, 0);
         return;
     }
     MC2S_ShopBuyItem mC2S_ShopBuyItem = new MC2S_ShopBuyItem();
     mC2S_ShopBuyItem.ID = data.shopData.ID;
     mC2S_ShopBuyItem.Price = (uint)num;
     mC2S_ShopBuyItem.ShopType = (int)shopType;
     mC2S_ShopBuyItem.Count = 1;
     Globals.Instance.CliSession.Send(514, mC2S_ShopBuyItem);
 }