From f056014c50a2133d50715f79e41f6e4ee0d5a9f7 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 5 Sep 2024 11:24:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/base/player.go | 4 ++-- model/player.go | 2 +- model/playergamedata.go | 2 +- worldsrv/playerinfo.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) 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), } // 游戏数据 From bcac7f06d3ec65644ce2e427f2b383ca3b81f05e Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 5 Sep 2024 11:26:52 +0800 Subject: [PATCH 2/2] update public --- data/DB_PropExchange.dat | Bin 384 -> 384 bytes data/DB_Task.dat | Bin 5299 -> 5299 bytes public | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/data/DB_PropExchange.dat b/data/DB_PropExchange.dat index 3094b57366ddb3f45bda1c2b49ca90dda8ad3167..90627e23e7ffb7a0a0572e799000ac27ec367e02 100644 GIT binary patch literal 384 zcmd-w<6snElw#w!+Qtl~uR-bSQ2H{Iz5=3^I5-yevI!h$vE|a^U;?YZ36;MErEf#& z8))joIUweP%>mknZVy;JP#oPnnEf#Kfz4Oq1iPbQ?IRYhSPmAjLtqBO6v7;I2kIc0 Z!7vBH494mZC3cQQK#zW5=3<~N1OR1nJT(9S literal 384 zcmd-w<6snElw#w!(#8y?uR`f-Q2IKQz6_$3I5-yevI!h$vE|a^U;?YZ1(m-IrEfs# zn`r98IUwf4?17mJRtK~nrXOq%kdN*Tn7Ls4lsLieXjuD*g)5eW1?&)*Mwr844!Z+& d5X@qj!7vBF3`TK?5sYFG>d1mD!V`9lJ+1%xIu@{3Il;r9XQ+PsmUi4_39 C3SNT% delta 368 zcmdn2xmj~UxgZC}!d^Ck1-)!uY#d8~ERl&FjZnc0ZOl+XuFX=6lNl$Ma0pJ`$Fvnl zi%f23-X+M!aj}hAfXNGD#)O6ZlY>|cprR~L(FKR(CQoLu#G>{tixteGr9ME5KxT1G z)?hsgRJ#c15}3IMT5Kn?v4KngiLye?ZRo6;9Kd#D@@H<5%^K`JjFXF*MJ9J}=z|0% zpXS&BRn7%f4l-m4r|IP7e1em2aTbGBC35`(^9#6}CvWEv+04!(%_NIz3()mZOpJ_N z4jfm3u9KbYz$-pEj4yDqF)$={@a0YxVHf1!vgUYvg;_voG9$m(*u0US Gi4_1>oN4v| diff --git a/public b/public index cbad299..06da9b3 160000 --- a/public +++ b/public @@ -1 +1 @@ -Subproject commit cbad2992a1ce71327def46ea01ebbcc8800bee89 +Subproject commit 06da9b31abec96f3936877d7d73069e9852781ff