This commit is contained in:
liwei 2023-07-25 19:48:26 +08:00
commit b53dfc9ad8
8 changed files with 249 additions and 88 deletions

View File

@ -228,5 +228,49 @@
"t": "10000002",
"n": 19
}
},
{
"BuffId": 143002311,
"BuffGroupId": 1005,
"Type": 1,
"BuffLevel": 1,
"Quality": 3,
"BuffIcon": "",
"BuffStory": {
"key": "stonehenge_buffconfig_BuffStory_9",
"text": "描述描述描述9"
},
"BuffUpgradeCost": {
"a": "attr",
"t": "gold",
"n": 8
},
"BuffSell": {
"a": "attr",
"t": "gold",
"n": 9
}
},
{
"BuffId": 115005311,
"BuffGroupId": 1005,
"Type": 1,
"BuffLevel": 2,
"Quality": 3,
"BuffIcon": "",
"BuffStory": {
"key": "stonehenge_buffconfig_BuffStory_10",
"text": "描述描述描述10"
},
"BuffUpgradeCost": {
"a": "attr",
"t": "gold",
"n": 9
},
"BuffSell": {
"a": "attr",
"t": "gold",
"n": 10
}
}
]

View File

@ -1,8 +1,10 @@
package stonehenge
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
//参数校验
@ -16,18 +18,33 @@ func (this *apiComp) EnterLevelCheck(session comm.IUserSession, req *pb.Stonehen
return
}
// 选择英雄
//进入关卡 选择英雄和buff 一起处理
func (this *apiComp) EnterLevel(session comm.IUserSession, req *pb.StonehengeEnterLevelReq) (errdata *pb.ErrorData) {
var (
stone *pb.DBStonehenge
update map[string]interface{}
heros []*pb.DBHero
stone *pb.DBStonehenge
update map[string]interface{}
heros []*pb.DBHero
portal int32 // 生成传送门 构造房间数据
confStage *cfg.GameStroneStageData
roomlotteryConf *cfg.GameRoomlotteryData
roomConf *cfg.GameStroneRoomData
szBuff []int32
err error
)
update = make(map[string]interface{})
if errdata = this.EnterLevelCheck(session, req); errdata != nil {
return
}
confStage = this.module.configure.GetStageConfByStageid(req.Stageid, 1)
if confStage == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
}
return
}
portal = confStage.RoomGroup
this.module.Debugf("%v", confStage)
stone = this.module.modelStonehenge.GetStonehengeData(session.GetUserId())
if len(stone.Hero) != 0 || len(stone.Addweight) != 0 {
@ -55,6 +72,37 @@ func (this *apiComp) EnterLevel(session comm.IUserSession, req *pb.StonehengeEnt
update["hero"] = stone.Hero
stone.Addweight[req.BuffType] = 1
update["addweight"] = stone.Addweight
// 生成传送门
if roomlotteryConf = this.module.configure.GetRoomLotterConfById(portal); roomlotteryConf != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: fmt.Sprintf("GetRoomLotterConfById :%d", portal),
}
return
}
stone.Rooms = &pb.RoomData{
Eventid: map[int32]bool{},
Portal: this.module.configure.GetRoomGroupDataByLottery(confStage.PortalGroup),
Selectbuff: []int32{},
Complete: false,
Index: 1,
Roomid: confStage.RoomGroup, // 第一个房间的房间id读配置
}
if roomConf, err = this.module.configure.GetStoneRoomDataById(portal); err != nil {
return
}
if roomConf.EventrewardGroup != 0 { // 参数校验
szBuff = this.module.configure.GetEventGroupDataByLottery(roomConf.EventrewardGroup)
for _, v := range szBuff {
stone.Rooms.Eventid[v] = true
}
}
update["rooms"] = stone.Rooms
update["curRoomIndes"] = stone.CurRoomIndes
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), "enterlevel", &pb.StonehengeEnterLevelResp{
Hero: stone.Hero,

View File

@ -1,8 +1,10 @@
package stonehenge
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
//参数校验
@ -16,11 +18,14 @@ func (this *apiComp) EventCheck(session comm.IUserSession, req *pb.StonehengeEve
return
}
// 结算房间
func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq) (errdata *pb.ErrorData) {
var (
stone *pb.DBStonehenge
update map[string]interface{}
stone *pb.DBStonehenge
update map[string]interface{}
roomConf *cfg.GameStroneRoomData
err error
newEvent int32 // 是否有新的事件
eventConf *cfg.GameStroneEventData
)
update = make(map[string]interface{})
if errdata = this.EventCheck(session, req); errdata != nil {
@ -28,13 +33,47 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
}
stone = this.module.modelStonehenge.GetStonehengeData(session.GetUserId())
stone.StageID = 0
if _, ok := stone.Rooms.Eventid[req.Eventid]; !ok { // 不存在该事件
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: fmt.Sprintf("req.Eventid err :%d", req.Eventid),
}
return
}
if stone.Rooms.Eventid[req.Eventid] { // 重复完成
errdata = &pb.ErrorData{
Code: pb.ErrorCode_StonehengeRepeatedReward,
Title: pb.ErrorCode_StonehengeRepeatedReward.ToString(),
Message: fmt.Sprintf("req.Eventid err :%d", req.Eventid),
}
return
}
update["stageID"] = stone.StageID
if roomConf, err = this.module.configure.GetStoneRoomDataById(stone.Rooms.Roomid); err != nil {
return
}
if eventConf, err = this.module.configure.GetStoneEventDataById(req.Eventid); err != nil {
return
}
// 校验事件有后续事件
if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中
newEvent = eventConf.PostEvent
stone.Rooms.Eventid[newEvent] = false //
stone.Rooms.Eventid[req.Eventid] = true //
}
// 校验是否通关
if roomConf.Condition == req.Eventid {
stone.Rooms.Complete = true
}
update["rooms"] = stone.Rooms
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), "event", &pb.StonehengeEventResp{
Eventid: req.Eventid,
Eventid: req.Eventid,
NewEvent: newEvent,
Room: stone.Rooms,
})
return
}

View File

@ -30,13 +30,19 @@ func (this *apiComp) GotoRoom(session comm.IUserSession, req *pb.StonehengeGotoR
// 校验传送门
if stone.Rooms != nil {
if !stone.Rooms.Complete { // 上一关好没有完成 不能进下一关
errdata = &pb.ErrorData{
Code: pb.ErrorCode_StonehengeGotoRoomFailed,
Message: pb.ErrorCode_StonehengeGotoRoomFailed.ToString(),
}
return
}
for _, v := range stone.Rooms.Portal {
if v == req.Portal {
bCheck = true
break
}
}
}
if !bCheck {
errdata = &pb.ErrorData{

View File

@ -27,7 +27,7 @@ type configureComp struct {
module *Stonehenge
hlock sync.RWMutex
// stronestage
stage map[int32][]*cfg.GameStroneStageData
stage map[int64]*cfg.GameStroneStageData
// buff
buff map[int32]map[int32]struct{} // key buff 类型 value buffid
@ -95,7 +95,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
configure.RegisterConfigure(game_stageconf, cfg.NewGameStroneStage, this.LoadGameStroneStage)
configure.RegisterConfigure(game_buffconf, cfg.NewGameStroneBuff, this.LoadGameStroneBuff)
this.GetGameStroneBuff(2)
return
}
@ -324,9 +323,11 @@ func (this *configureComp) LoadRoomGroupData() {
return
}
func (this *configureComp) GetRoomLotterConfById(id int32) (data *cfg.GameRoomlotteryData) {
if v, err := this.GetConfigure(game_roomlottery); err == nil {
if configure, ok := v.(*cfg.GameRoomlottery); ok {
return configure.Get(id)
data = configure.Get(id)
return
}
}
return
@ -704,9 +705,10 @@ func (this *configureComp) LoadGameStroneStage() {
if configure, ok := v.(*cfg.GameStroneStage); ok {
this.hlock.Lock()
defer this.hlock.Unlock()
this.stage = make(map[int32][]*cfg.GameStroneStageData)
this.stage = make(map[int64]*cfg.GameStroneStageData, 0)
for _, v := range configure.GetDataList() {
this.stage[v.StageId] = append(this.stage[v.StageId], v)
key := int64(v.StageId)<<16 + int64(v.RoomId)
this.stage[key] = v
}
}
}
@ -714,8 +716,10 @@ func (this *configureComp) LoadGameStroneStage() {
return
}
func (this *configureComp) GetStageConfByStageid(stgeid int32) (conf []*cfg.GameStroneStageData) {
return this.stage[stgeid]
// 参数1 关卡id 参数2 层数id
func (this *configureComp) GetStageConfByStageid(stgeid int32, roomid int32) (conf *cfg.GameStroneStageData) {
key := int64(stgeid)<<16 + int64(roomid)
return this.stage[key]
}
func (this *configureComp) LoadGameStroneBuff() {

View File

@ -422,6 +422,8 @@ const (
ErrorCode_StonehengeRepeatedSelectBUff ErrorCode = 4902 // 重复选择buff
ErrorCode_StonehengePortalErr ErrorCode = 4903 // 传送门校验不对
ErrorCode_StonehengeEnterRoomFailed ErrorCode = 4904 // 进入房间失败
ErrorCode_StonehengeRepeatedReward ErrorCode = 4905 // 事件重复完成
ErrorCode_StonehengeGotoRoomFailed ErrorCode = 4906 // 进入房间失败
)
// Enum value maps for ErrorCode.
@ -784,6 +786,8 @@ var (
4902: "StonehengeRepeatedSelectBUff",
4903: "StonehengePortalErr",
4904: "StonehengeEnterRoomFailed",
4905: "StonehengeRepeatedReward",
4906: "StonehengeGotoRoomFailed",
}
ErrorCode_value = map[string]int32{
"Success": 0,
@ -1143,6 +1147,8 @@ var (
"StonehengeRepeatedSelectBUff": 4902,
"StonehengePortalErr": 4903,
"StonehengeEnterRoomFailed": 4904,
"StonehengeRepeatedReward": 4905,
"StonehengeGotoRoomFailed": 4906,
}
)
@ -1177,7 +1183,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xf6, 0x41, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xb4, 0x42, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
@ -1704,8 +1710,12 @@ var file_errorcode_proto_rawDesc = []byte{
0x12, 0x18, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x50, 0x6f,
0x72, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x10, 0xa7, 0x26, 0x12, 0x1e, 0x0a, 0x19, 0x53, 0x74,
0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x6f, 0x6f,
0x6d, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xa8, 0x26, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6d, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xa8, 0x26, 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x74,
0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64,
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xa9, 0x26, 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x74, 0x6f,
0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x6f, 0x74, 0x6f, 0x52, 0x6f, 0x6f, 0x6d, 0x46,
0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xaa, 0x26, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -32,7 +32,8 @@ type RoomData struct {
// map<int32,int32> group = 4; // 事件组
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
}
func (x *RoomData) Reset() {
@ -102,6 +103,13 @@ func (x *RoomData) GetIndex() int32 {
return 0
}
func (x *RoomData) GetRoomid() int32 {
if x != nil {
return x.Roomid
}
return 0
}
type DBStonehenge struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -235,7 +243,7 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{
0x0a, 0x1e, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2f, 0x73, 0x74, 0x6f,
0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x01, 0x0a, 0x08, 0x52, 0x6f, 0x6f,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x01, 0x0a, 0x08, 0x52, 0x6f, 0x6f,
0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74,
0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07,
@ -246,47 +254,49 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{
0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
0x78, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x45, 0x6e, 0x74, 0x72,
0x78, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x76, 0x65,
0x6e, 0x74, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbe, 0x04, 0x0a, 0x0c, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e,
0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67,
0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65,
0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64,
0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f,
0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61,
0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x76, 0x62, 0x75,
0x66, 0x66, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x62, 0x75, 0x66,
0x66, 0x12, 0x37, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x18, 0x07, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e,
0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x12, 0x1f, 0x0a, 0x04, 0x68, 0x65,
0x72, 0x6f, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x31, 0x0a, 0x06, 0x72,
0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42,
0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72,
0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x3a,
0x0a, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65,
0x2e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65,
0x1a, 0x3b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbe, 0x04,
0x0a, 0x0c, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75,
0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, 0x12, 0x1f,
0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e,
0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12,
0x18, 0x0a, 0x07, 0x65, 0x6e, 0x76, 0x62, 0x75, 0x66, 0x66, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05,
0x52, 0x07, 0x65, 0x6e, 0x76, 0x62, 0x75, 0x66, 0x66, 0x12, 0x37, 0x0a, 0x08, 0x75, 0x73, 0x65,
0x72, 0x62, 0x75, 0x66, 0x66, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42,
0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x62,
0x75, 0x66, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75,
0x66, 0x66, 0x12, 0x1f, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x68,
0x65, 0x72, 0x6f, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x09, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e,
0x67, 0x65, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06,
0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69,
0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x53, 0x74,
0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67,
0x68, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67,
0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72,
0x62, 0x75, 0x66, 0x66, 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, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x1a, 0x3c, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 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, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a,
0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 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, 0x08, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x77,
0x65, 0x69, 0x67, 0x68, 0x74, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -342,10 +342,10 @@ type StonehengeEventReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id
Param1 string `protobuf:"bytes,2,opt,name=param1,proto3" json:"param1"`
Param2 string `protobuf:"bytes,3,opt,name=param2,proto3" json:"param2"`
Param3 string `protobuf:"bytes,4,opt,name=param3,proto3" json:"param3"`
Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id
Param1 int32 `protobuf:"varint,2,opt,name=param1,proto3" json:"param1"`
Param2 int32 `protobuf:"varint,3,opt,name=param2,proto3" json:"param2"`
Param3 int32 `protobuf:"varint,4,opt,name=param3,proto3" json:"param3"`
}
func (x *StonehengeEventReq) Reset() {
@ -387,25 +387,25 @@ func (x *StonehengeEventReq) GetEventid() int32 {
return 0
}
func (x *StonehengeEventReq) GetParam1() string {
func (x *StonehengeEventReq) GetParam1() int32 {
if x != nil {
return x.Param1
}
return ""
return 0
}
func (x *StonehengeEventReq) GetParam2() string {
func (x *StonehengeEventReq) GetParam2() int32 {
if x != nil {
return x.Param2
}
return ""
return 0
}
func (x *StonehengeEventReq) GetParam3() string {
func (x *StonehengeEventReq) GetParam3() int32 {
if x != nil {
return x.Param3
}
return ""
return 0
}
type StonehengeEventResp struct {
@ -413,10 +413,10 @@ type StonehengeEventResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id
NewEvent int32 `protobuf:"varint,2,opt,name=newEvent,proto3" json:"newEvent"` // 新的事件id
Room *RoomData `protobuf:"bytes,3,opt,name=room,proto3" json:"room"`
Reward *UserAssets `protobuf:"bytes,4,opt,name=reward,proto3" json:"reward"` // 完成事件获得的奖励
Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id
NewEvent int32 `protobuf:"varint,2,opt,name=newEvent,proto3" json:"newEvent"` // 新的事件id
Room *RoomData `protobuf:"bytes,3,opt,name=room,proto3" json:"room"`
Reward []*UserAssets `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward"` // 完成事件获得的奖励
}
func (x *StonehengeEventResp) Reset() {
@ -472,7 +472,7 @@ func (x *StonehengeEventResp) GetRoom() *RoomData {
return nil
}
func (x *StonehengeEventResp) GetReward() *UserAssets {
func (x *StonehengeEventResp) GetReward() []*UserAssets {
if x != nil {
return x.Reward
}
@ -823,10 +823,10 @@ type StonehengeBattleOverResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id
NewEvent int32 `protobuf:"varint,2,opt,name=newEvent,proto3" json:"newEvent"` // 新的事件id
Room *RoomData `protobuf:"bytes,3,opt,name=room,proto3" json:"room"`
Reward *UserAssets `protobuf:"bytes,4,opt,name=reward,proto3" json:"reward"` // 完成事件获得的奖励
Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id
NewEvent int32 `protobuf:"varint,2,opt,name=newEvent,proto3" json:"newEvent"` // 新的事件id
Room *RoomData `protobuf:"bytes,3,opt,name=room,proto3" json:"room"`
Reward []*UserAssets `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward"` // 完成事件获得的奖励
}
func (x *StonehengeBattleOverResp) Reset() {
@ -882,7 +882,7 @@ func (x *StonehengeBattleOverResp) GetRoom() *RoomData {
return nil
}
func (x *StonehengeBattleOverResp) GetReward() *UserAssets {
func (x *StonehengeBattleOverResp) GetReward() []*UserAssets {
if x != nil {
return x.Reward
}
@ -930,10 +930,10 @@ var file_stonehenge_stonehenge_msg_proto_rawDesc = []byte{
0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x71, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72,
0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72,
0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x33, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e,
0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76,
@ -941,7 +941,7 @@ var file_stonehenge_stonehenge_msg_proto_rawDesc = []byte{
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d,
0x12, 0x23, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x12, 0x23, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x72,
0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65,
0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
@ -978,7 +978,7 @@ var file_stonehenge_stonehenge_msg_proto_rawDesc = []byte{
0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04,
0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f,
0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x23, 0x0a, 0x06, 0x72,
0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73,
0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}