diff --git a/data/DB_PropExchange.dat b/data/DB_PropExchange.dat index 3094b57..90627e2 100644 Binary files a/data/DB_PropExchange.dat and b/data/DB_PropExchange.dat differ diff --git a/data/DB_Task.dat b/data/DB_Task.dat index fb5fdb1..37be7cc 100644 Binary files a/data/DB_Task.dat and b/data/DB_Task.dat differ diff --git a/gamesrv/base/player.go b/gamesrv/base/player.go index 9b29b76..7a8c0cb 100644 --- a/gamesrv/base/player.go +++ b/gamesrv/base/player.go @@ -149,7 +149,7 @@ func NewPlayer(sid int64, data []byte, ws, gs *netlib.Session) *Player { ShopLastLookTime: make(map[int32]int64), IsFoolPlayer: make(map[string]bool), }, - GameData: make(map[int32]*model.PlayerGameData), + GameData: make(map[string]*model.PlayerGameData), } if p.init(data) { @@ -383,7 +383,7 @@ func (this *Player) MarshalData(gameid int) (d []byte, e error) { if v.Platform == "" { v.Platform = this.Platform } - if v.Id == 0 { + if v.Id == "" { v.Id = k } } diff --git a/model/player.go b/model/player.go index c26829f..27cf053 100644 --- a/model/player.go +++ b/model/player.go @@ -348,7 +348,7 @@ type MatchFreeSignupRec struct { // 大厅玩家信息发送给游戏服 type WGPlayerInfo struct { *PlayerData - GameData map[int32]*PlayerGameData // 游戏数据,只允许存储玩家对应某个游戏需要持久化的数据 + GameData map[string]*PlayerGameData // 游戏数据,只允许存储玩家对应某个游戏需要持久化的数据 } type PlayerData struct { diff --git a/model/playergamedata.go b/model/playergamedata.go index 0fd4a07..be6677c 100644 --- a/model/playergamedata.go +++ b/model/playergamedata.go @@ -9,7 +9,7 @@ import ( type PlayerGameData struct { Platform string `bson:"-"` SnId int32 - Id int32 // 游戏id或场次id + Id string // 游戏id或场次id Data interface{} // 数据 } diff --git a/worldsrv/playerinfo.go b/worldsrv/playerinfo.go index 850c073..70b2f3c 100644 --- a/worldsrv/playerinfo.go +++ b/worldsrv/playerinfo.go @@ -30,7 +30,7 @@ type AllPlayerInfo struct { // PlayerInfo 玩家信息 type PlayerInfo struct { - GameData map[int32]*model.PlayerGameData // 游戏数据 + GameData map[string]*model.PlayerGameData // 游戏数据 } type PlayerInfoMgr struct { @@ -69,7 +69,7 @@ func (p *PlayerInfoMgr) Callback(player any, ret *internal.PlayerLoadReplay) { return } info := &PlayerInfo{ - GameData: make(map[int32]*model.PlayerGameData), + GameData: make(map[string]*model.PlayerGameData), } // 游戏数据