#W# Auto harvest (mining, lumbjack, fishing).
This commit is contained in:
parent
43a0e95879
commit
9b15cd0b7b
1 changed files with 15 additions and 1 deletions
|
|
@ -229,6 +229,20 @@ namespace Server.Engines.Harvest
|
||||||
def.SendMessageTo( from, def.FailMessage );
|
def.SendMessageTo( from, def.FailMessage );
|
||||||
|
|
||||||
OnHarvestFinished( from, tool, def, vein, bank, resource, toHarvest );
|
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 )
|
public virtual void OnHarvestFinished( Mobile from, Item tool, HarvestDefinition def, HarvestVein vein, HarvestBank bank, HarvestResource resource, object harvested )
|
||||||
|
|
@ -495,4 +509,4 @@ namespace Server
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue