public bool CheckAnyWearSymbol(out int posId, out uint symbolId) { posId = 0; symbolId = 0; CUseableContainer useableContainer = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GetUseableContainer(enCONTAINER_TYPE.ITEM); int curUseableCount = useableContainer.GetCurUseableCount(); CSymbolItem item = null; CSymbolItem item2 = null; int pos = 0; for (int i = 0; i < curUseableCount; i++) { CUseable useableByIndex = useableContainer.GetUseableByIndex(i); if (useableByIndex.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL) { item = (CSymbolItem)useableByIndex; if ((((item != null) && (item.m_stackCount > item.GetPageWearCnt(0))) && ((item.GetPageWearCnt(0) < CSymbolSystem.s_maxSameIDSymbolEquipNum) && this.GetWearPos(item, 0, out pos))) && (((item2 == null) || (item.m_SymbolData.bColor < item2.m_SymbolData.bColor)) || ((item.m_SymbolData.bColor == item2.m_SymbolData.bColor) && (item.m_SymbolData.wLevel < item2.m_SymbolData.wLevel)))) { item2 = item; posId = pos; symbolId = item.m_baseID; } } } return(item2 != null); }
public bool CheckAnyWearSymbol(out int posId, out uint symbolId, byte colorType = 0) { posId = 0; symbolId = 0u; CUseableContainer useableContainer = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GetUseableContainer(enCONTAINER_TYPE.ITEM); int curUseableCount = useableContainer.GetCurUseableCount(); CSymbolItem cSymbolItem = null; int num = 0; for (int i = 0; i < curUseableCount; i++) { CUseable useableByIndex = useableContainer.GetUseableByIndex(i); if (useableByIndex.m_type == 5) { CSymbolItem cSymbolItem2 = (CSymbolItem)useableByIndex; enFindSymbolWearPosCode enFindSymbolWearPosCode; if (cSymbolItem2 != null && cSymbolItem2.m_stackCount > cSymbolItem2.GetPageWearCnt(0) && cSymbolItem2.GetPageWearCnt(0) < CSymbolWearController.s_maxSameIDSymbolEquipNum && this.GetWearPos(cSymbolItem2, 0, out num, out enFindSymbolWearPosCode)) { if (colorType != 0) { if (cSymbolItem2.m_SymbolData.bColor == colorType && (cSymbolItem == null || cSymbolItem2.m_SymbolData.wLevel < cSymbolItem.m_SymbolData.wLevel)) { cSymbolItem = cSymbolItem2; posId = num; symbolId = cSymbolItem2.m_baseID; } } else if (cSymbolItem == null || cSymbolItem2.m_SymbolData.bColor < cSymbolItem.m_SymbolData.bColor || (cSymbolItem2.m_SymbolData.bColor == cSymbolItem.m_SymbolData.bColor && cSymbolItem2.m_SymbolData.wLevel < cSymbolItem.m_SymbolData.wLevel)) { cSymbolItem = cSymbolItem2; posId = num; symbolId = cSymbolItem2.m_baseID; } } } } return(cSymbolItem != null); }
public bool IsSymbolPosMatchItem(int pageIndex, ResSymbolPos symbolPos, CSymbolItem symbol) { if (((pageIndex < 0) || (pageIndex >= this.m_pageCount)) || ((symbolPos == null) || (symbol == null))) { return(false); } return((CheckSymbolColor(symbolPos, symbol.m_SymbolData.bColor) && (symbol.m_stackCount > symbol.GetPageWearCnt(pageIndex))) && ((symbol.m_SymbolData.wLevel <= this.m_pageMaxLvlLimit) && (symbol.GetPageWearCnt(pageIndex) < CSymbolSystem.s_maxSameIDSymbolEquipNum))); }
public bool IsSymbolPosMatchItem(int pageIndex, ResSymbolPos symbolPos, CSymbolItem symbol) { return(pageIndex >= 0 && pageIndex < this.m_pageCount && symbolPos != null && symbol != null && (CSymbolInfo.CheckSymbolColor(symbolPos, symbol.m_SymbolData.bColor) && symbol.m_stackCount > symbol.GetPageWearCnt(pageIndex) && (int)symbol.m_SymbolData.wLevel <= this.m_pageMaxLvlLimit && symbol.GetPageWearCnt(pageIndex) < CSymbolWearController.s_maxSameIDSymbolEquipNum)); }