// Token: 0x060008E5 RID: 2277 RVA: 0x000B63F4 File Offset: 0x000B45F4 public bool GetMonsterPriceGroupIndex(ushort group, ref DataIndexTbl Data) { int gambleMode = (int)BattleController.GambleMode; if (gambleMode >= this.MonsterPriceIndex.Length) { return(false); } Data = this.MonsterPriceIndex[gambleMode][(int)group]; return(true); }
// Token: 0x06001ECD RID: 7885 RVA: 0x003AD9D8 File Offset: 0x003ABBD8 private void InitPrice() { DataManager instance = DataManager.Instance; byte b = 0; DataIndexTbl dataIndexTbl = default(DataIndexTbl); int gambleMode = (int)BattleController.GambleMode; CExternalTableWithWordKey <MonsterPriceTbl>[] gambleMonsterPriceTable = DataManager.Instance.GambleMonsterPriceTable; if (!GamblingManager.Instance.GetMonsterPriceGroupIndex(GamblingManager.Instance.m_GambleEventSave.GroupID, ref dataIndexTbl) || gambleMode >= gambleMonsterPriceTable.Length) { return; } for (int i = 0; i < (int)dataIndexTbl.Num; i++) { MonsterPriceTbl recordByIndex = gambleMonsterPriceTable[gambleMode].GetRecordByIndex((int)(dataIndexTbl.BeginIdx - 1) + i); Equip recordByKey = instance.EquipTable.GetRecordByKey(recordByIndex.Item); if (!GUIManager.Instance.IsLeadItem(recordByKey.EquipKind)) { UIHIBtn component; if ((int)b < this.PriceCont.GetChild(0).GetChild(0).childCount) { GUIManager.Instance.ChangeHeroItemImg(this.PriceCont.GetChild(0).GetChild(0).GetChild((int)b), eHeroOrItem.Item, recordByKey.EquipKey, 0, 0, 0); this.PriceCont.GetChild(0).GetChild(0).GetChild((int)b).gameObject.SetActive(true); component = this.PriceCont.GetChild(0).GetChild(0).GetChild((int)b).GetComponent <UIHIBtn>(); } else { RectTransform rectTransform = UnityEngine.Object.Instantiate(this.PriceCont.GetChild(0).GetChild(0).GetChild(0)) as RectTransform; rectTransform.SetParent(this.PriceCont.GetChild(0).GetChild(0)); rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, rectTransform.anchoredPosition.y, 0f); Quaternion localRotation = rectTransform.localRotation; localRotation.eulerAngles = Vector3.zero; rectTransform.localRotation = localRotation; rectTransform.localScale = Vector3.one; rectTransform.anchoredPosition = new Vector2((float)(36 + 74 * i), -37f); rectTransform.gameObject.SetActive(true); GUIManager.Instance.ChangeHeroItemImg(rectTransform, eHeroOrItem.Item, recordByKey.EquipKey, 0, 0, 0); this.AddRefreshText(rectTransform.GetChild(4).GetComponent <UIText>()); component = rectTransform.GetComponent <UIHIBtn>(); component.GetComponent <UIButtonHint>().enabled = true; GUIManager.Instance.SetItemScaleClickSound(component, false, true); } EItemType eitemType = (EItemType)(recordByKey.EquipKind - 1); if (eitemType == EItemType.EIT_ComboTreasureBox || (eitemType == EItemType.EIT_MaterialTreasureBox && recordByKey.PropertiesInfo[0].Propertieskey == 4) || (eitemType == EItemType.EIT_MaterialTreasureBox && (recordByKey.PropertiesInfo[2].Propertieskey < 1 || recordByKey.PropertiesInfo[2].Propertieskey > 3))) { component.m_BtnID2 = (int)recordByKey.EquipKey; component.m_Handler = this; component.GetComponent <UIButtonHint>().enabled = false; EventPatchery component2 = component.gameObject.GetComponent <EventPatchery>(); if (component2 == null) { component.gameObject.AddComponent <EventPatchery>().SetEvnetObj(this.PriceScroll); } else { component2.SetEvnetObj(this.PriceScroll); } GUIManager.Instance.SetItemScaleClickSound(component, true, true); } } else if ((int)b < this.PriceCont.GetChild(0).GetChild(1).childCount) { GUIManager.Instance.ChangeLordEquipImg(this.PriceCont.GetChild(0).GetChild(1).GetChild((int)b), recordByKey.EquipKey, recordByIndex.Rank, eLordEquipDisplayKind.OnlyItem, 0, 0, 0, 0, 0, false); this.PriceCont.GetChild(0).GetChild(1).GetChild((int)b).gameObject.SetActive(true); } else { RectTransform rectTransform = UnityEngine.Object.Instantiate(this.PriceCont.GetChild(0).GetChild(1).GetChild(0)) as RectTransform; rectTransform.SetParent(this.PriceCont.GetChild(0).GetChild(1)); rectTransform.anchoredPosition3D = new Vector3(rectTransform.anchoredPosition.x, rectTransform.anchoredPosition.y, 0f); Quaternion localRotation2 = rectTransform.localRotation; localRotation2.eulerAngles = Vector3.zero; rectTransform.localRotation = localRotation2; rectTransform.localScale = Vector3.one; rectTransform.anchoredPosition = new Vector2((float)(36 + 74 * i), -37f); rectTransform.gameObject.SetActive(true); GUIManager.Instance.ChangeLordEquipImg(rectTransform, recordByKey.EquipKey, recordByIndex.Rank, eLordEquipDisplayKind.OnlyItem, 0, 0, 0, 0, 0, false); } b += 1; } float num = 4f + 74f * (float)b; if (this.PriceCont.sizeDelta.x < num) { Vector2 sizeDelta = this.PriceCont.sizeDelta; sizeDelta.x = num + 4f; this.PriceCont.sizeDelta = sizeDelta; } else { this.PriceScroll.enabled = false; } }