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.
90 lines
3.2 KiB
90 lines
3.2 KiB
using ProtoCSStruct;
|
|
using Sog;
|
|
|
|
namespace Game
|
|
{
|
|
public class ChapterHandler : BasePacketHandler
|
|
{
|
|
public override int GetServiceType()
|
|
{
|
|
return GameServiceType.ChapterHandler;
|
|
}
|
|
|
|
public override void Dispose()
|
|
{
|
|
}
|
|
|
|
public override void HandlerClientPacket(PlayerSession playerSession, StructPacket packet)
|
|
{
|
|
PlayerOnGame player = playerSession.Player;
|
|
if (player == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
switch (packet.MsgID)
|
|
{
|
|
case (int)CSGameMsgID.BattleBeginReq:
|
|
ChapterSvc.OnBattleBegin(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.BattleOptionReq:
|
|
ChapterSvc.OnBattleOption(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.OnBattleDefeatReq:
|
|
ChapterSvc.OnBattleDefeat(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.OntickBattleEntityReq:
|
|
ChapterSvc.OnTickBattleEntity(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.KilledMonsterReq:
|
|
ChapterSvc.OnKilledMonsterReq(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.BattleActiveAltarReq:
|
|
ChapterSvc.OnActiveAltar(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.OnPickupMonsterRewardReq:
|
|
ChapterSvc.OnPickupMonsterReward(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.MopUpReq:
|
|
ChapterSvc.OnMopUp(player);
|
|
break;
|
|
case (int)CSGameMsgID.OnBattlePushPropDataReq:
|
|
ChapterSvc.PushProp(player,packet);
|
|
break;
|
|
// case (int)CSGameMsgID.OnGainBattleRewardReq:
|
|
// ChapterSvc.OnGainStageReward(player, packet);
|
|
// break;
|
|
case (int)CSGameMsgID.OnGainAllBattleRewardReq:
|
|
ChapterSvc.OnGainAllStageReward(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.CbStartReq:
|
|
CBattleSvc.OnBattleStart(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.CbFinishReq:
|
|
CBattleSvc.OnFinishLayer(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.CbLeaveReq:
|
|
CBattleSvc.OnLeave(player, packet);
|
|
break;
|
|
case (int)CSGameMsgID.CbGetlayerrewardReq:
|
|
CBattleSvc.OnGetLayerAward(player, packet);
|
|
break;
|
|
|
|
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
public override void HandlerServerPacket(uint serverID, StructPacket packet)
|
|
{
|
|
switch (packet.MsgID)
|
|
{
|
|
|
|
case (int)CSGameMsgID.RankPlayerBylevelRes:
|
|
CBattleSvc.RankPlayerBylevelRes(packet);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|