更新任务配置

This commit is contained in:
wh_zcy 2022-11-07 22:24:06 +08:00
parent aeb93e6b50
commit f82c6627ac
4 changed files with 60 additions and 99 deletions

View File

@ -1,7 +1,13 @@
[
{
"id": 10001,
"type_id": 10001,
"id_list": 1,
"weight": 1000,
"jump_interface": 103,
"task_display": {
"key": "guild_task10001",
"text": "提升任意英雄1级"
},
"reward": [
{
"a": "attr",
@ -29,8 +35,14 @@
"contribution": 50
},
{
"id": 10002,
"type_id": 10002,
"id_list": 2,
"weight": 1000,
"jump_interface": 103,
"task_display": {
"key": "guild_task10002",
"text": "提升任意英雄5级"
},
"reward": [
{
"a": "attr",
@ -58,8 +70,14 @@
"contribution": 50
},
{
"id": 10003,
"type_id": 10003,
"id_list": 3,
"weight": 1000,
"jump_interface": 103,
"task_display": {
"key": "guild_task10003",
"text": "提升任意英雄10级"
},
"reward": [
{
"a": "attr",
@ -87,8 +105,14 @@
"contribution": 50
},
{
"id": 10004,
"type_id": 10101,
"id_list": 4,
"weight": 1000,
"jump_interface": 0,
"task_display": {
"key": "guild_task10101",
"text": "登录游戏"
},
"reward": [
{
"a": "attr",
@ -116,8 +140,14 @@
"contribution": 50
},
{
"id": 10005,
"type_id": 10201,
"id_list": 5,
"weight": 1000,
"jump_interface": 107,
"task_display": {
"key": "guild_task10201",
"text": "进行1次普通招募"
},
"reward": [
{
"a": "attr",
@ -145,8 +175,14 @@
"contribution": 50
},
{
"id": 10006,
"type_id": 10202,
"id_list": 6,
"weight": 1000,
"jump_interface": 107,
"task_display": {
"key": "guild_task10202",
"text": "进行5次普通招募"
},
"reward": [
{
"a": "attr",
@ -174,8 +210,14 @@
"contribution": 50
},
{
"id": 10007,
"type_id": 10203,
"id_list": 7,
"weight": 1000,
"jump_interface": 107,
"task_display": {
"key": "guild_task10203",
"text": "进行10次普通招募"
},
"reward": [
{
"a": "attr",
@ -201,92 +243,5 @@
}
],
"contribution": 50
},
{
"id": 10008,
"weight": 1000,
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 70
},
{
"a": "attr",
"t": "guildcoin",
"n": 50
}
],
"sociaty_reward": [
{
"a": "attr",
"t": "guildactive",
"n": 20
},
{
"a": "attr",
"t": "guildexp",
"n": 20
}
],
"contribution": 50
},
{
"id": 10009,
"weight": 1000,
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 80
},
{
"a": "attr",
"t": "guildcoin",
"n": 50
}
],
"sociaty_reward": [
{
"a": "attr",
"t": "guildactive",
"n": 20
},
{
"a": "attr",
"t": "guildexp",
"n": 20
}
],
"contribution": 50
},
{
"id": 10010,
"weight": 1000,
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 100
},
{
"a": "attr",
"t": "guildcoin",
"n": 50
}
],
"sociaty_reward": [
{
"a": "attr",
"t": "guildactive",
"n": 20
},
{
"a": "attr",
"t": "guildexp",
"n": 40
}
],
"contribution": 50
}
]

View File

@ -48,13 +48,13 @@ func (this *ModelSociatyTask) initSociatyTask(uid, sociatyId string) error {
randInts := utils.RandomNumbers(0, len(list)-1, int(ggd.GuildTaskNum))
for _, v := range randInts {
taskList = append(taskList, &pb.SociatyTask{
TaskId: list[v].Id,
TaskId: list[v].TypeId,
})
}
} else {
for _, v := range list {
taskList = append(taskList, &pb.SociatyTask{
TaskId: v.Id,
TaskId: v.TypeId,
})
}
}

View File

@ -21,7 +21,7 @@ func NewGameGuildTask(_buf []map[string]interface{}) (*GameGuildTask, error) {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
dataMap[_v.TypeId] = _v
}
}
return &GameGuildTask{_dataList:_dataList, _dataMap:dataMap}, nil

View File

@ -11,8 +11,11 @@ package cfg
import "errors"
type GameGuildTaskData struct {
Id int32
TypeId int32
IdList int32
Weight int32
JumpInterface int32
TaskDisplay string
Reward []*Gameatn
SociatyReward []*Gameatn
Contribution int32
@ -25,8 +28,11 @@ func (*GameGuildTaskData) GetTypeId() int32 {
}
func (_v *GameGuildTaskData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type_id"].(float64); !_ok_ { err = errors.New("type_id error"); return }; _v.TypeId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_list"].(float64); !_ok_ { err = errors.New("id_list error"); return }; _v.IdList = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["jump_interface"].(float64); !_ok_ { err = errors.New("jump_interface error"); return }; _v.JumpInterface = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_display"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDisplay error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDisplay, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{
var _arr_ []interface{}
var _ok_ bool