Example #1
0
    /// <summary>
    /// 玩家庄园抓地鼠奖励
    /// </summary>
    /// <param name="isAd"></param>
    private void GetMouseAwardUser(bool isAd)
    {
        CSOneselfMarmot csOneselfMarmot = new CSOneselfMarmot()
        {
            IsAdvert = isAd
        };

        ProtocalManager.Instance().SendCSOneselfMarmot(csOneselfMarmot, (scOneselfMarmot) => {
            foreach (var elem in scOneselfMarmot.AwardInfo)
            {
                StaticData.UpdateWareHouseItem(elem.GoodId, elem.GoodNum, elem.IsLock);
            }
            //待删,todo
            string tipStr = "请到仓库查看奖励!";
            StaticData.CreateToastTips(tipStr);
        }, (error) => { });
    }
Example #2
0
        public void SendCSOneselfMarmot(CSOneselfMarmot csoneselfmarmot, Action <SCOneselfMarmot> ResponseSCOneselfMarmotCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSOneselfMarmot> ();

            ProtoSendMethod.BusinessRequest <SCOneselfMarmot>(csoneselfmarmot, opCodeType, ResponseSCOneselfMarmotCallBack, errorCallBack, isShowDefaultTip);
        }