Fixes several bugs and streamlines the BOD code. (#32)
This commit is contained in:
parent
a45094f2dc
commit
114dc1a16b
21 changed files with 500 additions and 777 deletions
|
|
@ -131,10 +131,8 @@ namespace Server.Engines.BulkOrders
|
|||
if (number == 0)
|
||||
continue;
|
||||
|
||||
bool isSelected = filters[i, 1] == filterValue;
|
||||
|
||||
if (!isSelected && i % xOffsets.Length == 0)
|
||||
isSelected = filterValue == 0;
|
||||
bool isSelected = filters[i, 1] == filterValue ||
|
||||
i % xOffsets.Length == 0 && filterValue == 0;
|
||||
|
||||
AddHtmlLocalized(x + 35 + xOffsets[i % xOffsets.Length], y + i / xOffsets.Length * yOffset,
|
||||
xWidths[i % xOffsets.Length], 32, number, isSelected ? 16927 : LabelColor);
|
||||
|
|
|
|||
|
|
@ -60,9 +60,7 @@ namespace Server.Engines.BulkOrders
|
|||
|
||||
int price = 0;
|
||||
|
||||
VendorItem vi = pv.GetVendorItem(m_Book);
|
||||
|
||||
if (vi?.IsForSale == false)
|
||||
if (pv.GetVendorItem(m_Book)?.IsForSale == false)
|
||||
price = m_Entry.Price;
|
||||
|
||||
if (price != m_Price)
|
||||
|
|
@ -89,6 +87,7 @@ namespace Server.Engines.BulkOrders
|
|||
{
|
||||
pv.SayTo(m_From, 503204); // You do not have room in your backpack for this
|
||||
m_From.SendGump(new BOBGump(m_From, m_Book, m_Page));
|
||||
item.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 ) )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue