合成返回

This commit is contained in:
meixiongfeng 2022-10-20 09:56:12 +08:00
parent f34efe5f45
commit 18256d7dc6
3 changed files with 16 additions and 2 deletions

View File

@ -27,6 +27,7 @@ const ( //消息回复的头名称
HeroLock = "lock" // 英雄锁定
DrawCard = "drawcard" // 抽卡
DrawCardFloor = "drawcardfloor" // 抽卡保底
HeroFusionResp = "fusion"
)
//组件初始化接口

View File

@ -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
}

View File

@ -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 (