예제 #1
0
 public void Buy()
 {
     if (this.APSD == null || this.APData == null)
     {
         return;
     }
     if (Tools.GetRemainAARewardTime(this.APSD.Base.CloseTimeStamp) <= 0)
     {
         GameUIManager.mInstance.ShowMessageTipByKey("activityOverTip", 0f, 0f);
         return;
     }
     if (this.BuyCount() <= 0)
     {
         GameUIManager.mInstance.ShowMessageTipByKey("activityDartOver", 0f, 0f);
         return;
     }
     if (Tools.MoneyNotEnough(ECurrencyType.ECurrencyT_Diamond, this.APData.OffPrice, 0))
     {
         return;
     }
     MC2S_BuyActivityPayShopItem mC2S_BuyActivityPayShopItem = new MC2S_BuyActivityPayShopItem();
     mC2S_BuyActivityPayShopItem.ActivityID = this.APSD.Base.ID;
     mC2S_BuyActivityPayShopItem.ItemID = this.APData.ID;
     mC2S_BuyActivityPayShopItem.Price = this.APData.OffPrice;
     Globals.Instance.CliSession.Send(759, mC2S_BuyActivityPayShopItem);
 }
예제 #2
0
 private void HandleBuyActivityPayShopItemCmd(CommandParser.Command param)
 {
     int activityID = 0;
     int.TryParse(param.GetParam(1), out activityID);
     int itemID = 0;
     int.TryParse(param.GetParam(2), out itemID);
     int price = 0;
     int.TryParse(param.GetParam(3), out price);
     MC2S_BuyActivityPayShopItem mC2S_BuyActivityPayShopItem = new MC2S_BuyActivityPayShopItem();
     mC2S_BuyActivityPayShopItem.ActivityID = activityID;
     mC2S_BuyActivityPayShopItem.ItemID = itemID;
     mC2S_BuyActivityPayShopItem.Price = price;
     Globals.Instance.CliSession.Send(759, mC2S_BuyActivityPayShopItem);
 }