掠夺刷新消耗
This commit is contained in:
parent
d64dc44390
commit
1cd99f6b05
@ -59,7 +59,7 @@ func (this *apiComp) Develop(session comm.IUserSession, req *pb.PlunderDevelopRe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
list.Develop[req.Cid] = 1
|
list.Develop[req.Cid] = conf.Type
|
||||||
update["develop"] = list.Develop
|
update["develop"] = list.Develop
|
||||||
this.module.modelPlunder.changePlunderData(session.GetUserId(), update)
|
this.module.modelPlunder.changePlunderData(session.GetUserId(), update)
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package plunder
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) RefreshCheck(session comm.IUserSession, req *pb.PlunderRefreshReq) (errdata *pb.ErrorData) {
|
func (this *apiComp) RefreshCheck(session comm.IUserSession, req *pb.PlunderRefreshReq) (errdata *pb.ErrorData) {
|
||||||
@ -14,6 +15,7 @@ func (this *apiComp) Refresh(session comm.IUserSession, req *pb.PlunderRefreshRe
|
|||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
list *pb.DBPlunder
|
list *pb.DBPlunder
|
||||||
|
freeCount int32
|
||||||
)
|
)
|
||||||
if errdata = this.RefreshCheck(session, req); errdata != nil {
|
if errdata = this.RefreshCheck(session, req); errdata != nil {
|
||||||
return
|
return
|
||||||
@ -26,6 +28,19 @@ func (this *apiComp) Refresh(session comm.IUserSession, req *pb.PlunderRefreshRe
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 获取技能
|
||||||
|
for k, v := range list.Develop {
|
||||||
|
if v == 101 {
|
||||||
|
if r, e := this.module.configure.getPlunderDevelopById(k); e == nil {
|
||||||
|
freeCount += r.BuffID
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if list.Refresh > freeCount {
|
||||||
|
if errdata = this.module.ConsumeRes(session, []*cfg.Gameatn{this.module.ModuleTools.GetGlobalConf().PlunderPvpRemake}, true); errdata != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
// 刷新货物
|
// 刷新货物
|
||||||
list.Source, err = this.module.modelPlunder.refreshGoodsInfo()
|
list.Source, err = this.module.modelPlunder.refreshGoodsInfo()
|
||||||
list.Setout = []int32{}
|
list.Setout = []int32{}
|
||||||
|
Loading…
Reference in New Issue
Block a user