public virtual bool CanSellItem(Item item, IShopSellInfo ssi) { if (item == null || item.Deleted || !item.Movable || !item.IsStandardLoot() || !ssi.IsSellable(item)) { return(false); } if (_DynamicStock.GetValue(item) != null) { return(false); } if (item is Container && item.Items.Count > 0) { return(false); } var p = item.Parent as Item; while (p != null) { if (p is ILockable && ((ILockable)p).Locked) { return(false); } p = p.Parent as Item; } return(true); }
public SBINXHairStylist(ArrayList buyList, ArrayList sellList) { if (buyList != null) { m_BuyInfo = new InternalBuyInfo(buyList); } else { m_BuyInfo = new InternalBuyInfo(); } if (sellList != null) { m_SellInfo = new InternalSellInfo(sellList); } else { m_SellInfo = new InternalSellInfo(); } }
public virtual int GetSellPrice(Mobile seller, IShopSellInfo info, SellItemResponse resp) { return(info.GetSellPriceFor(resp.Item)); }
public SBProvisioner(Expansion e) { m_BuyInfo = new InternalBuyInfo(e); m_SellInfo = new InternalSellInfo(); }
public SBWeaponSmith(Expansion e) { m_BuyInfo = new InternalBuyInfo(e); m_SellInfo = new InternalSellInfo(e); }
private int GetSellPriceFor( IShopSellInfo ssi, Item item ) { int price = ssi.GetSellPriceFor( item ); Item[] items = this.BuyPack.FindItemsByType( item.GetType() ); int amount = 0; if ( item.Stackable ) amount = items.Length; else { for ( int i = 0; i < items.Length; i++ ) { amount += items[i].Amount; } } double scalar = 1.0 - ( amount / 250.0 ); return Math.Max( 1, (int) ( price * scalar ) ); }
public SBArchitect(Expansion e) { m_BuyInfo = new InternalBuyInfo(e); m_SellInfo = new InternalSellInfo(e); }
public SBRangedWeapon(Expansion e) { m_BuyInfo = new InternalBuyInfo(e); m_SellInfo = new InternalSellInfo(e); }
public SBBlacksmith(Expansion e) { m_BuyInfo = new InternalBuyInfo(e); m_SellInfo = new InternalSellInfo(e); }
public SBVarietyDealer(Expansion e) { m_BuyInfo = new InternalBuyInfo(e); m_SellInfo = new InternalSellInfo(e); }
public SBTrashMan() { _BuyInfo = new InternalBuyInfo(); _SellInfo = new InternalSellInfo(); }
public SBAnimalTrainer(Expansion e) { m_BuyInfo = new InternalBuyInfo(e); m_SellInfo = new InternalSellInfo(); }
public SBMage(Expansion e) { m_BuyInfo = new InternalBuyInfo(e); m_SellInfo = new InternalSellInfo(e); }