fix: Fixes amount error spam from scissors (#1715)

This commit is contained in:
Kamron Batman 2024-03-30 09:52:40 -07:00 • committed by GitHub
parent e638fb7893
commit 39215935cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4121,28 +4121,18 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
}
}
public virtual void ScissorHelper(Mobile from, Item newItem, int amountPerOldItem)
{
ScissorHelper(from, newItem, amountPerOldItem, true);
}
public virtual void ScissorHelper(Mobile from, Item newItem, int amountPerOldItem, bool carryHue)
public virtual void ScissorHelper(Mobile from, Item newItem, int amountPerOldItem, bool carryHue = true)
{
// let's not go over 60000
var amount = Math.Min(Amount, 60000 / amountPerOldItem);
Amount -= amount;
var ourHue = Hue;
var thisMap = Map;
var thisParent = m_Parent;
var worldLoc = GetWorldLocation();
var type = LootType;
if (Amount == 0)
{
Delete();
}
Consume(amount);
newItem.Amount = amount * amountPerOldItem;