Exemplo n.º 1
0
 public void FinishRequest(int backId, bool sendSuccess)
 {
     try
     {
         PayRequest value = null;
         if (activeRequest.TryGetValue(backId, out value))
         {
             activeRequest.Remove(backId);
             if (sendSuccess)
             {
                 log.InfoFormat("角色名:{0} 充值或消费 {1} 商城币奖励发放成功!", (object)value.PlayerName, (object)value.RewardGroup.price);
                 if (DAOManager.PayRewardDAO.GetReadPrice(value.PayReward) < value.RewardGroup.price)
                 {
                     DAOManager.PayRewardDAO.UpdataPayReward(value.PayReward, value.RewardGroup.price);
                 }
             }
         }
         else
         {
             log.Debug((object)("未知的返回操作ID:" + Conversions.ToString(backId) + " 服务器操作状态:" + Conversions.ToString(sendSuccess)));
         }
     }
     catch (Exception ex)
     {
         ProjectData.SetProjectError(ex);
         Exception ex2 = ex;
         log.Error((object)ex2.ToString());
         ProjectData.ClearProjectError();
     }
 }
Exemplo n.º 2
0
 internal void SendRequest(GameConnection gs, string account, string playerName, PayReward pay, PayRewardGroup rd, string payName)
 {
     try
     {
         Interlocked.Increment(ref requestId);
         PayRequest payRequest = new PayRequest(requestId, account, playerName, pay, rd);
         activeRequest.Add(requestId, payRequest);
         gs.SendPacket(new SM_GS_SEND_PAYREWARD(payName, payRequest));
         log.InfoFormat("发送: 角色名:{0} 充值或消费 {1} 商城币奖励 操作ID:{2}", (object)playerName, (object)rd.price, (object)payRequest.RequestId);
     }
     catch (Exception ex)
     {
         ProjectData.SetProjectError(ex);
         Exception ex2 = ex;
         log.Error((object)ex2.ToString());
         ProjectData.ClearProjectError();
     }
 }