public PurchaseableItem[] getMarketItesByName(string name) { if (sortingPurchaseableItem.ContainsKey(name)) { return(sortingPurchaseableItem[name]); } if (purchaseableProducts.Count == 0) { Debug.Log("Error! [getMarketItesByName(" + name + ")] : marketPurchaser == null || marketPurchaser.Length == 0"); // ошибка клиента покупочный модуль не определён //testInit(); return(null); } List <PurchaseableItem> lMP = new List <PurchaseableItem>(); for (int i = 0; i < purchaseableProducts.Count; i++) { string curName = purchaseableProducts[i].Name.Substring(0, name.Length); if (isHasNameInStartString(curName, name)) { lMP.Add(purchaseableProducts[i]); } } if (lMP.Count == 0) { Debug.Log("Warning! [getMarketItesByName(" + name + ")] : name not find"); // ошибка клиента не удалось получить предмет по имени return(null); } PurchaseableItem[] res = new PurchaseableItem[lMP.Count]; for (int i = 0; i < lMP.Count; i++) { res[i] = lMP[i]; } sortingPurchaseableItem.Add(name, res); return(res); }
double ICatanRemoteServer.BuyResource(PurchaseableItem item, List <ResourceType> cards) { throw new NotImplementedException(); }
/// <summary> /// Set the source instance for this viewmodel /// </summary> /// <param name="Instance"></param> public void SetSource(PurchaseableItem Instance) { m_Model = Instance; }