mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
修复问题、添加give命令
修复使用除主角外角色无法进入的问题 新增give命令 武器数量 精炼 角色等级 命座等后期增加参数
This commit is contained in:
@@ -46,6 +46,10 @@ func (g *GameManager) AddUserWeapon(userId uint32, itemId uint32) uint64 {
|
||||
weaponId := uint64(g.snowflake.GenId())
|
||||
player.AddWeapon(itemId, weaponId)
|
||||
weapon := player.GetWeapon(weaponId)
|
||||
if weapon == nil {
|
||||
logger.LOG.Error("weapon is nil, itemId: %v, weaponId: %v", itemId, weaponId)
|
||||
return 0
|
||||
}
|
||||
|
||||
// PacketStoreItemChangeNotify
|
||||
storeItemChangeNotify := new(proto.StoreItemChangeNotify)
|
||||
|
||||
Reference in New Issue
Block a user