void onClickCompose(GameObject go) { if (btnClose.gameObject.activeSelf == false) { return; } if (popupType == RuneInfoPopup.Type.Reinforce && RuneStudioMain.instance.step != RuneStudioMain.Step.Finish) { Debug.Log("wait..."); return; } if (data.rare >= RareType.S) { UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("COMPOSE_NOMORE")); return; } else if (data.reinforceLevel < GameIDData.MAX_LEVEL) { UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("COMPOSE_LEVELLIMIT")); return; } else { int composeSourceNumber = 0; for (int i = 0; i < GameDataManager.instance.partsInventoryList.Count; ++i) { if (GameDataManager.instance.partsInventoryList[i].rare == data.rare && GameDataManager.instance.partsInventoryList[i].reinforceLevel == GameIDData.MAX_LEVEL) { ++composeSourceNumber; if (composeSourceNumber > 2) { break; } } } if (isFromInventorySlot) { --composeSourceNumber; } if (composeSourceNumber <= 0) { UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("NO_COMPOSE_EQUIP", RareType.CHARACTER[data.rare])); return; } } hide(); GameManager.me.uiManager.uiMenu.uiHero.startComposeMode(GameIDData.getClone(data), isFromInventorySlot); }
void onClickReinforce(GameObject go) { if (btnClose.gameObject.activeSelf == false) { return; } if (data.reinforceLevel >= GameIDData.MAX_LEVEL) { UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("REINFORCE_NOMORE")); return; } hide(); GameManager.me.uiManager.uiMenu.uiHero.startReinforceMode(GameIDData.getClone(data), isFromInventorySlot); }
void onClickCompose(GameObject go) { if (btnClose.gameObject.activeSelf == false) { return; } if (popupType == RuneInfoPopup.Type.Reinforce && RuneStudioMain.instance.step != RuneStudioMain.Step.Finish) { Debug.Log("wait..."); return; } if (data.rare >= RareType.S) { UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("COMPOSE_NOMORE")); return; } else if (data.reinforceLevel < 20) { UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("COMPOSE_LEVELLIMIT")); return; } else { int composeSourceNumber = 0; for (int i = 0; i < GameDataManager.instance.unitInventoryList.Count; ++i) { if (GameDataManager.instance.unitInventoryList[i].rare == data.rare && GameDataManager.instance.unitInventoryList[i].reinforceLevel == GameIDData.MAX_LEVEL) { ++composeSourceNumber; if (composeSourceNumber > 2) { break; } } } if (isFromInventorySlot) { --composeSourceNumber; } if (composeSourceNumber <= 0) { int needNum = 1; if (isFromInventorySlot == false) { needNum = 2; } if (GameDataManager.instance.playerUnitSlots != null) { foreach (KeyValuePair <string, PlayerUnitSlot[]> kv in GameDataManager.instance.playerUnitSlots) { if (GameDataManager.instance.serverHeroData.ContainsKey(kv.Key)) { foreach (PlayerUnitSlot ps in kv.Value) { if (ps.isOpen == false || ps.unitInfo == null) { continue; } if (ps.unitInfo.rare == data.rare && ps.unitInfo.reinforceLevel == GameIDData.MAX_LEVEL) { --needNum; if (needNum <= 0) { UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("CANT_COMPOSE_SELECTED")); return; } } } } } } //합성 재료가 없습니다.\n합성 재료로 O급 20레벨 소환룬(스킬룬)이 필요합니다. UISystemPopup.open(UISystemPopup.PopupType.Default, Util.getUIText("NO_COMPOSE_SUMMON", RareType.CHARACTER[data.rare])); return; } } hide(); GameManager.me.uiManager.uiMenu.uiSummon.startComposeMode(GameIDData.getClone(data), isFromInventorySlot); }