public void OnClickResearchButton() { if (bAdvisorDoIt && shortageTypes.Count > 0) { ZoneTile tile = ZoneTerrain.Get().zoneTiles.GetMyTile(MtTileTypes.BuildingMageTower); if (tile != null) { UIAdvisorTalkPop.Create(tile.transform, MWText.instance.GetText(MWText.EText.E_2175), true); int tutorialStep = PlayerPrefs.GetInt("TutorialStep32", 0); if (tutorialStep == 0 && !UITutorial.IsLoaded()) { UITutorial.Create(32); } } Close(); return; } if (shortageTypes.Count > 0) { UIShortageResources.Create(shortageTypes.ToArray(), shortageValue.ToArray(), delegate { RefreshCost(goldCost, stoneCost, woodCost); }, false); } else { LobbyScene.Get().RequestLearnNationAttribute(curSelectedAttributeInfo.AttributeType, false, OnResponseLearnNationAttribute); } }
public void OnClickJustNowButton() { if (shortageTypes.Count > 0) { UIShortageResources.Create(shortageTypes.ToArray(), shortageValue.ToArray(), delegate { RefreshCost(goldCost, stoneCost, woodCost); }, false); } else if (AccountInfo.instance.gem < MtStatic.GetJustNowCompleteGemCost(curSelectedAttributeInfo.LearningDuration)) { UIToastMessage.Create(MWText.instance.GetText(MWText.EText.E_2281)); } else { if (AccountInfo.instance.gold >= goldCost && AccountInfo.instance.stone >= stoneCost && AccountInfo.instance.wood >= woodCost) { LobbyScene.Get().RequestLearnNationAttribute(curSelectedAttributeInfo.AttributeType, true, OnResponseLearnNationAttribute); } else { UIToastMessage.Create(MWText.instance.GetText(MWText.EText.E_2175)); } } }