暂定投降次数 后续走配置
This commit is contained in:
parent
5104e22cc9
commit
3cadcaa6b4
@ -34,7 +34,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.EntertainGetList
|
||||
for _, v := range this.module.configure.GetGameConsumeIntegral() {
|
||||
list.Playtype = append(list.Playtype, v.Key) // 配置读取一个玩法
|
||||
}
|
||||
list.Touxiang = 0
|
||||
list.Touxiang = 3 // 需求 默认3 后面可能走配置
|
||||
update["touxiang"] = list.Touxiang // 每天投降次数清0
|
||||
update["rtime"] = list.Rtime
|
||||
update["playtype"] = list.Playtype
|
||||
|
@ -507,13 +507,13 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
||||
return
|
||||
}
|
||||
if list, err := this.module.model.getEntertainmList(session.GetUserId()); err == nil {
|
||||
if list.Touxiang >= 3 {
|
||||
if list.Touxiang > 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_EntertainMaxTouxiangCount,
|
||||
Title: pb.ErrorCode_EntertainMaxTouxiangCount.ToString(),
|
||||
}
|
||||
}
|
||||
list.Touxiang += 1
|
||||
list.Touxiang -= 1
|
||||
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{
|
||||
"touxiang": list.Touxiang,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user