Fixes several bugs and streamlines the BOD code. (#32)

This commit is contained in:
Kamron Batman 2019-03-12 23:41:19 -07:00 • committed by GitHub
parent a45094f2dc
commit 114dc1a16b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 500 additions and 777 deletions

View file

@ -0,0 +1,28 @@
using Server.Targeting;
namespace Server.Engines.BulkOrders
{
public class BODTarget : Target
{
private BaseBOD m_Deed;
public BODTarget(BaseBOD deed) : base(18, false, TargetFlags.None)
{
m_Deed = deed;
}
protected override void OnTarget(Mobile from, object targeted)
{
if (m_Deed.Deleted || !m_Deed.IsChildOf(from.Backpack))
return;
if (!(targeted is Item item && item.IsChildOf(from.Backpack)))
{
from.SendLocalizedMessage( 1045158 ); // You must have the item in your backpack to target it.
return;
}
m_Deed.EndCombine(from, item);
}
}
}