예제 #1
0
        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);
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
 public virtual int GetSellPrice(Mobile seller, IShopSellInfo info, SellItemResponse resp)
 {
     return(info.GetSellPriceFor(resp.Item));
 }
예제 #4
0
 public SBProvisioner(Expansion e)
 {
     m_BuyInfo  = new InternalBuyInfo(e);
     m_SellInfo = new InternalSellInfo();
 }
예제 #5
0
 public SBWeaponSmith(Expansion e)
 {
     m_BuyInfo  = new InternalBuyInfo(e);
     m_SellInfo = new InternalSellInfo(e);
 }
예제 #6
0
        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 ) );
        }
예제 #7
0
 public SBArchitect(Expansion e)
 {
     m_BuyInfo  = new InternalBuyInfo(e);
     m_SellInfo = new InternalSellInfo(e);
 }
예제 #8
0
 public SBRangedWeapon(Expansion e)
 {
     m_BuyInfo  = new InternalBuyInfo(e);
     m_SellInfo = new InternalSellInfo(e);
 }
예제 #9
0
 public SBBlacksmith(Expansion e)
 {
     m_BuyInfo  = new InternalBuyInfo(e);
     m_SellInfo = new InternalSellInfo(e);
 }
예제 #10
0
 public SBVarietyDealer(Expansion e)
 {
     m_BuyInfo  = new InternalBuyInfo(e);
     m_SellInfo = new InternalSellInfo(e);
 }
예제 #11
0
 public SBTrashMan()
 {
     _BuyInfo  = new InternalBuyInfo();
     _SellInfo = new InternalSellInfo();
 }
예제 #12
0
 public SBAnimalTrainer(Expansion e)
 {
     m_BuyInfo  = new InternalBuyInfo(e);
     m_SellInfo = new InternalSellInfo();
 }
예제 #13
0
 public SBMage(Expansion e)
 {
     m_BuyInfo  = new InternalBuyInfo(e);
     m_SellInfo = new InternalSellInfo(e);
 }