fix: Fixes possibel NPE with misbehaving Weapon property (#1083)
This commit is contained in:
parent
8509b1f8a0
commit
da877f59a7
2 changed files with 2 additions and 2 deletions
|
|
@ -738,7 +738,7 @@ namespace Server
|
||||||
|
|
||||||
var weapon = Weapon;
|
var weapon = Weapon;
|
||||||
|
|
||||||
if (!InRange(combatant, weapon.MaxRange))
|
if (weapon == null || !InRange(combatant, weapon.MaxRange))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ namespace Server.Items
|
||||||
public override WeaponType DefType => WeaponType.Fists;
|
public override WeaponType DefType => WeaponType.Fists;
|
||||||
public override WeaponAnimation DefAnimation => WeaponAnimation.Wrestle;
|
public override WeaponAnimation DefAnimation => WeaponAnimation.Wrestle;
|
||||||
|
|
||||||
public static void Initialize()
|
public static void Configure()
|
||||||
{
|
{
|
||||||
Mobile.DefaultWeapon = new Fists();
|
Mobile.DefaultWeapon = new Fists();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue