Fix/consume - Closes #10 (#14)

* Fixes stacking, consumption instead of deletion, and a few other minor issues. Server-side only.
* Fixes stacking of ore.
* Fixes cooking consumption.
This commit is contained in:
Kamron Batman 2018-02-22 00:57:07 -08:00 committed by GitHub
parent f6d5689dee
commit 0d9fe76b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 163 additions and 91 deletions

View file

@ -96,6 +96,10 @@ namespace Server.Items
public BaseOre( Serial serial ) : base( serial )
{
}
public override bool CanStackWith(Item dropped)
{
return dropped.Stackable && Stackable && dropped.GetType() == GetType() && dropped.Hue == Hue && dropped.Name == Name && (dropped.Amount + Amount) <= 60000 && dropped != this;
}
public override void AddNameProperty( ObjectPropertyList list )
{
@ -698,4 +702,4 @@ namespace Server.Items
return new ValoriteIngot();
}
}
}
}