private void MessageBox_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton) { // Start yes or no task if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes) { ParentQuest.SetTask(yesTaskSymbol); } else { ParentQuest.SetTask(noTaskSymbol); } // Close prompt sender.CloseWindow(); }
/// <summary> /// Continuously checks where player is and sets target true/false based on site properties. /// </summary> public override void Update(Task caller) { bool result = false; // Get place resource Place place = ParentQuest.GetPlace(placeSymbol); if (place == null) { return; } // Check building site if (place.SiteDetails.siteType == SiteTypes.Building) { result = CheckInsideBuilding(place); } else if (place.SiteDetails.siteType == SiteTypes.Town) { result = CheckInsideTown(place); } else if (place.SiteDetails.siteType == SiteTypes.Dungeon) { result = CheckInsideDungeon(place); } // Handle positive check if (result) { // "saying" popup // TODO: Should this run every time or only once? if (textId != 0) { ParentQuest.ShowMessagePopup(textId); } // Enable target task ParentQuest.SetTask(taskSymbol); } else { // Disable target task ParentQuest.UnsetTask(taskSymbol); } }
public override void Update(Task caller) { ParentQuest.SetTask(taskSymbol); SetComplete(); }