解决冲突
This commit is contained in:
commit
b61b41313d
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -348,7 +348,7 @@ type MatchFreeSignupRec struct {
|
|||
// 大厅玩家信息发送给游戏服
|
||||
type WGPlayerInfo struct {
|
||||
*PlayerData
|
||||
GameData map[int32]*PlayerGameData // 游戏数据,只允许存储玩家对应某个游戏需要持久化的数据
|
||||
GameData map[string]*PlayerGameData // 游戏数据,只允许存储玩家对应某个游戏需要持久化的数据
|
||||
}
|
||||
|
||||
type PlayerData struct {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
type PlayerGameData struct {
|
||||
Platform string `bson:"-"`
|
||||
SnId int32
|
||||
Id int32 // 游戏id或场次id
|
||||
Id string // 游戏id或场次id
|
||||
Data interface{} // 数据
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
|
||||
// 游戏数据
|
||||
|
|
Loading…
Reference in New Issue