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.
48 lines
1.3 KiB
48 lines
1.3 KiB
1 month ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
using Google.Protobuf;
|
||
|
using Google.Protobuf.WellKnownTypes;
|
||
|
|
||
|
namespace SogClient
|
||
|
{
|
||
|
public abstract class ITestHandler
|
||
|
{
|
||
|
protected Player m_player;
|
||
|
|
||
|
protected List<int> m_msgList;
|
||
|
public ITestHandler(Player player)
|
||
|
{
|
||
|
m_player = player;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
public abstract void HandlerMsg(RequestPacket packet);
|
||
|
|
||
|
public abstract void Update(long nowSecond);
|
||
|
|
||
|
public abstract void RegisterMsg(TestHandlerMgr mgr);
|
||
|
|
||
|
public void SendToServer(IMessage pbMessage, int iMsgID)
|
||
|
{
|
||
|
TraceLog.Trace("ITestHandler SendToServer SendMsgToGame !");
|
||
|
m_player.SendMsgToGame(pbMessage, iMsgID, Convert.ToUInt32(m_player.GetSessionIDBySessionType(SessionType.GameSession)));
|
||
|
}
|
||
|
|
||
|
public void SendToChatServer(string message, ChatChannelType type)
|
||
|
{
|
||
|
m_player.SendMsgToChat(message, type);
|
||
|
}
|
||
|
|
||
|
public void SendToChatServer(IMessage pbMessage, int iMsgID)
|
||
|
{
|
||
|
TraceLog.Trace("ITestHandler SendToServer SendMsgToChat !");
|
||
|
m_player.SendMsgToGame(pbMessage, iMsgID, Convert.ToUInt32(m_player.GetSessionIDBySessionType(SessionType.ChatSession)));
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|