Ejemplo n.º 1
0
    //角色宠物列表..
    private static void msg_SCID_USER_PETS_NTF(int iMsgID, ref CMessage msg)
    {
        CliProto.SC_USER_PETS_NTF refMsg = (CliProto.SC_USER_PETS_NTF)msg;
        sdNewPetMgr.Instance.CreatePetInfo(refMsg);
        GameObject wnd = sdGameLevel.instance.NGUIRoot;

        if (wnd)
        {
            sdUIPetListPnl petListPnl = wnd.GetComponentInChildren <sdUIPetListPnl>();
            if (petListPnl)
            {
                petListPnl.RefreshPetListPage();
            }

            sdUIPetSaleSelectPnl petSalePnl = wnd.GetComponentInChildren <sdUIPetSaleSelectPnl>();
            if (petSalePnl)
            {
                petSalePnl.UpdatePetSaleSelectList();
            }
        }
    }
Ejemplo n.º 2
0
    //宠物单个失去..
    public static void msg_SCID_PET_SINGLE_LEAVE_NTF(int iMsgID, ref CMessage msg)
    {
        CliProto.SC_PET_SINGLE_LEAVE_NTF refMsg = (CliProto.SC_PET_SINGLE_LEAVE_NTF)msg;
        sdNewPetMgr.Instance.DeletePetInfo(refMsg);
        GameObject wnd = sdGameLevel.instance.NGUIRoot;

        if (wnd)
        {
            if (bIsSalePet == false)
            {
                sdUIPetListPnl petListPnl = wnd.GetComponentInChildren <sdUIPetListPnl>();
                if (petListPnl)
                {
                    petListPnl.RefreshPetListPage();
                }

                sdUIPetSaleSelectPnl petSalePnl = wnd.GetComponentInChildren <sdUIPetSaleSelectPnl>();
                if (petSalePnl)
                {
                    petSalePnl.UpdatePetSaleSelectList();
                }
            }
            else
            {
                if (m_iPetSaleNum > 3)
                {
                    m_iPetSaleNum--;
                }
                else
                {
                    bIsSalePet    = false;
                    m_iPetSaleNum = 0;
                    sdUICharacter.Instance.ShowMsgLine("战魂出售成功", MSGCOLOR.Yellow);
                }
            }
        }
    }