예제 #1
0
    private void ShowItems()
    {
        //获取数据
        List <uint> knapsackPackData = DataManager.Manager <ItemManager>().GetItemDataByPackageType(GameCmd.PACKAGETYPE.PACKAGETYPE_MAIN);

        m_lstUIItemCommondata.Clear();
        for (int i = 0; i < knapsackPackData.Count; i++)
        {
            BaseItem baseItem = DataManager.Manager <ItemManager>().GetBaseItemByQwThisId(knapsackPackData[i]);
            if (baseItem != null)
            {
                m_lstUIItemCommondata.Add(
                    new ItemDefine.UIItemCommonData()
                {
                    IconName   = baseItem.BaseData.itemIcon,
                    ShowGetWay = false,
                    Qulity     = baseItem.BaseData.quality,
                    ItemThisId = knapsackPackData[i],
                    Name       = baseItem.BaseData.itemName,
                });
            }
        }
        //生成UI
        gridCreator.CreateGrids(m_lstUIItemCommondata.Count);
    }
예제 #2
0
    //构造成员数据
    private void BuildMemberDatas()
    {
        if (!IsPanelMode(ClanPanelMode.Member) || !IsInitMode(ClanMemberMode.Member))
        {
            return;
        }

        ClanDefine.LocalClanInfo clanInfo = ClanInfo;
        if (null != clanInfo)
        {
            m_list_memberdatas = DataManager.Manager <ClanManger>().MemberSortByType(DataManager.Manager <ClanManger>().curMemberSortType, true);
            if (!m_list_memberdatas.Contains(m_uint_selectmemberid) && m_list_memberdatas.Count > 0)
            {
                m_uint_selectmemberid = m_list_memberdatas[0];
            }
            m_list_memberdatas.Sort(ClanDefine.ClanMemberSort);
            m_memberCreator.CreateGrids(m_list_memberdatas.Count);
            if (null != m_label_MemberONT)
            {
                ClanDefine.LocalClanMemberDB db = ClanManger.GetLocalCalnMemberDB(clanInfo.Lv);
                m_label_MemberONT.text = string.Format("成员数量:{0}/{1}/{2}", clanInfo.OnLineMemberCount
                                                       , clanInfo.MemberCount, ((null != db) ? db.MaxMember : 0));
            }
        }
    }
예제 #3
0
    void RefreshFashionGrid()
    {
        DataManager.Manager <UIPanelManager>().HidePanel(PanelID.FashionTips);
        m_suitDataManager.CurSuitType = m_em_fashionMode;
        int count = m_suitDataManager.GetSortListData().Count;

        if (m_fashionCreator != null)
        {
            m_fashionCreator.CreateGrids(count);

            SetNoneGridSelect();
        }
    }
예제 #4
0
    void ShowNormalTaskUI(table.QuestDataBase quest, QuestTraceInfo taskInfo)
    {
        if (quest == null)
        {
            return;
        }
        SetTaskDesc(ref quest);


        SetTargetLabel(taskInfo, ref quest, ref m_label_normaltargetLabel);


        if (taskInfo != null)
        {
            SetBottomBtnLable(taskInfo);

            if (taskInfo.exp == 0)
            {
                //请求任务奖励
                NetService.Instance.Send(new GameCmd.stRequestTaskRewardScriptUserCmd_C()
                {
                    task_id = m_nTaskid
                });
            }
            else
            {
                m_lstRewardItemInfo = GetRewardInfoList(taskInfo.exp, taskInfo.money, taskInfo.gold, taskInfo.Items, taskInfo.ItemNum);
                m_rewardItemGridCreator.CreateGrids(m_lstRewardItemInfo != null ? m_lstRewardItemInfo.Count : 0);
                //SetNormalReward(taskInfo.exp,taskInfo.money,taskInfo.gold,taskInfo.Items,taskInfo.ItemNum);
                return;
            }

            if (taskInfo.state != 0)
            {
                m_trans_DemonFresh.gameObject.SetActive(taskInfo.state != taskInfo.operate);
            }
            else
            {
                m_trans_DemonFresh.gameObject.SetActive(true);
            }
        }
        else
        {
            NetService.Instance.Send(new GameCmd.stRequestTaskRewardScriptUserCmd_C()
            {
                task_id = m_nTaskid
            });
            m_label_btn_bottom_Label.text = "接取";
            m_trans_DemonFresh.gameObject.SetActive(true);
        }
    }
예제 #5
0
    void InitScrollView()
    {
        m_petSettingGridCreator = m_trans_PetScrollView.GetComponent <UIGridCreatorBase>();
        if (m_petSettingGridCreator == null)
        {
            m_petSettingGridCreator = m_trans_PetScrollView.gameObject.AddComponent <UIGridCreatorBase>();
        }
        // GameObject obj = UIManager.GetResGameObj( GridID.Uipetsettinggrid ) as GameObject;
        m_petSettingGridCreator.arrageMent        = UIGridCreatorBase.Arrangement.Horizontal;
        m_petSettingGridCreator.gridContentOffset = new Vector2(-177, -240);
        m_petSettingGridCreator.gridWidth         = 90;
        m_petSettingGridCreator.gridHeight        = 90;
        m_petSettingGridCreator.rowcolumLimit     = 5;
        m_petSettingGridCreator.RefreshCheck();
        m_petSettingGridCreator.Initialize <UIPetSettingGrid>((uint)GridID.Uipetsettinggrid, UIManager.OnObjsCreate, UIManager.OnObjsRelease, OnUpdateUIGrid, OnUIGridEventDlg);
        // m_petSettingGridCreator.Initialize<UIPetSettingGrid>(obj, OnUpdateUIGrid, OnUIGridEventDlg);
        Dictionary <uint, IPet> petDic = m_petDataManager.GetPetDic();
        int count = 0;

        if (petDic != null)
        {
            count = petDic.Keys.Count;
        }
        m_petSettingGridCreator.CreateGrids(count);
    }
예제 #6
0
 void CreateTab()
 {
     if (m_tabGridCreator != null)
     {
         m_tabGridCreator.CreateGrids(m_lstHomeTradeTab != null ? m_lstHomeTradeTab.Count : 0);
     }
 }
예제 #7
0
 void CreateWeek()
 {
     if (m_weekCreator != null)
     {
         m_weekCreator.CreateGrids(m_lstWeek.Count);
     }
 }
예제 #8
0
 void RefreshItems()
 {
     list.Clear();
     for (int i = 0; i < m_WelfareData.collectWords.Count; i++)
     {
         string icon = i == m_WelfareData.collectWords.Count - 1 ? "tubiao_deng_he" : "tubiao_jia_he";
         list.Add(new UIItemRewardData()
         {
             itemID             = m_WelfareData.collectWords[i].itemid,
             num                = m_WelfareData.collectWords[i].itemNum,
             name               = m_WelfareData.collectWords[i].name,
             additionalIconName = icon,
             showAdditional     = true,
         });
     }
     for (int i = 0; i < m_WelfareData.lstWelfareItems.Count; i++)
     {
         list.Add(new UIItemRewardData()
         {
             itemID         = m_WelfareData.lstWelfareItems[i].itemid,
             num            = m_WelfareData.lstWelfareItems[i].itemNum,
             showAdditional = false,
         });
     }
     m_ctor.CreateGrids(list.Count);
 }
예제 #9
0
 void CreateRewardRank()
 {
     if (m_rewardGridCreator != null)
     {
         m_rewardGridCreator.CreateGrids(m_rewardList != null ? m_rewardList.Count : 0);
     }
 }
예제 #10
0
 /// <summary>
 /// 创建队伍grid list
 /// </summary>
 void CreateTeamGrids()
 {
     if (TDManager.ConvenientTeamList != null)
     {
         m_existedTeamGridCreator.CreateGrids(TDManager.ConvenientTeamList != null ? TDManager.ConvenientTeamList.Count : 0);
     }
 }
예제 #11
0
    /// <summary>
    /// 构建成员列表
    /// </summary>
    private void BuildApplyList()
    {
        if (!IsInitMode(ClanPanel.ClanMemberMode.Apply))
        {
            return;
        }

        ClanDefine.LocalClanInfo clanInfo = ClanInfo;
        m_list_applyUserIds.Clear();
        m_list_applyUserIds.AddRange(m_mgr.GetClanApplyUserIds());
        curApplySortType = MemberSortType.None;
        //获取数据
        if (null != clanInfo && null != m_applyCreator)
        {
            m_applyCreator.CreateGrids(m_list_applyUserIds.Count);
        }
    }
예제 #12
0
 private void CreateClanInviteList()
 {
     if (null != m_clanInviteCreator)
     {
         m_clanInviteCreator.CreateGrids(
             (null != m_inviteData && null != m_inviteData.inviteDatas) ? m_inviteData.inviteDatas.Count : 0);
     }
 }
예제 #13
0
 void CreateGrids()
 {
     m_peopleList = TDManager.GetInvitePeopleListByType(m_ePeopletype);
     if (m_peopleList != null)
     {
         m_TeamInviteGridCreator.CreateGrids((null != m_peopleList) ? m_peopleList.Count : 0);
     }
 }
예제 #14
0
    void CreateGrid()
    {
        m_lstDailyTestInfo = DataManager.Manager <DailyTestManager>().GetDailyTestInfoList();

        if (m_dailyTestGridCreator != null)
        {
            m_dailyTestGridCreator.CreateGrids(m_lstDailyTestInfo != null ? m_lstDailyTestInfo.Count : 0);
        }
    }
예제 #15
0
    void CreateGrid()
    {
        m_cityWarCopyList = DataManager.Manager <CityWarManager>().GetCityWarCopyListWithoutHuaXia();

        if (m_cityInfoGridCreator != null)
        {
            m_cityInfoGridCreator.CreateGrids(m_cityWarCopyList != null ? m_cityWarCopyList.Count : 0);
        }
    }
예제 #16
0
    void CreateGrid()
    {
        m_fishingRankInfoList = DataManager.Manager <FishingManager>().FishingRankInfoList;

        if (m_FishingRankCreator != null)
        {
            m_FishingRankCreator.CreateGrids(m_fishingRankInfoList != null ? m_fishingRankInfoList.Count : 0);
        }
    }
예제 #17
0
    /// <summary>
    /// 6个图腾信息
    /// </summary>
    void UpdateCityWarTower()
    {
        m_lstCityWarTotem = m_cityWarManger.CityWarTotemList;

        if (m_TotemListGridCreator != null)
        {
            m_TotemListGridCreator.CreateGrids(m_lstCityWarTotem != null ? m_lstCityWarTotem.Count : 0);
        }
    }
예제 #18
0
    /// <summary>
    /// //前20名信息
    /// </summary>
    void UpdateCityWarHeroListUI()
    {
        m_lstCityWarHero = m_cityWarManger.CityWarHeroList;

        if (m_WarInfoListGridCreator != null)
        {
            m_WarInfoListGridCreator.CreateGrids(m_lstCityWarHero != null ? m_lstCityWarHero.Count : 0);
        }
    }
예제 #19
0
    /// <summary>
    /// 激活加成UI
    /// </summary>
    void CreateActivateAddUI()
    {
        m_label_UseFighting.text = TManager.GetActivateAddFight(this.m_selectTitleId).ToString();
        List <uint> activateAddList = TManager.GetActivateAddList(this.m_selectTitleId);

        if (m_ActivatePropGridCreator != null)
        {
            m_ActivatePropGridCreator.CreateGrids(activateAddList != null ? activateAddList.Count : 0);
        }
    }
예제 #20
0
    void CreateDailyItemList()
    {
        table.RechargeCostDataBase rcDb = GameTableManager.Instance.GetTableItem <table.RechargeCostDataBase>(this.m_selectDailyId);
        if (rcDb == null)
        {
            return;
        }

        m_dailyItemArr = rcDb.reward.Split(';');
        m_dailyItemCreator.CreateGrids(m_dailyItemArr.Length);
    }
예제 #21
0
    /// <summary>
    /// 永久加成UI
    /// </summary>
    void CreateForeverAddUI()
    {
        //战斗力
        m_label_AttachedFighting.text = TManager.GetForeverAddFight(this.m_selectTitleId).ToString();
        List <uint> foreverAddList = TManager.GetForeverAddList(this.m_selectTitleId);

        if (m_ForeverPropGridCreator != null)
        {
            m_ForeverPropGridCreator.CreateGrids(foreverAddList != null ? foreverAddList.Count : 0);
        }
    }
예제 #22
0
    void CreateGrowUpFightPowerGrid()
    {
        m_trans_growrightscrollview.gameObject.SetActive(false);
        m_trans_growFightPowerContent.gameObject.SetActive(true);

        m_lstGrowUpFightPowerDB = DataManager.Manager <GrowUpManager>().GetGrowUpFightPowerGridList();
        if (m_GrowUpFightPowerGridCreator != null)
        {
            m_GrowUpFightPowerGridCreator.CreateGrids(m_lstGrowUpFightPowerDB != null ? m_lstGrowUpFightPowerDB.Count : 0);
        }
    }
예제 #23
0
    protected override void OnShow(object data)
    {
        base.OnShow(data);
        m_uWillUseItemNum = 0;
        DataManager.Manager <RideManager>().ValueUpdateEvent += OnUpdateList;
        RegisterGlobalUIEvent(true);
        if (data is UseItemParam)
        {
            m_UseItemParam = (UseItemParam)data;

            switch (m_UseItemParam.type)
            {
            case UseItemEnum.None:
                break;

            case UseItemEnum.RideExp:
                m_currUserItem = new RideExpUse();
                break;

            case UseItemEnum.RideFeed:
                m_currUserItem = new RideFeedUse();
                break;

            case UseItemEnum.MuhonExp:
                m_currUserItem = new MuhonExpUse();
                break;

            case UseItemEnum.PetLife:
                InitPetData(UseItemEnum.PetLife);
                break;

            case UseItemEnum.PetExp:
                InitPetData(UseItemEnum.PetExp);
                break;

            case UseItemEnum.RideTalent:
                RideTalentUserItem item = new RideTalentUserItem();
                item.CurTalent = (RideManager.RideTalentEnum)m_UseItemParam.customParam;
                m_currUserItem = item;
                break;

            default:
                break;
            }

            InitUI();

            if (m_UIGridCreatorBase != null)
            {
                m_UIGridCreatorBase.CreateGrids(m_lstUseItemData.Count);
            }
        }
    }
예제 #24
0
    /// <summary>
    /// 创建左侧的grid
    /// </summary>
    void CreateIndexTargetGrids()
    {
        if (m_dicActivity == null)
        {
            return;
        }

        if (m_dicActivity.TryGetValue(m_selectMainTargetId, out m_lstIndexTargetId))
        {
            m_TeamIndexTargetCreator.CreateGrids((null != m_lstIndexTargetId) ? m_lstIndexTargetId.Count : 0);
        }
    }
예제 #25
0
 public override void SetGridData(object data)
 {
     base.SetGridData(data);
     _UIItemRewardDatas = (UIItemRewardData)data;
     if (_UIItemRewardDatas != null)
     {
         if (m_ctor != null)
         {
             m_ctor.CreateGrids(1);
         }
     }
 }
예제 #26
0
 void RefreshItems()
 {
     list.Clear();
     for (int i = 0; i < m_rewardData.list.Count; i++)
     {
         list.Add(new UIItemRewardData()
         {
             itemID = m_rewardData.list[i].itemID,
             num    = m_rewardData.list[i].itemNum,
         });
     }
     m_ctor.CreateGrids(list.Count);
 }
예제 #27
0
    /// <summary>
    ///
    /// </summary>
    void CreateMainTargetGrids()
    {
        if (m_dicActivity == null)
        {
            return;
        }

        m_lstMainTargetId = new List <uint>(m_dicActivity.Keys);

        if (m_TeamMainTargetCreator != null)
        {
            m_TeamMainTargetCreator.CreateGrids((null != m_lstMainTargetId) ? m_lstMainTargetId.Count : 0);
        }
    }
예제 #28
0
    void CreateGrowUpGrid()
    {
        m_trans_growrightscrollview.gameObject.SetActive(true);
        m_trans_growFightPowerContent.gameObject.SetActive(false);

        List <uint> idList;

        if (DataManager.Manager <GrowUpManager>().TryGetGrowUpIdListByKeyAndSecondkey(this.m_selectFirstKeyId, this.m_selectSecondKeyId, out idList))
        {
            if (m_GrowUpGridCreator != null)
            {
                m_GrowUpGridCreator.CreateGrids(idList.Count);
            }
        }
    }
예제 #29
0
    /// <summary>
    /// 显示日常的详细信息
    /// </summary>
    /// <param name="index">索引</param>
    void ShowDailInfo()
    {
        if (null == curDailyData)
        {
            return;
        }
        m_label_Name.text        = curDailyData.name;
        m_sprite_Icon.spriteName = curDailyData.icon;
        m_sprite_Icon.MakePixelPerfect();
        uint times        = 0;
        uint liveness_num = 0;

        if (dm.ActiveDic.ContainsKey(curDailyData.id))
        {
            times        = dm.ActiveDic[curDailyData.id].time;
            liveness_num = dm.ActiveDic[curDailyData.id].liveness_num;
        }
        else
        {
            Engine.Utility.Log.Error("服务器下发的数据中对应不到表格中id为{0}的数据", curDailyData.id);
        }
        if (curDailyData.MaxTimes == 0)
        {
            m_label_Times.text = "不限";
        }
        else
        {
            m_label_Times.text = string.Format("{0}/{1}", times, curDailyData.MaxTimes);
        }
        m_label_Active.text       = string.Format("{0}/{1}", liveness_num, curDailyData.MaxActive);
        m_label_Require.text      = curDailyData.activityType;
        m_label_ActivityTime.text = curDailyData.activityTime;
        m_label_ActivityDesc.text = curDailyData.description;
        string[] items = curDailyData.awardItem.Split(';');
        AddCreator(m_trans_RewardGrid.transform);
        m_lst_UIItemRewardDatas.Clear();
        for (int i = 0; i < items.Length; i++)
        {
            uint itemID = uint.Parse(items[i]);
            m_lst_UIItemRewardDatas.Add(new UIItemRewardData()
            {
                itemID = itemID,
                num    = 1,
            });
        }
        m_ctor_UIItemRewardCreator.CreateGrids(m_lst_UIItemRewardDatas.Count);
    }
예제 #30
0
    void CreateUI()
    {
        //日奖励
        if (m_dailyCreator != null)
        {
            m_dailyCreator.CreateGrids(m_lstDaily.Count);
        }
        if (m_lstDaily.Count > 0)
        {
            SetSelectDailyGrid(m_lstDaily[0]);
        }

        //周奖励
        CreateWeek();

        UpdateRightLabel();
    }