From 3e53851962a4d27a5a9bc644208cb116ae9e50bb Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 30 Jun 2022 09:55:41 +0800 Subject: [PATCH] subType --- modules/hero/api.go | 13 +++++++++---- modules/hero/api_resonance.go | 2 +- modules/hero/api_resonanceReset.go | 2 +- modules/hero/api_resonanceSelect.go | 2 +- modules/hero/api_skillUp.go | 2 +- modules/hero/api_starUp.go | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/modules/hero/api.go b/modules/hero/api.go index a3a4bab6d..436069e9f 100644 --- a/modules/hero/api.go +++ b/modules/hero/api.go @@ -14,10 +14,15 @@ type apiComp struct { } const ( //消息回复的头名称 - StrengthenUplv = "strengthenherolv" - HeroSubTypeInfo = "info" //英雄卡片信息 - HeroSubTypeList = "list" //英雄列表 - HeroSubTypeChouka = "chouka" //抽卡 + StrengthenUplv = "strengthenherolv" + HeroSubTypeInfo = "info" //英雄卡片信息 + HeroSubTypeList = "list" //英雄列表 + HeroSubTypeChouka = "chouka" //抽卡 + ResonanceUseEnergy = "resonanceuseenergy" // 使用共鸣能量 + Resonance = "resonance" // 英雄共鸣属性 + ResonanceReset = "resonancereset" // 共鸣重置 + StrengthenUpSkill = "strengthenupskill" // 技能强化 + StrengthenUpStar = "strengthensupstar" // 英雄升星 ) //组件初始化接口 diff --git a/modules/hero/api_resonance.go b/modules/hero/api_resonance.go index c3bbcb1fc..1ebaf27f6 100644 --- a/modules/hero/api_resonance.go +++ b/modules/hero/api_resonance.go @@ -88,7 +88,7 @@ func (this *apiComp) Resonance(session comm.IUserSession, agrs map[string]interf } defer func() { if code == pb.ErrorCode_Success { - session.SendMsg(string(this.moduleHero.GetType()), StrengthenUplv, &pb.HeroResonanceResp{Hero: _hero}) + session.SendMsg(string(this.moduleHero.GetType()), Resonance, &pb.HeroResonanceResp{Hero: _hero}) } }() diff --git a/modules/hero/api_resonanceReset.go b/modules/hero/api_resonanceReset.go index 1ea8d8a64..6fa264b0f 100644 --- a/modules/hero/api_resonanceReset.go +++ b/modules/hero/api_resonanceReset.go @@ -66,7 +66,7 @@ func (this *apiComp) ResonanceReset(session comm.IUserSession, agrs map[string]i defer func() { if code == pb.ErrorCode_Success { - session.SendMsg(string(this.moduleHero.GetType()), "ResonanceReset", &pb.HeroResonanceResetResp{Hero: _hero, Energy: _hero.ResonateNum}) + session.SendMsg(string(this.moduleHero.GetType()), ResonanceReset, &pb.HeroResonanceResetResp{Hero: _hero, Energy: _hero.ResonateNum}) } }() diff --git a/modules/hero/api_resonanceSelect.go b/modules/hero/api_resonanceSelect.go index 18dc8e30c..a2a32db77 100644 --- a/modules/hero/api_resonanceSelect.go +++ b/modules/hero/api_resonanceSelect.go @@ -32,7 +32,7 @@ func (this *apiComp) ResonanceUseEnergy(session comm.IUserSession, agrs map[stri defer func() { if code == pb.ErrorCode_Success { - session.SendMsg(string(this.moduleHero.GetType()), StrengthenUplv, &pb.HeroResonanceUseEnergyResp{Hero: _hero}) + session.SendMsg(string(this.moduleHero.GetType()), ResonanceUseEnergy, &pb.HeroResonanceUseEnergyResp{Hero: _hero}) } }() diff --git a/modules/hero/api_skillUp.go b/modules/hero/api_skillUp.go index 801179e14..08cccaf07 100644 --- a/modules/hero/api_skillUp.go +++ b/modules/hero/api_skillUp.go @@ -74,7 +74,7 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, agrs map[strin } defer func() { if code == pb.ErrorCode_Success { - session.SendMsg(string(this.moduleHero.GetType()), StrengthenUplv, &pb.HeroStrengthenUpSkillResp{Hero: _hero}) + session.SendMsg(string(this.moduleHero.GetType()), StrengthenUpSkill, &pb.HeroStrengthenUpSkillResp{Hero: _hero}) } }() log.Debugf("英雄:%d 技能升级", tagHero) diff --git a/modules/hero/api_starUp.go b/modules/hero/api_starUp.go index 60d713991..ce513b89b 100644 --- a/modules/hero/api_starUp.go +++ b/modules/hero/api_starUp.go @@ -112,7 +112,7 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, agrs map[string } defer func() { if code == pb.ErrorCode_Success { - session.SendMsg(string(this.moduleHero.GetType()), StrengthenUplv, &pb.HeroStrengthenUpStarResp{Hero: _hero}) + session.SendMsg(string(this.moduleHero.GetType()), StrengthenUpStar, &pb.HeroStrengthenUpStarResp{Hero: _hero}) } }()