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.
69 lines
1.5 KiB
69 lines
1.5 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 TestFriendSelfChgNotify:ITestMessage
|
||
|
{
|
||
|
public CSFriendSelfChgNotify m_friendSelfChgNotify;
|
||
|
|
||
|
|
||
|
public TestFriendSelfChgNotify(Player player) : base(player)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public override void HandlerMsg(RequestPacket packet)
|
||
|
{
|
||
|
switch (packet.MsgID)
|
||
|
{
|
||
|
case (int)CSGameMsgID.FriendSelfChgNotify:
|
||
|
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public override void RegisterMsg(TestHandlerMgr mgr)
|
||
|
{
|
||
|
mgr.RegisterPacketHandler((int)CSGameMsgID.FriendSelfChgNotify, this);
|
||
|
}
|
||
|
|
||
|
public override void Update(long nowSecond)
|
||
|
{
|
||
|
|
||
|
if (nowSecond - lastSendTime >= 60)
|
||
|
{
|
||
|
MakeMsg();
|
||
|
SendToServer(m_friendSelfChgNotify, (int)CSGameMsgID.FriendSelfChgNotify);
|
||
|
lastSendTime = nowSecond;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
public override void MakeMsg()
|
||
|
{
|
||
|
if (m_friendSelfChgNotify == null)
|
||
|
{
|
||
|
m_friendSelfChgNotify = new CSFriendSelfChgNotify();
|
||
|
|
||
|
}
|
||
|
|
||
|
var friendItem = new DBFriendSelf();
|
||
|
friendItem.Uid = m_player.GetUid();
|
||
|
m_friendSelfChgNotify.Self = friendItem;
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|