fix: Fixes mining/lumberjacking multi-harvest (#5111)

This commit is contained in:
Kamron Batman 2025-08-20 15:32:05 -07:00 committed by GitHub
parent 206e92a19e
commit 6df8756c41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -255,6 +255,8 @@ namespace Server.Engines.Harvest
from.SendLocalizedMessage(1005213); // You can't do that
}
public override object GetLock(Mobile from, Item tool, HarvestDefinition def, object toHarvest) => this;
public override void OnHarvestStarted(Mobile from, Item tool, HarvestDefinition def, object toHarvest)
{
base.OnHarvestStarted(from, tool, def, toHarvest);
@ -294,4 +296,4 @@ namespace Server.Engines.Harvest
};
#endregion
}
}
}

View file

@ -468,6 +468,8 @@ namespace Server.Engines.Harvest
}
#endregion
public override object GetLock(Mobile from, Item tool, HarvestDefinition def, object toHarvest) => this;
public override bool BeginHarvesting(Mobile from, Item tool)
{
if (!base.BeginHarvesting(from, tool))
@ -490,7 +492,7 @@ namespace Server.Engines.Harvest
if (toHarvest is LandTarget)
{
from.SendLocalizedMessage(501862); // You can't mine there.
}
}
else if (!(toHarvest is LandTarget))
{
from.SendLocalizedMessage(501863); // You can't mine that.