#W# Auto harvest mining/lumberjacking/fishing. Removed all or except the large graphic ore.
This commit is contained in:
parent
5f61347479
commit
6249b9f8cd
2 changed files with 22 additions and 7 deletions
|
|
@ -237,6 +237,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 )
|
||||
|
|
@ -503,4 +517,4 @@ namespace Server
|
|||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,8 +68,9 @@ namespace Server.Items
|
|||
|
||||
private static int RandomSize()
|
||||
{
|
||||
double rand = Utility.RandomDouble();
|
||||
|
||||
return 0x19B9;
|
||||
/*double rand = Utility.RandomDouble();
|
||||
|
||||
if ( rand < 0.12 )
|
||||
return 0x19B7;
|
||||
else if ( rand < 0.18 )
|
||||
|
|
@ -77,7 +78,7 @@ namespace Server.Items
|
|||
else if ( rand < 0.25 )
|
||||
return 0x19BA;
|
||||
else
|
||||
return 0x19B9;
|
||||
return 0x19B9;*/
|
||||
}
|
||||
|
||||
public BaseOre( CraftResource resource ) : this( resource, 1 )
|
||||
|
|
@ -89,7 +90,7 @@ namespace Server.Items
|
|||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
Weight = 1.0;
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +243,7 @@ namespace Server.Items
|
|||
else if ( ore.ItemID == 0x19B9 )
|
||||
{
|
||||
newID = m_Ore.ItemID;
|
||||
plusWeight = ore.Amount * 2;
|
||||
plusWeight = ore.Amount * 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -698,4 +699,4 @@ namespace Server.Items
|
|||
return new ValoriteIngot();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue