gm优化
This commit is contained in:
parent
c0fe7338ef
commit
578213ee50
@ -540,7 +540,7 @@ func ReqGmCommand_(player *Player, Command string) error {
|
||||
BaseMod.NickName = player.PlayMod.getBaseMod().NickName
|
||||
BaseMod.Account = player.PlayMod.getBaseMod().Account
|
||||
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
|
||||
var modCopy PlayerModList
|
||||
var buf bytes.Buffer
|
||||
@ -610,7 +610,7 @@ func ReqGmCommand_(player *Player, Command string) error {
|
||||
player.ClearData()
|
||||
case "resetCode":
|
||||
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()
|
||||
case "debug":
|
||||
player.HandleInUserRank()
|
||||
|
||||
@ -115,6 +115,7 @@ func (p *PlayerBaseData) LoadDataFromDB(userName interface{}) bool {
|
||||
p.Data.NoAd = sqlStruck.NoAd
|
||||
p.Data.FaceBookId = sqlStruck.FaceBookId
|
||||
p.p.PlayMod.getBaseMod().RegisterTime = int64(sqlStruck.Rolecreatetime)
|
||||
p.p.PlayMod.getBaseMod().Uid = int64(sqlStruck.DwUin)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user