每日随机玩法 并重置时间
This commit is contained in:
parent
b2ff43d277
commit
919233dc6b
@ -2,6 +2,7 @@ set GOOS=linux
|
||||
set CGO_ENABLED=0
|
||||
cd ../
|
||||
del bin/mainte,bin/gateway,bin/worker
|
||||
go build -o ./bin/cmd ./services/cmd/main.go
|
||||
go build -o ./bin/mainte ./services/mainte/main.go
|
||||
go build -o ./bin/gateway ./services/gateway/main.go
|
||||
go build -o ./bin/worker ./services/worker/main.go
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
@ -26,10 +27,17 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.EntertainGetList
|
||||
}
|
||||
return
|
||||
}
|
||||
for _, v := range this.module.configure.GetGameConsumeIntegral() {
|
||||
list.Playtype = append(list.Playtype, v.Key) // 配置读取一个玩法
|
||||
|
||||
if !utils.IsToday(list.Rtime) {
|
||||
list.Rtime = configure.Now().Unix()
|
||||
for _, v := range this.module.configure.GetGameConsumeIntegral() {
|
||||
list.Playtype = append(list.Playtype, v.Key) // 配置读取一个玩法
|
||||
}
|
||||
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{
|
||||
"rtime": list.Rtime,
|
||||
"playtype": list.Playtype,
|
||||
})
|
||||
}
|
||||
list.Rtime = configure.Now().Unix()
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.EntertainGetListResp{
|
||||
Data: list,
|
||||
})
|
||||
|
@ -331,7 +331,6 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
}
|
||||
update["hero"] = stone.Hero
|
||||
case EventType23: // 事件buff 强化// 商店强化
|
||||
// EventType23/////////////
|
||||
if eventConf.Value2 == 0 { // 强化所有1级buff
|
||||
for _, v := range stone.Userbuff {
|
||||
if conf, e := this.module.configure.GetStoneBuffDataById(v); e != nil {
|
||||
@ -522,18 +521,6 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
}
|
||||
}
|
||||
|
||||
// if stone.Rooms.Complete { // 完成关卡 发放当前关奖励
|
||||
// if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes); conf != nil {
|
||||
// if len(conf.FirstReward) > 0 {
|
||||
// if errdata, reward = this.module.DispenseAtno(session, conf.FirstReward, true); errdata != nil {
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// // 记录首通
|
||||
// // stone.Reward[stone.StageID] = true
|
||||
// // update["reward"] = stone.Reward
|
||||
// }
|
||||
if len(eventConf.CostItem) > 0 {
|
||||
if errdata = this.module.ConsumeRes(session, eventConf.CostItem, true); errdata != nil { //真正的消耗
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user