From 72163df40229bbc0b13b2c4261ea8d423cb2b4bc Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 22 Mar 2024 17:37:34 +0800 Subject: [PATCH] 1 --- server/imserver_new/player/player.go | 59 +--------------------------- 1 file changed, 2 insertions(+), 57 deletions(-) diff --git a/server/imserver_new/player/player.go b/server/imserver_new/player/player.go index 616f2f83..83eeb174 100644 --- a/server/imserver_new/player/player.go +++ b/server/imserver_new/player/player.go @@ -4,7 +4,6 @@ import ( "cs" "f5" "github.com/golang/protobuf/proto" - "main/constant" "main/common" . "main/global" ) @@ -14,11 +13,6 @@ type player struct { socket f5.WspCliConn accountId string sessionId string - chatChannel int - privateTargetAccountId string // 私聊对象 accountId - worldChannelLastId uint64 // 世界聊天 last id - guildChannelLastId uint64 // 公会聊天 last id - privateChatLastId uint64 // 私聊 last id } func (this *player) init(req *pendingLoginRequest, rspObj *common.LoginRsp){ @@ -35,38 +29,10 @@ func (this *player) GetSessionId() string { return this.sessionId } -func (this *player) GetPrivateTargetAccountId() string { - return "" -} - -func (this *player) IncrPrivateChatLastId() int64 { - return 0 -} - func (this *player) IsOnline() bool { return true } -func (this *player) SetGuildChannelLastId(int64) { - -} - -func (this *player) SetWorldChannelLastId(int64) { - -} - -func (this *player) GetChatChannel() int32 { - return 0 -} - -func (this *player)GetWorldChannelLastId() int64 { - return 0 -} - -func (this* player) GetGuildChannelLastId() int64 { - return 0 -} - func (this *player) SendMsg(rspMsg proto.Message) { GetWspListener().SendProxyMsg(this.socket.Conn, this.socket.SocketHandle, rspMsg) } @@ -123,27 +89,10 @@ func (this *player) CMInviteFriendMsg(hdr *f5.MsgHdr, msg *cs.CMInviteFriendMsg) func (this *player) CMSendChatMsg(hdr *f5.MsgHdr, msg *cs.CMSendChatMsg) { } -func (this *player) SyncPrivateChatRedPoint() { - //msg := &cs.SMUpdatePrivateChatRedPointNotify{} - //GetChatMgr().FillSMUpdatePrivateChatRedPointNotify(p, msg) -} - func (this *player) CMReadMsgAndOpenChatNotify(hdr *f5.MsgHdr, msg *cs.CMReadMsgAndOpenChatNotify) { } func (this *player) CMSetCurrPrivateChatTarget(hdr *f5.MsgHdr, msg *cs.CMSetCurrPrivateChatTarget) { - //p.privateTargetAccountId = msg.GetTargetAccountId() - //GetChatMgr().SyncPrivateChatMsg(p) -} - -func (this *player) MarkNewMsg() { - //rspMsg := &cs.SMUpdateChatRedPointNotify{} - //GetChatMgr().FillSMUpdateChatRedPointNotify(p, rspMsg) - //p.SendMsg(rspMsg) -} - -func IsValidChatChannel(chatChannel int32) bool { - return chatChannel > constant.CCBegin && chatChannel < constant.CCEnd } func (this *player) CMGuildInfo(hdr *f5.MsgHdr, msg *cs.CMGuildInfo) { @@ -204,14 +153,10 @@ func (this *player) CMSearchGuilds(hdr *f5.MsgHdr, msg *cs.CMSearchGuilds) { func (this *player) CMGuildLogs(hdr *f5.MsgHdr, msg *cs.CMGuildLogs) { } -func (this *player) FillMFChatUser() *cs.MFChatUser { - return nil -} - func (this *player) onOffline() { } func newPlayer() *player { - hum := new(player) - return hum + p := new(player) + return p }