#W# Auto harvest mining/lumberjacking/fishing. Removed all or except the large graphic ore.

This commit is contained in:
WarrentyExpired 2026-08-07 18:46:15 -04:00
parent 5f61347479
commit 6249b9f8cd
2 changed files with 22 additions and 7 deletions

View file

@ -237,6 +237,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 )

View file

@ -68,7 +68,8 @@ namespace Server.Items
private static int RandomSize() private static int RandomSize()
{ {
double rand = Utility.RandomDouble(); return 0x19B9;
/*double rand = Utility.RandomDouble();
if ( rand < 0.12 ) if ( rand < 0.12 )
return 0x19B7; return 0x19B7;
@ -77,7 +78,7 @@ namespace Server.Items
else if ( rand < 0.25 ) else if ( rand < 0.25 )
return 0x19BA; return 0x19BA;
else else
return 0x19B9; return 0x19B9;*/
} }
public BaseOre( CraftResource resource ) : this( resource, 1 ) public BaseOre( CraftResource resource ) : this( resource, 1 )
@ -89,7 +90,7 @@ namespace Server.Items
Stackable = true; Stackable = true;
Amount = amount; Amount = amount;
Hue = CraftResources.GetHue( resource ); Hue = CraftResources.GetHue( resource );
Weight = 1.0;
m_Resource = resource; m_Resource = resource;
} }
@ -242,7 +243,7 @@ namespace Server.Items
else if ( ore.ItemID == 0x19B9 ) else if ( ore.ItemID == 0x19B9 )
{ {
newID = m_Ore.ItemID; newID = m_Ore.ItemID;
plusWeight = ore.Amount * 2; plusWeight = ore.Amount * 1;
} }
else else
{ {