mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
修复问题、添加give命令
修复使用除主角外角色无法进入的问题 新增give命令 武器数量 精炼 角色等级 命座等后期增加参数
This commit is contained in:
@@ -2,6 +2,7 @@ package model
|
||||
|
||||
import (
|
||||
gdc "hk4e/gs/config"
|
||||
"hk4e/pkg/logger"
|
||||
)
|
||||
|
||||
type Weapon struct {
|
||||
@@ -63,7 +64,11 @@ func (p *Player) AddWeapon(itemId uint32, weaponId uint64) {
|
||||
MainPropId: 0,
|
||||
Guid: 0,
|
||||
}
|
||||
itemDataConfig := gdc.CONF.ItemDataMap[int32(itemId)]
|
||||
itemDataConfig, ok := gdc.CONF.ItemDataMap[int32(itemId)]
|
||||
if !ok {
|
||||
logger.LOG.Error("config is nil, itemId: %v", itemId)
|
||||
return
|
||||
}
|
||||
if itemDataConfig.SkillAffix != nil {
|
||||
for _, skillAffix := range itemDataConfig.SkillAffix {
|
||||
if skillAffix > 0 {
|
||||
|
||||
Reference in New Issue
Block a user