コード例 #1
0
 /// <summary>
 /// 获取个人元宝
 /// </summary>
 /// <param name="user"></param>
 /// <returns></returns>
 public static void Trigger(GameUser user)
 {
     var trigger = new PaymentTrigger(GetPayment);
     trigger.BeginInvoke(user.GameId, user.ServerId, user.Pid, user.UserID, null, null);
     int vipLv;
     int vipGold = MathUtils.Addition(user.PayGold, user.ExtGold, int.MaxValue);
     List<VipLvInfo> vipLvArray = new ShareCacheStruct<VipLvInfo>().FindAll(u => u.PayGold <= vipGold);
     vipLv = vipLvArray.Count > 0 ? vipLvArray[vipLvArray.Count - 1].VipLv : (short)0;
     user.VipLv = vipLv;
     //user.Update();
 }
コード例 #2
0
        /// <summary>
        /// 获取个人元宝
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static void Trigger(GameUser user)
        {
            var trigger = new PaymentTrigger(GetPayment);

            trigger.BeginInvoke(user.GameId, user.ServerId, user.Pid, user.UserID, null, null);
            int vipLv;
            int vipGold = MathUtils.Addition(user.PayGold, user.ExtGold, int.MaxValue);
            List <VipLvInfo> vipLvArray = new ShareCacheStruct <VipLvInfo>().FindAll(u => u.PayGold <= vipGold);

            vipLv      = vipLvArray.Count > 0 ? vipLvArray[vipLvArray.Count - 1].VipLv : (short)0;
            user.VipLv = vipLv;
            //user.Update();
        }