private void SetOneCell(int cellIndex, RawInfo rawInfo) { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("Activity7DayCell"); instantiate2Prefab.get_transform().SetParent(this.scroll, false); instantiate2Prefab.get_gameObject().SetActive(true); instantiate2Prefab.set_name(cellIndex.ToString()); Transform btnGet = instantiate2Prefab.get_transform().FindChild("btnGet"); btnGet.GetComponent <Button>().get_onClick().RemoveAllListeners(); btnGet.GetComponent <Button>().get_onClick().AddListener(delegate { this.OnClickBtnGet(btnGet.get_gameObject()); }); this.SetBtnGet(btnGet, cellIndex); Transform transform = instantiate2Prefab.get_transform().FindChild("north").FindChild("txtCondition"); string text = GameDataUtils.GetChineseContent((int)rawInfo.chineseId, false); List <int> needParams = rawInfo.needParams; if (rawInfo.tab == Tab.TAB.PlayPass) { if (rawInfo.subTab == SubTab.ST.EliteDungeon) { JingYingFuBenPeiZhi jingYingFuBenPeiZhi = DataReader <JingYingFuBenPeiZhi> .Get(needParams.get_Item(0)); if (jingYingFuBenPeiZhi != null) { JJingYingFuBenQuYu jJingYingFuBenQuYu = DataReader <JJingYingFuBenQuYu> .Get(jingYingFuBenPeiZhi.map); string chineseContent = GameDataUtils.GetChineseContent(jingYingFuBenPeiZhi.bossName, false); text = string.Format(text, chineseContent); } } } else { string[] array = new string[needParams.get_Count()]; for (int i = 0; i < needParams.get_Count(); i++) { int grade = needParams.get_Item(i); if (i == 1 && rawInfo.subTab == SubTab.ST.PetUpStage) { array[i] = this.GetPetGrade(grade); } else { array[i] = grade.ToString(); } } text = string.Format(text, array); } transform.GetComponent <Text>().set_text(text); ItemInfo1 rewardItem = rawInfo.rewardItem; Transform parent = instantiate2Prefab.get_transform().FindChild("imgGrid"); if (rewardItem != null) { ItemShow.ShowItem(parent, rewardItem.itemId, (long)rewardItem.count, false, UINodesManager.T2RootOfSpecial, 2001); } }
protected void UpdateBossShow(int BossId) { this.ClearBossInfo(); if (BossId == 0) { return; } BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(BossId); if (bossBiaoQian == null) { return; } this.curBossId = BossId; this.m_TextBossName.set_text(GameDataUtils.GetChineseContent(bossBiaoQian.nameId, false)); ZhuChengPeiZhi zhuChengPeiZhi = DataReader <ZhuChengPeiZhi> .Get(bossBiaoQian.scene); this.m_TextHabitat.set_text(GameDataUtils.GetChineseContent(517519, false) + GameDataUtils.GetChineseContent(zhuChengPeiZhi.name, false)); int vipLv = EntityWorld.Instance.EntSelf.VipLv; if (vipLv >= bossBiaoQian.vipLevel) { this.m_TextBtnGo.set_text(GameDataUtils.GetChineseContent(517518, false)); } else { this.m_TextBtnGo.set_text(string.Format(GameDataUtils.GetChineseContent(517517, false), bossBiaoQian.vipLevel)); } this.RefreshModel(bossBiaoQian); for (int i = 0; i < bossBiaoQian.dropItem.get_Count(); i++) { ItemShow.ShowItem(this.m_ScrollLayoutDrop, bossBiaoQian.dropItem.get_Item(i), -1L, false, UINodesManager.T2RootOfSpecial, 2001); } }
public void InitUI(int titleId, Dictionary <int, int> itemIdNum) { this.isClick = false; base.SetMask(); for (int i = 0; i < this.Items.get_childCount(); i++) { Object.Destroy(this.Items.GetChild(i).get_gameObject()); } using (Dictionary <int, int> .Enumerator enumerator = itemIdNum.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <int, int> current = enumerator.get_Current(); ItemShow.ShowItem(this.Items, current.get_Key(), (long)current.get_Value(), false, null, 2001); } } FXSpineManager.Instance.PlaySpine(801, base.get_transform(), string.Empty, 3001, delegate { FXSpineManager.Instance.PlaySpine(802, UINodesManager.MiddleUIRoot, string.Empty, 3002, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None); TimerHeap.AddTimer(300u, 0, delegate { base.GetComponent <CanvasGroup>().set_alpha(1f); this.isClick = true; base.SetMask(); }); }, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None); }
public void initView() { NovicePacksPush novicePacksPush = NewPeoperGiftPackageManager.Instance.getNovicePacksPush(); if (novicePacksPush == null) { Debug.LogWarning("服务器推送的NovicePacksPush数据null,检测客户端或者服务器推送的数据."); return; } base.FindTransform("ButtonBuyPro").FindChild("BtnConfirmText").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(301027, false)); XinShouLiBao xinShouLiBao = DataReader <XinShouLiBao> .Get(novicePacksPush.pack.id); if (xinShouLiBao != null) { Icon icon = DataReader <Icon> .Get(xinShouLiBao.Chinese); if (icon != null) { ResourceManager.SetSprite(base.FindTransform("IconImage").GetComponent <Image>(), ResourceManager.GetIconSprite(icon.icon)); } } base.FindTransform("Count").GetComponent <Text>().set_text("X" + novicePacksPush.pack.price); ListPool pool = this.m_ItemPool; pool.Release(); pool.Create(novicePacksPush.pack.items.get_Count(), delegate(int index) { DropItem dropItem = novicePacksPush.pack.items.get_Item(index); int typeId = dropItem.typeId; long count = dropItem.count; ItemShow.SetItem(pool.Items.get_Item(index), typeId, count, false, UINodesManager.T2RootOfSpecial, 3000); }); }
private void RefreshReward(RewardPreviewUI.CopyType type) { SpecialFightMode mode = SpecialFightMode.None; switch (type) { case RewardPreviewUI.CopyType.GUARD: mode = SpecialFightMode.Hold; break; case RewardPreviewUI.CopyType.ESCORT: mode = SpecialFightMode.Protect; break; case RewardPreviewUI.CopyType.ATTACK: mode = SpecialFightMode.Save; break; } SpecialFightCommonTableData specialFightCommonTableData = SpecialFightManager.GetSpecialFightCommonTableData(mode); if (specialFightCommonTableData != null) { for (int i = 0; i < this.mSpecialRewards.get_childCount(); i++) { Object.Destroy(this.mSpecialRewards.GetChild(i).get_gameObject()); } for (int j = 0; j < specialFightCommonTableData.itemIDs.get_Count(); j++) { GameObject gameObject = ItemShow.ShowItem(this.mSpecialRewards, specialFightCommonTableData.itemIDs.get_Item(j), 0L, false, null, 2001); gameObject.get_transform().set_localScale(new Vector3(0.5f, 0.5f, 1f)); } this.mSpecialRewards.get_gameObject().SetActive(true); } }
private void SetOneActivity(Transform cell, int activityId) { Debug.LogError("SetOneActivity activityId=" + activityId); HuoDongZhongXin huoDongZhongXin = DataReader <HuoDongZhongXin> .Get(activityId); ResourceManager.SetTexture(cell.Find("imgIcon").GetComponent <RawImage>(), huoDongZhongXin.picture); cell.Find("imgIcon").GetComponent <RawImage>().SetNativeSize(); Button component = cell.Find("imgIcon").GetComponent <Button>(); component.get_onClick().RemoveAllListeners(); component.get_onClick().AddListener(delegate { this.OnClickImgIcon(int.Parse(cell.get_name())); }); ActiveCenterInfo activeCenterInfo = ActivityCenterManager.infoDict.get_Item(activityId); cell.Find("txtOpenTime").GetComponent <Text>().set_text(this.GetFormatOpenTime(huoDongZhongXin)); string text = (activeCenterInfo.remainTimes != -1) ? activeCenterInfo.remainTimes.ToString() : "不限"; cell.Find("txtRemainNum").GetComponent <Text>().set_text(text); cell.Find("txtPeopleNum").GetComponent <Text>().set_text(huoDongZhongXin.people.ToString()); for (int i = 0; i < huoDongZhongXin.award.get_Count(); i++) { int icon = DataReader <Items> .Get(huoDongZhongXin.award.get_Item(i)).icon; Debug.LogError("itemIconId=" + icon); GameObject gameObject = ItemShow.ShowItem(cell, huoDongZhongXin.award.get_Item(i), -1L, false, null, 2001); gameObject.get_transform().set_localScale(new Vector3(0.8f, 0.8f, 0.8f)); float num = this.itemIconPositionX[huoDongZhongXin.award.get_Count() - 1].get_Item(i); gameObject.get_transform().set_localPosition(new Vector3(num, -201f)); } this.SetActivityWithState(cell, activityId, ActivityCenterManager.infoDict.get_Item(activityId).status); }
private void SetRewards(ChongWuRenWuPinZhi dataRWPZ, PetTaskInfo pti) { this.m_lblTaskReward.set_text(string.Empty); if (dataRWPZ.drop.get_Count() > 0) { int templateId = 0; long dropNum = DropUtil.GetDropNum(dataRWPZ.drop.get_Item(0), EntityWorld.Instance.EntSelf.Lv, ref templateId); this.m_lblTaskReward.set_text(string.Format("奖励: 人物经验+{0}", Utils.GetItemNum(templateId, dropNum))); } List <int> itemIds = new List <int>(); List <long> itemNums = new List <long>(); if (pti.rewards.get_Count() > 0) { this.m_itemId = pti.rewards.get_Item(0).cfgId; itemIds.Add(pti.rewards.get_Item(0).cfgId); itemNums.Add(pti.rewards.get_Item(0).count); } this.mItemListPool.Create(itemIds.get_Count(), delegate(int index) { if (index < this.mItemListPool.Items.get_Count() && index < itemIds.get_Count() && index < itemNums.get_Count()) { ItemShow.SetItem(this.mItemListPool.Items.get_Item(index), itemIds.get_Item(index), itemNums.get_Item(index), false, UINodesManager.T2RootOfSpecial, 14000); } }); }
public void UpdateSCWinUI(SecretAreaChallengeResultNty result) { base.FindTransform("BtnStatisticsNode").get_gameObject().SetActive(true); this.lastBatchText.set_text(string.Format(GameDataUtils.GetChineseContent(512053, false), result.startStage)); this.currBatchText.set_text(string.Format(GameDataUtils.GetChineseContent(512054, false), result.endStage)); for (int i = 0; i < this.ItemConten.get_childCount(); i++) { Object.Destroy(this.ItemConten.GetChild(i).get_gameObject()); } for (int j = 0; j < result.copyRewards.get_Count(); j++) { ItemBriefInfo itemBriefInfo = result.copyRewards.get_Item(j); if (itemBriefInfo.cfgId == 1) { this.expText.set_text(itemBriefInfo.count.ToString()); } else if (itemBriefInfo.cfgId == 2) { this.goldText.set_text(itemBriefInfo.count.ToString()); } else { ItemShow.ShowItem(this.ItemConten, itemBriefInfo.cfgId, itemBriefInfo.count, false, null, 2001); } } }
public void UpdateCfgData() { Transform transform = base.FindTransform("GuildWarRewardItem1"); if (transform != null) { transform.FindChild("Title").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(515072, false)); transform.FindChild("Content").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(515073, false)); Transform parent = transform.FindChild("ItemList"); int itemId = (int)float.Parse(DataReader <JunTuanZhanXinXi> .Get("RankingReward").value); ItemShow.ShowItem(parent, itemId, -1L, false, null, 2001); } Transform transform2 = base.FindTransform("GuildWarRewardItem2"); if (transform2 != null) { transform2.FindChild("Title").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(515074, false)); transform2.FindChild("Content").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(515075, false)); Transform parent2 = transform2.FindChild("ItemList"); int itemId2 = (int)float.Parse(DataReader <JunTuanZhanXinXi> .Get("EndReward").value); ItemShow.ShowItem(parent2, itemId2, -1L, false, null, 2001); } Transform transform3 = base.FindTransform("GuildWarRewardItem3"); if (transform3 != null) { transform3.FindChild("Title").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(515076, false)); transform3.FindChild("Content").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(515077, false)); int id = (int)float.Parse(DataReader <JunTuanZhanXinXi> .Get("BuffWord").value); transform3.FindChild("Content2").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(id, false)); } }
public void SetShowItem(int itemId, Action callback) { Items config = DataReader <Items> .Get(itemId); if (config == null) { BoxBuyUI.Instance.Show(false); return; } this.m_TitleName.set_text(string.Format(GameDataUtils.GetChineseContent(508035, false), GameDataUtils.GetChineseContent(config.name, false))); this.m_BoxInfo.set_text(GameDataUtils.GetChineseContent(config.describeId1, false)); for (int i = 0; i < this.m_ScrollviewList.get_childCount(); i++) { Object.Destroy(this.m_ScrollviewList.GetChild(i).get_gameObject()); } if (config.effectId > 0) { List <DiaoLuo> list = DataReader <DiaoLuo> .DataList.FindAll((DiaoLuo a) => a.ruleId == config.effectId); if (list != null && list.get_Count() > 0) { for (int j = 0; j < list.get_Count(); j++) { DiaoLuo diaoLuo = list.get_Item(j); if (diaoLuo.dropType == 1) { ItemShow.ShowItem(this.m_ScrollviewList, diaoLuo.goodsId, diaoLuo.minNum, false, UINodesManager.T2RootOfSpecial, 2001); } } } } this.CallBack = callback; }
private void ShowAsNoPet(AwardInfo ai) { Transform transform = ItemShow.ShowItem(this.tmp, ai.itemId, (long)ai.itemCount, false, null, 2001).get_transform(); FXSpineManager.Instance.ReplaySpine(0, 1107, transform, "LuckDrawResult", 3001, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None); TimerHeap.AddTimer((uint)this.PlayTime, 0, delegate { this.ShowIcon(); }); }
public void UpdateItem(int onlyId, int id, int itemCount, int count, int reputation, List <NpcExchangeInfo> data) { this.HideGY(); this.IconItemId = id; this.OnlyId = onlyId; this.ReputationValue = reputation; this.StockCount = count; for (int i = 0; i < this.ImgIconGameObject.get_childCount(); i++) { Object.Destroy(this.ImgIconGameObject.GetChild(i).get_gameObject()); } GameObject gameObject = ItemShow.ShowItem(this.ImgIconGameObject, id, -1L, false, null, 2001); this.TextName.set_text(GameDataUtils.GetItemName(id, false, 0L)); string text = string.Empty; string text2 = string.Empty; this.ImageState1.SetActive(false); this.ImageState2.SetActive(false); this.ImageState3.SetActive(false); if (count == -1) { text = "声望要求:" + reputation.ToString(); if (EntityWorld.Instance.EntSelf.Reputation >= (long)reputation) { bool flag = this.CheckItemEnough(data); if (flag) { this.ImageState2.SetActive(true); } } } else { if (count < 1) { this.ImageState3.SetActive(true); } else if (EntityWorld.Instance.EntSelf.Reputation >= (long)reputation) { bool flag2 = this.CheckItemEnough(data); if (flag2) { this.ImageState2.SetActive(true); } } text = "剩余库存:" + count.ToString(); text2 = "声望要求:" + reputation.ToString(); } this.TextCount.set_text(text); this.TextReputation.set_text(text2); this.TextNeedCount.set_text(itemCount.ToString()); this.ExchangeData = data; this.IsCanClick = true; }
public void UpdateData(DefendFightBtlResultNty result) { if ((DefendFightManager.Instance.SelectDetailMode == DefendFightMode.DFMD.Hold || DefendFightManager.Instance.SelectDetailMode == DefendFightMode.DFMD.Save || DefendFightManager.Instance.SelectDetailMode == DefendFightMode.DFMD.Protect) && result.result.winnerId != EntityWorld.Instance.EntSelf.ID) { ResourceManager.SetSprite(this.ResultImage, ResourceManager.GetIconSprite("failure_bg_zi01")); ResourceManager.SetSprite(this.ResultImageFx, ResourceManager.GetIconSprite("win_Light_02")); } else { ResourceManager.SetSprite(this.ResultImage, ResourceManager.GetIconSprite("win_01")); ResourceManager.SetSprite(this.ResultImageFx, ResourceManager.GetIconSprite("win_Light_01")); } Debug.LogError(result.normalDropItems.get_Count() + "===========" + result.extendDropItems.get_Count()); for (int i = 0; i < this.rewardItems.get_childCount(); i++) { Object.Destroy(this.rewardItems.GetChild(i).get_gameObject()); } using (List <ItemBriefInfo> .Enumerator enumerator = result.normalDropItems.GetEnumerator()) { while (enumerator.MoveNext()) { ItemBriefInfo current = enumerator.get_Current(); if (current.cfgId == 1) { this.exp.set_text(current.count.ToString()); } else if (current.cfgId == 2) { this.gold.set_text(current.count.ToString()); } else { ItemShow.ShowItem(this.rewardItems, current.cfgId, current.count, false, null, 2001); } } } base.FindTransform("RewardBgsBoss").get_gameObject().SetActive(result.extendDropItems.get_Count() > 0); Transform transform = base.FindTransform("BossRewardItems"); for (int j = 0; j < transform.get_childCount(); j++) { Object.Destroy(transform.GetChild(j).get_gameObject()); } for (int k = 0; k < result.extendDropItems.get_Count(); k++) { ItemBriefInfo itemBriefInfo = result.extendDropItems.get_Item(k); ItemShow.ShowItem(transform, itemBriefInfo.cfgId, itemBriefInfo.count, false, null, 2001); } this.time.set_text(GameDataUtils.GetChineseContent(501004, false) + " " + TimeConverter.GetTime(result.result.killTargetUsedTime, TimeFormat.HHMMSS)); int id = (DefendFightManager.Instance.SelectDetailMode != DefendFightMode.DFMD.Protect) ? 513536 : 513537; this.num.set_text(string.Format(GameDataUtils.GetChineseContent(id, false), result.maxWave.ToString())); this.exitButton.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickDefendExit); }
protected void UpdateReward(List <int> reward) { for (int i = 0; i < this.DarkTrialUIRewardSlot.get_childCount(); i++) { Object.Destroy(this.DarkTrialUIRewardSlot.GetChild(i).get_gameObject()); } for (int j = 0; j < reward.get_Count(); j++) { ItemShow.ShowItem(this.DarkTrialUIRewardSlot, reward.get_Item(j), -1L, false, null, 2001); } }
public static GameObject ShowItem(Transform parent, int itemId, long count = -1L, bool showName = false, Transform ItemTipRoot = null, int depthValue = 2001) { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("ItemShow"); instantiate2Prefab.SetActive(true); instantiate2Prefab.get_transform().SetParent(parent); instantiate2Prefab.get_transform().set_localScale(Vector3.get_one()); instantiate2Prefab.get_transform().set_localPosition(Vector3.get_zero()); instantiate2Prefab.get_transform().set_localEulerAngles(Vector3.get_zero()); ItemShow.SetItem(instantiate2Prefab, itemId, count, showName, ItemTipRoot, 2001); return(instantiate2Prefab); }
private void RefreshCompetionRewardList() { for (int i = 0; i < this.activityRewardListTrans1.get_childCount(); i++) { Transform child = this.activityRewardListTrans1.GetChild(i); Object.Destroy(child.get_gameObject()); } for (int j = 0; j < this.competitionRewardList.get_Count(); j++) { ItemShow.ShowItem(this.activityRewardListTrans1, this.competitionRewardList.get_Item(j), -1L, false, null, 2001); } }
private void SCItemPrice() { for (int i = 0; i < this.Items.get_childCount(); i++) { Object.Destroy(this.Items.GetChild(i).get_gameObject()); } TiaoZhanBoCi currentInfo = SurvivalManager.Instance.GetCurrentInfo(); for (int j = 0; j < currentInfo.currencyType.get_Count(); j++) { ItemShow.ShowItem(this.Items, currentInfo.currencyType.get_Item(j), (long)currentInfo.currencyNum.get_Item(j), false, null, 2001); } }
public void RefreshUI(long taskuid, int itemId) { this.m_taskuid = taskuid; if (this.m_goRewardItemCache == null) { ItemShow.ShowItem(this.m_goRewardItem.get_transform(), itemId, -1L, false, null, 2001); } else { ItemShow.SetItem(this.m_goRewardItemCache, itemId, -1L, false, null, 2001); } this.mFormationItemListPool.Create(3, delegate(int index) { if (index < this.mFormationItemListPool.Items.get_Count()) { PetFormationPet component = this.mFormationItemListPool.Items.get_Item(index).GetComponent <PetFormationPet>(); component.SetItem(null, null, false); } }); PetTaskInfo pti = PetTaskManager.Instance.GetPetTaskInfo(taskuid); if (pti == null) { Debug.LogError("PetTaskInfo no exist, uid = " + taskuid); return; } ChongWuRenWuPinZhi chongWuRenWuPinZhi = DataReader <ChongWuRenWuPinZhi> .Get(pti.taskId); if (chongWuRenWuPinZhi == null) { Debug.LogError("GameData.ChongWuRenWuPeiZhi no exist, id = " + pti.taskId); return; } this.m_lblTaskTitle.set_text(GameDataUtils.GetChineseContent(pti.taskName, false) + " 任务时间: " + TimeConverter.GetTime(chongWuRenWuPinZhi.time, TimeFormat.HHMM_Chinese_MNoZero)); this.m_task_quality = chongWuRenWuPinZhi.petquality; this.mInfoItemListPool.Create(6, delegate(int index) { if (index < this.mInfoItemListPool.Items.get_Count()) { PTF_InfoItem component = this.mInfoItemListPool.Items.get_Item(index).GetComponent <PTF_InfoItem>(); if (index < 3 && index < pti.monsterId.get_Count()) { component.SetItemToMonster(pti.monsterId.get_Item(index)); } else if (index < 6 && index - 3 < pti.petId.get_Count()) { component.SetItemToPet(pti.petId.get_Item(index - 3), 1); } } }); }
private void CreateSelfReward(List <DropItem> rewards, float pct) { for (int i = 0; i < this.mRewardPanel.get_childCount(); i++) { Object.Destroy(this.mRewardPanel.GetChild(i).get_gameObject()); } long num = (long)((float)this.mData.parament * 0.01f * pct * 1000f); for (int j = 0; j < rewards.get_Count(); j++) { GameObject gameObject = ItemShow.ShowItem(this.mRewardPanel, rewards.get_Item(j).typeId, rewards.get_Item(j).count *num / 1000L, false, null, 2001); gameObject.get_transform().set_localScale(new Vector3(0.55f, 0.55f, 1f)); } }
private void SetItemGrid(List <int> items) { if (items == null) { return; } for (int i = 0; i < this.dropTrans.get_childCount(); i++) { Object.Destroy(this.dropTrans.GetChild(i).get_gameObject()); } for (int j = 0; j < items.get_Count(); j++) { ItemShow.ShowItem(this.dropTrans, items.get_Item(j), -1L, false, null, 2001); } }
private void ShowAsPet(AwardInfo ai) { Items items = DataReader <Items> .Get(ai.itemId); int level = items.level; int decompose_star = items.level; bool replace = false; string petName = string.Empty; if (ai.hadFlag) { if (decompose_star > ai.petOldStar) { replace = true; petName = PetManager.GetPetName(ai.petCfgId, decompose_star); decompose_star = ai.petOldStar; } else { replace = false; petName = PetManager.GetPetName(ai.petCfgId, ai.petOldStar); } } PetManager.Instance.JustObtainPetNty(ai.petCfgId, level, decompose_star, ai.hadFlag, replace, petName, delegate { Pet pet = DataReader <Pet> .Get(ai.petCfgId); if (!ai.hadFlag) { Transform transform = ItemShow.ShowItem(this.tmp, ai.itemId, (long)ai.itemCount, false, null, 2001).get_transform(); if (ai.petCfgId > 0) { TeShuChongWu teShuChongWu = DataReader <TeShuChongWu> .Get(ai.petCfgId); if (teShuChongWu != null) { this.FxIdList.Add(FXSpineManager.Instance.PlaySpine(teShuChongWu.effectId, transform, "LuckDrawResult", 3001, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None)); } } } else { Transform transform = ItemShow.ShowItem(this.tmp, pet.fragmentId, (long)PetManager.GetReturnFragment(pet, decompose_star), false, null, 2001).get_transform(); } TimerHeap.AddTimer(1000u, 0, delegate { this.ShowIcon(); }); }); }
private void SetRewards(List <ItemBriefInfo> list) { if (list == null) { return; } for (int i = 0; i < list.get_Count(); i++) { int cfgId = list.get_Item(i).cfgId; long count = list.get_Item(i).count; if (DataReader <Items> .Get(cfgId) != null) { ItemShow.ShowItem(this.m_PanelRewards, cfgId, count, false, UINodesManager.T2RootOfSpecial, 2001); } } }
private void CreateReward(int rewardId) { for (int i = 0; i < this.mSpecialRewards.get_childCount(); i++) { Object.Destroy(this.mSpecialRewards.GetChild(i).get_gameObject()); } List <DiaoLuo> dataList = DataReader <DiaoLuo> .DataList; for (int j = 0; j < dataList.get_Count(); j++) { DiaoLuo diaoLuo = dataList.get_Item(j); if (diaoLuo.ruleId == rewardId && diaoLuo.dropType == 1) { GameObject gameObject = ItemShow.ShowItem(this.mSpecialRewards, diaoLuo.goodsId, diaoLuo.minNum, false, null, 2001); gameObject.get_transform().set_localScale(new Vector3(0.5f, 0.5f, 1f)); } } }
private void SearchNextName(object sender, EventArgs e) { bool res = Options.DesignAlternative ? ItemShowAlternative.SearchName(textBoxItemName.Text, true) : ItemShow.SearchName(textBoxItemName.Text, true); if (res) { return; } DialogResult result = MessageBox.Show("No item found", "Result", MessageBoxButtons.OKCancel, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); if (result == DialogResult.Cancel) { Close(); } }
private void CreateOtherReward(List <int> dropIds) { this.mFindReward.Clear(); List <DiaoLuo> dataList = DataReader <DiaoLuo> .DataList; for (int i = 0; i < dropIds.get_Count(); i++) { this.FindDropReward(dataList, dropIds.get_Item(i)); } for (int j = 0; j < this.mRewardPanel.get_childCount(); j++) { Object.Destroy(this.mRewardPanel.GetChild(j).get_gameObject()); } for (int k = 0; k < this.mFindReward.get_Count(); k++) { GameObject gameObject = ItemShow.ShowItem(this.mRewardPanel, this.mFindReward.get_Item(k).goodsId, this.mFindReward.get_Item(k).minNum *(long)this.mData.parament / 100L, false, null, 2001); gameObject.get_transform().set_localScale(new Vector3(0.55f, 0.55f, 1f)); } }
private void SetItems() { List <ShouChong> list = DataReader <ShouChong> .DataList; int loop = 1; int i; for (i = 0; i < list.get_Count(); i++) { int id = list.get_Item(i).Reward.get_Item(0); XDict <int, long> itemDic = FirstPayManager.Instance.GetRewardItems(id); ListPool pool = this.m_ItemPool; if (i == 1) { pool = this.m_ItemPool2; } if (i == 2) { pool = this.m_ItemPool3; } pool.Create(itemDic.Count, delegate(int index) { if (index < itemDic.Count && index < pool.Items.get_Count()) { ItemShow.SetItem(pool.Items.get_Item(index), itemDic.ElementKeyAt(index), itemDic.ElementValueAt(index), false, UINodesManager.T2RootOfSpecial, 3000); Vector3 localScale = new Vector3(0.7f, 0.7f, 0.7f); if (index == 0) { localScale = new Vector3(0.85f, 0.85f, 0.85f); } pool.Items.get_Item(index).GetComponent <RectTransform>().set_localScale(localScale); } if (i == list.get_Count() && itemDic.Count == pool.Items.get_Count()) { if (loop == 3) { this.PlaySpineOfItems(); } loop++; } }); } }
public void SetBossRewardItems(Dictionary <int, int> itemIdNum) { if (itemIdNum.get_Count() > 0) { base.FindTransform("RewardBgsBoss").get_gameObject().SetActive(true); Transform transform = base.FindTransform("BossRewardItems"); for (int i = 0; i < transform.get_childCount(); i++) { Object.Destroy(transform.GetChild(i).get_gameObject()); } using (Dictionary <int, int> .Enumerator enumerator = itemIdNum.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <int, int> current = enumerator.get_Current(); ItemShow.ShowItem(transform, current.get_Key(), (long)current.get_Value(), false, null, 2001); } } } }
private void UpdateRewardItems() { List <int> list = new List <int>(); List <int> list2 = new List <int>(); JunTuanZhanJiangLi junTuanZhanJiangLi = DataReader <JunTuanZhanJiangLi> .Get(1); if (junTuanZhanJiangLi != null) { for (int i = 0; i < junTuanZhanJiangLi.reward.get_Count(); i++) { JunTuanZhanJiangLi.RewardPair rewardPair = junTuanZhanJiangLi.reward.get_Item(i); list.Add(rewardPair.key); list2.Add(rewardPair.value); } for (int j = 0; j < list.get_Count(); j++) { ItemShow.ShowItem(this.rewardItemsListTrans, list.get_Item(j), -1L, false, null, 2001); } } }
private void SetItems() { MinorLoginNty info = DayGiftManager.Instance.GetRewardItems(); if (info == null || info.items == null) { return; } this.m_ItemPool.Create(info.items.get_Count(), delegate(int index) { if (index < info.items.get_Count() && index < this.m_ItemPool.Items.get_Count()) { ItemShow.SetItem(this.m_ItemPool.Items.get_Item(index), info.items.get_Item(index).cfgId, info.items.get_Item(index).count, false, UINodesManager.T2RootOfSpecial, 14000); } if (index == this.m_ItemPool.Items.get_Count() - 1) { this.PlaySpineOfItems(); } }); }
public void UpdateData(ResultExperienceCopyNty result, int batch = -1) { ResourceManager.SetSprite(this.ResultImage, ResourceManager.GetIconSprite("win_01")); ResourceManager.SetSprite(this.ResultImageFx, ResourceManager.GetIconSprite("win_Light_01")); for (int i = 0; i < this.rewardItems.get_childCount(); i++) { Object.Destroy(this.rewardItems.GetChild(i).get_gameObject()); } using (List <DropItem> .Enumerator enumerator = result.item.GetEnumerator()) { while (enumerator.MoveNext()) { DropItem current = enumerator.get_Current(); if (current.typeId == 1) { this.exp.set_text(current.count.ToString()); } else if (current.typeId == 2) { this.gold.set_text(current.count.ToString()); } else { ItemShow.ShowItem(this.rewardItems, current.typeId, current.count, false, null, 2001); } } } base.FindTransform("RewardBgsBoss").get_gameObject().SetActive(false); Transform transform = base.FindTransform("BossRewardItems"); for (int j = 0; j < transform.get_childCount(); j++) { Object.Destroy(transform.GetChild(j).get_gameObject()); } this.time.set_text(string.Empty); this.num.set_text((batch < 0) ? string.Empty : string.Format(GameDataUtils.GetChineseContent(513536, false), batch.ToString())); this.exitButton.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickExperienceExit); }
public static List<ItemShow> SearchItemInItemWarehouse(ItemFilter filter) { LoadWarehouse(); List<ItemShow> result = new List<ItemShow>(); Regex regex = new Regex(@"-雇员(?<id>\d+)"); foreach (KeyValuePair<String, List<ItemFullInfo>> catalog in _warehouse) { foreach (var item in catalog.Value) { if (item.Desc != null && item.Desc.Name != null && filter.RegEx.IsMatch(item.Desc.Name)) { if (_locationName.ContainsKey(item.Location.Type)) { String lLocation = _locationName[item.Location.Type]; Match m = regex.Match(catalog.Key); if (m.Success) { lLocation += m.Groups["id"].Value; } if (item.Info.IsHQ) { item.Desc.Name += "[HQ]"; } ItemShow i = new ItemShow() { Key = item.Desc.Name, Character = item.Location.Character, Location = lLocation, Amount = item.Info.Amount }; result.Add(i); } } } } return result; }