This commit is contained in:
@@ -6,10 +6,6 @@ import (
|
||||
"blazing/logic/service/common"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/modules/player/model"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
)
|
||||
|
||||
type baseplayer struct {
|
||||
@@ -22,10 +18,8 @@ type baseplayer struct {
|
||||
|
||||
// NewPlayerCaptureContext 创建用户捕捉上下文(每次登录调用)
|
||||
func newbaseplayer() baseplayer {
|
||||
rng := rand.New(rand.NewSource(time.Now().UnixNano() + int64(grand.Intn(1000000))))
|
||||
ret := baseplayer{}
|
||||
ret.PlayerCaptureContext = &info.PlayerCaptureContext{
|
||||
Random: rng,
|
||||
Denominator: 1000,
|
||||
DecayFactor: 0.10, // 15%衰减率
|
||||
MinDecayNum: 1,
|
||||
|
||||
Reference in New Issue
Block a user