This commit is contained in:
liwei1dao 2023-06-01 16:27:29 +08:00
commit a70c3b8652
6 changed files with 23 additions and 24 deletions

View File

@ -396,8 +396,6 @@ type (
}
// 世界任务
IWorldtask interface {
// 任务条件达成通知
TaskCondFinishNotify(session IUserSession, condIds []int32) error
// bingo任务
BingoJumpTask(session IUserSession, groupId, rtaskId int32) error
// 通过任务ID bingo

View File

@ -54,10 +54,15 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
}
}
// 消耗获取
for i := 0; i < int(lvUpCount); i++ {
if atn := this.module.configure.GetHeroSkillCost(heroCfg.Star); len(atn) > 0 {
cost = append(cost, atn...)
atn := this.module.configure.GetHeroSkillCost(heroCfg.Star)
for _, v := range atn {
res := &cfg.Gameatn{
A: v.A,
T: v.T,
N: v.N * lvUpCount,
}
cost = append(cost, res)
}
// 检查消耗

View File

@ -256,8 +256,9 @@ func (this *configureComp) GetHeroSkillUpConfig(skillid int32) (data *cfg.GameHe
var (
v interface{}
)
if conf, ok := v.(*cfg.GameHeroSkillLevel); ok {
if v, err = this.GetConfigure(hero_skillup); err == nil {
if v, err = this.GetConfigure(hero_skillup); err == nil {
if conf, ok := v.(*cfg.GameHeroSkillLevel); ok {
if data = conf.Get(skillid); data == nil {
err = comm.NewNotFoundConfErr("hero", hero_skillup, skillid)
}

View File

@ -385,14 +385,14 @@ func (this *ModuleRtask) processTasks(session comm.IUserSession, taskParams ...*
return
}
//通知世界任务模块
module, err := this.service.GetModule(comm.ModuleWorldtask)
if err == nil {
//世界任务
if worldtask, ok := module.(comm.IWorldtask); ok {
if err := worldtask.TaskCondFinishNotify(session, condIdsForNotify); err != nil {
}
}
}
// module, err := this.service.GetModule(comm.ModuleWorldtask)
// if err == nil {
// //世界任务
// if worldtask, ok := module.(comm.IWorldtask); ok {
// if err := worldtask.TaskCondFinishNotify(session, condIdsForNotify); err != nil {
// }
// }
// }
// 通知公会任务模块
// sociatyModule, err := this.service.GetModule(comm.ModuleSociaty)
// if err != nil {

View File

@ -241,10 +241,10 @@ type TaskParams struct {
}
// 任务条件达成通知
func (this *Sociaty) TCondFinishNotify(uid string, condIds []int32) {
func (this *Sociaty) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
log.Debug("公会任务通知",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "condIds", Value: condIds})
log.Field{Key: "condIds", Value: conds})
sociaty := this.modelSociaty.getUserSociaty(uid)
if sociaty == nil {
@ -260,8 +260,8 @@ func (this *Sociaty) TCondFinishNotify(uid string, condIds []int32) {
var flag bool
for _, v := range dt.TaskList {
for _, condId := range condIds {
if v.TaskId == condId {
for _, cond := range conds {
if v.TaskId == cond.Conid && cond.State == pb.BuriedItemFinishState_buried_finish {
v.Status = 1
flag = true
}

View File

@ -155,11 +155,6 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
return
}
// 任务条件达成通知
func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condIds []int32) error {
return nil
}
// 获取我的世界任务
func (this *Worldtask) GetMyWorldtask(uid string) *pb.DBWorldtask {
wt, err := this.modelWorldtask.getWorldtask(uid)