Esempio n. 1
0
 private void HandleLuckyRollCmd(CommandParser.Command param)
 {
     int type = 0;
     int.TryParse(param.GetParam(1), out type);
     int num = 0;
     int.TryParse(param.GetParam(2), out num);
     int num2 = 0;
     int.TryParse(param.GetParam(3), out num2);
     MC2S_LuckyRoll mC2S_LuckyRoll = new MC2S_LuckyRoll();
     mC2S_LuckyRoll.Type = type;
     mC2S_LuckyRoll.Flag = (num != 0);
     mC2S_LuckyRoll.Free = (num2 != 0);
     Globals.Instance.CliSession.Send(206, mC2S_LuckyRoll);
 }
 public void OnBuyTenClick(GameObject go)
 {
     Globals.Instance.EffectSoundMgr.Play("ui/ui_001");
     if (this.IsOpen)
     {
         if (!Tools.MoneyNotEnough(ECurrencyType.ECurrencyT_Diamond, GameConst.GetInt32(66), 0))
         {
             this.RollType = GUIRewardLuckyDrawInfo.ERollType.ERollType_High_Ten;
             MC2S_LuckyRoll mC2S_LuckyRoll = new MC2S_LuckyRoll();
             mC2S_LuckyRoll.Type = 3;
             mC2S_LuckyRoll.Free = false;
             mC2S_LuckyRoll.Flag = true;
             Globals.Instance.CliSession.Send(224, mC2S_LuckyRoll);
         }
     }
     else
     {
         GameUIManager.mInstance.ShowMessageTipByKey("activityOverTip", 0f, 0f);
         this.Refresh();
     }
 }
Esempio n. 3
0
 private void SendRequest2Server()
 {
     this.mBuyOne.collider.enabled = false;
     MC2S_LuckyRoll mC2S_LuckyRoll = new MC2S_LuckyRoll();
     mC2S_LuckyRoll.Type = 2;
     Globals.Instance.CliSession.Send(224, mC2S_LuckyRoll);
     base.Invoke("EnableBtnCollider", 2f);
 }
Esempio n. 4
0
 private void SendRollRequestToServer()
 {
     if (Tools.IsPetBagFull())
     {
         return;
     }
     MC2S_LuckyRoll mC2S_LuckyRoll = new MC2S_LuckyRoll();
     GUIRollingSceneV2.ERollType eRollType = this.rollType;
     if (eRollType != GUIRollingSceneV2.ERollType.ERollType_Low)
     {
         if (eRollType == GUIRollingSceneV2.ERollType.ERollType_high)
         {
             mC2S_LuckyRoll.Type = 1;
             GUIRollingSceneV2.ERollTimes eRollTimes = this.rollTimes;
             if (eRollTimes != GUIRollingSceneV2.ERollTimes.ERollTimes_One)
             {
                 if (eRollTimes == GUIRollingSceneV2.ERollTimes.ERollTimes_Ten)
                 {
                     mC2S_LuckyRoll.Flag = true;
                     mC2S_LuckyRoll.Free = false;
                 }
             }
             else
             {
                 mC2S_LuckyRoll.Flag = false;
                 mC2S_LuckyRoll.Free = GUIRollSceneV2.IsHighRollFree();
             }
         }
     }
     else
     {
         mC2S_LuckyRoll.Type = 0;
         GUIRollingSceneV2.ERollTimes eRollTimes = this.rollTimes;
         if (eRollTimes != GUIRollingSceneV2.ERollTimes.ERollTimes_One)
         {
             if (eRollTimes == GUIRollingSceneV2.ERollTimes.ERollTimes_Ten)
             {
                 mC2S_LuckyRoll.Free = false;
                 mC2S_LuckyRoll.Flag = true;
             }
         }
         else
         {
             mC2S_LuckyRoll.Free = GUIRollSceneV2.IsLowRollFree();
             mC2S_LuckyRoll.Flag = false;
         }
     }
     Globals.Instance.CliSession.Send(224, mC2S_LuckyRoll);
 }