You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

145 lines
5.3 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Sog;
using ProtoCSStruct;
namespace DB
{
public static class RankOp
{
// public static void OnQueryArenaReq(uint remoteAppID, StructPacket packet, DBOperator dbOperator)
// {
// ref SSQueryArenaDbReq req = ref packet.GetMessage<SSQueryArenaDbReq>();
//
// TraceLog.Trace("RankOp.OnQueryRankReq rankId {0} RealmId {1} groupId {2}"
// , req.RankId, req.RealmId, req.GroupId);
//
// var res = new SSQueryArenaDbRes
// {
// RankId = req.RankId,
// RealmId = req.RealmId,
// GroupId = req.GroupId,
// IsCurRank = req.IsCurRank
// };
//
// bool ret = dbOperator.QueryRank(req.RankId, req.RealmId, req.GroupId, ref res.Data);
//
// if (ret == false)
// {
// TraceLog.Error("RankOp.OnQueryRankReq failed, rankId {0} realmId {1} groupId"
// , req.RankId, req.RealmId, req.GroupId);
// return;
// }
// else
// {
// TraceLog.Trace("RankOp.OnQueryRankReq failed, rankId {0} realmId {1} groupId"
// , req.RankId, req.RealmId, req.GroupId);
//
// }
//
// DBServerUtils.GetPacketSender().SendToServerByID(remoteAppID, (int) SSGameMsgID.QueryArenaDbRes, ref res, 0);
// }
//
//
// public static void OnSaveArenaReq(uint remoteAppID, StructPacket packet, DBOperator dbOperator)
// {
// ref SSSaveArenaDbReq req = ref packet.GetMessage<SSSaveArenaDbReq>();
//
// TraceLog.Trace("RankOp.OnSaveRankReq rankId {0} realmId {1} groupId", req.RankId, req.RealmId, req.GroupId);
//
// bool ret = dbOperator.ReplaceRank(req.RankId, req.RealmId, req.GroupId, 0, ref req.Data);
//
// var res = new SSSaveArenaDbRes
// {
// RankId = req.RankId,
// RealmId = req.RealmId,
// GroupId = req.GroupId,
// DataSeq = req.DataSeq
// };
//
// if (ret == false)
// {
// TraceLog.Error("RankOp.OnSaveRankReq failed, rankId {0} realmId {1} groupId {2}", req.RankId,
// req.RealmId, req.GroupId);
// return;
// }
// else
// {
// TraceLog.Trace("RankOp.OnSaveRankReq succ, rankId {0} realmId {1} groupId {2}", req.RankId, req.RealmId,
// req.GroupId);
//
// DBServerUtils.GetPacketSender().SendToServerByID(remoteAppID,(int) SSGameMsgID.SaveArenaDbRes, ref res, 0);
// }
// }
//
// public static void OnQueryRankReq(uint remoteAppID, StructPacket packet, DBOperator dbOperator)
// {
// ref SSQueryRankDbReq req = ref packet.GetMessage<SSQueryRankDbReq>();
//
// TraceLog.Trace("RankOp.OnQueryRankReq rankId {0} RealmId {1} groupId {2}"
// , req.RankId, req.RealmId, req.GroupId);
//
// var res = new SSQueryArenaDbRes
// {
// RankId = req.RankId,
// RealmId = req.RealmId,
// GroupId = req.GroupId,
// IsCurRank = req.IsCurRank
// };
//
// bool ret = dbOperator.QueryRank(req.RankId, req.RealmId, req.GroupId, ref res.Data);
//
// if (ret == false)
// {
// TraceLog.Error("RankOp.OnQueryRankReq failed, rankId {0} realmId {1} groupId"
// , req.RankId, req.RealmId, req.GroupId);
// return;
// }
// else
// {
// TraceLog.Trace("RankOp.OnQueryRankReq failed, rankId {0} realmId {1} groupId"
// , req.RankId, req.RealmId, req.GroupId);
//
// }
//
// DBServerUtils.GetPacketSender()
// .SendToServerByID(remoteAppID, (int)SSGameMsgID.QueryRankDbRes, ref res, 0);
// }
//
// public static void OnSaveRankReq(uint remoteAppID, StructPacket packet, DBOperator dbOperator)
// {
// ref SSSaveRankDbReq req = ref packet.GetMessage<SSSaveRankDbReq>();
//
// TraceLog.Trace("RankOp.OnQueryRankReq rankId {0} RealmId {1} groupId {2}"
// , req.RankId, req.RealmId, req.GroupId);
//
// var res = new SSQueryArenaDbRes
// {
// RankId = req.RankId,
// RealmId = req.RealmId,
// GroupId = req.GroupId,
// };
//
// bool ret = dbOperator.QueryRank(req.RankId, req.RealmId, req.GroupId, ref res.Data);
//
// if (ret == false)
// {
// TraceLog.Error("RankOp.OnQueryRankReq failed, rankId {0} realmId {1} groupId"
// , req.RankId, req.RealmId, req.GroupId);
// return;
// }
// else
// {
// TraceLog.Trace("RankOp.OnQueryRankReq failed, rankId {0} realmId {1} groupId"
// , req.RankId, req.RealmId, req.GroupId);
//
// }
//
// DBServerUtils.GetPacketSender()
// .SendToServerByID(remoteAppID, (int)SSGameMsgID.SaveRankDbRes, ref res, 0);
// }
}
}