推送关卡boss 房间数据类型调整

This commit is contained in:
meixiongfeng 2023-07-27 10:14:50 +08:00
parent 2bf552053d
commit aa549856c3
5 changed files with 3702 additions and 1294 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6424,7 +6424,7 @@
"text": "寻找所有宝箱1" "text": "寻找所有宝箱1"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 1,
"npc": 60130, "npc": 60130,
"completetask": [ "completetask": [
50000023 50000023
@ -6466,7 +6466,7 @@
"text": "寻找所有宝箱2" "text": "寻找所有宝箱2"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 1,
"npc": 60140, "npc": 60140,
"completetask": [ "completetask": [
50000024 50000024
@ -6508,7 +6508,7 @@
"text": "寻找所有宝箱3" "text": "寻找所有宝箱3"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 1,
"npc": 60150, "npc": 60150,
"completetask": [ "completetask": [
50000025 50000025
@ -6550,7 +6550,7 @@
"text": "寻找所有宝箱4" "text": "寻找所有宝箱4"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 1,
"npc": 60160, "npc": 60160,
"completetask": [ "completetask": [
50000026 50000026
@ -6592,7 +6592,7 @@
"text": "寻找所有宝箱5" "text": "寻找所有宝箱5"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 1,
"npc": 60170, "npc": 60170,
"completetask": [ "completetask": [
50000027 50000027

View File

@ -16,11 +16,12 @@ func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.StonehengeG
func (this *apiComp) GetList(session comm.IUserSession, req *pb.StonehengeGetListReq) (errdata *pb.ErrorData) { func (this *apiComp) GetList(session comm.IUserSession, req *pb.StonehengeGetListReq) (errdata *pb.ErrorData) {
var ( var (
stone *pb.DBStonehenge stone *pb.DBStonehenge
rooms []int32 rooms map[int32]int32
) )
if errdata = this.GetListCheck(session, req); errdata != nil { if errdata = this.GetListCheck(session, req); errdata != nil {
return return
} }
rooms = make(map[int32]int32)
stone = this.module.modelStonehenge.GetStonehengeData(session.GetUserId()) stone = this.module.modelStonehenge.GetStonehengeData(session.GetUserId())
// 校验赛季是否结束 // 校验赛季是否结束
if configure.Now().Unix() >= stone.Etime { if configure.Now().Unix() >= stone.Etime {
@ -47,8 +48,9 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.StonehengeGetLis
} }
s := &DBStoneBoss{} s := &DBStoneBoss{}
this.module.ModuleTools.GetGlobalData(StoneBossKey, s) this.module.ModuleTools.GetGlobalData(StoneBossKey, s)
for _, v := range s.BossStage { for k, v := range s.BossStage {
rooms = append(rooms, v.Roomid) //rooms = append(rooms, v.Roomid)
rooms[k] = v.Roomid
} }
session.SendMsg(string(this.module.GetType()), "getlist", &pb.StonehengeGetListResp{ session.SendMsg(string(this.module.GetType()), "getlist", &pb.StonehengeGetListResp{
Data: stone, Data: stone,

View File

@ -30,10 +30,9 @@ type RoomData struct {
Portal []int32 `protobuf:"varint,2,rep,packed,name=portal,proto3" json:"portal"` // 传送门id Portal []int32 `protobuf:"varint,2,rep,packed,name=portal,proto3" json:"portal"` // 传送门id
Selectbuff []int32 `protobuf:"varint,3,rep,packed,name=selectbuff,proto3" json:"selectbuff"` // 给前端显示的buff 组 Selectbuff []int32 `protobuf:"varint,3,rep,packed,name=selectbuff,proto3" json:"selectbuff"` // 给前端显示的buff 组
// map<int32,int32> group = 4; // 事件组 // map<int32,int32> group = 4; // 事件组
Complete bool `protobuf:"varint,5,opt,name=complete,proto3" json:"complete"` // 房间是否通关 Complete bool `protobuf:"varint,5,opt,name=complete,proto3" json:"complete"` // 房间是否通关
//repeated int32 selectweight = 9; // 进入关卡就要选择的 Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index"` // 房间索引
Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index"` // 房间索引 Roomid int32 `protobuf:"varint,7,opt,name=roomid,proto3" json:"roomid"` // 房间id
Roomid int32 `protobuf:"varint,7,opt,name=roomid,proto3" json:"roomid"` // 房间id
} }
func (x *RoomData) Reset() { func (x *RoomData) Reset() {
@ -122,7 +121,7 @@ type DBStonehenge struct {
Rooms *RoomData `protobuf:"bytes,5,opt,name=rooms,proto3" json:"rooms"` // 当前房间信息 Rooms *RoomData `protobuf:"bytes,5,opt,name=rooms,proto3" json:"rooms"` // 当前房间信息
Webuff []int32 `protobuf:"varint,6,rep,packed,name=webuff,proto3" json:"webuff"` // 我方环境buff 不能被更改 Webuff []int32 `protobuf:"varint,6,rep,packed,name=webuff,proto3" json:"webuff"` // 我方环境buff 不能被更改
Enemybuff []int32 `protobuf:"varint,7,rep,packed,name=enemybuff,proto3" json:"enemybuff"` // 地方环境buff 不能被更改 Enemybuff []int32 `protobuf:"varint,7,rep,packed,name=enemybuff,proto3" json:"enemybuff"` // 地方环境buff 不能被更改
Userbuff map[int32]int32 `protobuf:"bytes,8,rep,name=userbuff,proto3" json:"userbuff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 玩家获得的buff key buff 类型 Userbuff map[int32]int32 `protobuf:"bytes,8,rep,name=userbuff,proto3" json:"userbuff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 玩家获得的buff key:buffid value:0
Hero []*BattleRole `protobuf:"bytes,9,rep,name=hero,proto3" json:"hero"` // 英雄信息 Hero []*BattleRole `protobuf:"bytes,9,rep,name=hero,proto3" json:"hero"` // 英雄信息
Reward map[int32]bool `protobuf:"bytes,10,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 是否首通 key:stageid Reward map[int32]bool `protobuf:"bytes,10,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 是否首通 key:stageid
Addweight map[int32]int32 `protobuf:"bytes,11,rep,name=addweight,proto3" json:"addweight" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 选择buff权重增加 key 类型 Addweight map[int32]int32 `protobuf:"bytes,11,rep,name=addweight,proto3" json:"addweight" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 选择buff权重增加 key 类型

View File

@ -64,8 +64,8 @@ type StonehengeGetListResp struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Data *DBStonehenge `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` Data *DBStonehenge `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
Roomid []int32 `protobuf:"varint,2,rep,packed,name=roomid,proto3" json:"roomid"` //房间id 根据房间找boss Roomid map[int32]int32 `protobuf:"bytes,2,rep,name=roomid,proto3" json:"roomid" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //房间id 根据房间找boss
} }
func (x *StonehengeGetListResp) Reset() { func (x *StonehengeGetListResp) Reset() {
@ -107,7 +107,7 @@ func (x *StonehengeGetListResp) GetData() *DBStonehenge {
return nil return nil
} }
func (x *StonehengeGetListResp) GetRoomid() []int32 { func (x *StonehengeGetListResp) GetRoomid() map[int32]int32 {
if x != nil { if x != nil {
return x.Roomid return x.Roomid
} }
@ -901,12 +901,18 @@ var file_stonehenge_stonehenge_msg_proto_rawDesc = []byte{
0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x16, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x16,
0x0a, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x4c,
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x52, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0xb1, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x6e, 0x65,
0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x04, 0x64, 0x61, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x04, 0x64,
0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x02, 0x20,
0x28, 0x05, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x22, 0x61, 0x0a, 0x17, 0x53, 0x74, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65,
0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x6f, 0x6f, 0x6d,
0x69, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x1a,
0x39, 0x0a, 0x0b, 0x52, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x61, 0x0a, 0x17, 0x53, 0x74,
0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x65, 0x76,
0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03,
0x28, 0x09, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x66, 0x66, 0x54, 0x28, 0x09, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x66, 0x66, 0x54,
@ -995,7 +1001,7 @@ func file_stonehenge_stonehenge_msg_proto_rawDescGZIP() []byte {
return file_stonehenge_stonehenge_msg_proto_rawDescData return file_stonehenge_stonehenge_msg_proto_rawDescData
} }
var file_stonehenge_stonehenge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_stonehenge_stonehenge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{ var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{
(*StonehengeGetListReq)(nil), // 0: StonehengeGetListReq (*StonehengeGetListReq)(nil), // 0: StonehengeGetListReq
(*StonehengeGetListResp)(nil), // 1: StonehengeGetListResp (*StonehengeGetListResp)(nil), // 1: StonehengeGetListResp
@ -1013,33 +1019,35 @@ var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{
(*StonehengeBattleResp)(nil), // 13: StonehengeBattleResp (*StonehengeBattleResp)(nil), // 13: StonehengeBattleResp
(*StonehengeBattleOverReq)(nil), // 14: StonehengeBattleOverReq (*StonehengeBattleOverReq)(nil), // 14: StonehengeBattleOverReq
(*StonehengeBattleOverResp)(nil), // 15: StonehengeBattleOverResp (*StonehengeBattleOverResp)(nil), // 15: StonehengeBattleOverResp
(*DBStonehenge)(nil), // 16: DBStonehenge nil, // 16: StonehengeGetListResp.RoomidEntry
(*BattleRole)(nil), // 17: BattleRole (*DBStonehenge)(nil), // 17: DBStonehenge
(*RoomData)(nil), // 18: RoomData (*BattleRole)(nil), // 18: BattleRole
(*UserAssets)(nil), // 19: UserAssets (*RoomData)(nil), // 19: RoomData
(*BattleFormation)(nil), // 20: BattleFormation (*UserAssets)(nil), // 20: UserAssets
(*BattleInfo)(nil), // 21: BattleInfo (*BattleFormation)(nil), // 21: BattleFormation
(*BattleReport)(nil), // 22: BattleReport (*BattleInfo)(nil), // 22: BattleInfo
(*BattleReport)(nil), // 23: BattleReport
} }
var file_stonehenge_stonehenge_msg_proto_depIdxs = []int32{ var file_stonehenge_stonehenge_msg_proto_depIdxs = []int32{
16, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge 17, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge
17, // 1: StonehengeEnterLevelResp.hero:type_name -> BattleRole 16, // 1: StonehengeGetListResp.roomid:type_name -> StonehengeGetListResp.RoomidEntry
18, // 2: StonehengeEnterLevelResp.room:type_name -> RoomData 18, // 2: StonehengeEnterLevelResp.hero:type_name -> BattleRole
18, // 3: StonehengeGotoRoomResp.room:type_name -> RoomData 19, // 3: StonehengeEnterLevelResp.room:type_name -> RoomData
18, // 4: StonehengeEventResp.room:type_name -> RoomData 19, // 4: StonehengeGotoRoomResp.room:type_name -> RoomData
19, // 5: StonehengeEventResp.reward:type_name -> UserAssets 19, // 5: StonehengeEventResp.room:type_name -> RoomData
18, // 6: StonehengeGetRoomInfoResp.room:type_name -> RoomData 20, // 6: StonehengeEventResp.reward:type_name -> UserAssets
16, // 7: StonehengeFinishResp.data:type_name -> DBStonehenge 19, // 7: StonehengeGetRoomInfoResp.room:type_name -> RoomData
20, // 8: StonehengeBattleReq.battle:type_name -> BattleFormation 17, // 8: StonehengeFinishResp.data:type_name -> DBStonehenge
21, // 9: StonehengeBattleResp.info:type_name -> BattleInfo 21, // 9: StonehengeBattleReq.battle:type_name -> BattleFormation
22, // 10: StonehengeBattleOverReq.report:type_name -> BattleReport 22, // 10: StonehengeBattleResp.info:type_name -> BattleInfo
18, // 11: StonehengeBattleOverResp.room:type_name -> RoomData 23, // 11: StonehengeBattleOverReq.report:type_name -> BattleReport
19, // 12: StonehengeBattleOverResp.reward:type_name -> UserAssets 19, // 12: StonehengeBattleOverResp.room:type_name -> RoomData
13, // [13:13] is the sub-list for method output_type 20, // 13: StonehengeBattleOverResp.reward:type_name -> UserAssets
13, // [13:13] is the sub-list for method input_type 14, // [14:14] is the sub-list for method output_type
13, // [13:13] is the sub-list for extension type_name 14, // [14:14] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension extendee 14, // [14:14] is the sub-list for extension type_name
0, // [0:13] is the sub-list for field type_name 14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
} }
func init() { file_stonehenge_stonehenge_msg_proto_init() } func init() { file_stonehenge_stonehenge_msg_proto_init() }
@ -1251,7 +1259,7 @@ func file_stonehenge_stonehenge_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stonehenge_stonehenge_msg_proto_rawDesc, RawDescriptor: file_stonehenge_stonehenge_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 16, NumMessages: 17,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },