public void SwapItemLotValues(ShopLotItem itemToSwapWith) { ShopLotItem myOriginalShopLotItem = ShopLotItem; ShopLotItem itemToSwapWithOriginalShopItem = itemToSwapWith; //Swap ShopLotItem = itemToSwapWithOriginalShopItem; itemToSwapWith = myOriginalShopLotItem; }
public bool HasShopLotItem(ShopLotItem shopItem) { foreach (var item in Items) { if (item.ShopLotItem.ID == shopItem.ID && item.ShopLotItem.ItemCategory == shopItem.ItemCategory) { return(true); } } return(false); }
public ShopLot(PARAM.Row itemShop, NPCShopkeeper owner) { ID = itemShop.ID; ShopLotItem = new ShopLotItem(this, (ItemShopCategoryID)Convert.ToInt64(itemShop["equipType"].Value), Convert.ToInt64(itemShop["equipId"].Value)); ShopType = (ShopTypeID)Convert.ToInt32(itemShop["shopType"].Value); Value = Convert.ToInt32(itemShop["value"].Value); MaterialID = Convert.ToInt32(itemShop["mtrlId"].Value); EventFlag = Convert.ToInt32(itemShop["eventFlag"].Value); SellQuantity = Convert.ToInt32(itemShop["sellQuantity"].Value); QwcID = Convert.ToInt64(itemShop["qwcId"].Value); Description = itemShop.Name; ownerShopKeeper = owner; originalRow = itemShop; }