diff --git a/modules/caravan/api_buyorsell.go b/modules/caravan/api_buyorsell.go index d57f0b4c4..57d73f726 100644 --- a/modules/caravan/api_buyorsell.go +++ b/modules/caravan/api_buyorsell.go @@ -138,9 +138,8 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe if reward := this.module.DispenseRes(session, lvReward, true); reward != nil { this.module.Errorf("lv reward dispenseRes err:%v", lvReward) errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足 - Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: err.Error(), + Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足 + Title: pb.ErrorCode_ConfigNoFound.ToString(), } return } diff --git a/modules/dispatch/api_do.go b/modules/dispatch/api_do.go index c4083dc39..9d9269c5a 100644 --- a/modules/dispatch/api_do.go +++ b/modules/dispatch/api_do.go @@ -58,9 +58,8 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda if len(req.HeroIds) < int(dConf.Taskneed) { this.module.Error("英雄派遣:", log.Field{Key: "HeroIds len", Value: len(req.HeroIds)}, log.Field{Key: "Taskneed", Value: dConf.Taskneed}) errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DispatchHeroNoEnough, - Title: pb.ErrorCode_DispatchHeroNoEnough.ToString(), - Message: err.Error(), + Code: pb.ErrorCode_DispatchHeroNoEnough, + Title: pb.ErrorCode_DispatchHeroNoEnough.ToString(), } return } @@ -68,9 +67,8 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda d := this.module.modelDispatch.getDBDispatch(session.GetUserId()) if d == nil && d.Nb == nil { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DataNotFound, - Title: pb.ErrorCode_DataNotFound.ToString(), - Message: err.Error(), + Code: pb.ErrorCode_DataNotFound, + Title: pb.ErrorCode_DataNotFound.ToString(), } return } @@ -79,9 +77,8 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda ticketAtn := this.module.ModuleTools.GetGlobalConf().DispatchNumtools if errdata = this.module.CheckRes(session, []*cfg.Gameatn{ticketAtn}); errdata != nil { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DispatchTicketNoEnough, - Title: pb.ErrorCode_DispatchTicketNoEnough.ToString(), - Message: err.Error(), + Code: pb.ErrorCode_DispatchTicketNoEnough, + Title: pb.ErrorCode_DispatchTicketNoEnough.ToString(), } return } diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index 745dcaaa4..72a50e815 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -670,7 +670,7 @@ func (this *ModelHero) setTalentProperty(hero *pb.DBHero, conf *cfg.GameHeroTale hero.TalentProperty = make(map[string]int32) } - hero.TalentProperty[conf.Attrkey] += int32(math.Floor((float64(conf.Attrvar) / 1000) * float64(hero.Property[conf.Attrkey]))) + hero.TalentProperty[conf.Attrkey] += conf.Attrvar _heroMap := make(map[string]interface{}, 0) if conf.Skill != 0 { @@ -711,7 +711,7 @@ func (this *ModelHero) resetTalentProperty(hero *pb.DBHero) { if v.HeroId == hero.HeroID { // 找到对应的英雄 for k := range v.Talent { if conf, _ := this.module.configure.GetHeroTalent(k); conf != nil { //获取天赋 - hero.TalentProperty[conf.Attrkey] = int32(math.Floor((float64(conf.Attrvar) / 1000) * float64(hero.Property[conf.Attrkey]))) + hero.TalentProperty[conf.Attrkey] = conf.Attrvar } } break diff --git a/modules/hero/module.go b/modules/hero/module.go index d5bfe566d..13f9716c8 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -373,9 +373,8 @@ func (this *Hero) KungFuHero(session comm.IUserSession, heroObjID string, bKongf if bKongfu && _hero.Status == pb.HeroType_HeroTypeKongFu { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_HeroAlreadyKongFuStatus, // 已经是练功状态 - Title: pb.ErrorCode_HeroAlreadyKongFuStatus.ToString(), - Message: err.Error(), + Code: pb.ErrorCode_HeroAlreadyKongFuStatus, // 已经是练功状态 + Title: pb.ErrorCode_HeroAlreadyKongFuStatus.ToString(), } return }