Compare commits
3 Commits
0ae60f1f2d
...
5ee2dd9eac
Author | SHA1 | Date |
---|---|---|
|
5ee2dd9eac | |
|
a61fdc3a7f | |
|
b07e90ee47 |
|
@ -32,7 +32,7 @@ build-job:
|
|||
- release
|
||||
script:
|
||||
- git checkout $CI_COMMIT_REF_NAME
|
||||
- git pull
|
||||
- git pull origin $CI_COMMIT_REF_NAME
|
||||
# 拷贝到GOPATH
|
||||
- echo '拷贝到GOPATH'
|
||||
- cp -rfp ./* $GOPATH/src/$ProjectPath
|
||||
|
|
|
@ -2,7 +2,9 @@ package model
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"encoding/gob"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
@ -909,7 +911,13 @@ 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,
|
||||
|
@ -920,6 +928,7 @@ 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,
|
||||
|
@ -929,7 +938,7 @@ func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform
|
|||
CreateTime: tNow.Local(),
|
||||
Ver: VER_PLAYER_MAX - 1,
|
||||
HeadOutLine: 1,
|
||||
IsRob: false,
|
||||
IsRob: isRobot,
|
||||
PackageID: packTag,
|
||||
YesterdayGameData: NewPlayerGameCtrlData(),
|
||||
TodayGameData: NewPlayerGameCtrlData(),
|
||||
|
|
Loading…
Reference in New Issue