internal void TaotalConsumHandle(GameConnection gs, int id, string accountName, string playerName, int cost) { PayRewardTemplate payRewardTemplate = _payRewards[id]; if (!Information.IsNothing(payRewardTemplate) && payRewardTemplate.IsActive() && payRewardTemplate.type == PayRewardType.TOTAL_CONSUM) { PayReward payReward = new PayReward(accountName, payRewardTemplate.type, id, 0, DateTime.Parse(payRewardTemplate.start_time), DateTime.Parse(payRewardTemplate.end_time)); payReward.PayNum = cost; DAOManager.PayRewardDAO.InsertPayReward(payReward); } }
private void InitializeSendReward(GameConnection gs, string account, string playerName, List <PayReward> rewards) { foreach (PayReward reward in rewards) { PayRewardTemplate payRewardTemplate = _payRewards[reward.RewardId]; foreach (PayRewardGroup item in payRewardTemplate.rewardGroup) { if (item.price <= reward.PayNum && item.price > reward.ReadNum) { PayRewardController.GetInstance().SendRequest(gs, account, playerName, reward, item, payRewardTemplate.pay_name); } } } }