This commit is contained in:
liwei1dao 2023-11-22 11:56:32 +08:00
commit 675c1b44c9
13 changed files with 85 additions and 32 deletions

BIN
bin/cmd

Binary file not shown.

Binary file not shown.

View File

@ -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": ""
}
}
]

View File

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

View File

@ -569,7 +569,7 @@
"auto_accept": 1,
"tasktips": 0,
"deliver_task": 0,
"lock_add": 0,
"lock_add": 1,
"finish": [],
"finishparameter": "",
"fnishipoint": [],

Binary file not shown.

Binary file not shown.

View File

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

View File

@ -28,6 +28,8 @@ const (
game_horoscope = "game_horoscope.json" //星阵图
game_combatlevel = "game_combatlevel.json" //关卡编辑器
hero_talentbox = "game_talentbox.json" // 天赋详细数据
)
type configureComp struct {

View File

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

View File

@ -14,4 +14,5 @@ const (
GameOpencondType_Maxmapid = 2
GameOpencondType_Worldtaskid = 3
GameOpencondType_Friend = 4
GameOpencondType_MoonLevel = 5
)

View File

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

View File

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