上传代码
This commit is contained in:
parent
aa5d494761
commit
1109709ffd
@ -1,6 +1,7 @@
|
|||||||
package pay
|
package pay
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
@ -68,9 +69,9 @@ func (this *apiComp) ActivityBuy(session comm.IUserSession, req *pb.PayActivityB
|
|||||||
totalbuy = info.Activitys[conf.Type].Items[conf.Id].Totalbuynum
|
totalbuy = info.Activitys[conf.Type].Items[conf.Id].Totalbuynum
|
||||||
if conf.RepeatNum >= totalbuy || conf.BuyNum >= 0 && buynum >= conf.BuyNum {
|
if conf.RepeatNum >= totalbuy || conf.BuyNum >= 0 && buynum >= conf.BuyNum {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_PayBuyNumNotEnough,
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
Title: pb.ErrorCode_PayBuyNumNotEnough.ToString(),
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
Message: err.Error(),
|
Message: fmt.Sprintf("conf.RepeatNum:%d totalbuy:%d conf.BuyNum:%d buynum:%d", conf.RepeatNum, totalbuy, conf.BuyNum, buynum),
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -163,16 +163,16 @@ func (this *ModelUniongve) userlock(id string) (result *redis.RedisMutex, err er
|
|||||||
// 击杀boos
|
// 击杀boos
|
||||||
func (this *ModelUniongve) booskill(unionid string, boosid int32, info *pb.DBUnionGve) {
|
func (this *ModelUniongve) booskill(unionid string, boosid int32, info *pb.DBUnionGve) {
|
||||||
var (
|
var (
|
||||||
// conf *cfg.GameGuildBossData
|
conf *cfg.GameGuildBossData
|
||||||
members []*pb.SociatyMemberInfo
|
members []*pb.SociatyMemberInfo
|
||||||
offlist []string = make([]string, 0)
|
offlist []string = make([]string, 0)
|
||||||
onine []string = make([]string, 0)
|
onine []string = make([]string, 0)
|
||||||
// err error
|
err error
|
||||||
)
|
)
|
||||||
// if conf, err = this.module.configure.getguildbossByid(boosid); err != nil {
|
if conf, err = this.module.configure.getguildbossByid(boosid); err != nil {
|
||||||
// this.module.Errorln(err)
|
this.module.Errorln(err)
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
members = this.module.sociaty.MembersBySociatyId(unionid)
|
members = this.module.sociaty.MembersBySociatyId(unionid)
|
||||||
if members == nil || len(members) == 0 {
|
if members == nil || len(members) == 0 {
|
||||||
this.module.Error("MembersBySociatyId is nil !")
|
this.module.Error("MembersBySociatyId is nil !")
|
||||||
@ -186,4 +186,10 @@ func (this *ModelUniongve) booskill(unionid string, boosid int32, info *pb.DBUni
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, v := range info.Boos {
|
||||||
|
if v.Hp > 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user