This commit is contained in:
parent
7ad00dceac
commit
0b4c3b15d9
41 changed files with 976 additions and 144 deletions
|
|
@ -186,7 +186,7 @@ namespace Server.Engines.Harvest
|
|||
item.Amount = amount;
|
||||
}
|
||||
|
||||
bank.Consume( def, item.Amount, from );
|
||||
bank.Consume( item.Amount, from );
|
||||
|
||||
if ( Give( from, item, def.PlaceAtFeetIfFull ) )
|
||||
{
|
||||
|
|
@ -198,6 +198,22 @@ namespace Server.Engines.Harvest
|
|||
item.Delete();
|
||||
}
|
||||
|
||||
BonusHarvestResource bonus = def.GetBonusResource();
|
||||
|
||||
if ( bonus != null && bonus.Type != null && skillBase >= bonus.ReqSkill )
|
||||
{
|
||||
Item bonusItem = Construct( bonus.Type, from );
|
||||
|
||||
if ( Give( from, bonusItem, true ) ) //Bonuses always allow placing at feet, even if pack is full irregrdless of def
|
||||
{
|
||||
bonus.SendSuccessTo( from );
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
if ( tool is IUsesRemaining )
|
||||
{
|
||||
IUsesRemaining toolWithUses = (IUsesRemaining)tool;
|
||||
|
|
@ -266,14 +282,14 @@ namespace Server.Engines.Harvest
|
|||
if ( map == null )
|
||||
return false;
|
||||
|
||||
ArrayList atFeet = new ArrayList();
|
||||
List<Item> atFeet = new List<Item>();
|
||||
|
||||
foreach ( Item obj in m.GetItemsInRange( 0 ) )
|
||||
atFeet.Add( obj );
|
||||
|
||||
for ( int i = 0; i < atFeet.Count; ++i )
|
||||
{
|
||||
Item check = (Item)atFeet[i];
|
||||
Item check = atFeet[i];
|
||||
|
||||
if ( check.StackWith( m, item, false ) )
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue