fix: Fixes food stacking for poisoned food. (#987)

This commit is contained in:
Mink80 2022-04-08 19:37:42 +02:00 committed by GitHub
parent 0d9259e4cd
commit f91ebe8183
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,19 @@ namespace Server.Items
}
}
public override bool CanStackWith(Item dropped)
{
if (dropped is Food food)
{
if (Poison != food.Poison || Poisoner != food.Poisoner)
{
return false;
}
}
return base.CanStackWith(dropped);
}
public virtual bool Eat(Mobile from)
{
// Fill the Mobile with FillFactor