Compare commits

..

No commits in common. "5ee2dd9eac085fe2c521e4b18f8e7f325b64f6ca" and "0ae60f1f2d76ade68c4db0edfa1806da3fd93ee0" have entirely different histories.

2 changed files with 2 additions and 11 deletions

View File

@ -32,7 +32,7 @@ build-job:
- release
script:
- git checkout $CI_COMMIT_REF_NAME
- git pull origin $CI_COMMIT_REF_NAME
- git pull
# 拷贝到GOPATH
- echo '拷贝到GOPATH'
- cp -rfp ./* $GOPATH/src/$ProjectPath

View File

@ -2,9 +2,7 @@ package model
import (
"bytes"
"crypto/md5"
"encoding/gob"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
@ -911,13 +909,7 @@ func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform
logger.Logger.Trace("New player name is empty.")
return nil
}
raw := fmt.Sprintf("%v%v", DEFAULT_PLAYER_SAFEBOX_PWD, common.GetAppId())
h := md5.New()
io.WriteString(h, raw)
pwd := hex.EncodeToString(h.Sum(nil))
tNow := time.Now()
isRobot := channel == common.Channel_Rob
pd := &PlayerData{
Id: bson.NewObjectId(),
AccountId: acc,
@ -928,7 +920,6 @@ func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform
SnId: id,
Head: rand.Int31n(common.HeadRange),
HeadUrl: headUrl,
SafeBoxPassword: pwd,
Ip: ip,
RegIp: ip,
Params: params,
@ -938,7 +929,7 @@ func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform
CreateTime: tNow.Local(),
Ver: VER_PLAYER_MAX - 1,
HeadOutLine: 1,
IsRob: isRobot,
IsRob: false,
PackageID: packTag,
YesterdayGameData: NewPlayerGameCtrlData(),
TodayGameData: NewPlayerGameCtrlData(),