private void _InitializeShops(IGameContext gameContext) { m_shops = new List <Shop.Shop>(); foreach (Contents.Shopping.ShopData currentShopData in gameContext.Data.InCodeData.ShopListData.allShopList) { List <Shop.ShopItem> items = new List <Shop.ShopItem>(); foreach (Contents.Shopping.ShopItemData sellingItemData in currentShopData.CatalogueData) { Shop.ShopItem currentItem = new Shop.ShopItem( sellingItemData.Price, sellingItemData.View, sellingItemData.ItemGenerator); items.Add(currentItem); } m_shops.Add(new Shop.Shop(items, currentShopData.GenerateOrderProcessor())); } m_shopFindTable = new Dictionary <long, Shop.Shop>(); foreach (Shop.Shop currentShop in m_shops) { m_shopFindTable.Add(currentShop.SerialNumber, currentShop); } }
public Core.Game.Shopping.Order DoOrder(long shopId, Shop.ShopItem purchasingItem, World world) { Core.Game.Shopping.Order order = new Core.Game.Shopping.Order(purchasingItem, world.LogicTime); m_shopFindTable[shopId].Order(order); m_orderHistory.Add(order); return(order); }