Example #1
0
    void OpenUI(Tab_UIPath uiPath)
    {
        if (UIPathData.m_DicUIInfo.ContainsKey(uiPath.Path))
        {
            UIPathData curData = UIPathData.m_DicUIInfo[uiPath.Path];
            // 科技院单独处理
            if (uiPath.Path == "Prefab/UI/Restaurant")
            {
                RestaurantController.OpenWindow(true);
            }
            else
            {
                UIManager.ShowUI(curData, (bSuccess, param) =>
                {
                    if (!string.IsNullOrEmpty(uiPath.Param))
                    {
                        switch (uiPath.Path)
                        {
                        case "Prefab/UI/ActivityController":
                            ActivityController.Instance().m_HuoDongControl.ChangeTab(uiPath.Param);
                            break;

                        case "Prefab/UI/PartnerFrameRoot":
                            PartnerFrameLogic.Instance().m_TabController.ChangeTab(uiPath.Param);
                            break;
                        }
                    }
                });
            }
        }
    }
 void OnRebirthClick()
 {
     if (PartnerFrameLogic.Instance() != null)
     {
         PartnerFrameLogic.Instance().OnRebirthClick(m_Fellow);
     }
 }
Example #3
0
 void OnChangeNameClick()
 {
     if (PartnerFrameLogic.Instance() != null)
     {
         PartnerFrameLogic.Instance().OnChangeNameClick(m_Fellow);
     }
 }
    void OnBattleClick()
    {
        if (m_Fellow == null)
        {
            return;
        }

        if (false == m_Fellow.IsValid())
        {
            return;
        }

        CG_CALL_FELLOW pak = (CG_CALL_FELLOW)PacketDistributed.CreatePacket(MessageID.PACKET_CG_CALL_FELLOW);

        pak.SetGuid(m_Fellow.Guid);
        pak.SendPacket();

        GameManager.gameManager.SoundManager.PlaySoundEffect(30);

        if (m_NewPlayerGuideFlag_Step == 1)
        {
            if (PartnerFrameLogic.Instance())
            {
                PartnerFrameLogic.Instance().NewPlayerGuide(1);
            }
        }
    }
Example #5
0
    public void HandleChangeTab()
    {
//         m_TabController.delTabChanged = TabOnClick;
//         if (m_DefaultTab == DEVELOPCONTENT.DEVELOPCONTENT_STAR)
//         {
//             m_TabController.ChangeTab("Tab1-Star");
//         }
//         else if (m_DefaultTab == DEVELOPCONTENT.DEVELOPCONTENT_SKILL)
//         {
//             m_TabController.ChangeTab("Tab2-Skill");
//         }

        GameManager.gameManager.ActiveScene.InitFakeObjRoot(m_ModelViewTopLeft, m_ModelViewBottomRight);
        GameManager.gameManager.ActiveScene.ShowFakeObj();
        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().InitPartnerList();
            // 可能从宠物属性界面点升星/技能升级切过来 而不是点大标签
            // 此时还要默认选中在属性界面选中的宠物 加载完列表后默认选中立即清空
            PartnerFrameLogic.Instance().InitPartnerList(m_DefaultFellowGuid, (fellow) =>
            {
                return(fellow.GetFellowType() != (int)FELLOWTYPE.BABY);
            });
            m_DefaultFellowGuid = GlobeVar.INVALID_GUID;
            bool hasShowFellow = PartnerFrameLogic.Instance().m_PartnerListGrid.transform.childCount > 0;
            m_Content.SetActive(hasShowFellow);
            m_EmptyContent.SetActive(!hasShowFellow);
            if (!hasShowFellow)
            {
                GameManager.gameManager.ActiveScene.HideFakeObj();
            }
        }
    }
Example #6
0
 void Check_NewPlayerGuide()
 {
     if (PartnerFrameLogic.Instance() && PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 4)
     {
         NewPlayerGuide(1);
     }
 }
Example #7
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_SYNC_FELLOW_BREEDINGINFO packet = (GC_SYNC_FELLOW_BREEDINGINFO)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            GameManager.gameManager.PlayerDataPool.LastProcreateTime = packet.Lastprocreatetime;
            GameManager.gameManager.PlayerDataPool.GoneProcreateTime = packet.GoneProcreateTime;
            if (PartnerFrameLogic_Breeding.Instance() != null)
            {
                PartnerFrameLogic_Breeding.Instance().UpdateFellowInfo_Button();
                PartnerFrameLogic_Breeding.Instance().UpdateFellowInfo_Window(false);
            }
            if (MenuBarLogic.Instance() != null)
            {
                MenuBarLogic.Instance().UpdateFellowRedTip();
            }
            if (PartnerFrameLogic.Instance() != null)
            {
                PartnerFrameLogic.Instance().UpdateFellowTip();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Example #8
0
    void LoadPartnerAndMountRoot(bool bSuccess, object param)
    {
        if (PartnerFrameLogic.Instance() == null)
        {
            return;
        }
        int type = (int)param;

        switch (type)
        {
        case 1:
            PartnerFrameLogic.Instance().ChangeTabClick("Button1-Info");
            break;

        case 2:
            PartnerFrameLogic.Instance().ChangeTabClick("Button2-Develop");
            break;

        case 3:
            PartnerFrameLogic.Instance().ChangeTabClick("Button3-Skill");
            break;

        case 4:
            PartnerFrameLogic.Instance().ChangeTabClick("Button3-Bleeding");
            break;
        }
    }
    public void OnFellowClick()
    {
        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().OnFellowClick(m_fellow);

            if (gameObject.name == "00" && PartnerFrameLogic.Instance())
            {
                int nIndex = PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step;
                if (PartnerFrameLogic_Info.Instance() != null)
                {
                    if (nIndex == 2)// 召唤伙伴
                    {
                        PartnerFrameLogic_Info.Instance().NewPlayerGuide(1);
                    }
                    else if (nIndex == 12)// 天赋技能
                    {
                        PartnerFrameLogic_Info.Instance().NewPlayerGuide(2);
                    }
                    PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step = -1;
                    return;
                }
                else if (nIndex == 15)// 升星
                {
                    PartnerFrameLogic.Instance().NewPlayerGuide(16);
                }
            }
        }
    }
    /// <summary>
    /// 选择被吃的宝宝
    /// </summary>
    /// <param name="item"></param>
    public void OnChooseMaterialClick(MaterialPartnerItemLogic item)
    {
        if (item.Choose)
        {
            m_ChoosePartnerGuid.Add(item.GetGuid());
            m_ChoosePartnerExp += item.StarExp;
        }
        else
        {
            m_ChoosePartnerGuid.Remove(item.GetGuid());
            m_ChoosePartnerExp -= item.StarExp;
        }
        ShowFellowDetail(item.m_fellow);

        int nTotalStarExp = m_ChoosePartnerExp + m_Fellow.StarExp;

        m_ChooseMaterialExpSprite.fillAmount = (float)nTotalStarExp / (float)m_Fellow.GetCurStarExpMax();

        int addLevel = FellowTool.GetFellowAddStarLevel(m_Fellow.StarLevel, nTotalStarExp);

        if (addLevel > 0)
        {
            m_ChooseMaterialExpCount.gameObject.SetActive(true);
            m_ChooseMaterialExpCount.text = "x" + addLevel.ToString();
        }
        else
        {
            m_ChooseMaterialExpCount.gameObject.SetActive(false);
        }

        if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 17)
        {
            PartnerFrameLogic.Instance().NewPlayerGuide(18);
        }
    }
Example #11
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_FELLOW_ENCHANCE_RET packet = (GC_FELLOW_ENCHANCE_RET)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            if (PartnerFrameLogic.Instance() != null)
            {
                PartnerFrameLogic.Instance().RefreshPartnerList((fellow) =>
                {
                    return(fellow.GetFellowType() != (int)Games.Fellow.FELLOWTYPE.BABY);
                });
            }
            if (PartnerFrameLogic_Star.Instance() != null)
            {
                PartnerFrameLogic_Star.Instance().HandleFellowStarRet();
            }

            if (packet.Result == 1)
            {
                // ³É¹¦²¥·Å¶¯»­
                PartnerFrameLogic_Star.Instance().PlayStarUpgradeEffect();
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
    /// <summary>
    /// 打开选择学习技能书界面
    /// </summary>
    /// <param name="go"></param>
    void OpenChooseSkillBookDialog(GameObject go)
    {
        Utils.CleanGrid(m_SkillChooseGrid);

        List <Tab_CabalFellowElementSkillBook> FellowSkillBookList = GameManager.gameManager.PlayerDataPool.BackPack.GetSkillLearnBooksByElementType(m_Fellow.ElementAttr);

        if (FellowSkillBookList.Count <= 0)
        {
            GUIData.AddNotifyData("#{11500}");
            return;
        }
        //选择技能书界面
        m_SkillChooseWindow.SetActive(true);

        int index = 0;

        //foreach (Tab_CabalFellowElementSkillBook book in GameManager.gameManager.PlayerDataPool.BackPack.GetSkillLearnBooksByElementType(m_Fellow.ElementAttr))
        foreach (Tab_CabalFellowElementSkillBook book in FellowSkillBookList)
        {
            if (m_Fellow.IsHaveSkillId(book.SkillId))
            {
                continue;
            }
            Tab_CabalFellowElementSkill tabSkill = TableManager.GetCabalFellowElementSkillByID(book.SkillId, 0);
            if (tabSkill == null)
            {
                continue;
            }

            Tab_SkillEx tabSkillEx = TableManager.GetSkillExByID(book.SkillId, 0);
            if (tabSkillEx == null)
            {
                continue;
            }

            Tab_SkillBase tabBase = TableManager.GetSkillBaseByID(tabSkillEx.BaseId, 0);
            if (tabBase == null)
            {
                continue;
            }
            string     itemName  = index < 10 ? "0" + index.ToString() : index.ToString();
            GameObject SkillItem = Utils.BindObjToParent(m_SkillChooseItem, m_SkillChooseGrid, itemName);
            if (SkillItem != null && SkillItem.GetComponent <PartnerSkillChooseItemLogic>() != null)
            {
                SkillItem.GetComponent <PartnerSkillChooseItemLogic>().Init(book);
            }
            index += 1;
        }

        if (m_SkillChooseGrid.GetComponent <UIGrid>() != null)
        {
            m_SkillChooseGrid.GetComponent <UIGrid>().Reposition();
        }

        if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 4)
        {
            PartnerFrameLogic.Instance().NewPlayerGuide(5);
        }
    }
Example #13
0
 void OnEnable()
 {
     m_Instance = this;
     m_TabController.delTabChanged = TabOnClick;
     m_TabController.ChangeTab("Button1-Info");
     Check_NewPlayerGuide();
     UpdateDevelopRemindPoint();
 }
    //void OnElementInfoClick()
    //{
    //    m_ElementInfoWindow.SetActive(!m_ElementInfoWindow.activeSelf);
    //}

    void OnStarLevelUpClick()
    {
        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().ChangeToDevelop(
                PartnerFrameLogic_Develop.DEVELOPCONTENT.DEVELOPCONTENT_STAR,
                m_Fellow != null ? m_Fellow.Guid : GlobeVar.INVALID_GUID);
        }
    }
Example #15
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_CALL_FELLOW_RET packet = (GC_CALL_FELLOW_RET)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            UInt64 fellowGuid  = packet.Guid;
            int    fellowObjId = packet.Objid;

            if (fellowGuid == GlobeVar.INVALID_GUID)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }

            FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer;

            if (container != null)
            {
                Fellow fellow = container.GetFellowByGuid(fellowGuid);
                if (fellow != null)
                {
                    //设置为召出
                    fellow.Called = true;

                    if (PartnerFrameLogic.Instance() != null)
                    {
                        if (PartnerFrameLogic_Info.Instance() != null)
                        {
                            PartnerFrameLogic_Info.Instance().UpdateFellowInfo(fellow, false);
                        }

                        if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 1)
                        {
                            if (MenuBarLogic.Instance())
                            {
                                //MenuBarLogic.Instance().NewPlayerGuide(101);
                            }
                            //PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step = -1;
                        }
                        //UIManager.CloseUI(UIInfo.PartnerFrameRoot);
                    }
                }
            }
            Singleton <ObjManager> .GetInstance().MainPlayer.CurFellowObjId = fellowObjId;

            Singleton <ObjManager> .GetInstance().MainPlayer.CurFellowObjGuid = fellowGuid;

            //播放召出特效
            GameManager.gameManager.PlayerDataPool.FellowPlayerEffect = true;

            //enter your logic
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
    public void HandleChangeTab()
    {
        GameManager.gameManager.ActiveScene.InitFakeObjRoot(m_ModelViewTopLeft, m_ModelViewBottomRight);
        GameManager.gameManager.ActiveScene.ShowFakeObj();

        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().InitPartnerList();
        }

        Check_NewPlayerGuide();
    }
    void Check_NewPlayerGuide()
    {
        if (PartnerFrameLogic.Instance() == null)
        {
            return;
        }
        int nIndex = PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step;

        if (nIndex == 2)
        {
            PartnerFrameLogic.Instance().NewPlayerGuide(nIndex);
        }
    }
 /// <summary>
 /// 完成选择技能书
 /// </summary>
 /// <param name="book"></param>
 public void OnSkillChooseOKClick(Tab_CommonItem book)
 {
     m_SkillChooseWindow.SetActive(false);
     m_NewElementSkillIcon.spriteName = book.Icon;
     m_NewElementSkillIcon.gameObject.SetActive(true);
     m_NewElementSkillName.text = book.Name;
     m_NewElementSkillName.gameObject.SetActive(true);
     m_LearnSkillAddTips.SetActive(false);
     m_LearnSkillChooseBuffer = book.Id;
     if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 5)
     {
         PartnerFrameLogic.Instance().NewPlayerGuide(6);
     }
 }
Example #19
0
    public void NewPlayerGuide(int nIndex)
    {
        NewPlayerGuideFlag_Step = nIndex;
        switch (nIndex)
        {
        case 1:
            PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step = -1;
            NewPlayerGuidLogic.OpenWindow(m_TalentLevelUpButton, 100, 60, Utils.GetDicByID(10422), "left", 0, true, true);
            break;

        case 2:
            NewPlayerGuidLogic.OpenWindow(m_OkButton, 200, 60, Utils.GetDicByID(10423), "topleft", 0, true, true);
            break;
        }
    }
    /// <summary>
    /// 弃用
    /// </summary>
    void OnSkillLevelUpClick()
    {
        if (PartnerFrameLogic.Instance() != null)
        {
            if (NewPlayerGuideFlag_Step == 2)
            {
                NewPlayerGuideFlag_Step = -1;
                PartnerFrameLogic.Instance().NewPlayerGuide(4);
            }

            PartnerFrameLogic.Instance().ChangeToDevelop(
                PartnerFrameLogic_Develop.DEVELOPCONTENT.DEVELOPCONTENT_SKILL,
                m_Fellow != null ? m_Fellow.Guid : GlobeVar.INVALID_GUID);
        }
    }
 /// <summary>
 /// 点击学习技能按钮,打开学习技能UI
 /// </summary>
 void OnLearnSkillClick(GameObject go)
 {
     for (int i = 0; i < m_OldElementSkill.Length && i < Fellow.FELLOW_ELEMENTSKILL_COUNT && i < Fellow.FELLOW_ELEMENTSKILL_OPENCOUNT; i++)
     {
         int skillId = m_Fellow.GetElementSkillId(i);
         oldSkillId[i] = skillId;
         m_OldElementSkill[i].Init(skillId, i, m_Fellow.Level);
     }
     m_LearnSkillWindow.SetActive(true);
     ClearSkillLearnDialog();
     if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 13)
     {
         PartnerFrameLogic.Instance().NewPlayerGuide(4);
     }
     return;
 }
Example #22
0
    void OnEnable()
    {
        m_Instance = this;

        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().HidePartnerList();
        }

        m_BreedingViewport.sourceCamera = UICamera.mainCamera;

        UpdateFellowInfo_Button();
        UpdateFellowInfo_Window();

        InvokeRepeating("UpdateRemainTime", 0, 1);
    }
Example #23
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_FELLOW_REBIRTH packet = (GC_FELLOW_REBIRTH)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            if (PartnerFrameLogic.Instance() != null)
            {
                PartnerFrameLogic.Instance().InitPartnerList(PartnerFrameLogic.Instance().rebirthFellowGuid);
                //PartnerFrameLogic.Instance().rebirthFellowGuid = Games.GlobeDefine.GlobeVar.INVALID_GUID;
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
    void InitElementSkill_Info(int skillid)
    {
        Tab_CabalFellowElementSkill tabSkill = TableManager.GetCabalFellowElementSkillByID(skillid, 0);

        if (tabSkill == null)
        {
            return;
        }

        Tab_SkillEx tabSkillEx = TableManager.GetSkillExByID(skillid, 0);

        if (tabSkillEx == null)
        {
            return;
        }

        Tab_SkillBase tabBase = TableManager.GetSkillBaseByID(tabSkillEx.BaseId, 0);

        if (tabBase == null)
        {
            return;
        }

        m_TallentSkillId = GlobeVar.INVALID_ID;
        m_ElementSkillId = skillid;

        Tab_CabalFellowElementSkill tabNextSkill = TableManager.GetCabalFellowElementSkillByID(tabSkill.NextSkillId, 0);

        if (tabNextSkill == null)
        {
            lblSkillLv.text = "MAX";
        }
        sprSkillIcon.spriteName = tabBase.Icon;
        sprSkillIcon.gameObject.SetActive(true);

        lblSkillLv.text = FellowTool.GetFellowElementLevelText(skillid);
        lblSkillLv.transform.parent.gameObject.SetActive(true);
        lblSkillName.text = tabBase.Name;
        lblSkillDesc.text = tabBase.SkillIntro;
        objLock.SetActive(false);
        enhanceSkill.SetActive(true);
        UIEventListener.Get(enhanceSkill).onClick = ShowEnhanceDialog;
        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().UpdateDevelopRemindPoint();
        }
    }
 /// <summary>
 /// 成功学习技能
 /// </summary>
 void OnLearnSkillOK()
 {
     skillLearnEffect.SetActive(true);
     for (int i = 0; i < m_OldElementSkill.Length && i < Fellow.FELLOW_ELEMENTSKILL_COUNT && i < Fellow.FELLOW_ELEMENTSKILL_OPENCOUNT; i++)
     {
         int skillId = m_Fellow.GetElementSkillId(i);
         if (skillId != oldSkillId[i])
         {
             playItem = m_OldElementSkill[i];
             playItem.skillLeardEffect.SetActive(true);
             break;
         }
     }
     if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 6)
     {
         PartnerFrameLogic.Instance().NewPlayerGuide(7);
     }
     StartCoroutine(HideEffect());
 }
    /// <summary>
    /// 填充天赋技能数据
    /// </summary>
    /// <param name="skillid"></param>
    /// <param name="curexp"></param>
    public void InitTallentSkill(int skillid, int curexp)//天赋和技能公用一个,所以加个标识区分 true为天赋 false技能
    {
        m_bTallent = true;
        Tab_CabalFellowTallentSkill tabSkill = TableManager.GetCabalFellowTallentSkillByID(skillid, 0);

        if (tabSkill == null)
        {
            return;
        }
        HideDetail(null);         //切换宠物时 隐藏Tip
        m_TallentSkillId        = skillid;
        m_ElementSkillId        = GlobeVar.INVALID_ID;
        sprSkillIcon.spriteName = tabSkill.Icon;
        lblSkillName.text       = tabSkill.Name;
        lblSkillDesc.text       = tabSkill.SkillDesc;
        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().UpdateDevelopRemindPoint();
        }
    }
    /// <summary>
    /// 打开选择宠物窗口
    /// </summary>
    public void OnAddMaterialClick()
    {
        if (m_Fellow == null)
        {
            return;
        }
        m_AutoButtonLabel.text = StrDictionary.GetClientDictionaryString("#{10180}");//快速选择
        m_ChooseMaterialTitle.SetActive(false);
        m_ChoosePanel.SetActive(true);
        m_ChooseMaterialAutoMenu.SetActive(false);

        m_Tips.SetActive(false);
        m_StarButton.SetActive(false);
        UIEventListener.Get(m_CloseBg).onClick = OnChooseMaterialCancelClick;
        m_ChooseMaterialWindow.SetActive(true);
        InitMaterialPartnerGrid_Auto(-1);
        if (PartnerFrameLogic.Instance().NewPlayerGuideFlag_Step == 16)
        {
            PartnerFrameLogic.Instance().NewPlayerGuide(17);
        }
    }
Example #28
0
    public void InitTallentSkill(int skillid, int curexp)
    {
        Tab_CabalFellowTallentSkill tabSkill = TableManager.GetCabalFellowTallentSkillByID(skillid, 0);

        if (tabSkill == null)
        {
            return;
        }

        m_TallentSkillId = skillid;
        m_ElementSkillId = GlobeVar.INVALID_ID;

        m_NameLabel.text = tabSkill.Name;
        m_NameLabel.gameObject.SetActive(true);

        m_ExpLabel.text = tabSkill.NextSkillId != GlobeVar.INVALID_ID ? StrDictionary.GetClientDictionaryString("#{10321}", curexp, tabSkill.LevelUpExp) : "MAX";
        m_ExpLabel.gameObject.SetActive(true);

        m_SkillIcon.spriteName = tabSkill.Icon;
        m_SkillIcon.gameObject.SetActive(true);

        m_QualityPic.spriteName = FellowTool.GetFellowTallentSkillQualityPic(skillid);

        m_LevelLabel.text = "LV" + tabSkill.Level.ToString();
        m_LevelLabel.gameObject.SetActive(true);

        m_LockSprite.SetActive(false);
        m_FlagLabel.gameObject.SetActive(false);

        if (m_LevelUpButton != null)
        {
            m_LevelUpButton.SetActive(tabSkill.NextSkillId != GlobeVar.INVALID_ID);
        }

        updateTalentRemindPoint(skillid);
        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().UpdateDevelopRemindPoint();
        }
    }
    private void MoveButtonFun(bool bState = true)  //当宠物为宝宝时不显示 升星和技能按钮 克隆按钮前移
    {
        m_nPos2 = PartnerFrameLogic.Instance().m_TabBtn [2].transform.localPosition;
        m_nPos1 = PartnerFrameLogic.Instance().m_TabBtn [1].transform.localPosition;
        if (bState)
        {
            if (PartnerFrameLogic.Instance() != null)
            {
                PartnerFrameLogic.Instance().m_TabBtn[1].SetActive(false);
                PartnerFrameLogic.Instance().m_TabBtn[2].SetActive(false);
            }
            PartnerFrameLogic.Instance().m_TabBtn[3].transform.localPosition = m_nPos1;
        }
        else
        {
            if (PartnerFrameLogic.Instance() != null)
            {
                PartnerFrameLogic.Instance().m_TabBtn[1].SetActive(true);
                PartnerFrameLogic.Instance().m_TabBtn[2].SetActive(true);
            }

            PartnerFrameLogic.Instance().m_TabBtn[3].transform.localPosition = new Vector3(m_nPos2.x * 2 - m_nPos1.x, m_nPos2.y, m_nPos2.z);
        }
    }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_UPDATE_FELLOW packet = (GC_UPDATE_FELLOW)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //取得伙伴在容器中的索引
            int             index     = packet.Packindex;
            FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer;

            if (container != null)
            {
                Fellow fellow = container.GetFellowByIndex(index);
                if (fellow != null)
                {
                    //GUID
                    fellow.Guid = packet.Guid;
                    //ID
                    fellow.DataId = packet.Dataid;
                    //昵称
                    fellow.Name = packet.Name;
                    //品质
                    if (packet.HasQuality)
                    {
                        fellow.Quality = packet.Quality;
                    }
                    //经验
                    if (packet.HasExp)
                    {
                        fellow.Exp = packet.Exp;
                    }
                    //级别
                    if (packet.HasLevel)
                    {
                        fellow.Level = packet.Level;
                    }
                    //打星等级
                    if (packet.HasStarexp)
                    {
                        fellow.StarExp = packet.Starexp;
                    }
                    //打星等级
                    if (packet.HasStarlevel)
                    {
                        fellow.StarLevel = packet.Starlevel;
                    }
                    //成长率
                    //if (packet.HasGrowup)
                    //{
                    //    fellow.GrowUp = (float)packet.Growup / 100.0f;
                    //}
                    //幸运值
                    if (packet.HasLucky)
                    {
                        fellow.Lucky = packet.Lucky;
                    }
                    //当前可用繁殖次数
                    if (packet.HasProcreatecount)
                    {
                        fellow.ProcreateCount = packet.Procreatecount;
                    }
                    //元素属性
                    if (packet.HasElementattr)
                    {
                        fellow.ElementAttr = packet.Elementattr;
                    }
                    //上锁
                    if (packet.HasIslock)
                    {
                        fellow.Locked = (packet.Islock == 1) ? true : false;
                    }
                    //初始五围属性
                    if (packet.HasBaseattack)
                    {
                        fellow.BaseAttack = packet.Baseattack;
                    }
                    if (packet.HasBasehit)
                    {
                        fellow.BaseHit = packet.Basehit;
                    }
                    if (packet.HasBasecritical)
                    {
                        fellow.BaseCritical = packet.Basecritical;
                    }
                    if (packet.HasBaseguard)
                    {
                        fellow.BaseGuard = packet.Baseguard;
                    }
                    if (packet.HasBasebless)
                    {
                        fellow.BaseBless = packet.Basebless;
                    }
                    if (packet.tallentskillidCount > 0 && packet.tallentskilllevelCount > 0)
                    {
                        fellow.TallentSkill.Clear();
                        for (int i = 0; i < packet.tallentskillidCount && i < packet.tallentskilllevelCount; i++)
                        {
                            if (false == fellow.TallentSkill.ContainsKey(packet.tallentskillidList[i]))
                            {
                                fellow.TallentSkill.Add(packet.tallentskillidList[i], packet.tallentskilllevelList[i]);
                            }
                        }
                    }
                    for (int i = 0; i < packet.elementskillidCount; i++)
                    {
                        if (false == fellow.IsHaveSkillId(packet.elementskillidList[i]))
                        {
                            fellow.SetElementSkillId(packet.elementskillidList[i], i);
                        }
                    }

                    if (PartnerFrameLogic.Instance() != null)
                    {
                        PartnerFrameLogic.Instance().UpdateFellowInfo_Refresh();
                        if (PartnerFrameLogic.Instance().rebirthFellowGuid != GlobeVar.INVALID_GUID)
                        {
                            PartnerFrameLogic.Instance().InitPartnerList(PartnerFrameLogic.Instance().rebirthFellowGuid);
                            PartnerFrameLogic.Instance().rebirthFellowGuid = Games.GlobeDefine.GlobeVar.INVALID_GUID;
                        }
                    }

                    if (Singleton <ObjManager> .GetInstance().MainPlayer != null && fellow.Guid == Singleton <ObjManager> .GetInstance().MainPlayer.CurFellowObjGuid)
                    {
                        Obj_Fellow curFellow = Singleton <ObjManager> .GetInstance().FindObjInScene(Singleton <ObjManager> .GetInstance().MainPlayer.CurFellowObjId) as Obj_Fellow;

                        if (curFellow != null)
                        {
                            curFellow.SetBordName(fellow.Name);
                        }
                    }
                }
            }
            if (MenuBarLogic.Instance() != null)
            {
                MenuBarLogic.Instance().UpdateFellowRedTip();
            }
            if (PartnerFrameLogic.Instance() != null)
            {
                PartnerFrameLogic.Instance().UpdateFellowTip();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }