#W# Auto harvest (mining, lumbjack, fishing).

This commit is contained in:
WarrentyExpired 2026-07-15 12:03:30 -04:00
parent 43a0e95879
commit 9b15cd0b7b

View file

@ -229,6 +229,20 @@ namespace Server.Engines.Harvest
def.SendMessageTo( from, def.FailMessage );
OnHarvestFinished( from, tool, def, vein, bank, resource, toHarvest );
if ( from != null && from.Alive && !from.Deleted && from.NetState != null && tool != null && !tool.Deleted )
{
if ( from.TotalWeight >= 400 )
{
from.SendMessage( 0x22, "You are carrying too much weight to continue harvesting." );
}
else
{
Timer.DelayCall( TimeSpan.FromMilliseconds( 500 ), delegate()
{
StartHarvesting( from, tool, toHarvest );
});
}
}
}
public virtual void OnHarvestFinished( Mobile from, Item tool, HarvestDefinition def, HarvestVein vein, HarvestBank bank, HarvestResource resource, object harvested )
@ -495,4 +509,4 @@ namespace Server
{
}
}
}
}