From 18256d7dc6c49626708669d4a21825b48be77b44 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 20 Oct 2022 09:56:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E6=88=90=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/api.go | 1 + modules/hero/api_fusion.go | 2 ++ pb/hero_msg.pb.go | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/hero/api.go b/modules/hero/api.go index 53d8e8809..816def5ed 100644 --- a/modules/hero/api.go +++ b/modules/hero/api.go @@ -27,6 +27,7 @@ const ( //消息回复的头名称 HeroLock = "lock" // 英雄锁定 DrawCard = "drawcard" // 抽卡 DrawCardFloor = "drawcardfloor" // 抽卡保底 + HeroFusionResp = "fusion" ) //组件初始化接口 diff --git a/modules/hero/api_fusion.go b/modules/hero/api_fusion.go index ab464843f..7b1084ed0 100644 --- a/modules/hero/api_fusion.go +++ b/modules/hero/api_fusion.go @@ -76,5 +76,7 @@ func (this *apiComp) Fusion(session comm.IUserSession, req *pb.HeroFusionReq) (c ChangeList = append(ChangeList, newHero) } session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: ChangeList}) + + session.SendMsg(string(this.module.GetType()), Awaken, &pb.HeroFusionResp{Heroid: conf.Hero}) return } diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index b34f81336..d1ddadbc3 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -1754,6 +1754,8 @@ type HeroFusionResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Heroid string `protobuf:"bytes,1,opt,name=heroid,proto3" json:"heroid"` // 获得新英雄 } func (x *HeroFusionResp) Reset() { @@ -1788,6 +1790,13 @@ func (*HeroFusionResp) Descriptor() ([]byte, []int) { return file_hero_hero_msg_proto_rawDescGZIP(), []int{33} } +func (x *HeroFusionResp) GetHeroid() string { + if x != nil { + return x.Heroid + } + return "" +} + var File_hero_hero_msg_proto protoreflect.FileDescriptor var file_hero_hero_msg_proto_rawDesc = []byte{ @@ -1947,9 +1956,11 @@ var file_hero_hero_msg_proto_rawDesc = []byte{ 0x65, 0x72, 0x6f, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x10, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var (