更新配置
This commit is contained in:
parent
03e2337b36
commit
bdcf51ae8a
1564
bin/json/game_heromethod.json
Normal file
1564
bin/json/game_heromethod.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -698,5 +698,47 @@
|
||||
"n": 100
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": 40000,
|
||||
"id_list": 41,
|
||||
"id_tag": 4,
|
||||
"task_display": "释放1技能",
|
||||
"type_id": 401,
|
||||
"condition_second": 1,
|
||||
"condition_condition": 13001,
|
||||
"active": 0,
|
||||
"id_after": 0,
|
||||
"reword": []
|
||||
},
|
||||
{
|
||||
"key": 40001,
|
||||
"id_list": 42,
|
||||
"id_tag": 4,
|
||||
"task_display": "释放2技能",
|
||||
"type_id": 402,
|
||||
"condition_second": 2,
|
||||
"condition_condition": 13001,
|
||||
"active": 0,
|
||||
"id_after": 0,
|
||||
"reword": []
|
||||
},
|
||||
{
|
||||
"key": 40002,
|
||||
"id_list": 43,
|
||||
"id_tag": 4,
|
||||
"task_display": "战斗胜利",
|
||||
"type_id": 403,
|
||||
"condition_second": 1,
|
||||
"condition_condition": 13001,
|
||||
"active": 0,
|
||||
"id_after": 0,
|
||||
"reword": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -478,5 +478,17 @@
|
||||
"packagename": "tips",
|
||||
"comname": "rewardTips",
|
||||
"des": "奖励预览弹窗"
|
||||
},
|
||||
{
|
||||
"id": "roleupgrade",
|
||||
"file": "RoleUpGradeWindow",
|
||||
"unloadpkg": 1,
|
||||
"loadtype": 1,
|
||||
"full": 2,
|
||||
"blur": 1,
|
||||
"package": "roledetails/roledetails",
|
||||
"packagename": "roledetails",
|
||||
"comname": "roleupgrade",
|
||||
"des": "英雄升级升星详情"
|
||||
}
|
||||
]
|
@ -151,7 +151,6 @@ func (r *Robot) printBuilders() {
|
||||
|
||||
//处理用例,发送请求
|
||||
func (r *Robot) handleReq() {
|
||||
// go func() {
|
||||
for len(r.builderMap) > 0 {
|
||||
for _, b := range r.builderMap {
|
||||
if b.enabled && b.req != nil {
|
||||
@ -170,7 +169,6 @@ func (r *Robot) handleReq() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// }()
|
||||
}
|
||||
|
||||
//加入用例并执行请求
|
||||
@ -183,6 +181,7 @@ func (r *Robot) addTestCaseAndReq(tcs []*TestCase) {
|
||||
func (r *Robot) handleNotify(uuid string, msg *pb.UserMessage) {
|
||||
if msg.MainType == "notify" && msg.SubType == "errornotify" {
|
||||
r.caseError++
|
||||
logrus.Debug("errornotify %v", r.caseError)
|
||||
rsp := &pb.NotifyErrorNotifyPush{}
|
||||
if !comm.ProtoUnmarshal(msg, rsp) {
|
||||
return
|
||||
@ -217,6 +216,7 @@ func (r *Robot) handleRsp(id string) {
|
||||
zlog.Fatalf("unmarshal err:%v", err)
|
||||
}
|
||||
|
||||
zlog.Debugf("1 %v.%v", msg.MainType, msg.SubType)
|
||||
uuid, _ := r.findTestCase(msg)
|
||||
if uuid == "" {
|
||||
uuid = id
|
||||
@ -227,7 +227,7 @@ func (r *Robot) handleRsp(id string) {
|
||||
if v.enabled &&
|
||||
(msg.MainType == v.mainType &&
|
||||
msg.SubType == v.subType) {
|
||||
|
||||
zlog.Debugf("2 %v.%v", msg.MainType, msg.SubType)
|
||||
v.hs = time.Since(v.start)
|
||||
if !comm.ProtoUnmarshal(msg, v.rsp) {
|
||||
return
|
||||
|
27
comm/result.go
Normal file
27
comm/result.go
Normal file
@ -0,0 +1,27 @@
|
||||
package comm
|
||||
|
||||
import "go_dreamfactory/lego/sys/log"
|
||||
|
||||
type ResultStruct[T any] struct {
|
||||
Result T
|
||||
Err error
|
||||
}
|
||||
|
||||
func Result[T any](result T, err error) *ResultStruct[T] {
|
||||
return &ResultStruct[T]{Result: result, Err: err}
|
||||
}
|
||||
|
||||
func (this *ResultStruct[T]) Unwrap() T {
|
||||
if this.Err != nil {
|
||||
log.Errorf("%v", this.Err)
|
||||
}
|
||||
return this.Result
|
||||
}
|
||||
|
||||
func (this *ResultStruct[T]) UnwrapOr(ret T) T {
|
||||
if this.Err != nil {
|
||||
return ret
|
||||
}
|
||||
|
||||
return this.Result
|
||||
}
|
@ -40,6 +40,7 @@ type Tables struct {
|
||||
heroResonance *Game_heroResonance
|
||||
comAtn *Game_comAtn
|
||||
heroAwaken *Game_heroAwaken
|
||||
heroMethod *Game_heroMethod
|
||||
shop *Game_shop
|
||||
shopitem *Game_shopitem
|
||||
taskRound *Game_taskRound
|
||||
@ -227,6 +228,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.heroAwaken, err = NewGame_heroAwaken(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_heromethod") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.heroMethod, err = NewGame_heroMethod(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_shop") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
42
sys/configure/structs/game.heroMethod.go
Normal file
42
sys/configure/structs/game.heroMethod.go
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
package cfg
|
||||
|
||||
type Game_heroMethod struct {
|
||||
_dataMap map[int32]*Game_heroMethodData
|
||||
_dataList []*Game_heroMethodData
|
||||
}
|
||||
|
||||
func NewGame_heroMethod(_buf []map[string]interface{}) (*Game_heroMethod, error) {
|
||||
_dataList := make([]*Game_heroMethodData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Game_heroMethodData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := NewGame_heroMethodData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Hid] = _v
|
||||
}
|
||||
}
|
||||
return &Game_heroMethod{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Game_heroMethod) GetDataMap() map[int32]*Game_heroMethodData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Game_heroMethod) GetDataList() []*Game_heroMethodData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Game_heroMethod) Get(key int32) *Game_heroMethodData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
78
sys/configure/structs/game.heroMethodData.go
Normal file
78
sys/configure/structs/game.heroMethodData.go
Normal file
@ -0,0 +1,78 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type Game_heroMethodData struct {
|
||||
Hid int32
|
||||
Herointr string
|
||||
EquipSuit1 []int32
|
||||
Pro1 int32
|
||||
EquipSuit2 []int32
|
||||
Pro2 int32
|
||||
EquipSuit3 []int32
|
||||
Pro3 int32
|
||||
}
|
||||
|
||||
func (Game_heroMethodData) GetTypeId() int {
|
||||
return -622558911
|
||||
}
|
||||
|
||||
func NewGame_heroMethodData(_buf map[string]interface{}) (_v *Game_heroMethodData, err error) {
|
||||
_v = &Game_heroMethodData{}
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hid"].(float64); !_ok_ { err = errors.New("hid error"); return }; _v.Hid = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["herointr"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Herointr error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Herointr, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["equip_suit1"].([]interface{}); !_ok_ { err = errors.New("equip_suit1 error"); return }
|
||||
|
||||
_v.EquipSuit1 = make([]int32, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ int32
|
||||
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
||||
_v.EquipSuit1 = append(_v.EquipSuit1, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pro1"].(float64); !_ok_ { err = errors.New("pro1 error"); return }; _v.Pro1 = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["equip_suit2"].([]interface{}); !_ok_ { err = errors.New("equip_suit2 error"); return }
|
||||
|
||||
_v.EquipSuit2 = make([]int32, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ int32
|
||||
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
||||
_v.EquipSuit2 = append(_v.EquipSuit2, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pro2"].(float64); !_ok_ { err = errors.New("pro2 error"); return }; _v.Pro2 = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["equip_suit3"].([]interface{}); !_ok_ { err = errors.New("equip_suit3 error"); return }
|
||||
|
||||
_v.EquipSuit3 = make([]int32, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ int32
|
||||
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
||||
_v.EquipSuit3 = append(_v.EquipSuit3, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pro3"].(float64); !_ok_ { err = errors.New("pro3 error"); return }; _v.Pro3 = int32(_tempNum_) }
|
||||
return
|
||||
}
|
Loading…
Reference in New Issue
Block a user