共鸣配置获取 取英雄原始星级
This commit is contained in:
parent
87ff904049
commit
2c6b53ad07
@ -113,8 +113,8 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
|
|||||||
//xx英雄满级、共鸣、觉醒至最高状态
|
//xx英雄满级、共鸣、觉醒至最高状态
|
||||||
nextAwaken := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
nextAwaken := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
||||||
if nextAwaken == nil { // 达到满级觉醒
|
if nextAwaken == nil { // 达到满级觉醒
|
||||||
resonConfig := this.module.configure.GetHeroResonanceConfig(_hero.HeroID, _hero.Star+1)
|
resonConfig := this.module.configure.GetHeroResonanceConfig(_hero.HeroID, cfg.Star)
|
||||||
if resonConfig == nil { // 满星
|
if resonConfig.Maxnum == _hero.ResonateNum {
|
||||||
if _hero.Lv == _hero.Star*comm.HeroStarLvRatio {
|
if _hero.Lv == _hero.Star*comm.HeroStarLvRatio {
|
||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype37, 1, cfg.Color)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype37, 1, cfg.Color)
|
||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype38, 1)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype38, 1)
|
||||||
|
@ -41,8 +41,14 @@ func (this *apiComp) Resonance(session comm.IUserSession, req *pb.HeroResonanceR
|
|||||||
if code != pb.ErrorCode_Success {
|
if code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
//获取原始星级
|
||||||
|
conf := this.module.configure.GetHero(_hero.HeroID)
|
||||||
|
if conf == nil {
|
||||||
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
|
return
|
||||||
|
}
|
||||||
// 共鸣次数判断
|
// 共鸣次数判断
|
||||||
resonConfig := this.module.configure.GetHeroResonanceConfig(_hero.HeroID, _hero.Star)
|
resonConfig := this.module.configure.GetHeroResonanceConfig(_hero.HeroID, conf.Star)
|
||||||
if resonConfig == nil {
|
if resonConfig == nil {
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
@ -160,8 +166,8 @@ func (this *apiComp) Resonance(session comm.IUserSession, req *pb.HeroResonanceR
|
|||||||
//xx英雄满级、共鸣、觉醒至最高状态
|
//xx英雄满级、共鸣、觉醒至最高状态
|
||||||
nextAwaken := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
nextAwaken := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
||||||
if nextAwaken == nil { // 达到满级觉醒
|
if nextAwaken == nil { // 达到满级觉醒
|
||||||
resonConfig := this.module.configure.GetHeroResonanceConfig(_hero.HeroID, _hero.Star+1)
|
resonConfig := this.module.configure.GetHeroResonanceConfig(_hero.HeroID, cfg.Star)
|
||||||
if resonConfig == nil { // 满星
|
if resonConfig.Maxnum == _hero.ResonateNum { // 共鸣满
|
||||||
if _hero.Lv == _hero.Star*comm.HeroStarLvRatio {
|
if _hero.Lv == _hero.Star*comm.HeroStarLvRatio {
|
||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype37, 1, cfg.Color)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype37, 1, cfg.Color)
|
||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype38, 1)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype38, 1)
|
||||||
|
@ -63,8 +63,9 @@ func (this *apiComp) ResonanceUseEnergy(session comm.IUserSession, req *pb.HeroR
|
|||||||
this.module.Errorf("update hero skill failed:%v", err1)
|
this.module.Errorf("update hero skill failed:%v", err1)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
conf := this.module.configure.GetHero(_hero.HeroID)
|
||||||
// 计算属性
|
// 计算属性
|
||||||
this.module.modelHero.setEnergyProperty(_hero)
|
this.module.modelHero.setEnergyProperty(_hero, conf.Star)
|
||||||
session.SendMsg(string(this.module.GetType()), ResonanceUseEnergy, &pb.HeroResonanceUseEnergyResp{Hero: _hero})
|
session.SendMsg(string(this.module.GetType()), ResonanceUseEnergy, &pb.HeroResonanceUseEnergyResp{Hero: _hero})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -201,8 +201,8 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
|
|||||||
//xx英雄满级、共鸣、觉醒至最高状态
|
//xx英雄满级、共鸣、觉醒至最高状态
|
||||||
nextAwaken := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
nextAwaken := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
||||||
if nextAwaken == nil { // 达到满级觉醒
|
if nextAwaken == nil { // 达到满级觉醒
|
||||||
resonConfig := this.module.configure.GetHeroResonanceConfig(_hero.HeroID, _hero.Star+1)
|
resonConfig := this.module.configure.GetHeroResonanceConfig(_hero.HeroID, cfg.Star)
|
||||||
if resonConfig == nil { // 满星
|
if resonConfig.Maxnum == _hero.ResonateNum { // 共鸣满
|
||||||
if _hero.Lv == _hero.Star*comm.HeroStarLvRatio {
|
if _hero.Lv == _hero.Star*comm.HeroStarLvRatio {
|
||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype37, 1, cfg.Color)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype37, 1, cfg.Color)
|
||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype38, 1)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype38, 1)
|
||||||
|
@ -282,8 +282,9 @@ func (this *ModelHero) setJuexingProperty(hero *pb.DBHero, key string, value int
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 设置共鸣能量点数属性
|
// 设置共鸣能量点数属性
|
||||||
func (this *ModelHero) setEnergyProperty(hero *pb.DBHero) {
|
func (this *ModelHero) setEnergyProperty(hero *pb.DBHero, star int32) {
|
||||||
resonConfig := this.moduleHero.configure.GetHeroResonanceConfig(hero.HeroID, hero.Star)
|
|
||||||
|
resonConfig := this.moduleHero.configure.GetHeroResonanceConfig(hero.HeroID, star)
|
||||||
if resonConfig == nil {
|
if resonConfig == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user