Give weapon by InitWeaponItemId
This commit is contained in:
parent
42129057e1
commit
bfa305df8e
1 changed files with 1 additions and 1 deletions
|
@ -229,7 +229,7 @@ internal class CreatureController : Controller
|
|||
|
||||
// Give weapon to entity
|
||||
RoleInfoConfig roleConfig = _configManager.GetConfig<RoleInfoConfig>(entity.ConfigId)!;
|
||||
WeaponConfig weaponConfig = _configManager.GetCollection<WeaponConfig>().Enumerate<WeaponConfig>().First(weapon => weapon.WeaponType == roleConfig.WeaponType);
|
||||
WeaponConfig weaponConfig = _configManager.GetConfig<WeaponConfig>(roleConfig.InitWeaponItemId)!;
|
||||
entity.WeaponId = weaponConfig.ItemId;
|
||||
|
||||
if (i == 0) _modelManager.Creature.PlayerEntityId = entity.Id;
|
||||
|
|
Loading…
Reference in a new issue