gm命令获取全部英雄,不会发送为-1的英雄

This commit is contained in:
meixiongfeng 2023-06-29 15:39:30 +08:00
parent 31c754c27c
commit 289f992521

View File

@ -331,12 +331,13 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
) )
data := this.configure.GetHeroConfigData() data := this.configure.GetHeroConfigData()
for _, v := range data { for _, v := range data {
res = append(res, &cfg.Gameatn{ if v.Handbook != -1 {
A: "hero", res = append(res, &cfg.Gameatn{
T: v.Hid, A: "hero",
N: 1, T: v.Hid,
}) N: 1,
})
}
} }
errdata = this.DispenseRes(session, res, true) errdata = this.DispenseRes(session, res, true)
if errdata != nil { if errdata != nil {