using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Common; using AxibugEmuOnline.Client.Event; using AxibugEmuOnline.Client.Network; using AxibugProtobuf; namespace AxibugEmuOnline.Client.Manager { public class AppShare { public AppShare() { NetMsg.Instance.RegNetMsgEvent((int)CommandID.CmdGameMark, RecvGameStar); } /// /// 发送收藏 /// /// /// [0]收藏[1]取消收藏 public void SendGameStar(int RomID, PlatformType Platform, int Motion) { Protobuf_Game_Mark req = new Protobuf_Game_Mark() { State = Motion, RomID = RomID, PlatformType = Platform }; App.log.Info($"LeavnRoom"); App.network.SendToServer((int)CommandID.CmdGameMark, ProtoBufHelper.Serizlize(req)); } /// /// 收藏 /// /// void RecvGameStar(byte[] reqData) { Protobuf_Game_Mark_RESP msg = ProtoBufHelper.DeSerizlize(reqData); Eventer.Instance.PostEvent(EEvent.OnDoStars, msg.PlatformType, msg.RomID); } } }