This commit is contained in:
meixiongfeng 2023-11-02 15:52:25 +08:00
parent d544c13b64
commit a920f31d81
2 changed files with 7 additions and 4 deletions

View File

@ -20,9 +20,10 @@ func (this *apiComp) BoxRewardCheck(session comm.IUserSession, req *pb.Entertain
// 赛季奖励
func (this *apiComp) BoxReward(session comm.IUserSession, req *pb.EntertainBoxRewardReq) (errdata *pb.ErrorData) {
var (
list *pb.DBXXLData
err error
atno []*pb.UserAtno
list *pb.DBXXLData
err error
atno []*pb.UserAtno
boxid int32
)
list, err = this.module.model.getEntertainmList(session.GetUserId())
if err != nil {
@ -42,12 +43,13 @@ func (this *apiComp) BoxReward(session comm.IUserSession, req *pb.EntertainBoxRe
}
// 校验时间
if configure.Now().Unix() >= list.Box[req.Index].Opentime {
boxid = list.Box[req.Index].Boxid
list.Box = append(list.Box[:req.Index], list.Box[req.Index+1:]...)
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{
"box": list.Box,
})
// 发奖
if conf, err := this.module.configure.GetGameConsumeBoxConf(list.Box[req.Index].Boxid); err != nil {
if conf, err := this.module.configure.GetGameConsumeBoxConf(boxid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),

View File

@ -530,6 +530,7 @@ func (this *MapData) SkillUp(pos int32, color int32, skillid int32, value int32,
}
} else if skillid == 3 || skillid == 5 { //选中一个方块,消除周围一圈
ids = append(ids, int(pos)) // 包含自己
x := int(pos / Width)
y := int(pos % Height)
if x-1 >= 0 { // 左