Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
a70c3b8652
@ -396,8 +396,6 @@ type (
|
|||||||
}
|
}
|
||||||
// 世界任务
|
// 世界任务
|
||||||
IWorldtask interface {
|
IWorldtask interface {
|
||||||
// 任务条件达成通知
|
|
||||||
TaskCondFinishNotify(session IUserSession, condIds []int32) error
|
|
||||||
// bingo任务
|
// bingo任务
|
||||||
BingoJumpTask(session IUserSession, groupId, rtaskId int32) error
|
BingoJumpTask(session IUserSession, groupId, rtaskId int32) error
|
||||||
// 通过任务ID bingo
|
// 通过任务ID bingo
|
||||||
|
@ -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 {
|
atn := this.module.configure.GetHeroSkillCost(heroCfg.Star)
|
||||||
cost = append(cost, atn...)
|
for _, v := range atn {
|
||||||
|
res := &cfg.Gameatn{
|
||||||
|
A: v.A,
|
||||||
|
T: v.T,
|
||||||
|
N: v.N * lvUpCount,
|
||||||
}
|
}
|
||||||
|
cost = append(cost, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查消耗
|
// 检查消耗
|
||||||
|
@ -256,8 +256,9 @@ func (this *configureComp) GetHeroSkillUpConfig(skillid int32) (data *cfg.GameHe
|
|||||||
var (
|
var (
|
||||||
v interface{}
|
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 {
|
if data = conf.Get(skillid); data == nil {
|
||||||
err = comm.NewNotFoundConfErr("hero", hero_skillup, skillid)
|
err = comm.NewNotFoundConfErr("hero", hero_skillup, skillid)
|
||||||
}
|
}
|
||||||
|
@ -385,14 +385,14 @@ func (this *ModuleRtask) processTasks(session comm.IUserSession, taskParams ...*
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
//通知世界任务模块
|
//通知世界任务模块
|
||||||
module, err := this.service.GetModule(comm.ModuleWorldtask)
|
// module, err := this.service.GetModule(comm.ModuleWorldtask)
|
||||||
if err == nil {
|
// if err == nil {
|
||||||
//世界任务
|
// //世界任务
|
||||||
if worldtask, ok := module.(comm.IWorldtask); ok {
|
// if worldtask, ok := module.(comm.IWorldtask); ok {
|
||||||
if err := worldtask.TaskCondFinishNotify(session, condIdsForNotify); err != nil {
|
// if err := worldtask.TaskCondFinishNotify(session, condIdsForNotify); err != nil {
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// 通知公会任务模块
|
// 通知公会任务模块
|
||||||
// sociatyModule, err := this.service.GetModule(comm.ModuleSociaty)
|
// sociatyModule, err := this.service.GetModule(comm.ModuleSociaty)
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
|
@ -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.Debug("公会任务通知",
|
||||||
log.Field{Key: "uid", Value: uid},
|
log.Field{Key: "uid", Value: uid},
|
||||||
log.Field{Key: "condIds", Value: condIds})
|
log.Field{Key: "condIds", Value: conds})
|
||||||
|
|
||||||
sociaty := this.modelSociaty.getUserSociaty(uid)
|
sociaty := this.modelSociaty.getUserSociaty(uid)
|
||||||
if sociaty == nil {
|
if sociaty == nil {
|
||||||
@ -260,8 +260,8 @@ func (this *Sociaty) TCondFinishNotify(uid string, condIds []int32) {
|
|||||||
|
|
||||||
var flag bool
|
var flag bool
|
||||||
for _, v := range dt.TaskList {
|
for _, v := range dt.TaskList {
|
||||||
for _, condId := range condIds {
|
for _, cond := range conds {
|
||||||
if v.TaskId == condId {
|
if v.TaskId == cond.Conid && cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||||
v.Status = 1
|
v.Status = 1
|
||||||
flag = true
|
flag = true
|
||||||
}
|
}
|
||||||
|
@ -155,11 +155,6 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务条件达成通知
|
|
||||||
func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condIds []int32) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取我的世界任务
|
// 获取我的世界任务
|
||||||
func (this *Worldtask) GetMyWorldtask(uid string) *pb.DBWorldtask {
|
func (this *Worldtask) GetMyWorldtask(uid string) *pb.DBWorldtask {
|
||||||
wt, err := this.modelWorldtask.getWorldtask(uid)
|
wt, err := this.modelWorldtask.getWorldtask(uid)
|
||||||
|
Loading…
Reference in New Issue
Block a user