From 53ad2c1e07c1df4fd1cef027e03091bdc3e7237f Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 18 Nov 2022 10:46:11 +0800 Subject: [PATCH] =?UTF-8?q?bingo=E5=91=BD=E4=BB=A4=E4=B8=AD=E7=9A=84Iamyou?= =?UTF-8?q?dad=E4=BC=98=E5=8C=96=20=E5=8F=AF=E4=BB=A5=E7=9B=B4=E6=8E=A5bin?= =?UTF-8?q?ggo=E6=89=80=E6=9C=89hero=E8=A1=A8=E4=B8=AD=E5=9B=BE=E9=89=B4?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=B8=BA1=E7=9A=84=E8=8B=B1=E9=9B=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_daddy.json | 240 -------------------------------------- modules/comp_configure.go | 8 ++ modules/gm/module.go | 10 ++ 3 files changed, 18 insertions(+), 240 deletions(-) diff --git a/bin/json/game_daddy.json b/bin/json/game_daddy.json index 4e5040959..0d3e88987 100644 --- a/bin/json/game_daddy.json +++ b/bin/json/game_daddy.json @@ -1,14 +1,4 @@ [ - { - "index": "1", - "var": [ - { - "a": "hero", - "t": "25001", - "n": 5 - } - ] - }, { "index": "2", "var": [ @@ -19,16 +9,6 @@ } ] }, - { - "index": "3", - "var": [ - { - "a": "hero", - "t": "25004", - "n": 5 - } - ] - }, { "index": "13", "var": [ @@ -89,36 +69,6 @@ } ] }, - { - "index": "19", - "var": [ - { - "a": "hero", - "t": "42911", - "n": 100 - } - ] - }, - { - "index": "20", - "var": [ - { - "a": "hero", - "t": "43911", - "n": 100 - } - ] - }, - { - "index": "21", - "var": [ - { - "a": "hero", - "t": "44911", - "n": 100 - } - ] - }, { "index": "23", "var": [ @@ -399,126 +349,6 @@ } ] }, - { - "index": "51", - "var": [ - { - "a": "hero", - "t": "43921", - "n": 50 - } - ] - }, - { - "index": "52", - "var": [ - { - "a": "hero", - "t": "44921", - "n": 50 - } - ] - }, - { - "index": "53", - "var": [ - { - "a": "hero", - "t": "45921", - "n": 50 - } - ] - }, - { - "index": "54", - "var": [ - { - "a": "hero", - "t": "44006", - "n": 5 - } - ] - }, - { - "index": "55", - "var": [ - { - "a": "hero", - "t": "35001", - "n": 5 - } - ] - }, - { - "index": "56", - "var": [ - { - "a": "hero", - "t": "44005", - "n": 5 - } - ] - }, - { - "index": "57", - "var": [ - { - "a": "hero", - "t": "15004", - "n": 5 - } - ] - }, - { - "index": "59", - "var": [ - { - "a": "hero", - "t": "14007", - "n": 5 - } - ] - }, - { - "index": "60", - "var": [ - { - "a": "hero", - "t": "45003", - "n": 5 - } - ] - }, - { - "index": "61", - "var": [ - { - "a": "hero", - "t": "24004", - "n": 5 - } - ] - }, - { - "index": "65", - "var": [ - { - "a": "hero", - "t": "34006", - "n": 5 - } - ] - }, - { - "index": "66", - "var": [ - { - "a": "hero", - "t": "24003", - "n": 5 - } - ] - }, { "index": "67", "var": [ @@ -529,76 +359,6 @@ } ] }, - { - "index": "68", - "var": [ - { - "a": "hero", - "t": "43901", - "n": 5 - } - ] - }, - { - "index": "69", - "var": [ - { - "a": "hero", - "t": "43902", - "n": 5 - } - ] - }, - { - "index": "70", - "var": [ - { - "a": "hero", - "t": "43903", - "n": 5 - } - ] - }, - { - "index": "71", - "var": [ - { - "a": "hero", - "t": "14003", - "n": 5 - } - ] - }, - { - "index": "72", - "var": [ - { - "a": "hero", - "t": "24002", - "n": 5 - } - ] - }, - { - "index": "73", - "var": [ - { - "a": "hero", - "t": "15005", - "n": 5 - } - ] - }, - { - "index": "74", - "var": [ - { - "a": "hero", - "t": "35003", - "n": 5 - } - ] - }, { "index": "75", "var": [ diff --git a/modules/comp_configure.go b/modules/comp_configure.go index 2b0d5f043..0561f265c 100644 --- a/modules/comp_configure.go +++ b/modules/comp_configure.go @@ -289,3 +289,11 @@ func (this *MCompConfigure) LoadSignData() { } return } +func (this *MCompConfigure) GetHeroConfigData() (data []*cfg.GameHeroData) { + if v, err := this.GetConfigure(new_hero); err == nil { + if configure, ok := v.(*cfg.GameHero); ok { + return configure.GetDataList() + } + } + return nil +} diff --git a/modules/gm/module.go b/modules/gm/module.go index 98551806b..d1ea770f1 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -119,6 +119,16 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC res = append(res, v.Var...) } + data := this.configure.GetHeroConfigData() + for _, v := range data { + if v.Handbook != -1 { + res = append(res, &cfg.Gameatn{ + A: "hero", + T: v.Hid, + N: 1, + }) + } + } code = this.DispenseRes(session, res, true) if code != pb.ErrorCode_Success { this.Errorf("资源发放失败,%v", code)