上传公会远征协议代码
This commit is contained in:
parent
3897ee817e
commit
0406fa38a1
@ -6,6 +6,7 @@ import (
|
|||||||
"go_dreamfactory/lego/sys/log"
|
"go_dreamfactory/lego/sys/log"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
"math"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 参数校验
|
// 参数校验
|
||||||
@ -24,6 +25,7 @@ func (this *apiComp) UpHero(session comm.IUserSession, req *pb.ExpeditionUpHeroR
|
|||||||
boos *pb.DBExpeditionBoos
|
boos *pb.DBExpeditionBoos
|
||||||
heros []*pb.DBHero
|
heros []*pb.DBHero
|
||||||
condition []int32
|
condition []int32
|
||||||
|
addpwaer int32
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if errdata = this.UpHeroCheck(session, req); errdata != nil {
|
if errdata = this.UpHeroCheck(session, req); errdata != nil {
|
||||||
@ -112,6 +114,19 @@ func (this *apiComp) UpHero(session comm.IUserSession, req *pb.ExpeditionUpHeroR
|
|||||||
member.Totalpower += v.Fightvalue
|
member.Totalpower += v.Fightvalue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if condition[0] >= conf.Race[1] {
|
||||||
|
addpwaer += conf.Fight
|
||||||
|
}
|
||||||
|
if condition[1] >= conf.Job[1] {
|
||||||
|
addpwaer += conf.Fight
|
||||||
|
}
|
||||||
|
if condition[2] >= int32(len(conf.Hid)) {
|
||||||
|
addpwaer += conf.Fight
|
||||||
|
}
|
||||||
|
if condition[3] >= conf.Color[1] {
|
||||||
|
addpwaer += conf.Fight
|
||||||
|
}
|
||||||
|
member.Totalpower = member.Totalpower + int32(math.Floor(float64(member.Totalpower)*float64(addpwaer)/float64(1000)))
|
||||||
boos.Members[session.GetUserId()] = member
|
boos.Members[session.GetUserId()] = member
|
||||||
if err = this.module.model.updateExpedition(info); err != nil {
|
if err = this.module.model.updateExpedition(info); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
|
Loading…
Reference in New Issue
Block a user