예제 #1
0
        private void OnBreakSymbolClick(CUIEvent uiEvent)
        {
            if (this.m_curTransformSymbol != null)
            {
                CSymbolItem symbolByCfgID = this.GetSymbolByCfgID(this.m_curTransformSymbol.dwID);
                if (symbolByCfgID == null)
                {
                    Singleton <CUIManager> .GetInstance().OpenTips("Symbol__Item_Not_Exist_Tip", true, 1.5f, null, new object[0]);
                }
                else if (symbolByCfgID.m_stackCount > symbolByCfgID.GetMaxWearCnt())
                {
                    string text = Singleton <CTextManager> .GetInstance().GetText("Symbol_Break_Tip");

                    Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(text, enUIEventID.SymbolMake_OnItemBreakConfirm, enUIEventID.None, false);
                }
                else
                {
                    CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                    if (masterRoleInfo != null)
                    {
                        string strContent = string.Format(Singleton <CTextManager> .GetInstance().GetText("Symbol_Break_Item_Wear_Tip"), masterRoleInfo.m_symbolInfo.GetMaxWearSymbolPageName(symbolByCfgID));
                        Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(strContent, enUIEventID.SymbolMake_OnItemBreakConfirm, enUIEventID.None, false);
                    }
                }
            }
        }
예제 #2
0
 private bool CheckSymbolBreak(CSymbolItem symbol, ushort breakLvlMask)
 {
     return(((symbol != null) && (symbol.m_SymbolData.wLevel < CSymbolInfo.s_maxSymbolLevel)) && ((symbol.m_stackCount > symbol.GetMaxWearCnt()) && (((((int)1) << symbol.m_SymbolData.wLevel) & breakLvlMask) != 0)));
 }