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.
70 lines
1.7 KiB
70 lines
1.7 KiB
1 month ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
using Google.Protobuf.WellKnownTypes;
|
||
|
|
||
|
namespace SogClient
|
||
|
{
|
||
|
class TestFriendListChgNotify:ITestMessage
|
||
|
{
|
||
|
public CSFriendListChgNotify m_friendListChgNotify;
|
||
|
|
||
|
public TestFriendListChgNotify(Player player) : base(player)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public override void HandlerMsg(RequestPacket packet)
|
||
|
{
|
||
|
switch (packet.MsgID)
|
||
|
{
|
||
|
case (int)CSGameMsgID.FriendListChgNotify:
|
||
|
TraceLog.Trace("TestFriendListChgNotify.HandlerMsg packet.MsgID:{0} packet.Msg: {1}", packet.MsgID, packet.Packet.ToString());
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public override void RegisterMsg(TestHandlerMgr mgr)
|
||
|
{
|
||
|
|
||
|
mgr.RegisterPacketHandler((int)CSGameMsgID.FriendListChgNotify, this);
|
||
|
}
|
||
|
|
||
|
public override void Update(long nowSecond)
|
||
|
{
|
||
|
|
||
|
if (nowSecond - lastSendTime >= 40)
|
||
|
{
|
||
|
MakeMsg();
|
||
|
SendToServer(m_friendListChgNotify, (int)CSGameMsgID.FriendListChgNotify);
|
||
|
lastSendTime = nowSecond;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
public override void MakeMsg()
|
||
|
{
|
||
|
if (m_friendListChgNotify == null)
|
||
|
{
|
||
|
m_friendListChgNotify = new CSFriendListChgNotify();
|
||
|
|
||
|
}
|
||
|
|
||
|
m_friendListChgNotify.IsDelete = 0;
|
||
|
DBFriendOne friendItem = new DBFriendOne();
|
||
|
friendItem.Uid = m_player.GetUid();
|
||
|
m_friendListChgNotify.Friend = friendItem;
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|