Exemple #1
0
        public bool AddMerchantItem(UInt32 SpawnID, UInt32 ItemID, string Name, UInt32 Slot, int Quantity)
        {
            int i = FindMerchant(SpawnID);


            if (i < 0)
            {
                return(false);
            }

            for (int j = 0; j < MerchantList[i].Items.Count; ++j)
            {
                if (MerchantList[i].Items[j].ItemID == ItemID)
                {
                    return(false);
                }
            }

            MerchantItem NewItem = new MerchantItem(ItemID, Name, Slot, Quantity);

            MerchantList[i].Items.Add(NewItem);

            return(true);
        }
Exemple #2
0
        public bool AddMerchantItem(UInt32 SpawnID, UInt32 ItemID, string Name, UInt32 Slot, int Quantity)
        {
            int i = FindMerchant(SpawnID);

            if (i < 0)
                return false;

            for (int j = 0; j < MerchantList[i].Items.Count; ++j)
                if (MerchantList[i].Items[j].ItemID == ItemID)
                    return false;

            MerchantItem NewItem = new MerchantItem(ItemID, Name, Slot, Quantity);

            MerchantList[i].Items.Add(NewItem);

            return true;
        }