版署 道具资源发放规则 通过gm 字段过滤
This commit is contained in:
parent
22969820e1
commit
d473b3b005
File diff suppressed because it is too large
Load Diff
@ -1651,7 +1651,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 70
|
||||
}
|
||||
],
|
||||
"wkqbx": 0,
|
||||
@ -1659,7 +1659,7 @@
|
||||
"img": "",
|
||||
"prompt": {
|
||||
"key": "opencond_opencond_prompt_72",
|
||||
"text": "主角等级达到10开启"
|
||||
"text": "主角等级达到70开启"
|
||||
},
|
||||
"uiid": 0,
|
||||
"activateType": 2,
|
||||
|
@ -45,7 +45,7 @@
|
||||
"text": "每日礼包2"
|
||||
},
|
||||
"packagetype": "day_1",
|
||||
"buy_num": 2,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_2",
|
||||
"text": "每日礼包2"
|
||||
@ -77,7 +77,7 @@
|
||||
"text": "每日礼包3"
|
||||
},
|
||||
"packagetype": "day_2",
|
||||
"buy_num": 3,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_3",
|
||||
"text": "每日礼包3"
|
||||
@ -109,7 +109,7 @@
|
||||
"text": "每日礼包4"
|
||||
},
|
||||
"packagetype": "day_3",
|
||||
"buy_num": 3,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_4",
|
||||
"text": "每日礼包4"
|
||||
@ -141,7 +141,7 @@
|
||||
"text": "每日礼包5"
|
||||
},
|
||||
"packagetype": "day_4",
|
||||
"buy_num": 3,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_5",
|
||||
"text": "每日礼包5"
|
||||
@ -200,7 +200,7 @@
|
||||
"text": "每周礼包2"
|
||||
},
|
||||
"packagetype": "week_2",
|
||||
"buy_num": 2,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_7",
|
||||
"text": "每周礼包2"
|
||||
@ -232,7 +232,7 @@
|
||||
"text": "每周礼包3"
|
||||
},
|
||||
"packagetype": "week_3",
|
||||
"buy_num": 3,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_8",
|
||||
"text": "每周礼包3"
|
||||
@ -259,7 +259,7 @@
|
||||
"text": "每周礼包4"
|
||||
},
|
||||
"packagetype": "week_4",
|
||||
"buy_num": 4,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_9",
|
||||
"text": "每周礼包4"
|
||||
@ -291,7 +291,7 @@
|
||||
"text": "每周礼包5"
|
||||
},
|
||||
"packagetype": "week_5",
|
||||
"buy_num": 5,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_10",
|
||||
"text": "每周礼包5"
|
||||
@ -318,7 +318,7 @@
|
||||
"text": "每周礼包6"
|
||||
},
|
||||
"packagetype": "week_6",
|
||||
"buy_num": 999,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_11",
|
||||
"text": "每周礼包6"
|
||||
@ -345,7 +345,7 @@
|
||||
"text": "每周礼包7"
|
||||
},
|
||||
"packagetype": "week_6",
|
||||
"buy_num": 999,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_12",
|
||||
"text": "每周礼包7"
|
||||
@ -377,7 +377,7 @@
|
||||
"text": "每月礼包1"
|
||||
},
|
||||
"packagetype": "month_2",
|
||||
"buy_num": 5,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_13",
|
||||
"text": "每月礼包1"
|
||||
@ -404,7 +404,7 @@
|
||||
"text": "每月礼包2"
|
||||
},
|
||||
"packagetype": "month_2",
|
||||
"buy_num": 5,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_14",
|
||||
"text": "每月礼包2"
|
||||
@ -431,7 +431,7 @@
|
||||
"text": "每月礼包3"
|
||||
},
|
||||
"packagetype": "month_2",
|
||||
"buy_num": 5,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_15",
|
||||
"text": "每月礼包3"
|
||||
@ -458,7 +458,7 @@
|
||||
"text": "每月礼包4"
|
||||
},
|
||||
"packagetype": "month_2",
|
||||
"buy_num": 5,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_16",
|
||||
"text": "每月礼包4"
|
||||
|
@ -147,18 +147,23 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
||||
}
|
||||
}
|
||||
// 发所有道具
|
||||
item := this.configure.GetAllItemConfigure()
|
||||
for _, v := range item {
|
||||
res = append(res, &cfg.Gameatn{
|
||||
A: "item",
|
||||
T: v.Id,
|
||||
N: 100,
|
||||
})
|
||||
_data := this.configure.GetAllItemConfigure()
|
||||
var szRes []*cfg.Gameatn
|
||||
for _, v := range _data {
|
||||
if v.Gm != 1 {
|
||||
res := &cfg.Gameatn{
|
||||
A: "item",
|
||||
T: v.Id,
|
||||
N: 100,
|
||||
}
|
||||
szRes = append(szRes, res)
|
||||
}
|
||||
}
|
||||
errdata = this.DispenseRes(session, res, true)
|
||||
if errdata != nil {
|
||||
this.Errorf("资源发放失败,%v", errdata)
|
||||
|
||||
if errdata = this.DispenseRes(session, szRes, true); errdata != nil {
|
||||
this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], errdata)
|
||||
}
|
||||
|
||||
this.Debug("使用bingo命令",
|
||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||
log.Field{Key: "param", Value: datas[0]},
|
||||
@ -450,16 +455,21 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
||||
// return
|
||||
// }
|
||||
_data := this.configure.GetAllItemConfigure()
|
||||
var sz []*cfg.Gameatn
|
||||
for _, v := range _data {
|
||||
res := &cfg.Gameatn{
|
||||
A: "item",
|
||||
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)
|
||||
if v.Gm != 1 {
|
||||
res := &cfg.Gameatn{
|
||||
A: "item",
|
||||
T: v.Id,
|
||||
N: 100,
|
||||
}
|
||||
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 ",
|
||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||
log.Field{Key: "0", Value: datas[0]},
|
||||
|
@ -34,6 +34,7 @@ type GameItemData struct {
|
||||
Img string
|
||||
Intr string
|
||||
Sale []*Gameatn
|
||||
Gm int32
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user