上传代码
This commit is contained in:
parent
aa5d494761
commit
1109709ffd
@ -1,6 +1,7 @@
|
||||
package pay
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
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
|
||||
if conf.RepeatNum >= totalbuy || conf.BuyNum >= 0 && buynum >= conf.BuyNum {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_PayBuyNumNotEnough,
|
||||
Title: pb.ErrorCode_PayBuyNumNotEnough.ToString(),
|
||||
Message: err.Error(),
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: fmt.Sprintf("conf.RepeatNum:%d totalbuy:%d conf.BuyNum:%d buynum:%d", conf.RepeatNum, totalbuy, conf.BuyNum, buynum),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -163,16 +163,16 @@ func (this *ModelUniongve) userlock(id string) (result *redis.RedisMutex, err er
|
||||
// 击杀boos
|
||||
func (this *ModelUniongve) booskill(unionid string, boosid int32, info *pb.DBUnionGve) {
|
||||
var (
|
||||
// conf *cfg.GameGuildBossData
|
||||
conf *cfg.GameGuildBossData
|
||||
members []*pb.SociatyMemberInfo
|
||||
offlist []string = make([]string, 0)
|
||||
onine []string = make([]string, 0)
|
||||
// err error
|
||||
err error
|
||||
)
|
||||
// if conf, err = this.module.configure.getguildbossByid(boosid); err != nil {
|
||||
// this.module.Errorln(err)
|
||||
// return
|
||||
// }
|
||||
if conf, err = this.module.configure.getguildbossByid(boosid); err != nil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
members = this.module.sociaty.MembersBySociatyId(unionid)
|
||||
if members == nil || len(members) == 0 {
|
||||
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