diff --git a/bin/cmd b/bin/cmd index 1c4384324..ecf36bb1c 100755 Binary files a/bin/cmd and b/bin/cmd differ diff --git a/bin/gateway b/bin/gateway index 37fae46dd..ccaab57fb 100755 Binary files a/bin/gateway and b/bin/gateway differ diff --git a/bin/json/game_opencond.json b/bin/json/game_opencond.json index d24229717..dc1a10900 100644 --- a/bin/json/game_opencond.json +++ b/bin/json/game_opencond.json @@ -2959,5 +2959,33 @@ "key": "", "text": "" } + }, + { + "id": "buzkashi", + "name": { + "key": "opencond_opencond_name_107", + "text": "捕羊大赛" + }, + "main": [ + { + "key": 2, + "param": 1101030 + } + ], + "wkqbx": 0, + "img": "icon_sytj", + "prompt": { + "key": "opencond_opencond_prompt_88", + "text": "继续完成更多主线任务开启" + }, + "uiid": 0, + "activateType": 0, + "notify": [], + "kqbx": 0, + "kqbx_ui": "", + "kqbx_text": { + "key": "", + "text": "" + } } ] \ No newline at end of file diff --git a/bin/json/game_privilegecard.json b/bin/json/game_privilegecard.json index b2fe7ace3..5f93a2e1c 100644 --- a/bin/json/game_privilegecard.json +++ b/bin/json/game_privilegecard.json @@ -1,6 +1,5 @@ [ { - "id": "yueka_lv1", "pType": 1, "name": "经典月卡", "assert_day": 30, @@ -26,10 +25,10 @@ ], "privilege_id": [ 20201 - ] + ], + "id": "yueka_lv1" }, { - "id": "yueka_lv2", "pType": 2, "name": "典藏月卡", "assert_day": 30, @@ -55,16 +54,7 @@ ], "privilege_id": [ 20201 - ] - }, - { - "id": "passcheck_1", - "pType": 3, - "name": "爬塔战令", - "assert_day": 30, - "renew_day": 0, - "day_reward": [], - "disposable_reward": [], - "privilege_id": [] + ], + "id": "yueka_lv2" } ] \ No newline at end of file diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index 89f8a07f3..b6b38c043 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -569,7 +569,7 @@ "auto_accept": 1, "tasktips": 0, "deliver_task": 0, - "lock_add": 0, + "lock_add": 1, "finish": [], "finishparameter": "", "fnishipoint": [], diff --git a/bin/mainte b/bin/mainte index 413aaf5ba..92e485042 100755 Binary files a/bin/mainte and b/bin/mainte differ diff --git a/bin/worker b/bin/worker index b6ebcd2be..7453d53fd 100755 Binary files a/bin/worker and b/bin/worker differ diff --git a/modules/privilege/configure.go b/modules/privilege/configure.go index ee4c0964c..f7e5a1d59 100644 --- a/modules/privilege/configure.go +++ b/modules/privilege/configure.go @@ -53,17 +53,18 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp return } +// 接口调整 稍后补充 func (this *configureComp) GetPrivilegeCard(id string) (data *cfg.GamePrivilegeCardData, err error) { - var ( - v interface{} - ) - if v, err = this.GetConfigure(game_privilegecard); err == nil { - if configure, ok := v.(*cfg.GamePrivilegeCard); ok { - if data = configure.Get(id); data != nil { - return - } - } - } + // var ( + // v interface{} + // ) + // if v, err = this.GetConfigure(game_privilegecard); err == nil { + // if configure, ok := v.(*cfg.GamePrivilegeCard); ok { + // if data = configure.Get(id); data != nil { + // return + // } + // } + // } err = comm.NewNotFoundConfErr(moduleName, game_privilegecard, id) return } diff --git a/modules/robot/configure.go b/modules/robot/configure.go index 886f416e7..49411720b 100644 --- a/modules/robot/configure.go +++ b/modules/robot/configure.go @@ -28,6 +28,8 @@ const ( game_horoscope = "game_horoscope.json" //星阵图 game_combatlevel = "game_combatlevel.json" //关卡编辑器 + + hero_talentbox = "game_talentbox.json" // 天赋详细数据 ) type configureComp struct { diff --git a/modules/robot/modulerobot_hero.go b/modules/robot/modulerobot_hero.go index 148b16bff..29944238e 100644 --- a/modules/robot/modulerobot_hero.go +++ b/modules/robot/modulerobot_hero.go @@ -223,7 +223,29 @@ func (this *ModuleRobot_Hero) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskDa err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message)) return } + case comm.Rtype33: + req := &pb.HeroAwakenReq{} + for _, v := range this.heros { + data, _ := this.GMGetTalentByHeroId(v.HeroID) + if int(v.JuexingLv) > 1 && 0 < len(data) { + req.HeroObjID = v.Id + break + } + if this.GetHeroTalentMaxLv(v.HeroID) > 10 { + continue + } + req.HeroObjID = v.Id + break + } + if req.HeroObjID == "" { + err = errors.New(fmt.Sprintf("code:%d message:not found hero", errdata.Code)) + return + } + if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "hero", "awaken", req); errdata != nil { + err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message)) + return + } } return } @@ -310,3 +332,12 @@ func (this *ModuleRobot_Hero) GetHeroAwalenConf(hid string) (data []*cfg.GameHer } return } +func (this *ModuleRobot_Hero) GetHeroTalentMaxLv(heroid string) (maxlv int32) { + if v, err := configure.GetConfigure(hero_talentbox); err == nil { + if configure, ok := v.(*cfg.GameTalentBox); ok { + return int32(len(configure.GetDataList())) + } + } + + return 0 +} diff --git a/sys/configure/structs/Game.OpencondType.go b/sys/configure/structs/Game.OpencondType.go index a7be337cb..c95fe8fc4 100644 --- a/sys/configure/structs/Game.OpencondType.go +++ b/sys/configure/structs/Game.OpencondType.go @@ -14,4 +14,5 @@ const ( GameOpencondType_Maxmapid = 2 GameOpencondType_Worldtaskid = 3 GameOpencondType_Friend = 4 + GameOpencondType_MoonLevel = 5 ) diff --git a/sys/configure/structs/Game.PrivilegeCard.go b/sys/configure/structs/Game.PrivilegeCard.go index 345c42ea2..ae9a2a781 100644 --- a/sys/configure/structs/Game.PrivilegeCard.go +++ b/sys/configure/structs/Game.PrivilegeCard.go @@ -9,25 +9,25 @@ package cfg type GamePrivilegeCard struct { - _dataMap map[string]*GamePrivilegeCardData + _dataMap map[int32]*GamePrivilegeCardData _dataList []*GamePrivilegeCardData } func NewGamePrivilegeCard(_buf []map[string]interface{}) (*GamePrivilegeCard, error) { _dataList := make([]*GamePrivilegeCardData, 0, len(_buf)) - dataMap := make(map[string]*GamePrivilegeCardData) + dataMap := make(map[int32]*GamePrivilegeCardData) for _, _ele_ := range _buf { if _v, err2 := DeserializeGamePrivilegeCardData(_ele_); err2 != nil { return nil, err2 } else { _dataList = append(_dataList, _v) - dataMap[_v.Id] = _v + dataMap[_v.PType] = _v } } return &GamePrivilegeCard{_dataList:_dataList, _dataMap:dataMap}, nil } -func (table *GamePrivilegeCard) GetDataMap() map[string]*GamePrivilegeCardData { +func (table *GamePrivilegeCard) GetDataMap() map[int32]*GamePrivilegeCardData { return table._dataMap } @@ -35,7 +35,7 @@ func (table *GamePrivilegeCard) GetDataList() []*GamePrivilegeCardData { return table._dataList } -func (table *GamePrivilegeCard) Get(key string) *GamePrivilegeCardData { +func (table *GamePrivilegeCard) Get(key int32) *GamePrivilegeCardData { return table._dataMap[key] } diff --git a/sys/configure/structs/Game.PrivilegeCardData.go b/sys/configure/structs/Game.PrivilegeCardData.go index 917294a21..e2032e1ff 100644 --- a/sys/configure/structs/Game.PrivilegeCardData.go +++ b/sys/configure/structs/Game.PrivilegeCardData.go @@ -11,7 +11,6 @@ package cfg import "errors" type GamePrivilegeCardData struct { - Id string PType int32 Name string AssertDay int32 @@ -19,6 +18,7 @@ type GamePrivilegeCardData struct { DayReward []*Gameatn DisposableReward []*Gameatn PrivilegeId []int32 + Id string } const TypeId_GamePrivilegeCardData = 1735553455 @@ -28,7 +28,6 @@ func (*GamePrivilegeCardData) GetTypeId() int32 { } func (_v *GamePrivilegeCardData)Deserialize(_buf map[string]interface{}) (err error) { - { var _ok_ bool; if _v.Id, _ok_ = _buf["id"].(string); !_ok_ { err = errors.New("id error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pType"].(float64); !_ok_ { err = errors.New("pType error"); return }; _v.PType = int32(_tempNum_) } { var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["assert_day"].(float64); !_ok_ { err = errors.New("assert_day error"); return }; _v.AssertDay = int32(_tempNum_) } @@ -75,6 +74,7 @@ func (_v *GamePrivilegeCardData)Deserialize(_buf map[string]interface{}) (err er } } + { var _ok_ bool; if _v.Id, _ok_ = _buf["id"].(string); !_ok_ { err = errors.New("id error"); return } } return }