This commit is contained in:
hahwu 2026-03-30 16:04:50 +08:00
parent 72e21945b6
commit 1a6ba1ab56
2 changed files with 3 additions and 2 deletions

View File

@ -540,7 +540,7 @@ func ReqGmCommand_(player *Player, Command string) error {
BaseMod.NickName = player.PlayMod.getBaseMod().NickName BaseMod.NickName = player.PlayMod.getBaseMod().NickName
BaseMod.Account = player.PlayMod.getBaseMod().Account BaseMod.Account = player.PlayMod.getBaseMod().Account
BaseMod.LoginTime = GoUtil.Now() BaseMod.LoginTime = GoUtil.Now()
BaseMod.AddCode = fmt.Sprintf("MMM-%s-%s", "156", GoUtil.UniqueStringFromInt(int(BaseMod.Uid))) BaseMod.AddCode = fmt.Sprintf("MMM-%s-%s", BaseMod.CountryCode, GoUtil.UniqueStringFromInt(int(BaseMod.Uid)))
// deep copy p1.PlayMod.mod_list to avoid sharing internal pointers // deep copy p1.PlayMod.mod_list to avoid sharing internal pointers
var modCopy PlayerModList var modCopy PlayerModList
var buf bytes.Buffer var buf bytes.Buffer
@ -610,7 +610,7 @@ func ReqGmCommand_(player *Player, Command string) error {
player.ClearData() player.ClearData()
case "resetCode": case "resetCode":
BaseMod := player.PlayMod.getBaseMod() BaseMod := player.PlayMod.getBaseMod()
BaseMod.AddCode = fmt.Sprintf("MMM-%s-%s", "156", GoUtil.UniqueStringFromInt(int(BaseMod.Uid))) BaseMod.AddCode = fmt.Sprintf("MMM-%s-%s", BaseMod.CountryCode, GoUtil.UniqueStringFromInt(int(BaseMod.Uid)))
player.BackUserInfo() player.BackUserInfo()
case "debug": case "debug":
player.HandleInUserRank() player.HandleInUserRank()

View File

@ -115,6 +115,7 @@ func (p *PlayerBaseData) LoadDataFromDB(userName interface{}) bool {
p.Data.NoAd = sqlStruck.NoAd p.Data.NoAd = sqlStruck.NoAd
p.Data.FaceBookId = sqlStruck.FaceBookId p.Data.FaceBookId = sqlStruck.FaceBookId
p.p.PlayMod.getBaseMod().RegisterTime = int64(sqlStruck.Rolecreatetime) p.p.PlayMod.getBaseMod().RegisterTime = int64(sqlStruck.Rolecreatetime)
p.p.PlayMod.getBaseMod().Uid = int64(sqlStruck.DwUin)
return true return true
} }