上传武馆雕像留存时间

This commit is contained in:
liwei1dao 2023-03-29 15:13:50 +08:00
parent a1e5d1f3d5
commit 3cb44f1ce5
4 changed files with 9 additions and 6 deletions

View File

@ -660,6 +660,7 @@
"n": 30000
}
],
"game_make_TunkNum": 5
"game_make_TunkNum": 5,
"pandamas_tiguandiaoxiang_cd": 10
}
]

View File

@ -32,7 +32,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.PracticeInfoReq) (c
}
for i := 0; i < len(room.Statuers); {
if time.Unix(room.Statuers[i].End, 0).After(configure.Now()) { //过期
if configure.Now().After(time.Unix(room.Statuers[i].End, 0)) {
room.Statuers = append(room.Statuers[:i], room.Statuers[i+1:]...)
update["statuers"] = room.Statuers
} else {

View File

@ -214,7 +214,7 @@ func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) {
keep = false
for _, v := range buleroom.Statuers {
if v.Uid == red {
v.End = configure.Now().Add(time.Minute * 1).Unix()
v.End = configure.Now().Add(time.Minute * time.Duration(this.configure.GetGlobalConf().PandamasTiguandiaoxiangCd)).Unix()
keep = true
break
}
@ -223,7 +223,7 @@ func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) {
buleroom.Statuers = append(buleroom.Statuers, &pb.DBPracticeStatuer{
Uid: red,
Figure: reduser.Figure,
End: configure.Now().Add(time.Minute * 1).Unix(),
End: configure.Now().Add(time.Minute * time.Duration(this.configure.GetGlobalConf().PandamasTiguandiaoxiangCd)).Unix(),
})
}
@ -238,7 +238,7 @@ func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) {
keep = false
for _, v := range redroom.Statuers {
if v.Uid == bule {
v.End = configure.Now().Add(time.Minute * 1).Unix()
v.End = configure.Now().Add(time.Minute * time.Duration(this.configure.GetGlobalConf().PandamasTiguandiaoxiangCd)).Unix()
keep = true
break
}
@ -247,7 +247,7 @@ func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) {
redroom.Statuers = append(redroom.Statuers, &pb.DBPracticeStatuer{
Uid: bule,
Figure: buleuser.Figure,
End: configure.Now().Add(time.Minute * 1).Unix(),
End: configure.Now().Add(time.Minute * time.Duration(this.configure.GetGlobalConf().PandamasTiguandiaoxiangCd)).Unix(),
})
}
for i, v := range buleroom.Statuers {

View File

@ -196,6 +196,7 @@ type GameGlobalData struct {
PandamasRankedBelow50 int32
MrylFlushed []*Gameatn
GameMakeTunkNum int32
PandamasTiguandiaoxiangCd int32
}
const TypeId_GameGlobalData = 477542761
@ -819,6 +820,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["game_make_TunkNum"].(float64); !_ok_ { err = errors.New("game_make_TunkNum error"); return }; _v.GameMakeTunkNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pandamas_tiguandiaoxiang_cd"].(float64); !_ok_ { err = errors.New("pandamas_tiguandiaoxiang_cd error"); return }; _v.PandamasTiguandiaoxiangCd = int32(_tempNum_) }
return
}