From 289f99252158bfcc520b48f73ceb1a4d740d78f9 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 29 Jun 2023 15:39:30 +0800 Subject: [PATCH] =?UTF-8?q?gm=E5=91=BD=E4=BB=A4=E8=8E=B7=E5=8F=96=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E8=8B=B1=E9=9B=84=EF=BC=8C=E4=B8=8D=E4=BC=9A=E5=8F=91?= =?UTF-8?q?=E9=80=81=E4=B8=BA-1=E7=9A=84=E8=8B=B1=E9=9B=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gm/module.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/gm/module.go b/modules/gm/module.go index 6f214a319..06b5ed495 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -331,12 +331,13 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er ) data := this.configure.GetHeroConfigData() for _, v := range data { - res = append(res, &cfg.Gameatn{ - A: "hero", - T: v.Hid, - N: 1, - }) - + if v.Handbook != -1 { + res = append(res, &cfg.Gameatn{ + A: "hero", + T: v.Hid, + N: 1, + }) + } } errdata = this.DispenseRes(session, res, true) if errdata != nil {