static void RecevicePlayerRename_s(SyncSession session, ProtocolRequestBase e) { PlayerRename_s msg = new PlayerRename_s(); msg.newName = e.m_data["newname"].ToString(); EventService.DispatchTypeEvent(session, msg); }
public void RecveviceRenameCharacter(SyncSession session, PlayerRename_s msg) { if (session.player == null) { Debug.LogError("玩家未登录"); } session.player.nickName = msg.newName; PlayerRename_c res = new PlayerRename_c(); res.code = ServiceErrorCode.c_Success; res.newName = msg.newName; ProtocolAnalysisService.SendMsg(session, res); }