//宠物强化结果.. private static void msg_SCID_PET_UP_ACK(int iMsgID, ref CMessage msg) { CliProto.SC_PET_UP_ACK refMsg = (CliProto.SC_PET_UP_ACK)msg; if (refMsg.m_Ok == 1) { sdNewPetMgr.Instance.UpdatePetUp((UInt64)refMsg.m_DBID, refMsg.m_Up); GameObject wnd = sdGameLevel.instance.NGUIRoot; if (wnd) { sdUIPetPropPnl petPropPnl = wnd.GetComponentInChildren <sdUIPetPropPnl>(); if (petPropPnl) { petPropPnl.ReflashPetPropUI(); } sdUIPetStrongPnl petStrongPnl = wnd.GetComponentInChildren <sdUIPetStrongPnl>(); if (petStrongPnl) { petStrongPnl.ReflashPetStrongIcon(); petStrongPnl.OnStrongSuccess(); } } } }
void OnClick() { if (gameObject) { if (m_uuDBID != UInt64.MaxValue && m_uuDBID != 0) { int iPos = sdNewPetMgr.Instance.GetIsInBattleAllTeam(m_uuDBID); if (iPos != 0) { string strMsg = ""; if (iPos <= 3) { strMsg = string.Format("该战魂已在战队{0}中出战", iPos); } else { iPos = iPos / 10; strMsg = string.Format("该战魂已在战队{0}中助战", iPos); } sdUICharacter.Instance.ShowMsgLine(strMsg, Color.red); return; } GameObject wnd = sdGameLevel.instance.NGUIRoot; if (wnd) { sdUIPetStrongSelectPnl petPnl = wnd.GetComponentInChildren <sdUIPetStrongSelectPnl>(); if (petPnl) { //显示选中的图标.. petPnl.SetAllPetItemUnSelected(); SetPetSelect(true); //设置sdNewPetMgr中的强化材料id.. petPnl.m_uuSelectDBID = m_uuDBID; sdNewPetMgr.Instance.m_uuPetStrongSelectID = petPnl.m_uuSelectDBID; //刷新宠物属性界面上的强化ui.. sdUIPetStrongPnl petStrongPnl = wnd.GetComponentInChildren <sdUIPetStrongPnl>(); if (petStrongPnl) { petStrongPnl.ReflashPetStrongIcon(); } //关闭材料选择界面.. if (sdUIPetControl.m_UIPetStrongSelectPnl != null) { sdUIPetControl.Instance.ClosePetPnl(sdUIPetControl.m_UIPetStrongSelectPnl); } } } } } }