diff --git a/gamesrv/base/logchannel.go b/gamesrv/base/logchannel.go index 4f77a44..de78540 100644 --- a/gamesrv/base/logchannel.go +++ b/gamesrv/base/logchannel.go @@ -3,6 +3,8 @@ package base import ( "reflect" + "mongo.games.com/goserver/core/logger" + "mongo.games.com/game/model" "mongo.games.com/game/mq" ) @@ -38,6 +40,7 @@ func (c *LogChannel) WriteLog(log interface{}) { if cname == "" { cname = "_null_" } + logger.Logger.Tracef("LogChannel ==> %#v", log) mq.Send(cname, log) } diff --git a/gamesrv/tienlen/scenedata_tienlen.go b/gamesrv/tienlen/scenedata_tienlen.go index f5c8548..e581d75 100644 --- a/gamesrv/tienlen/scenedata_tienlen.go +++ b/gamesrv/tienlen/scenedata_tienlen.go @@ -2114,6 +2114,7 @@ func (this *TienLenSceneData) SaveCustomLog() { state = 1 } log := &model.CustomLog{ + Platform: this.Platform, CycleId: this.CycleID, RoomConfigId: this.GetCustom().GetRoomConfigId(), RoomId: this.SceneId, diff --git a/gamesrv/tienlen/scenepolicy_tienlen.go b/gamesrv/tienlen/scenepolicy_tienlen.go index 5e654e1..020508a 100644 --- a/gamesrv/tienlen/scenepolicy_tienlen.go +++ b/gamesrv/tienlen/scenepolicy_tienlen.go @@ -2608,7 +2608,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) { if p != nil { var items []*model.Item for _, v := range packBilled.List[0].Award { - itemData := srvdata.GameItemMgr.Get(p.Platform, p.SnId) + itemData := srvdata.GameItemMgr.Get(p.Platform, v.GetId()) if itemData != nil { items = append(items, &model.Item{ ItemId: v.GetId(), diff --git a/model/customlog.go b/model/customlog.go index 08e6a27..67b82ec 100644 --- a/model/customlog.go +++ b/model/customlog.go @@ -1,9 +1,5 @@ package model -import ( - "github.com/globalsign/mgo/bson" -) - var ( DbCustomLogDBName = "log" DbCustomLogCollName = "log_custom" @@ -22,19 +18,18 @@ type RoundInfo struct { } type CustomLog struct { - Id bson.ObjectId `bson:"_id"` - Platform string `bson:"-"` - CycleId string // 本轮id,多局游戏属于同一轮 - RoomConfigId int32 // 房间配置id - GameFreeId int32 // 场次id - TotalRound int32 // 总局数 - PlayerNum int32 // 最大人数 - Password string // 密码 - CostType int32 // 付费方式 1房主 2AA - Voice int32 // 是否开启语音 1开启 - RoomId int32 // 房间id - SnId []PlayerInfo // 所有玩家 - List []RoundInfo // 对局记录 - StartTs, EndTs int64 // 开始,结束时间 - State int32 // 0正常结束 1后台中途解散 + Platform string `bson:"-"` + CycleId string // 本轮id,多局游戏属于同一轮 + RoomConfigId int32 // 房间配置id + GameFreeId int32 // 场次id + TotalRound int32 // 总局数 + PlayerNum int32 // 最大人数 + Password string // 密码 + CostType int32 // 付费方式 1房主 2AA + Voice int32 // 是否开启语音 1开启 + RoomId int32 // 房间id + SnId []PlayerInfo // 所有玩家 + List []RoundInfo // 对局记录 + StartTs, EndTs int64 // 开始,结束时间 + State int32 // 0正常结束 1后台中途解散 } diff --git a/model/gameplayerlistlog.go b/model/gameplayerlistlog.go index 4bbd768..4441b2d 100644 --- a/model/gameplayerlistlog.go +++ b/model/gameplayerlistlog.go @@ -99,6 +99,7 @@ func NewGamePlayerListLogEx(snid int32, gamedetailedlogid string, platform, chan cl.Time = tNow cl.MatchId = matchid cl.MatchType = matchType + cl.CycleId = cycleId return cl } diff --git a/worldsrv/action_game.go b/worldsrv/action_game.go index d53bca5..a080fc6 100644 --- a/worldsrv/action_game.go +++ b/worldsrv/action_game.go @@ -1348,6 +1348,8 @@ func CSGetPrivateRoomListHandler(s *netlib.Session, packetId int, data interface return nil } + PlayerNotifySingle.AddTime(p.SnId, common.NotifyPrivateRoomList, time.Second*15) + pack := &gamehall.SCGetPrivateRoomList{} scenes := SceneMgrSingleton.FindRoomList(&FindRoomParam{ Platform: p.Platform, diff --git a/worldsrv/playernotify.go b/worldsrv/playernotify.go index 7999b8e..e944769 100644 --- a/worldsrv/playernotify.go +++ b/worldsrv/playernotify.go @@ -3,6 +3,8 @@ package main import ( "time" + "mongo.games.com/goserver/core/logger" + "mongo.games.com/game/common" ) @@ -76,4 +78,5 @@ func (p *PlayerNotify) GetPlayers(tp common.NotifyType) []int32 { func (p *PlayerNotify) SendToClient(tp common.NotifyType, packetId int, pack interface{}) { ids := p.GetPlayers(tp) PlayerMgrSington.BroadcastMessageToTarget(ids, packetId, pack) + logger.Logger.Tracef("PlayerNotify SendToClient tp:%v ids:%v", tp, ids) } diff --git a/worldsrv/scenemgr.go b/worldsrv/scenemgr.go index 4938b49..864f2ca 100644 --- a/worldsrv/scenemgr.go +++ b/worldsrv/scenemgr.go @@ -85,7 +85,7 @@ func (m *SceneMgr) GenOneMatchSceneId() int { func (m *SceneMgr) GenPassword() string { for i := 0; i < 100; i++ { - s := strconv.Itoa(common.RandInt(10000, 100000)) + s := strconv.Itoa(common.RandInt(100000, 1000000)) if _, ok := m.password[s]; !ok { m.password[s] = struct{}{} return s