public int GetAllSwordsManCombatValue() { int CombatValue = 0; for (int i = 0; i < m_Items.Count; ++i) { SwordsMan item = m_Items[i]; if (null != item && item.IsValid()) { CombatValue += item.GetCombatValue(); } } return(CombatValue); }
/// <summary> /// 有效物品数量 /// </summary> /// <returns></returns> public int GetSwordsManCount() { int count = 0; for (int i = 0; i < m_Items.Count; ++i) { SwordsMan item = m_Items[i]; if (null != item && item.IsValid()) { ++count; } } return(count); }
static public List <SwordsMan> ItemFilter(SwordsManContainer oContainer) { if (null == oContainer) { return(null); } List <SwordsMan> resultlist = new List <SwordsMan>(); for (int nIndex = 0; nIndex < oContainer.ContainerSize; ++nIndex) { SwordsMan oSwordsMan = oContainer.GetSwordsMan(nIndex); if (null != oSwordsMan && oSwordsMan.IsValid()) { resultlist.Add(oSwordsMan); } } return(ItemSort(resultlist)); }
/// <summary> /// 筛选出高于品质的物品 /// </summary> /// <param name="ItemList"></param> /// <param name="nQuality"></param> /// <returns></returns> static public List <SwordsMan> ItemFilter(List <SwordsMan> ItemList, int nQuality) { if (null == ItemList) { return(null); } List <SwordsMan> resultlist = new List <SwordsMan>(); for (int nIndex = 0; nIndex < ItemList.Count; ++nIndex) { SwordsMan item = ItemList[nIndex]; if (null != item && item.IsValid()) { if (item.Quality <= nQuality) { resultlist.Add(item); } } } return(ItemSort(resultlist)); }