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

@ -64,23 +64,18 @@ namespace Server.Engines.BulkOrders
{
from.SendGump( new BOBGump( (PlayerMobile)from, this ) );
SecureTradeContainer cont = GetSecureTradeCont();
SecureTrade trade = GetSecureTradeCont()?.Trade;
if ( cont != null )
{
SecureTrade trade = cont.Trade;
if (trade?.From.Mobile == from )
trade.To.Mobile.SendGump( new BOBGump( (PlayerMobile)trade.To.Mobile, this ) );
else if (trade?.To.Mobile == from )
trade.From.Mobile.SendGump( new BOBGump( (PlayerMobile)trade.From.Mobile, this ) );
}
if (trade?.From.Mobile == from )
trade.To.Mobile.SendGump( new BOBGump( (PlayerMobile)trade.To.Mobile, this ) );
else if (trade?.To.Mobile == from )
trade.From.Mobile.SendGump( new BOBGump( (PlayerMobile)trade.From.Mobile, this ) );
}
}
public override bool OnDragDrop( Mobile from, Item dropped )
{
if ( dropped is LargeBOD || dropped is SmallBOD )
if ( dropped is BaseBOD )
{
if ( !IsChildOf( from.Backpack ) )
{