版署 道具资源发放规则 通过gm 字段过滤

This commit is contained in:
meixiongfeng 2023-08-21 15:18:05 +08:00
parent 22969820e1
commit d473b3b005
5 changed files with 1140 additions and 671 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1651,7 +1651,7 @@
"main": [ "main": [
{ {
"key": 1, "key": 1,
"param": 30 "param": 70
} }
], ],
"wkqbx": 0, "wkqbx": 0,
@ -1659,7 +1659,7 @@
"img": "", "img": "",
"prompt": { "prompt": {
"key": "opencond_opencond_prompt_72", "key": "opencond_opencond_prompt_72",
"text": "主角等级达到10开启" "text": "主角等级达到70开启"
}, },
"uiid": 0, "uiid": 0,
"activateType": 2, "activateType": 2,

View File

@ -45,7 +45,7 @@
"text": "每日礼包2" "text": "每日礼包2"
}, },
"packagetype": "day_1", "packagetype": "day_1",
"buy_num": 2, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_2", "key": "paypackage_paypackage_packagename_2",
"text": "每日礼包2" "text": "每日礼包2"
@ -77,7 +77,7 @@
"text": "每日礼包3" "text": "每日礼包3"
}, },
"packagetype": "day_2", "packagetype": "day_2",
"buy_num": 3, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_3", "key": "paypackage_paypackage_packagename_3",
"text": "每日礼包3" "text": "每日礼包3"
@ -109,7 +109,7 @@
"text": "每日礼包4" "text": "每日礼包4"
}, },
"packagetype": "day_3", "packagetype": "day_3",
"buy_num": 3, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_4", "key": "paypackage_paypackage_packagename_4",
"text": "每日礼包4" "text": "每日礼包4"
@ -141,7 +141,7 @@
"text": "每日礼包5" "text": "每日礼包5"
}, },
"packagetype": "day_4", "packagetype": "day_4",
"buy_num": 3, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_5", "key": "paypackage_paypackage_packagename_5",
"text": "每日礼包5" "text": "每日礼包5"
@ -200,7 +200,7 @@
"text": "每周礼包2" "text": "每周礼包2"
}, },
"packagetype": "week_2", "packagetype": "week_2",
"buy_num": 2, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_7", "key": "paypackage_paypackage_packagename_7",
"text": "每周礼包2" "text": "每周礼包2"
@ -232,7 +232,7 @@
"text": "每周礼包3" "text": "每周礼包3"
}, },
"packagetype": "week_3", "packagetype": "week_3",
"buy_num": 3, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_8", "key": "paypackage_paypackage_packagename_8",
"text": "每周礼包3" "text": "每周礼包3"
@ -259,7 +259,7 @@
"text": "每周礼包4" "text": "每周礼包4"
}, },
"packagetype": "week_4", "packagetype": "week_4",
"buy_num": 4, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_9", "key": "paypackage_paypackage_packagename_9",
"text": "每周礼包4" "text": "每周礼包4"
@ -291,7 +291,7 @@
"text": "每周礼包5" "text": "每周礼包5"
}, },
"packagetype": "week_5", "packagetype": "week_5",
"buy_num": 5, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_10", "key": "paypackage_paypackage_packagename_10",
"text": "每周礼包5" "text": "每周礼包5"
@ -318,7 +318,7 @@
"text": "每周礼包6" "text": "每周礼包6"
}, },
"packagetype": "week_6", "packagetype": "week_6",
"buy_num": 999, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_11", "key": "paypackage_paypackage_packagename_11",
"text": "每周礼包6" "text": "每周礼包6"
@ -345,7 +345,7 @@
"text": "每周礼包7" "text": "每周礼包7"
}, },
"packagetype": "week_6", "packagetype": "week_6",
"buy_num": 999, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_12", "key": "paypackage_paypackage_packagename_12",
"text": "每周礼包7" "text": "每周礼包7"
@ -377,7 +377,7 @@
"text": "每月礼包1" "text": "每月礼包1"
}, },
"packagetype": "month_2", "packagetype": "month_2",
"buy_num": 5, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_13", "key": "paypackage_paypackage_packagename_13",
"text": "每月礼包1" "text": "每月礼包1"
@ -404,7 +404,7 @@
"text": "每月礼包2" "text": "每月礼包2"
}, },
"packagetype": "month_2", "packagetype": "month_2",
"buy_num": 5, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_14", "key": "paypackage_paypackage_packagename_14",
"text": "每月礼包2" "text": "每月礼包2"
@ -431,7 +431,7 @@
"text": "每月礼包3" "text": "每月礼包3"
}, },
"packagetype": "month_2", "packagetype": "month_2",
"buy_num": 5, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_15", "key": "paypackage_paypackage_packagename_15",
"text": "每月礼包3" "text": "每月礼包3"
@ -458,7 +458,7 @@
"text": "每月礼包4" "text": "每月礼包4"
}, },
"packagetype": "month_2", "packagetype": "month_2",
"buy_num": 5, "buy_num": 1,
"packagename": { "packagename": {
"key": "paypackage_paypackage_packagename_16", "key": "paypackage_paypackage_packagename_16",
"text": "每月礼包4" "text": "每月礼包4"

View File

@ -147,18 +147,23 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
} }
} }
// 发所有道具 // 发所有道具
item := this.configure.GetAllItemConfigure() _data := this.configure.GetAllItemConfigure()
for _, v := range item { var szRes []*cfg.Gameatn
res = append(res, &cfg.Gameatn{ for _, v := range _data {
A: "item", if v.Gm != 1 {
T: v.Id, res := &cfg.Gameatn{
N: 100, A: "item",
}) T: v.Id,
N: 100,
}
szRes = append(szRes, res)
}
} }
errdata = this.DispenseRes(session, res, true)
if errdata != nil { if errdata = this.DispenseRes(session, szRes, true); errdata != nil {
this.Errorf("资源发放失败,%v", errdata) this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], errdata)
} }
this.Debug("使用bingo命令", this.Debug("使用bingo命令",
log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "param", Value: datas[0]}, log.Field{Key: "param", Value: datas[0]},
@ -450,16 +455,21 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
// return // return
// } // }
_data := this.configure.GetAllItemConfigure() _data := this.configure.GetAllItemConfigure()
var sz []*cfg.Gameatn
for _, v := range _data { for _, v := range _data {
res := &cfg.Gameatn{ if v.Gm != 1 {
A: "item", res := &cfg.Gameatn{
T: v.Id, A: "item",
N: 100, T: v.Id,
} N: 100,
if errdata = this.DispenseRes(session, []*cfg.Gameatn{res}, true); errdata != nil { }
this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], errdata) sz = append(sz, res)
} }
} }
if errdata = this.DispenseRes(session, sz, true); errdata != nil {
this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], errdata)
}
this.Debug("使用bingo命令:uid = %s ", this.Debug("使用bingo命令:uid = %s ",
log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "0", Value: datas[0]}, log.Field{Key: "0", Value: datas[0]},

View File

@ -34,6 +34,7 @@ type GameItemData struct {
Img string Img string
Intr string Intr string
Sale []*Gameatn Sale []*Gameatn
Gm int32
} }
const TypeId_GameItemData = -984700967 const TypeId_GameItemData = -984700967
@ -144,6 +145,7 @@ func (_v *GameItemData)Deserialize(_buf map[string]interface{}) (err error) {
} }
} }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["gm"].(float64); !_ok_ { err = errors.New("gm error"); return }; _v.Gm = int32(_tempNum_) }
return return
} }