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.
128 lines
4.4 KiB
128 lines
4.4 KiB
/*
|
|
Sog 游戏基础库
|
|
2016 by zouwei
|
|
*/
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
using Sog;
|
|
using ProtoCSStruct;
|
|
using Sog.Gate;
|
|
|
|
namespace Game
|
|
{
|
|
// 排行榜消息
|
|
public class RankHandler : BasePacketHandler
|
|
{
|
|
public override int GetServiceType()
|
|
{
|
|
return GameServiceType.RankHandler;
|
|
}
|
|
|
|
//销毁的时候置空
|
|
public override void Dispose()
|
|
{
|
|
}
|
|
|
|
public RankHandler()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
public override void HandlerClientPacket(PlayerSession playerSession, StructPacket packet)
|
|
{
|
|
PlayerOnGame player = playerSession.Player;
|
|
if (playerSession.Player == null)
|
|
{
|
|
TraceLog.Debug("RankHandler HandlerClientPacket drop message id {0} because session {1} no player object", packet.MsgID, playerSession.SessionID);
|
|
return;
|
|
}
|
|
|
|
switch (packet.MsgID)
|
|
{
|
|
case (int)CSGameMsgID.QueryRankListReq:
|
|
RankSvc.OnQueryRankListReq(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.QueryRankTopReq:
|
|
RankSvc.OnQueryRankTopReq(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.QueryRankSelfReq:
|
|
RankSvc.OnQueryRankSelfReq(player, packet);
|
|
//GameServerUtils.GetPacketSender().SendToWorldServer<CSQueryRankSelfReq>(packet, playerSession.Player.UserID);
|
|
break;
|
|
case (int)CSGameMsgID.QueryRankDetailReq:
|
|
GameServerUtils.GetPacketSender().SendToWorldServer<CSQueryRankDetailReq>(packet, playerSession.Player.UserID);
|
|
break;
|
|
|
|
|
|
case (int)CSGameMsgID.QueryActRankListReq:
|
|
RankSvc.OnQueryActRankListReq(player, packet);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
public override void HandlerServerPacket(uint serverID, StructPacket packet)
|
|
{
|
|
switch (packet.MsgID)
|
|
{
|
|
case (int)CSGameMsgID.QueryRankListRes:
|
|
RankSvc.OnQueryRankListRes(packet);
|
|
break;
|
|
case (int)CSGameMsgID.QueryRankTopRes:
|
|
RankSvc.OnQueryRankTopRes(packet);
|
|
break;
|
|
case (int)CSGameMsgID.QueryRankSelfRes:
|
|
RankSvc.OnQueryRankSelfRes(packet);
|
|
//SendToPlayerByObjectID<CSQueryRankSelfRes>(packet);
|
|
break;
|
|
case (int)CSGameMsgID.QueryRankDetailRes:
|
|
SendToPlayerByObjectID<CSQueryRankDetailRes>(packet);
|
|
break;
|
|
//case (int)SSGameMsgID.ArenaArenaEnterRes:
|
|
// OnArenaArenaEnterRes(packet);
|
|
// break;
|
|
//case (int)SSGameMsgID.ArenaArenaChallengeWinRes:
|
|
// OnArenaArenaChallengeWinRes(packet);
|
|
// break;
|
|
//case (int)SSGameMsgID.ArenaGetRivalListRes:
|
|
// OnArenaGetRivalListRes(packet);
|
|
// break;
|
|
//case (int)SSGameMsgID.ArenaGameRanklistRes:
|
|
// //OnArenaGameRanklistRes(packet);
|
|
// break;
|
|
case (int)SSGameMsgID.AddRankDataRes:
|
|
RankSvc.OnAddRankDataRes(packet);
|
|
break;
|
|
case (int)CSGameMsgID.NoticeRankChange:
|
|
RankSvc.OnNoticeRankChange(packet);
|
|
break;
|
|
|
|
case (int)SSGameMsgID.UpdateAwardRank:
|
|
RankSvc.OnUpdateAwardRank(packet);
|
|
break;
|
|
|
|
|
|
case (int)SSGameMsgID.AddActRankDataRes:
|
|
RankSvc.OnAddActRankDataRes(packet);
|
|
break;
|
|
case (int)CSGameMsgID.QueryActRankListRes:
|
|
RankSvc.OnQueryActRankListRes(packet);
|
|
break;
|
|
case (int)SSGameMsgID.QueryRankOneRes:
|
|
WxFriendRankSvc.OnQueryRankOneRes(packet);
|
|
break;
|
|
case (int)SSMsgID.QueryUidByWxidRes:
|
|
WxFriendRankSvc.OnQueryUidByWxidRes(packet);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|