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; } } }