using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Text; using System.Text.RegularExpressions; using Pathfinding; using PixelCrushers.DialogueSystem; using UnityEngine; // Token: 0x0200007F RID: 127 public class Records : MonoBehaviour { // Token: 0x06000C31 RID: 3121 RVA: 0x000EE6A4 File Offset: 0x000EC8A4 private void Awake() { Records.x = base.gameObject.GetComponent(); if (Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.WindowsEditor) { this.editor = true; } if (Application.platform == RuntimePlatform.WindowsPlayer) { OperatingSystem osversion = Environment.OSVersion; string operatingSystem = SystemInfo.operatingSystem; string text = "OS is "; OperatingSystem operatingSystem2 = osversion; Debug.Log(text + ((operatingSystem2 != null) ? operatingSystem2.ToString() : null) + " " + operatingSystem); if (operatingSystem.Contains("Windows 7") || operatingSystem.Contains("Vista")) { this.windows7 = true; } } if (Application.platform == RuntimePlatform.LinuxPlayer || this.steamDeck) { this.linux = true; Debug.Log("Running linux " + Screen.width.ToString() + " " + Screen.height.ToString()); } if (!this.editor) { Debug.Log("Version " + this.gameVersion.ToString()); } if (Application.productName.Contains("Demo")) { this.demo = true; this.extendedDemo = false; } else { this.demo = false; } this.windows = false; if (Application.platform == RuntimePlatform.WindowsPlayer) { this.windows = true; } if (!this.editor) { this.skipMainMenu = false; this.turnOffCharacters = false; this.turnOffAnimals = false; this.noCombat = false; this.testPatrols = false; this.secrets = false; this.questDebugging = false; this.combatQuipDebugging = false; this.combatConsoleDebugging = false; this.effectsDebugging = false; this.showRuleset = false; this.testQuests = false; this.astarDebugging = false; this.noDamage = false; this.editorBoro = false; } if (this.editor && !this.skipMainMenu) { this.editorMap = MapExit.exitToNames.None; this.editorQuickLoad = Records.saves.None; } if (!this.skipMainMenu && this.editor) { this.useTestCharacters = false; } if (this.editor) { if (this.editorQuickLoad != Records.saves.None) { this.editorQuickLoadFile = this.editorQuickLoad.ToString(); if (this.editorQuickLoadFile != "") { this.useTestCharacters = false; this.defaultStartPoint = false; } } else { this.editorQuickLoadFile = ""; GameObject.Find("Journal Canvas").GetComponent().NewGame(); string text2 = Application.persistentDataPath + "/AutoSave"; if (Directory.Exists(text2)) { string[] files = Directory.GetFiles(text2); for (int i = 0; i < files.Length; i++) { File.Delete(files[i]); } } } } if (!this.editor && !this.filming) { this.useTestCharacters = false; } if (this.useTestCharacters && Records.x.editor && this.skipMainMenu) { QuestLog.SetQuestState("CharacterCreation", QuestState.Success); QuestLog.SetQuestState("C6_Scribe", QuestState.Active); } this.characterNames = Enum.GetNames(typeof(Creatures.xmlNames)); Shader.SetGlobalFloat("_FadeOutUI", 0f); if (this.editor && this.serpentFiles) { this.FindSerpentFiles(); } } // Token: 0x06000C32 RID: 3122 RVA: 0x000EE9A2 File Offset: 0x000ECBA2 private void Start() { this.camTr = Links.x.worldCamera.gameObject.transform; this.forw = Vector3.forward; this.up = Vector3.up; } // Token: 0x06000C33 RID: 3123 RVA: 0x000EE9D4 File Offset: 0x000ECBD4 public void AddDead(Character character) { this.deadCharacters.Add(character); } // Token: 0x06000C34 RID: 3124 RVA: 0x000EE9E2 File Offset: 0x000ECBE2 public void AddDestroyCharacter(Character character) { if (!this.destroyCharacters.Contains(character)) { this.destroyCharacters.Add(character); } } // Token: 0x06000C35 RID: 3125 RVA: 0x000EE9FE File Offset: 0x000ECBFE public void AddBillboard(Transform t, bool isItem) { if (isItem) { this.itemBillboards.Add(t); return; } this.billboards.Add(t); } // Token: 0x06000C36 RID: 3126 RVA: 0x000EEA1C File Offset: 0x000ECC1C public void RemoveBillboard(Transform t, bool isItem) { if (isItem) { this.itemBillboards.Remove(t); return; } this.billboards.Remove(t); } // Token: 0x06000C37 RID: 3127 RVA: 0x000EEA3C File Offset: 0x000ECC3C private void LateUpdate() { this.UpdateLists(); int num = this.billboards.Count; bool flag = false; for (int i = 0; i < num; i++) { Transform transform = this.billboards[i]; if (transform) { transform.LookAt(transform.position + this.camTr.rotation * this.forw, this.camTr.rotation * this.up); } else { flag = true; } } if (flag) { this.billboards.RemoveAll((Transform item) => item == null); } flag = false; num = this.itemBillboards.Count; for (int j = 0; j < num; j++) { Transform transform = this.itemBillboards[j]; if (transform) { transform.LookAt(transform.position + this.camTr.rotation * this.forw, this.camTr.rotation * this.up); transform.position = transform.parent.position + this.camTr.forward * -0.5f + new Vector3(0f, 0.15f, 0f); } else { flag = true; } } if (flag) { this.itemBillboards.RemoveAll((Transform item) => item == null); } } // Token: 0x06000C38 RID: 3128 RVA: 0x000EEBE4 File Offset: 0x000ECDE4 public void UpdateLists() { int num = this.destroyCharacters.Count; if (num > 0) { for (int i = 0; i < num; i++) { this.destroyCharacters[i].FinishDestroyingCharacter(); } this.destroyCharacters.Clear(); } num = this.deadCharacters.Count; if (num > 0) { for (int j = 0; j < num; j++) { this.deadCharacters[j].Dead(false, true, false); } this.deadCharacters.Clear(); } } // Token: 0x06000C39 RID: 3129 RVA: 0x000EEC64 File Offset: 0x000ECE64 private void Update() { if (Links.x.gaia.sceneLoaded) { if (Records.x.partyCamping || this.openMenus.Count > 0 || Links.x.options.contents1.activeSelf) { if (Links.x.options.contents1.activeSelf) { if (!this.pausedForMenus) { if (!Records.x.paused) { this.pausedForMenus = true; } Links.x.gameplay.TogglePause(true); } } else if (!this.pausedForMenus && !Records.x.paused) { this.pausedForMenus = true; Links.x.gameplay.TogglePause(true); } } else if (this.pausedForMenus && !this.inMenus) { this.pausedForMenus = false; Links.x.gameplay.TogglePause(false); } if (Time.timeSinceLevelLoad > this.constantQuestCheckTimer) { this.CheckConstantlyForQuestTimers(); } if (Links.x.hoverObject) { this.hoverLightColor.a = 1f; this.currColor = Color.Lerp(this.currColor, this.hoverLightColor, Time.unscaledDeltaTime * 15f); Shader.SetGlobalVector("_DoorLightColor", this.currColor); } else if (this.hoverLightColor != Color.black) { this.currColor = Color.Lerp(this.currColor, Color.black, Time.unscaledDeltaTime * 15f); if (this.currColor != Color.black) { Shader.SetGlobalVector("_DoorLightColor", this.currColor); } if (this.currColor == Color.black) { this.hoverLightColor = Color.black; } } } if (this.fading) { this.currentDither = Mathf.Lerp(this.startDither, this.endDither, this.fadeAmount * 1f); Shader.SetGlobalFloat("_FadeOutUI", this.currentDither); if ((this.endDither == 1f && this.currentDither >= 1f) || (this.endDither == 0f && this.currentDither <= 0f)) { this.fading = false; } if (Records.x.filming) { this.fadeAmount += Time.unscaledDeltaTime * Records.x.filmingAnimatorSpeed; return; } if (Records.x.paused) { this.fadeAmount += Time.deltaTime * 1.5f; return; } this.fadeAmount += Time.unscaledDeltaTime * 1.5f; } } // Token: 0x06000C3A RID: 3130 RVA: 0x000EEF10 File Offset: 0x000ED110 public void StartUIFade(bool fadeOut, bool instant) { bool flag = true; if (this.endDither == 0f) { flag = false; } if (instant) { if (fadeOut) { this.currentDither = 1f; } else { this.currentDither = 0f; } Shader.SetGlobalFloat("_FadeOutUI", this.currentDither); return; } if (flag != fadeOut) { if (fadeOut) { this.startDither = 0f; this.endDither = 1f; } else { this.startDither = 1f; this.endDither = 0f; } if (this.fading) { this.startDither = this.currentDither; } this.fadeAmount = 0f; this.fading = true; } } // Token: 0x06000C3B RID: 3131 RVA: 0x000EEFB8 File Offset: 0x000ED1B8 public void RemoveControls(bool state) { bool flag = this.removeControls; this.removeControls = state; if (state != flag) { if (state) { Links.x.hudControl.ChangeHudVisibility(false, true); return; } Links.x.hudControl.ChangeHudVisibility(true, true); } } // Token: 0x06000C3C RID: 3132 RVA: 0x000EF000 File Offset: 0x000ED200 public bool CharacterInDialogue(Character character) { return character == Links.x.dialogue.npc1 || character == Links.x.dialogue.npc2 || character == Links.x.dialogue.npc3; } // Token: 0x06000C3D RID: 3133 RVA: 0x000EF055 File Offset: 0x000ED255 public int MenusCount() { return this.openMenus.Count; } // Token: 0x06000C3E RID: 3134 RVA: 0x000EF062 File Offset: 0x000ED262 public bool OpenMenusContains(GameObject g) { return this.openMenus.Contains(g); } // Token: 0x06000C3F RID: 3135 RVA: 0x000EF078 File Offset: 0x000ED278 public bool InObscuranceMenu() { return Links.x.creation || Links.x.characterSheet.canvas.enabled || Links.x.spellcrafting.open || Records.x.dialogue; } // Token: 0x06000C40 RID: 3136 RVA: 0x000EF0D2 File Offset: 0x000ED2D2 public void AddMenu(GameObject g) { if (this.openMenus.IndexOf(g) == -1) { this.openMenus.Add(g); } } // Token: 0x06000C41 RID: 3137 RVA: 0x000EF0F0 File Offset: 0x000ED2F0 public void RemoveMenu(GameObject g) { int num = this.openMenus.IndexOf(g); if (num > -1) { this.openMenus.RemoveAt(num); } } // Token: 0x06000C42 RID: 3138 RVA: 0x000EF11A File Offset: 0x000ED31A public void AddCloseButtonMenu(UITriggerButton g) { if (this.closeButtons.IndexOf(g) == -1) { this.closeButtons.Add(g); } } // Token: 0x06000C43 RID: 3139 RVA: 0x000EF137 File Offset: 0x000ED337 public GameObject FirstMenu() { if (this.openMenus.Count > 0) { return this.openMenus[this.openMenus.Count - 1]; } return null; } // Token: 0x06000C44 RID: 3140 RVA: 0x000EF161 File Offset: 0x000ED361 public UITriggerButton FirstCloseButton() { if (this.closeButtons.Count > 0) { return this.closeButtons[this.closeButtons.Count - 1]; } return null; } // Token: 0x06000C45 RID: 3141 RVA: 0x000EF18C File Offset: 0x000ED38C public void RemoveCloseButtonMenu(UITriggerButton g) { int num = this.closeButtons.IndexOf(g); if (num > -1) { this.closeButtons.RemoveAt(num); } } // Token: 0x06000C46 RID: 3142 RVA: 0x000EF1B6 File Offset: 0x000ED3B6 public void SetTypingState(bool state) { this.typing = state; } // Token: 0x06000C47 RID: 3143 RVA: 0x000EF1BF File Offset: 0x000ED3BF public bool IsSaving() { return this.needsSaveNames.Count != 0 || this.saving; } // Token: 0x06000C48 RID: 3144 RVA: 0x000EF1D9 File Offset: 0x000ED3D9 public void TriggerGlobalSave(string pickedSave, bool showNotifier) { if (!this.saving) { Records.x.openBook = pickedSave; base.StartCoroutine(this.SaveGameFiles(showNotifier)); return; } this.needsSaveNames.Add(pickedSave); } // Token: 0x06000C49 RID: 3145 RVA: 0x000EF20C File Offset: 0x000ED40C public void LoadGameFiles(bool beginning) { this.saving = true; if (this.editor && beginning && this.editorQuickLoadFile != "") { Links.x.saveKeeper.openBook = this.editorQuickLoadFile; Records.x.openBook = this.editorQuickLoadFile; } if (Links.x.saveKeeper.openBook != "AutoSave" && Links.x.saveKeeper.openBook != "") { string persistentDataPath = Application.persistentDataPath; string text = persistentDataPath + "/" + Links.x.saveKeeper.openBook; string text2 = persistentDataPath + "/AutoSave"; if (Directory.Exists(text)) { if (Directory.Exists(text2)) { string[] array = Directory.GetFiles(text2); for (int i = 0; i < array.Length; i++) { File.Delete(array[i]); } } else { Directory.CreateDirectory(text2); } if (Directory.Exists(text)) { foreach (string text3 in Directory.GetFiles(text)) { string fileName = Path.GetFileName(text3); string text4 = Path.Combine(text2, fileName); File.Copy(text3, text4); } } } else { Debug.Log("this save does not exist!"); } } if (beginning && this.editor) { Links.x.gameplay.gameHours = 5f; Links.x.gameplay.gameMinutes = 300f; Links.x.gameplay.gameSeconds = 18000f; Links.x.gameplay.LoadGameTime(); if (this.editorMap != MapExit.exitToNames.None) { this.editorSceneToLoad = this.editorMap.ToString(); if ((this.editorSceneToLoad != "" || this.editorQuickLoadFile != "") && ES3.FileExists("AutoSave/Quests.es3")) { beginning = false; } } } string text5 = Records.x.openBook + "/Quests.es3"; if (!ES3.FileExists(text5) && this.editor) { beginning = true; } if (beginning) { this.sceneToLoad = "_~[Menu]~_"; if (!this.editor || (this.editor && !this.skipMainMenu)) { Links.x.hudControl.ChangeHudVisibility(false, true); this.mainMenuOpen = true; this.removeControls = true; } if (this.editor) { if (this.editorMap != MapExit.exitToNames.None) { this.editorSceneToLoad = this.editorMap.ToString(); if (this.editorSceneToLoad != "") { this.sceneToLoad = this.editorSceneToLoad; } } if (this.useTestCharacters && this.editor && QuestLog.GetQuestState("C6_GobletGuildThievesA") == QuestState.Unassigned) { this.AddQuestToTimer("C6_GobletGuildThievesA", 72f, "unassigned", "active", false); this.AddQuestToTimer("C6_GobletGuildThievesB", 72f, "unassigned", "active", false); this.AddQuestToTimer("C6_GobletGuildThievesC", 72f, "unassigned", "active", false); } } Links.x.inventory.emeralds = 523; Links.x.gaia.RandomVariables(); } else { text5 = Records.x.openBook + "/Quests.es3"; this.saveFile = new ES3File(text5); Links.x.gaia.partyNames.Clear(); Links.x.gaia.partyIDs.Clear(); if (ES3.KeyExists("PartyNames", text5)) { Links.x.gaia.partyNames = this.saveFile.Load>("PartyNames"); Links.x.gaia.partyIDs = this.saveFile.Load>("PartyIDs"); } else { Debug.Log(text5 + " no key found"); } ES3File es3File = new ES3File("Version.es3"); if (es3File.KeyExists("DefendTutorialTip")) { this.needsDefendTooltip = es3File.Load("DefendTutorialTip"); } if (es3File.KeyExists("SynergyTutorialTip")) { this.needsSynergyTooltip = es3File.Load("SynergyTutorialTip"); } if (es3File.KeyExists("CompanionTutorialTip")) { this.needsCompanionTooltip = es3File.Load("CompanionTutorialTip"); } if (es3File.KeyExists("AttackTutorialTip")) { this.needsAttackTooltip = es3File.Load("AttackTutorialTip"); } if (es3File.KeyExists("MoreTutorialTip")) { this.needsMoreTooltip = es3File.Load("MoreTutorialTip"); } if (es3File.KeyExists("CircleTutorialTip")) { this.needsCircleTooltip = es3File.Load("CircleTutorialTip"); } this.sceneToLoad = this.saveFile.Load("SceneName", text5); Links.x.inventory.emeralds = this.saveFile.Load("Emeralds"); Links.x.inventory.gems = this.saveFile.Load("Gems"); Links.x.journal.LoadScrolls(); Links.x.cellar.LoadGorePiles(text5); Links.x.cellar.LoadTileEffects(text5); Links.x.inventory.groundBag.toggle = this.saveFile.Load("GroundItems"); Links.x.inventory.groundBag.hudButton.SetImageFromSave(); this.partyTotal = this.saveFile.Load("PartyTotal"); this.ai = this.saveFile.Load("AI"); this.kill = this.saveFile.Load("Kill"); if (this.saveFile.KeyExists("Rallies")) { Vector3 vector = this.saveFile.Load("Rallies"); Links.x.fellowship.rally = vector.z; Links.x.fellowship.rallyBoost = vector.x; Links.x.fellowship.rallyAttacks = vector.y; Links.x.hudControl.SetRallyBars(); Links.x.gaia.doCircle = false; this.defenseCircle = this.saveFile.Load>("DefenseCircle"); if (this.defenseCircle.Count > 0 && this.defenseCircle[0] != Vector3.zero) { Links.x.gaia.doCircle = true; } } Links.x.hudControl.allModalWindowsOpen = this.saveFile.Load("WindowsOpen"); Links.x.hudControl.SetModalWindowState(Links.x.hudControl.allModalWindowsOpen, false); Links.x.gameplay.keyControl.Setup(); this.saveFile.Load("MenuButtons"); Links.x.gameplay.gameDays = this.saveFile.Load("GameDays"); Links.x.gameplay.gameMinutes = this.saveFile.Load("GameMinutes"); Links.x.gameplay.gameSeconds = this.saveFile.Load("GameSeconds"); Links.x.gameplay.gameHours = this.saveFile.Load("GameHours"); Links.x.cameraEffects.indoors = this.saveFile.Load("Indoors"); DialogueManager.ResetDatabase(DatabaseResetOptions.KeepAllLoaded); PersistentDataManager.ApplySaveData(this.saveFile.Load("Dialogue", text5), DatabaseResetOptions.KeepAllLoaded); Links.x.hudControl.LoadWindows(); text5 = Records.x.openBook + "/CreatureLocations.es3"; this.creaturesMapXml.Clear(); this.creaturesMapNew.Clear(); this.creaturesMapOld.Clear(); this.creaturesMapHostility.Clear(); this.creaturesMapChangeTime.Clear(); this.creaturesMapGameObject.Clear(); this.creaturesMapLife.Clear(); this.creaturesMapIndex.Clear(); this.creaturesMapChangeDelay.Clear(); this.creaturesMapMovingFrom.Clear(); this.creaturesMapMovingFromPosition.Clear(); this.creaturesMapXml = this.saveFile.Load>("CreaturesMapXml"); this.creaturesMapNew = this.saveFile.Load>("CreatureMapsNew"); this.creaturesMapOld = this.saveFile.Load>("CreatureMapsOld"); this.creaturesMapHostility = this.saveFile.Load>("CreaturesMapHostility"); this.creaturesMapName = this.saveFile.Load>("CreaturesMapName"); this.creaturesMapPosition = this.saveFile.Load>("CreaturesMapPosition"); this.creaturesMapState = this.saveFile.Load>("CreaturesMapState"); this.creaturesMapChangeTime = this.saveFile.Load>("CreaturesMapChangeTime"); this.creaturesMapChangeDelay = this.saveFile.Load>("CreaturesMapChangeDelay"); this.creaturesMapGameObject = this.saveFile.Load>("CreaturesMapGameObject"); this.creaturesMapLife = this.saveFile.Load>("CreaturesMapLife"); this.creaturesMapIndex = this.saveFile.Load>("CreaturesMapIndex"); this.creaturesMapMovingFrom = this.saveFile.Load>("CreaturesMapMoving"); this.creaturesMapMovingFromPosition = this.saveFile.Load>("CreaturesMapMovingFromPosition"); if (this.saveFile.KeyExists("BoroPosition")) { this.boroPosition = this.saveFile.Load("BoroPosition"); this.boroRotation = this.saveFile.Load("BoroRotation"); this.boatPosition = this.saveFile.Load("BoatPosition"); this.boatRotation = this.saveFile.Load("BoatRotation"); this.partySailing = this.saveFile.Load("PartySailing"); this.boroScene = this.saveFile.Load("BoroScene"); this.partyBoatDown = this.saveFile.Load("PartyBoatDown"); this.boroBag = this.saveFile.Load("BoroBag"); this.boroID = this.saveFile.Load("BoroID"); this.boroWeight = this.saveFile.Load("BoroWeight"); this.boroBonus = this.saveFile.Load("BoroBonus"); this.boroLastBeachPoint = this.saveFile.Load("BoroLastBeachPoint"); this.banners.Clear(); this.banners = this.saveFile.Load>("Banners"); this.boroName = this.saveFile.Load("BoroName"); this.boroShrines = this.saveFile.Load("BoroShrines"); this.savedBoro = this.saveFile.Load>("SavedBoro"); this.boroInvisible = this.saveFile.Load("BoroInvisible"); } this.stunnedNPCs = this.saveFile.Load>("StunnedNPCs"); this.stunnedTime = this.saveFile.Load>("StunnedTime"); this.stunnedSaveFiles = this.saveFile.Load>("StunnedSaveFiles"); this.exiles = this.saveFile.Load>("Exiles"); this.exilesPurseState = this.saveFile.Load>("ExilesPurseState"); this.victims = this.saveFile.Load>("Victims"); this.victimBadgeState = this.saveFile.Load>("VictimBadgeState"); this.victimTown = this.saveFile.Load>("VictimTown"); this.victimBadgeStartTime = this.saveFile.Load>("VictimBadgeStartTime"); this.SetupStunned(); this.SetupBribeBadges(this.sceneToLoad); this.changeQuestName = this.saveFile.Load>("ChangeQuestName"); this.changeAtHour = this.saveFile.Load>("ChangeAtHour"); this.changeToState = this.saveFile.Load>("ChangeToState"); this.changeFromState = this.saveFile.Load>("ChangeFromState"); this.SetupSitsInfo(); Links.x.gameplay.LoadGameTime(); } this.saving = false; Links.x.gaia.GameFilesLoaded(this.sceneToLoad); } // Token: 0x06000C4A RID: 3146 RVA: 0x000EFE75 File Offset: 0x000EE075 private IEnumerator SaveGameFiles(bool showNotifier) { this.saving = true; bool paused = Records.x.paused; bool controlsRemoved = this.removeControls; if (showNotifier) { Links.x.gameFeed.AddFeed("Game recorded"); Links.x.saveVisual.SetActive(true); if (!paused) { Links.x.gameplay.TogglePause(true); } this.RemoveControls(true); yield return new WaitForSecondsRealtime(0.001f); } if (Records.x.openBook != "AutoSave") { string persistentDataPath = Application.persistentDataPath; string text = persistentDataPath + "/AutoSave"; string text2 = persistentDataPath + "/" + Records.x.openBook; if (Directory.Exists(text2)) { string[] array = Directory.GetFiles(text2); for (int i = 0; i < array.Length; i++) { File.Delete(array[i]); } } else { Directory.CreateDirectory(text2); } if (Directory.Exists(text)) { foreach (string text3 in Directory.GetFiles(text)) { string fileName = Path.GetFileName(text3); string text4 = Path.Combine(text2, fileName); File.Copy(text3, text4); } } } else { Links.x.combat.CheckReduceHostilities(true); Records.x.UpdateLists(); } string filename = Records.x.openBook + "/Quests.es3"; this.saveFile = new ES3File(filename); this.saveFile.Save("GameDays", Links.x.gameplay.gameDays); this.saveFile.Save("GameSeconds", Links.x.gameplay.gameSeconds); this.saveFile.Save("GameMinutes", Links.x.gameplay.gameMinutes); this.saveFile.Save("GameHours", Links.x.gameplay.gameHours); ES3File es3File = new ES3File("Version.es3"); es3File.Save("DefendTutorialTip", this.needsDefendTooltip); es3File.Save("SynergyTutorialTip", this.needsSynergyTooltip); es3File.Save("CompanionTutorialTip", this.needsCompanionTooltip); es3File.Save("AttackTutorialTip", this.needsAttackTooltip); es3File.Save("MoreTutorialTip", this.needsMoreTooltip); es3File.Save("CircleTutorialTip", this.needsCircleTooltip); es3File.Sync(); if (Records.x.openBook != "AutoSave") { Links.x.cameraEffects.Capture(Records.x.openBook); } Links.x.gameplay.keyControl.DoSave(); if (showNotifier) { yield return new WaitForSecondsRealtime(0.05f); } Links.x.sceneMap.DoSave(); Links.x.journal.DoSave(); Links.x.cellar.SaveTileEffects(filename); if (Links.x.gaia.boro) { this.boroPosition = Links.x.gaia.boro.tr.position; this.boroRotation = Links.x.gaia.boro.tr.rotation; this.boatPosition = Links.x.gaia.boro.tr.position; this.boatRotation = Links.x.gaia.boro.tr.rotation; this.boroScene = Links.x.diorama.sceneName; this.saveFile.Save("BoroBag", Links.x.gaia.boro.stats.savedMerchantList); this.saveFile.Save("BoroWeight", this.boroWeight); this.saveFile.Save("BoroLastBeachPoint", this.boroLastBeachPoint); this.saveFile.Save("BoroInvisible", Links.x.gaia.boroControls.boroInvisible); } else { this.saveFile.Save("BoroBag", ""); this.saveFile.Save("BoroWeight", 0f); this.saveFile.Save("BoroLastBeachPoint", Vector3.zero); this.saveFile.Save("BoroInvisible", false); } if (this.partySailing) { this.boatPosition = Links.x.gaia.boat.tr.position; this.boatRotation = Links.x.gaia.boat.tr.rotation; } this.saveFile.Save("BoroID", this.boroID); this.saveFile.Save("BoroName", this.boroName); this.saveFile.Save("BoroPosition", this.boroPosition); this.saveFile.Save("BoroRotation", this.boroRotation); this.saveFile.Save("PartySailing", this.partySailing); this.saveFile.Save("BoatPosition", this.boatPosition); this.saveFile.Save("BoatRotation", this.boatRotation); this.saveFile.Save("BoroScene", this.boroScene); this.saveFile.Save("PartyBoatDown", this.partyBoatDown); this.saveFile.Save>("Banners", this.banners); this.saveFile.Save("BoroBonus", this.boroBonus); this.saveFile.Save("BoroShrines", this.boroShrines); this.saveFile.Save>("SavedBoro", this.savedBoro); Links.x.gaia.partyNames.Clear(); Links.x.gaia.partyIDs.Clear(); this.party = Links.x.party; for (int j = 0; j < this.party.Count; j++) { if (this.party[j] && !this.party[j].summoned && !this.party[j].isBoro) { Links.x.gaia.partyNames.Add(this.party[j].stats.displayName); Links.x.gaia.partyIDs.Add(this.party[j].stats.partyID); } } this.saveFile.Save>("PartyNames", Links.x.gaia.partyNames); this.saveFile.Save>("PartyIDs", Links.x.gaia.partyIDs); this.saveFile.Save("PartyTotal", this.partyTotal); for (int k = 0; k < this.party.Count; k++) { if (this.party[k] && !this.party[k].summoned && !this.party[k].isBoro) { this.party[k].stats.CharacterSave(); } } this.party = Links.x.portraitOrder; this.saveFile.Save("WindowsOpen", Links.x.hudControl.allModalWindowsOpen); this.saveFile.Save("Indoors", Links.x.cameraEffects.indoors); this.saveFile.Save("SceneName", Links.x.diorama.sceneName); Links.x.gaia.SaveSummons(); this.saveFile.Save("GroundItems", Links.x.inventory.groundBag.toggle); this.saveFile.Save("Emeralds", Links.x.inventory.emeralds); this.saveFile.Save("Gems", Links.x.inventory.gems); this.saveFile.Save("AI", this.ai); this.saveFile.Save("Kill", this.kill); this.saveFile.Save("MenuButtons", Links.x.hudControl.menuButtonsOpen); this.saveFile.Save("Rallies", new Vector3(Links.x.fellowship.rallyBoost, Links.x.fellowship.rallyAttacks, Links.x.fellowship.rally)); if (this.circle) { this.circleTiles = Links.x.fellowship.circleTiles; Vector3 middleCircle = Links.x.gameplay.middleCircle; Vector3 eulerAngles = Links.x.gameplay.circleRotation.eulerAngles; this.defenseCircle.Clear(); this.defenseCircle.Add(middleCircle); for (int l = 0; l < 9; l++) { if (l < this.circleTiles.Count) { this.defenseCircle.Add((Vector3)this.circleTiles[l].position); } else { this.defenseCircle.Add(Vector3.zero); } } this.defenseCircle.Add(eulerAngles); } else { this.defenseCircle.Clear(); } this.saveFile.Save>("DefenseCircle", this.defenseCircle); Links.x.hudControl.SetPartyWait(); string saveData = PersistentDataManager.GetSaveData(); this.saveFile.Save("Dialogue", saveData); Links.x.diorama.SaveCreatures(); Links.x.diorama.PrepareItemsToSave(); yield return new WaitForSecondsRealtime(0.05f); Links.x.diorama.SaveGroundItems(); Links.x.diorama.SaveInteractives(); Links.x.fogOfWar.Save(); Links.x.fogOfWarInterior.Save(); string text5 = this.SaveTime(); ES3File es3File2 = new ES3File("Version.es3"); if (Records.x.openBook == "CheckpointSave") { es3File2.Save("CheckpointSave", "Check Point Save"); es3File2.Save("CheckpointSaveTime", text5); } if (Records.x.openBook == "QuickSave") { es3File2.Save("QuickSaveTime", text5); } if (Records.x.openBook == "Save1") { es3File2.Save("Save1Time", text5); } if (Records.x.openBook == "Save2") { es3File2.Save("Save2Time", text5); } if (Records.x.openBook == "Save3") { es3File2.Save("Save3Time", text5); } if (Records.x.openBook == "Save4") { es3File2.Save("Save4Time", text5); } if (Records.x.openBook == "Save5") { es3File2.Save("Save5Time", text5); } if (Records.x.openBook == "Save6") { es3File2.Save("Save6Time", text5); } if (Records.x.openBook == "Save7") { es3File2.Save("Save7Time", text5); } if (Records.x.openBook == "Save8") { es3File2.Save("Save8Time", text5); } if (Records.x.openBook == "Save9") { es3File2.Save("Save9Time", text5); } if (Records.x.openBook == "Save10") { es3File2.Save("Save10Time", text5); } es3File2.Sync(); ES3File es3File3 = new ES3File("SerpentData.es3"); es3File3.Save("SitsAnimal", this.sitsAnimal); es3File3.Save("SitsCompanion1", this.sitsCompanion1); es3File3.Save("SitsCompanion2", this.sitsCompanion2); es3File3.Save("SitsCompanion3", this.sitsCompanion3); es3File3.Save("SitsCompanion4", this.sitsCompanion4); es3File3.Save("SitsNecholai", this.sitsNecholai); es3File3.Sync(); filename = Records.x.openBook + "/CreatureLocations.es3"; this.saveFile.Save>("CreaturesMapXml", this.creaturesMapXml); this.saveFile.Save>("CreatureMapsNew", this.creaturesMapNew); this.saveFile.Save>("CreatureMapsOld", this.creaturesMapOld); this.saveFile.Save>("CreaturesMapName", this.creaturesMapName); this.saveFile.Save>("CreaturesMapHostility", this.creaturesMapHostility); this.saveFile.Save>("CreaturesMapPosition", this.creaturesMapPosition); this.saveFile.Save>("CreaturesMapState", this.creaturesMapState); this.saveFile.Save>("CreaturesMapChangeTime", this.creaturesMapChangeTime); this.saveFile.Save>("CreaturesMapChangeDelay", this.creaturesMapChangeDelay); this.saveFile.Save>("CreaturesMapGameObject", this.creaturesMapGameObject); this.saveFile.Save>("CreaturesMapLife", this.creaturesMapLife); this.saveFile.Save>("CreaturesMapIndex", this.creaturesMapIndex); this.saveFile.Save>("CreaturesMapMoving", this.creaturesMapMovingFrom); this.saveFile.Save>("CreaturesMapMovingFromPosition", this.creaturesMapMovingFromPosition); this.saveFile.Save>("StunnedNPCs", this.stunnedNPCs); this.saveFile.Save>("StunnedTime", this.stunnedTime); this.saveFile.Save>("StunnedSaveFiles", this.stunnedSaveFiles); this.saveFile.Save>("Exiles", this.exiles); this.saveFile.Save>("ExilesPurseState", this.exilesPurseState); this.saveFile.Save>("Victims", this.victims); this.saveFile.Save>("VictimBadgeState", this.victimBadgeState); this.saveFile.Save>("VictimBadgeStartTime", this.victimBadgeStartTime); this.saveFile.Save>("VictimTown", this.victimTown); this.saveFile.Save>("ChangeQuestName", this.changeQuestName); this.saveFile.Save>("ChangeAtHour", this.changeAtHour); this.saveFile.Save>("ChangeToState", this.changeToState); this.saveFile.Save>("ChangeFromState", this.changeFromState); this.saveFile.Sync(); yield return new WaitForSecondsRealtime(0.05f); filename = Records.x.openBook + "/Quests.es3"; Links.x.cellar.SaveGorePiles(filename); Links.x.hudControl.SaveWindows(); if (Links.x.saveLoad) { Links.x.saveLoad.UpdateSave(Records.x.openBook); } Records.x.openBook = "AutoSave"; Links.x.saveKeeper.openBook = "AutoSave"; if (showNotifier && !Records.x.inMenus) { GC.Collect(); } this.saving = false; if (!paused && showNotifier && !Records.x.inMenus) { Links.x.gameplay.TogglePause(false); } if (showNotifier && !controlsRemoved) { this.RemoveControls(false); } if (this.needsSaveNames.Count > 0) { Records.x.openBook = this.needsSaveNames[0]; this.needsSaveNames.RemoveAt(0); this.TriggerGlobalSave(Records.x.openBook, false); } yield break; } // Token: 0x06000C4B RID: 3147 RVA: 0x000EFE8C File Offset: 0x000EE08C private string SaveTime() { string text = ""; float num = Mathf.Round((float)Links.x.gameplay.gameDays); float num2 = Mathf.Round(Mathf.Round(Links.x.gameplay.gameHours) / 24f * 10f) / 10f; num += num2; if (num == 1f) { text = text + num.ToString() + " day, "; } else { text = text + num.ToString() + " days, "; } text += Links.x.diorama.sceneDisplayName; string text2 = DateTime.Now.ToString("hh:mm"); string text3 = DateTime.Now.ToString("MM/dd/yyyy"); text += "\n"; text += text2; text += " on "; return text + text3; } // Token: 0x06000C4C RID: 3148 RVA: 0x000EFF80 File Offset: 0x000EE180 public void CopyToCheckPoint() { string persistentDataPath = Application.persistentDataPath; string text = persistentDataPath + "/AutoSave"; string text2 = persistentDataPath + "/CheckpointSave"; if (Directory.Exists(text2)) { string[] array = Directory.GetFiles(text2); for (int i = 0; i < array.Length; i++) { File.Delete(array[i]); } } else { Directory.CreateDirectory(text2); } if (Directory.Exists(text)) { foreach (string text3 in Directory.GetFiles(text)) { string fileName = Path.GetFileName(text3); string text4 = Path.Combine(text2, fileName); File.Copy(text3, text4); } } Links.x.cameraEffects.Capture("CheckpointSave"); string text5 = this.SaveTime(); ES3File es3File = new ES3File("Version.es3"); es3File.Save("CheckpointSaveTime", text5); es3File.Sync(); if (Links.x.saveLoad) { Links.x.saveLoad.UpdateSave("CheckpointSave"); } } // Token: 0x06000C4D RID: 3149 RVA: 0x000F0075 File Offset: 0x000EE275 public void ChangeDeadList(string xmlName, bool add) { } // Token: 0x06000C4E RID: 3150 RVA: 0x000F0078 File Offset: 0x000EE278 public void CircleFromLoad() { if (this.defenseCircle.Count > 10) { Vector3 vector = this.defenseCircle[0]; Vector3 vector2 = this.defenseCircle[1]; Vector3 vector3 = this.defenseCircle[2]; Vector3 vector4 = this.defenseCircle[3]; Vector3 vector5 = this.defenseCircle[4]; Vector3 vector6 = this.defenseCircle[5]; Vector3 vector7 = this.defenseCircle[6]; Vector3 vector8 = this.defenseCircle[7]; Vector3 vector9 = this.defenseCircle[8]; Vector3 vector10 = this.defenseCircle[9]; Vector3 vector11 = this.defenseCircle[10]; Links.x.gameplay.CircleFromLoad(vector, vector2, vector3, vector4, vector5, vector6, vector7, vector8, vector9, vector10, vector11); } } // Token: 0x06000C4F RID: 3151 RVA: 0x000F0150 File Offset: 0x000EE350 private void SetupSitsInfo() { if (this.sitsCompanion1 != "" && this.sitsCompanion2 != "") { DialogueLua.SetVariable("SerpentSaveFileInfo1", string.Concat(new string[] { "brave ", this.sitsCompanion1, " and ", this.sitsCompanion2, " the wise" })); } DialogueLua.SetVariable("SerpentSaveFileInfo2", this.sitsNecholai); } // Token: 0x06000C50 RID: 3152 RVA: 0x000F01D0 File Offset: 0x000EE3D0 public void CheckForTemporaryCreatures(int type) { this.returningCreatures.Clear(); int count = this.creaturesMapXml.Count; bool flag = false; int currentGameTimeHours = Links.x.gameplay.GetCurrentGameTimeHours(); for (int i = 0; i < this.creaturesMapXml.Count; i++) { string text = this.creaturesMapNew[i]; bool flag2 = true; bool flag3 = false; bool flag4 = false; if (text == Links.x.diorama.sceneName) { flag3 = true; } if (this.creaturesMapXml[i].Contains("Ghost")) { flag4 = true; } if (flag) { Debug.Log(string.Concat(new string[] { "Checking temp creature for ", Links.x.diorama.sceneName, " pass ", type.ToString(), " hours: ", currentGameTimeHours.ToString(), " time until return ", (this.creaturesMapChangeTime[i] + 3).ToString(), " is same map?", flag3.ToString(), " name is: ", this.creaturesMapXml[i] })); } if (currentGameTimeHours > this.creaturesMapChangeTime[i] + 24 && this.creaturesMapChangeTime[i] >= 0 && type == 0 && !flag4) { if (this.creaturesMapIndex[i] > -1) { flag2 = false; string text2 = string.Concat(new string[] { "AutoSave/Creature_", this.creaturesMapOld[i], "_", this.creaturesMapGameObject[i], ".es3" }); if (flag) { Debug.Log(string.Concat(new string[] { "Pass 1 for ", Links.x.diorama.sceneName, " sending npc back ", this.creaturesMapXml[i], " ", text2, " ", ES3.FileExists(text2).ToString(), " ", this.creaturesMapOld[i] })); } if (ES3.FileExists(text2)) { this.saveFileTemporary = new ES3File(text2); this.positions = this.saveFileTemporary.Load>("Positions"); this.maps = this.saveFileTemporary.Load>("Maps"); int num = this.creaturesMapIndex[i]; this.positions[num] = Vector3.zero; this.maps[num] = this.creaturesMapOld[i]; this.saveFileTemporary.Save>("Positions", this.positions); this.saveFileTemporary.Save>("Maps", this.maps); this.saveFileTemporary.Sync(); this.returningCreatures.Add(i); } else { this.creaturesMapChangeTime[i] = -1; } } else { this.creaturesMapChangeTime[i] = -1; } } if (flag2 && flag3) { string text3 = this.creaturesMapOld[i]; string text4 = this.creaturesMapXml[i]; int characterCreatureIndex = this.GetCharacterCreatureIndex(text4); if (characterCreatureIndex > -1) { if (type == 1 && text == text3 && !flag4) { CreatureActions creatureActions = Links.x.diorama.MatchCreatureActions(this.creaturesMapGameObject[i]); if (flag) { string text5 = "found original map for temporary creature, returning to: "; CreatureActions creatureActions2 = creatureActions; Debug.Log(text5 + ((creatureActions2 != null) ? creatureActions2.ToString() : null)); } if (creatureActions) { Vector3 playerStartingPosition = Links.x.gaia.playerStartingPosition; GraphNode playerStartingNode = Links.x.gaia.playerStartingNode; if (creatureActions.ReturnSingleToMap(this.creaturesMapName[i], this.creaturesMapHostility[i], text4, characterCreatureIndex, text3, playerStartingPosition, this.creaturesMapState[i], this.creaturesMapLife[i], "", this.creaturesMapIndex[i])) { creatureActions.UpdateDelays(this.creaturesMapChangeDelay[i], i, this.creaturesMapMovingFrom[i]); if (this.creaturesMapChangeDelay[i] > 0f && this.creaturesMapHostility[i] >= 2) { creatureActions.hunting = true; } creatureActions.temporaryStartNode = Links.x.gaia.playerStartingNode; Debug.Log("Returned creature to main script " + text4 + " " + this.creaturesMapChangeDelay[i].ToString()); this.returningCreatures.Add(i); flag2 = false; } } } if (flag2 && type == 2) { Vector3 vector = this.creaturesMapPosition[i]; int num2 = this.creaturesMapLife[i]; if (num2 > 0) { if (flag) { string text6 = "Adding new creature "; string text7 = text4; string text8 = " "; Vector3 vector2 = vector; Debug.Log(text6 + text7 + text8 + vector2.ToString()); } if (vector == Vector3.zero) { vector = Links.x.gaia.playerStartingPosition; } if (flag) { string[] array = new string[8]; array[0] = "Adding new creature "; array[1] = text4; array[2] = " "; array[3] = text3; array[4] = " "; int num3 = 5; Vector3 vector2 = vector; array[num3] = vector2.ToString(); array[6] = " "; array[7] = this.creaturesMapChangeDelay[i].ToString(); Debug.Log(string.Concat(array)); } Links.x.diorama.SetupTemporaryCreatures(this.creaturesMapName[i], this.creaturesMapHostility[i], text4, characterCreatureIndex, text3, this.creaturesMapMovingFrom[i], vector, this.creaturesMapState[i], num2, "", this.creaturesMapIndex[i], this.creaturesMapChangeDelay[i]); this.creaturesMapChangeDelay[i] = 0f; } else { string text9 = string.Concat(new string[] { "AutoSave/Creature_", this.creaturesMapOld[i], "_", this.creaturesMapGameObject[i], ".es3" }); if (flag) { Debug.Log(string.Concat(new string[] { "sending npc back ", this.creaturesMapXml[i], " ", text9, " ", ES3.FileExists(text9).ToString(), " ", this.creaturesMapOld[i], " because its dead" })); } if (ES3.FileExists(text9)) { this.saveFileTemporary = new ES3File(text9); this.health = this.saveFileTemporary.Load>("Health"); this.maps = this.saveFileTemporary.Load>("Maps"); int num4 = this.creaturesMapIndex[i]; this.health[num4] = 0; this.maps[num4] = this.creaturesMapOld[i]; this.saveFileTemporary.Save>("Health", this.health); this.saveFileTemporary.Save>("Maps", this.maps); this.saveFileTemporary.Sync(); } this.returningCreatures.Add(i); } } } else { Debug.Log("could not find enum for xmlName " + text4); } } if (this.returningCreatures.Count > 0) { int num5 = this.returningCreatures[0]; if (flag) { Debug.Log("returning creature " + this.creaturesMapXml[num5]); } this.RemoveTemporaryCreature(this.creaturesMapName[num5], this.creaturesMapXml[num5], this.creaturesMapOld[num5], this.creaturesMapIndex[num5]); this.returningCreatures.Clear(); i--; } } } // Token: 0x06000C51 RID: 3153 RVA: 0x000F0A24 File Offset: 0x000EEC24 public int GetCharacterCreatureIndex(string xmlName) { for (int i = 0; i < this.characterNames.Length; i++) { if (this.characterNames[i] == xmlName) { return i; } } return -1; } // Token: 0x06000C52 RID: 3154 RVA: 0x000F0A58 File Offset: 0x000EEC58 public void RemoveTemporaryCreature(string creaturesName, string xmlName, string originalMap, int mapIndex) { int count = this.creaturesMapXml.Count; int num = -1; for (int i = 0; i < this.creaturesMapOld.Count; i++) { if (this.creaturesMapOld[i] == originalMap && this.creaturesMapName[i] == creaturesName && this.creaturesMapIndex[i] == mapIndex) { num = i; break; } } if (num > -1) { this.creaturesMapOld.RemoveAt(num); this.creaturesMapNew.RemoveAt(num); this.creaturesMapHostility.RemoveAt(num); this.creaturesMapName.RemoveAt(num); this.creaturesMapXml.RemoveAt(num); this.creaturesMapPosition.RemoveAt(num); this.creaturesMapState.RemoveAt(num); this.creaturesMapChangeTime.RemoveAt(num); this.creaturesMapChangeDelay.RemoveAt(num); this.creaturesMapGameObject.RemoveAt(num); this.creaturesMapLife.RemoveAt(num); this.creaturesMapIndex.RemoveAt(num); this.creaturesMapMovingFrom.RemoveAt(num); this.creaturesMapMovingFromPosition.RemoveAt(num); } } // Token: 0x06000C53 RID: 3155 RVA: 0x000F0B74 File Offset: 0x000EED74 public void AddTemporaryCreature(string creaturesName, string xmlName, string oldMap, string newMap, int hostility, Vector3 position, string state, string parentName, int life, string savedEffects, int mapIndex, float delay, string movingFromMap, Vector3 movingStartPosition, bool updateMapMoving) { int num = -1; for (int i = 0; i < this.creaturesMapOld.Count; i++) { Debug.Log(this.creaturesMapOld[i] + " " + oldMap); if (this.creaturesMapOld[i] == oldMap) { Debug.Log(this.creaturesMapName[i] + " " + creaturesName); if (this.creaturesMapName[i] == creaturesName) { Debug.Log(this.creaturesMapIndex[i].ToString() + " " + mapIndex.ToString()); if (this.creaturesMapIndex[i] == mapIndex) { num = i; break; } } } } bool flag = true; if (flag) { string[] array = new string[20]; array[0] = "Adding temporary creature "; array[1] = creaturesName; array[2] = " xml "; array[3] = xmlName; array[4] = " index "; array[5] = num.ToString(); array[6] = " old map "; array[7] = oldMap; array[8] = " new map "; array[9] = newMap; array[10] = " delay "; array[11] = delay.ToString(); array[12] = " pt "; int num2 = 13; Vector3 vector = position; array[num2] = vector.ToString(); array[14] = " state "; array[15] = state; array[16] = " map index "; array[17] = mapIndex.ToString(); array[18] = " life "; array[19] = life.ToString(); Debug.Log(string.Concat(array)); } if (num > -1) { bool flag2 = false; if (state == "Purgatory" || state == "Resurrected" || state == "Purgatory2") { flag2 = true; } if (life <= 0 && !flag2) { this.RemoveTemporaryCreature(this.creaturesMapName[num], this.creaturesMapXml[num], this.creaturesMapOld[num], this.creaturesMapIndex[num]); return; } if (flag) { Debug.Log(string.Concat(new string[] { "new map ", newMap, " xml name ", xmlName, " creature name ", creaturesName, " ", this.creaturesMapIndex[num].ToString() })); } this.creaturesMapNew[num] = newMap; this.creaturesMapHostility[num] = hostility; this.creaturesMapName[num] = creaturesName; this.creaturesMapXml[num] = xmlName; this.creaturesMapPosition[num] = position; this.creaturesMapState[num] = state; this.creaturesMapChangeTime[num] = Links.x.gameplay.GetCurrentGameTimeHours(); this.creaturesMapChangeDelay[num] = delay; this.creaturesMapGameObject[num] = parentName; this.creaturesMapLife[num] = life; if (updateMapMoving) { this.creaturesMapMovingFrom[num] = movingFromMap; this.creaturesMapMovingFromPosition[num] = movingStartPosition; return; } } else if (life > 0) { this.creaturesMapOld.Add(oldMap); this.creaturesMapNew.Add(newMap); this.creaturesMapHostility.Add(hostility); this.creaturesMapName.Add(creaturesName); this.creaturesMapXml.Add(xmlName); this.creaturesMapPosition.Add(position); this.creaturesMapState.Add(state); this.creaturesMapChangeTime.Add(Links.x.gameplay.GetCurrentGameTimeHours()); this.creaturesMapChangeDelay.Add(delay); this.creaturesMapGameObject.Add(parentName); this.creaturesMapLife.Add(life); this.creaturesMapIndex.Add(mapIndex); this.creaturesMapMovingFrom.Add(movingFromMap); this.creaturesMapMovingFromPosition.Add(movingStartPosition); } } // Token: 0x06000C54 RID: 3156 RVA: 0x000F0F54 File Offset: 0x000EF154 public void ReturnTemporaryCreatureToPreviousMap(string creaturesName, string xmlName, int mapIndex, string oldMap) { int num = -1; for (int i = 0; i < this.creaturesMapOld.Count; i++) { if (this.creaturesMapOld[i] == oldMap && this.creaturesMapName[i] == creaturesName && this.creaturesMapIndex[i] == mapIndex) { num = i; break; } } Debug.Log("Returning creature following player " + creaturesName + " to map, index is " + num.ToString()); if (num > -1) { this.creaturesMapNew[num] = this.creaturesMapMovingFrom[num]; this.creaturesMapName[num] = creaturesName; this.creaturesMapChangeDelay[num] = 0f; } } // Token: 0x06000C55 RID: 3157 RVA: 0x000F100B File Offset: 0x000EF20B public void StartBribe() { this.Bribe(1f, true, true, "", false); } // Token: 0x06000C56 RID: 3158 RVA: 0x000F1020 File Offset: 0x000EF220 public void StartForgiveness() { this.Bribe(1f, false, true, "", true); } // Token: 0x06000C57 RID: 3159 RVA: 0x000F1038 File Offset: 0x000EF238 private void Bribe(float t, bool fromDialogue, bool all, string single, bool forgiven) { for (int i = 0; i < this.victims.Count; i++) { Debug.Log(string.Concat(new string[] { "Starting bribe ", this.victims[i], " ", this.victimTown[i], " ", all.ToString(), " ", forgiven.ToString() })); if (this.victims[i] != "" && ((all && (this.victimTown[i] == Links.x.diorama.sceneName || this.victimBadgeState[i] == "Remove")) || single == this.victims[i])) { Library.Characters pcrowFromName = Links.x.library.GetPCRowFromName(this.victims[i]); Links.x.hudControl.RemoveBribeBadge(this.victims[i]); Character character = Links.x.diorama.FindCharacterAnyState(this.victims[i]); if (character) { character.attackingUntilBribe = false; } this.victimBadgeStartTime[i] = -1f; this.victims[i] = ""; this.victimBadgeState[i] = ""; this.victimTown[i] = ""; if (fromDialogue) { Links.x.gameFeed.AddFeed("Cleared of crime against " + pcrowFromName._DisplayName + " (Reparations made)"); } else if (!forgiven) { Links.x.gameFeed.AddFeed("Cleared of crime against " + pcrowFromName._DisplayName + " (No witnesses)"); } else { Links.x.gameFeed.AddFeed("Forgiven of crime against " + pcrowFromName._DisplayName); } } } this.victimBadgeStartTime.RemoveAll((float item) => item == -1f); this.victimBadgeState.RemoveAll((string item) => item == ""); this.victims.RemoveAll((string item) => item == ""); this.victimTown.RemoveAll((string item) => item == ""); this.BribeBadgeCount(); } // Token: 0x06000C58 RID: 3160 RVA: 0x000F1300 File Offset: 0x000EF500 public void SetupBribeBadges(string sceneName) { for (int i = 0; i < this.victims.Count; i++) { if (this.victimTown[i] == sceneName) { bool flag = false; if (this.victimBadgeState[i] == "StunnedWaiting") { flag = true; } Links.x.hudControl.AddBribeBadge(this.victims[i], this.victimBadgeStartTime[i], flag, true); } } } // Token: 0x06000C59 RID: 3161 RVA: 0x000F137C File Offset: 0x000EF57C public int BribeBadgeCount() { int num = 0; if (!Links.x.gaia.sceneLoaded) { return 0; } for (int i = 0; i < this.victims.Count; i++) { if (this.victimTown[i] == Links.x.diorama.sceneName && this.victimBadgeState[i] != "StunnedWaiting") { num++; } } this.badgeCount = num; return num; } // Token: 0x06000C5A RID: 3162 RVA: 0x000F13FC File Offset: 0x000EF5FC public int BribeBadgeCountOld() { int num = 0; for (int i = 0; i < this.victims.Count; i++) { if (this.victimTown[i] == Links.x.diorama.sceneName) { string text = this.victimBadgeState[i]; if (text != "StunnedWaiting" && text != "Seen" && text != "Unseen") { num++; } } } this.badgeCount = num; return num; } // Token: 0x06000C5B RID: 3163 RVA: 0x000F1484 File Offset: 0x000EF684 public void UpdateBribeState(Character seenCharacter) { if (this.victims.Count == 0) { return; } if (seenCharacter.isHostage) { return; } if (Records.x.editor) { Debug.Log("Updating bribe state: " + ((seenCharacter != null) ? seenCharacter.ToString() : null) + " saw crime, added as witness"); } for (int i = 0; i < this.victims.Count; i++) { if (this.victimBadgeState[i] == "Unseen") { this.victimBadgeState[i] = "Seen"; } } if (!this.witnesses.Contains(seenCharacter)) { this.witnesses.Add(seenCharacter); } } // Token: 0x06000C5C RID: 3164 RVA: 0x000F1530 File Offset: 0x000EF730 public void UpdateBribeBadgeFromTimer(string info) { for (int i = 0; i < this.victims.Count; i++) { if (this.victims[i] == info) { this.victimBadgeState[i] = "Fled"; } } } // Token: 0x06000C5D RID: 3165 RVA: 0x000F1578 File Offset: 0x000EF778 public void CombatDoneBribeStates() { bool flag = false; bool flag2 = true; bool flag3 = true; bool flag4 = false; for (int i = 0; i < this.witnesses.Count; i++) { if (this.witnesses[i]) { if (!this.witnesses[i].dead) { flag2 = false; } if (this.witnesses[i].stunned || this.witnesses[i].dead) { if (this.witnesses[i].stunned) { flag4 = true; } } else { flag3 = false; } if (Records.x.editor) { string[] array = new string[8]; array[0] = "Checking witness "; int num = 1; Character character = this.witnesses[i]; array[num] = ((character != null) ? character.ToString() : null); array[2] = " all stunned: "; array[3] = flag3.ToString(); array[4] = " any stunned: "; array[5] = flag4.ToString(); array[6] = " all dead: "; array[7] = flag2.ToString(); Debug.Log(string.Concat(array)); } } } if (this.victims.Count > 0 && Records.x.editor) { Debug.Log(string.Concat(new string[] { "All stunned ", flag3.ToString(), " any stunned ", flag4.ToString(), " all dead ", flag2.ToString() })); } for (int j = 0; j < this.victims.Count; j++) { bool flag5 = false; bool flag6 = false; bool flag7 = false; Character character2 = Links.x.diorama.FindCharacterAnyState(this.victims[j]); if (character2) { if (character2.stunned) { flag6 = true; } if (character2.dead) { flag7 = true; } } else { flag7 = true; } if (flag6 && (flag3 || flag2)) { flag5 = true; } if (flag7 && flag4 && (flag3 || flag2)) { flag5 = true; } if (Records.x.editor) { string[] array2 = new string[14]; array2[0] = "wait, need to stun: "; array2[1] = flag5.ToString(); array2[2] = " character stunned: "; array2[3] = flag6.ToString(); array2[4] = " character dead: "; array2[5] = flag7.ToString(); array2[6] = " character is: "; int num2 = 7; Character character3 = character2; array2[num2] = ((character3 != null) ? character3.ToString() : null); array2[8] = " badge state is: "; array2[9] = this.victimBadgeState[j]; array2[10] = " witnesses are stunned? "; array2[11] = flag3.ToString(); array2[12] = " dead? "; array2[13] = flag2.ToString(); Debug.Log(string.Concat(array2)); } if (this.victimBadgeState[j] == "Unseen" || (this.victimBadgeState[j] == "Seen" && flag2 && !flag5)) { this.victimBadgeState[j] = "Remove"; flag = true; } else if (this.victimBadgeState[j] == "Seen") { if (flag7) { if (flag5) { this.victimBadgeState[j] = "StunnedWaiting"; this.victimBadgeStartTime[j] = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); } else { this.victimBadgeState[j] = "Dead"; } } else if (flag6) { if (flag5) { this.victimBadgeState[j] = "StunnedWaiting"; this.victimBadgeStartTime[j] = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); } else { this.victimBadgeState[j] = "Stunned"; } } else { this.victimBadgeState[j] = "Fled"; } if (this.victimBadgeState[j] == "StunnedWaiting") { AnimateButton bribeBadge = Links.x.hudControl.GetBribeBadge(this.victims[j]); bribeBadge.id = (int)this.victimBadgeStartTime[j]; Links.x.hudControl.UpdateBribeBadgeState(bribeBadge, true); Character nearestParty = Links.x.GetNearestParty(Links.x.rtsCamera.bokehFollow.position, null, 900f); if (nearestParty) { base.StartCoroutine(this.VictimQuip(character2, nearestParty)); } } if (Records.x.editor) { Debug.Log(this.victimBadgeState[j]); } } if (flag) { this.Bribe(0f, false, false, this.victims[j], false); Character nearestParty2 = Links.x.GetNearestParty(Links.x.rtsCamera.bokehFollow.position, null, 900f); j--; if (nearestParty2 && this.victims.Count == 0) { nearestParty2.StartQuip("None the wiser"); } } flag = false; } this.witnesses.Clear(); } // Token: 0x06000C5E RID: 3166 RVA: 0x000F1A85 File Offset: 0x000EFC85 private IEnumerator VictimQuip(Character c, Character near) { yield return new WaitForSeconds(0.5f); if (c && !c.dead) { near.StartQuip("They'll talk of this when they wake up..."); } yield break; } // Token: 0x06000C5F RID: 3167 RVA: 0x000F1A9C File Offset: 0x000EFC9C public string CanBribe(string info) { int i = 0; while (i < this.victims.Count) { if (info == this.victims[i]) { if (this.victimBadgeState[i].Contains("Waiting")) { return "Stunned"; } if (!(this.victimTown[i] == Links.x.diorama.sceneName)) { return "Out of town"; } if (Links.x.sensory.BribeCharacterNear(Links.x.main, true)) { return "Yes"; } return "Too far"; } else { i++; } } return "No"; } // Token: 0x06000C60 RID: 3168 RVA: 0x000F1B54 File Offset: 0x000EFD54 public bool IsVictim(Character character) { string xmlName = character.stats.xmlName; return this.IsVictim(xmlName); } // Token: 0x06000C61 RID: 3169 RVA: 0x000F1B74 File Offset: 0x000EFD74 public bool IsVictim(string characterName) { return this.victims.Contains(characterName); } // Token: 0x06000C62 RID: 3170 RVA: 0x000F1B88 File Offset: 0x000EFD88 public bool IsFelon(Character character) { string xmlName = character.stats.xmlName; return this.IsFelon(xmlName); } // Token: 0x06000C63 RID: 3171 RVA: 0x000F1BA8 File Offset: 0x000EFDA8 public bool IsFelon(string characterName) { return this.stunnedNPCs.Contains(characterName); } // Token: 0x06000C64 RID: 3172 RVA: 0x000F1BBC File Offset: 0x000EFDBC public void AddBribeBadge(Character character, string state, bool fromSave, Character fromCharacter) { if (!character) { return; } if (Links.x.diorama.sceneName == "F4_BanquetIsle") { return; } if (character.stats.semizenMagic) { return; } if (character.willBeHostile) { return; } Debug.Log(string.Concat(new string[] { "Adding bribe badge ", (character != null) ? character.ToString() : null, " ", state, " ", (fromCharacter != null) ? fromCharacter.ToString() : null })); if (this.victims.IndexOf(character.stats.xmlName) == -1) { Debug.Log("add victim " + ((character != null) ? character.ToString() : null)); this.victims.Add(character.stats.xmlName); this.victimBadgeStartTime.Add(Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours())); this.victimBadgeState.Add(state); string text = Links.x.diorama.sceneName; if (character.creatures && character.creatures.temporary) { text = character.creatures.originalScene; } if (text == "C6_Cave" || text == "C6_Tomb") { text = "C6_FortenLazure"; } this.victimTown.Add(text); bool flag = false; if (state == "StunnedUnseen") { flag = true; } Links.x.hudControl.AddBribeBadge(character.stats.xmlName, (float)((int)Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours())), flag, fromSave); } } // Token: 0x06000C65 RID: 3173 RVA: 0x000F1D72 File Offset: 0x000EFF72 public void TurnInExiles(bool waited, string specialTurnIn) { Debug.Log(specialTurnIn); base.StartCoroutine(this.TurnIn(waited, specialTurnIn)); } // Token: 0x06000C66 RID: 3174 RVA: 0x000F1D89 File Offset: 0x000EFF89 private IEnumerator TurnIn(bool waited, string specialTurnIn) { yield return new WaitForSecondsRealtime(1f); bool lookForSpecialTurnIn = false; if (specialTurnIn != "" && specialTurnIn != null) { lookForSpecialTurnIn = true; } int num4; for (int i = 0; i < this.stunnedNPCs.Count; i = num4 + 1) { Debug.Log(this.stunnedNPCs[i]); Library.Characters pcrowFromName = Links.x.library.GetPCRowFromName(this.stunnedNPCs[i]); if (pcrowFromName != null) { string quest = pcrowFromName._Quest; bool flag = this.CanTurnInExile(quest, this.stunnedNPCs[i]); if (lookForSpecialTurnIn && flag) { flag = this.stunnedNPCs[i].Contains(specialTurnIn); Debug.Log(string.Concat(new string[] { specialTurnIn, " ", this.stunnedNPCs[i], " ", flag.ToString() })); } if (flag) { if (QuestLog.GetQuestState(pcrowFromName._Quest) == QuestState.WaitingForExileIsland) { QuestLog.SetQuestState(pcrowFromName._Quest, QuestState.ExileIsland); } if (lookForSpecialTurnIn) { Links.x.diorama.CheckCreaturesThatMightActivate(); } else { this.exiles.Add(this.stunnedNPCs[i]); float num = 12f; if (waited) { num = 0f; } float num2 = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()) + num; this.exilesPurseState.Add(num2); Links.x.forfeits.AddLine(this.stunnedNPCs[i], num2); } Character character = Links.x.diorama.FindCharacterAnyState(pcrowFromName._Name); if (character) { character.Missing(); } bool flag2 = true; if (this.stunnedNPCs[i] == "RozafirStoreKeep") { this.AddQuestToTimer("D6_NewStoreKeep", 24f, "unassigned", "active", false); } if (this.stunnedNPCs[i].Contains("RozafirDolki")) { this.UpdateSaveFileHealth("D6_Rozafir_" + this.stunnedNPCs[i], pcrowFromName._Life, false); } string[] array = new string[5]; int num3 = 0; Character character2 = character; array[num3] = ((character2 != null) ? character2.ToString() : null); array[1] = " "; array[2] = flag2.ToString(); array[3] = " "; array[4] = this.stunnedSaveFiles[i]; Debug.Log(string.Concat(array)); if (!character && flag2) { this.UpdateSaveFileHealth(this.stunnedSaveFiles[i], 0, false); } Links.x.hudControl.RemoveStunBadge(this.stunnedNPCs[i], true); this.stunnedTime[i] = -1f; this.stunnedNPCs[i] = ""; this.stunnedSaveFiles[i] = ""; } } yield return new WaitForSecondsRealtime(0.3f); num4 = i; } this.stunnedTime.RemoveAll((float item) => item == -1f); this.stunnedNPCs.RemoveAll((string item) => item == ""); this.stunnedSaveFiles.RemoveAll((string item) => item == ""); Links.x.diorama.CheckQuestActivations(); yield break; } // Token: 0x06000C67 RID: 3175 RVA: 0x000F1DA8 File Offset: 0x000EFFA8 public bool HasSpecialTurnIn(string type) { for (int i = 0; i < this.stunnedNPCs.Count; i++) { if (this.stunnedNPCs[i].Contains(type)) { return !this.stunnedNPCs[i].Contains("Dolki") || Links.x.diorama.sceneName.Contains("D6"); } } return false; } // Token: 0x06000C68 RID: 3176 RVA: 0x000F1E1C File Offset: 0x000F001C public void CheckStunnedStates() { for (int i = 0; i < this.stunnedNPCs.Count; i++) { AnimateButton stunBadge = Links.x.hudControl.GetStunBadge(this.stunnedNPCs[i]); if (!stunBadge.state) { string quest = Links.x.library.GetPCRowFromName(this.stunnedNPCs[i])._Quest; if (this.CanTurnInExile(quest, this.stunnedNPCs[i])) { Links.x.hudControl.UpdateBadgeState(stunBadge); } } } } // Token: 0x06000C69 RID: 3177 RVA: 0x000F1EAC File Offset: 0x000F00AC public int ExilesToTurnIn() { int num = 0; for (int i = 0; i < this.stunnedNPCs.Count; i++) { Library.Characters pcrowFromName = Links.x.library.GetPCRowFromName(this.stunnedNPCs[i]); if (pcrowFromName != null) { string quest = pcrowFromName._Quest; if (this.CanTurnInExile(quest, this.stunnedNPCs[i])) { if (quest.Contains("D6_Dolki")) { if (Links.x.diorama.sceneName.Contains("D6")) { num++; } } else { num++; } } } } return num; } // Token: 0x06000C6A RID: 3178 RVA: 0x000F1F40 File Offset: 0x000F0140 public void SetupStunned() { for (int i = 0; i < this.stunnedNPCs.Count; i++) { string quest = Links.x.library.GetPCRowFromName(this.stunnedNPCs[i])._Quest; bool flag = this.CanTurnInExile(quest, this.stunnedNPCs[i]); Links.x.hudControl.AddStunBadge(this.stunnedNPCs[i], this.stunnedTime[i], flag, true); } Links.x.forfeits.SetupFromGameLoad(); } // Token: 0x06000C6B RID: 3179 RVA: 0x000F1FD0 File Offset: 0x000F01D0 public void AddStunned(Character character, bool fromSave) { if (!this.stunnedNPCs.Contains(character.stats.xmlName)) { Debug.Log("add stunned " + ((character != null) ? character.ToString() : null)); this.stunnedNPCs.Add(character.stats.xmlName); this.stunnedTime.Add(Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours())); this.stunnedSaveFiles.Add(Links.x.diorama.sceneName + "_" + character.creatures.gameObject.name); string quest = Links.x.library.GetPCRowFromName(character.stats.xmlName)._Quest; bool flag = this.CanTurnInExile(quest, character.stats.xmlName); Links.x.hudControl.AddStunBadge(character.stats.xmlName, (float)((int)Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours())), flag, fromSave); if (this.IsVictim(character.stats.xmlName)) { int num = this.victims.IndexOf(character.stats.xmlName); if (num > -1) { Links.x.hudControl.RemoveBribeBadge(this.victims[num]); this.victimBadgeStartTime.RemoveAt(num); this.victims.RemoveAt(num); this.victimTown.RemoveAt(num); this.victimBadgeState.RemoveAt(num); } } } } // Token: 0x06000C6C RID: 3180 RVA: 0x000F2160 File Offset: 0x000F0360 public void KilledStunnedVictim(string x) { bool flag = false; Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); for (int i = 0; i < this.victims.Count; i++) { if (x == this.victims[i] && this.victimBadgeState[i].Contains("Waiting")) { flag = true; Links.x.hudControl.RemoveBribeBadge(this.victims[i]); this.victimBadgeStartTime[i] = -1f; this.victims[i] = ""; this.victimTown[i] = ""; this.victimBadgeState[i] = ""; } } if (flag) { this.victims.RemoveAll((string item) => item == ""); this.victimBadgeState.RemoveAll((string item) => item == ""); this.victimTown.RemoveAll((string item) => item == ""); this.victimBadgeStartTime.RemoveAll((float item) => item == -1f); } } // Token: 0x06000C6D RID: 3181 RVA: 0x000F22E0 File Offset: 0x000F04E0 public void KilledStunnedFelon(string x) { bool flag = false; Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); for (int i = 0; i < this.stunnedNPCs.Count; i++) { if (x == this.stunnedNPCs[i]) { this.FailedExileTurnIn(this.stunnedNPCs[i]); flag = true; this.stunnedTime[i] = -1f; this.stunnedNPCs[i] = ""; } } if (flag) { this.stunnedTime.RemoveAll((float item) => item == -1f); this.stunnedNPCs.RemoveAll((string item) => item == ""); } } // Token: 0x06000C6E RID: 3182 RVA: 0x000F23C0 File Offset: 0x000F05C0 public void CheckHourForStunnedBadges() { bool flag = false; float num = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); for (int i = 0; i < this.stunnedNPCs.Count; i++) { if (this.testQuests && this.editor) { Debug.Log(string.Concat(new string[] { "stunned ", this.stunnedNPCs[i], " ", num.ToString(), " ", this.stunnedTime[i].ToString() })); } if (num >= this.stunnedTime[i] + 24f) { this.FailedExileTurnIn(this.stunnedNPCs[i]); flag = true; this.stunnedTime[i] = -1f; this.stunnedNPCs[i] = ""; } } if (flag) { this.stunnedTime.RemoveAll((float item) => item == -1f); this.stunnedNPCs.RemoveAll((string item) => item == ""); } } // Token: 0x06000C6F RID: 3183 RVA: 0x000F2510 File Offset: 0x000F0710 private void FailedExileTurnIn(string characterName) { Library.Characters pcrowFromName = Links.x.library.GetPCRowFromName(characterName); Links.x.gameFeed.AddFeed(pcrowFromName._DisplayName + " regained consciousness"); string quest = pcrowFromName._Quest; if (quest != "" && QuestLog.GetQuestState(quest) == QuestState.WaitingForExileIsland) { QuestLog.SetQuestState(quest, this.StringToQuestState(pcrowFromName._QuestProofState)); } Links.x.hudControl.RemoveStunBadge(characterName, false); if (quest.Contains("C6_GobletGuildThieves") && Links.x.diorama.sceneName == "C6_FortenLazure") { string text = "LazureInnFightPatronA"; if (quest == "C6_GobletGuildThievesB") { text = "LazureInnFightPatronB"; } if (quest == "C6_GobletGuildThievesC") { text = "LazureInnFightPatronC"; } Character character = Links.x.diorama.FindCharacterAnyState(text); if (character && !character.dead) { character.creatures.CheckQuestSwap(); } } if (quest.Contains("D5") && characterName.Contains("WestRuins") && QuestLog.GetQuestState("D5_RobberFortCleared") == QuestState.Success) { QuestLog.SetQuestState(quest, QuestState.Fled); Character character2 = Links.x.diorama.FindCharacterAnyState(characterName); if (character2 && !character2.dead && !character2.missing) { character2.Leave(true); } } } // Token: 0x06000C70 RID: 3184 RVA: 0x000F2678 File Offset: 0x000F0878 public bool CanTurnInExile(string questName, string characterName) { if (questName.Contains("C6_GobletGuildThieves") && characterName.Contains("Island")) { bool flag = true; Library.Characters pcrowFromName = Links.x.library.GetPCRowFromName(characterName); QuestState questState = this.StringToQuestState(pcrowFromName._SetQuestStateOnDeath); for (int i = 0; i < 3; i++) { string text = "C6_GobletGuildThievesA"; if (i == 1) { text = "C6_GobletGuildThievesB"; } if (i == 2) { text = "C6_GobletGuildThievesC"; } if (QuestLog.GetQuestState(text) != questState && QuestLog.GetQuestState(text) != QuestState.WaitingForExileIsland && QuestLog.GetQuestState(text) != QuestState.ExileIsland && QuestLog.GetQuestState(text) != QuestState.PerpIsDead) { flag = false; break; } } return flag; } if (characterName.Contains("WestRuins")) { bool flag2 = true; Library.Characters pcrowFromName2 = Links.x.library.GetPCRowFromName(characterName); QuestState questState2 = this.StringToQuestState(pcrowFromName2._SetQuestStateOnDeath); for (int j = 0; j < 13; j++) { string text2 = "D5_RobberBaron"; if (j == 1) { text2 = "D5_Archer1"; } if (j == 2) { text2 = "D5_Archer2"; } if (j == 3) { text2 = "D5_Archer3"; } if (j == 4) { text2 = "D5_Archer4"; } if (j == 5) { text2 = "D5_Archer5"; } if (j == 6) { text2 = "D5_Archer6"; } if (j == 7) { text2 = "D5_Archer7"; } if (j == 8) { text2 = "D5_Archer8"; } if (j == 9) { text2 = "D5_Archer9"; } if (j == 10) { text2 = "D5_Archer10"; } if (j == 11) { text2 = "D5_Lookout"; } if (j == 12) { text2 = "D5_Pagan"; } if (QuestLog.GetQuestState(text2) != questState2 && QuestLog.GetQuestState(text2) != QuestState.WaitingForExileIsland && QuestLog.GetQuestState(text2) != QuestState.ExileIsland && QuestLog.GetQuestState(text2) != QuestState.Fled && QuestLog.GetQuestState(text2) != QuestState.PerpIsDead) { flag2 = false; break; } } return flag2; } if (questName.Contains("C6_GraveRobber") && !questName.Contains("Topside")) { bool flag3 = true; Library.Characters pcrowFromName3 = Links.x.library.GetPCRowFromName(characterName); QuestState questState3 = this.StringToQuestState(pcrowFromName3._SetQuestStateOnDeath); for (int k = 0; k < 12; k++) { string text3 = "C6_GraveRobberMeleeA"; if (k == 1) { text3 = "C6_GraveRobberMeleeB"; } if (k == 2) { text3 = "C6_GraveRobberArcherA"; } if (k == 3) { text3 = "C6_GraveRobberArcherB"; } if (k == 4) { text3 = "C6_GraveRobberPaganA"; } if (k == 5) { text3 = "C6_GraveRobberBothA"; } if (k == 6) { text3 = "C6_GraveRobberBothB"; } if (k == 7) { text3 = "C6_GraveRobberBothC"; } if (k == 8) { text3 = "C6_GraveRobberBothD"; } if (k == 9) { text3 = "C6_GraveRobberBothE"; } if (k == 10) { text3 = "C6_GraveRobberBothF"; } if (k == 11) { text3 = "C6_GraveRobberBothG"; } if (QuestLog.GetQuestState(text3) != questState3 && QuestLog.GetQuestState(text3) != QuestState.WaitingForExileIsland && QuestLog.GetQuestState(text3) != QuestState.ExileIsland && QuestLog.GetQuestState(text3) != QuestState.PerpIsDead) { flag3 = false; break; } } return flag3; } if (questName.Contains("C6_GraveRobber") && questName.Contains("Topside")) { bool flag4 = true; Library.Characters pcrowFromName4 = Links.x.library.GetPCRowFromName(characterName); QuestState questState4 = this.StringToQuestState(pcrowFromName4._SetQuestStateOnDeath); for (int l = 0; l < 2; l++) { string text4 = "C6_GraveRobberTopsideA"; if (l == 1) { text4 = "C6_GraveRobberTopsideB"; } if (QuestLog.GetQuestState(text4) != questState4 && QuestLog.GetQuestState(text4) != QuestState.WaitingForExileIsland && QuestLog.GetQuestState(text4) != QuestState.ExileIsland && QuestLog.GetQuestState(text4) != QuestState.PerpIsDead) { flag4 = false; break; } } return flag4; } if (questName.Contains("D6_Dolki")) { bool flag5 = true; Library.Characters pcrowFromName5 = Links.x.library.GetPCRowFromName(characterName); QuestState questState5 = this.StringToQuestState(pcrowFromName5._SetQuestStateOnDeath); for (int m = 0; m < 6; m++) { string text5 = "D6_DolkiA"; if (m == 1) { text5 = "D6_DolkiB"; } if (m == 2) { text5 = "D6_DolkiC"; } if (m == 3) { text5 = "D6_DolkiD"; } if (m == 4) { text5 = "D6_DolkiE"; } if (m == 5) { text5 = "D6_DolkiF"; } if (QuestLog.GetQuestState(text5) != questState5 && QuestLog.GetQuestState(text5) != QuestState.WaitingForExileIsland && QuestLog.GetQuestState(text5) != QuestState.ExileIsland && QuestLog.GetQuestState(text5) != QuestState.PerpIsDead) { flag5 = false; break; } } return flag5; } if (questName.Contains("StonebridgeBanditA")) { bool flag6 = true; Library.Characters pcrowFromName6 = Links.x.library.GetPCRowFromName(characterName); QuestState questState6 = this.StringToQuestState(pcrowFromName6._SetQuestStateOnDeath); for (int n = 0; n < 2; n++) { string text6 = "StonebridgeBanditA"; if (n == 1) { text6 = "StonebridgeBanditB"; } QuestState questState7 = QuestLog.GetQuestState(text6); if (!this.InQuestStateTurnIn(questState7, questState6)) { flag6 = false; break; } } return flag6; } return true; } // Token: 0x06000C71 RID: 3185 RVA: 0x000F2B5F File Offset: 0x000F0D5F private bool InQuestStateTurnIn(QuestState q, QuestState deathState) { return q == deathState || q == QuestState.WaitingForExileIsland || q == QuestState.ExileIsland || q == QuestState.PerpIsDead; } // Token: 0x06000C72 RID: 3186 RVA: 0x000F2B80 File Offset: 0x000F0D80 public void AddQuestToTimer(string questName, float howLong, string changeFrom, string changeTo, bool constant) { if (Records.x.editor) { Debug.Log(string.Concat(new string[] { "Adding quest timer: ", questName, " for ", howLong.ToString(), " hours, change from ", changeFrom, " to ", changeTo, ", is constant? ", constant.ToString() })); } int num = this.changeQuestName.IndexOf(questName); if (num == -1) { this.changeQuestName.Add(questName); if (!constant) { float num2 = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); num2 += howLong; this.changeAtHour.Add(num2); } else { float num3 = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); num3 += howLong; this.changeAtHour.Add(num3 * -1f); } this.changeToState.Add(changeTo); this.changeFromState.Add(changeFrom); return; } if (!constant) { float num4 = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); num4 += howLong; this.changeAtHour[num] = num4; } else { float num5 = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); num5 += howLong; this.changeAtHour[num] = num5 * -1f; } this.changeToState[num] = changeTo; this.changeFromState[num] = changeFrom; } // Token: 0x06000C73 RID: 3187 RVA: 0x000F2CFC File Offset: 0x000F0EFC private void ClearTimer(int i) { this.changeAtHour[i] = 0f; this.changeQuestName[i] = ""; this.changeToState[i] = ""; this.changeFromState[i] = ""; } // Token: 0x06000C74 RID: 3188 RVA: 0x000F2D4D File Offset: 0x000F0F4D private void UpdateSaveFileHealth(string mapName, string creatureName, int amt, bool missing) { this.UpdateSaveFileHealth(mapName + "_" + creatureName, amt, missing); } // Token: 0x06000C75 RID: 3189 RVA: 0x000F2D64 File Offset: 0x000F0F64 private void UpdateSaveFileHealth(string full, int amt, bool missing) { string text = "AutoSave/Creature_" + full + ".es3"; Debug.Log(text + " " + ES3.FileExists(text).ToString()); if (ES3.FileExists(text)) { this.saveFileTemporary = new ES3File(text); if (missing) { this.states = this.saveFileTemporary.Load>("States"); this.states[0] = "Gone"; this.saveFileTemporary.Save>("States", this.states); } this.health = this.saveFileTemporary.Load>("Health"); this.health[0] = amt; this.saveFileTemporary.Save>("Health", this.health); this.saveFileTemporary.Sync(); return; } Debug.Log("filename not found to update health from quest timer " + full); } // Token: 0x06000C76 RID: 3190 RVA: 0x000F2E4C File Offset: 0x000F104C private bool OutOfSight(Character character) { if (Links.x.rtsCamera.currentBoundsName == "") { if (character && Links.x.fogOfWar.IsVisible(character.tr.position)) { return false; } } else if (character && Links.x.fogOfWarInterior.IsVisible(character.tr.position)) { return false; } return true; } // Token: 0x06000C77 RID: 3191 RVA: 0x000F2EC4 File Offset: 0x000F10C4 public void CheckConstantlyForQuestTimers() { float num = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); string sceneName = Links.x.diorama.sceneName; for (int i = 0; i < this.changeQuestName.Count; i++) { bool flag = false; if (this.changeAtHour[i] < 0f) { string text = this.changeQuestName[i]; QuestState questState = QuestLog.GetQuestState(text); if (questState == this.StringToQuestState(this.changeFromState[i]) || this.changeFromState[i] == "" || this.changeFromState[i] == "any") { if (this.testQuests && this.editor) { Debug.Log(string.Concat(new string[] { "Checking ", text, " ", this.changeFromState[i], " ", this.changeToState[i] })); } if (text == "C6_WitchMessage") { Character character = null; if (sceneName.Contains("C6_FortenLazure")) { character = Links.x.diorama.FindCharacterAnyState("LazureForfeitsChild"); } if (character) { if (QuestLog.GetQuestState("C6_WitchTask") == QuestState.Unassigned) { if (this.changeFromState[i] == "unassigned") { this.changeFromState[i] = "active"; QuestLog.SetQuestState(text, QuestState.Active); } if (!character.gameObject.GetComponent()) { character.gameObject.AddComponent().TalkToWitch(character, (Vector3)character.creatures.GetWalkNodeIndex(0).position); } } if (questState == QuestState.Success) { flag = true; } } } if (text == "C5_CaravanLeaderWalk") { Character character2 = null; if (sceneName.Contains("C5_AbandonedFarm")) { character2 = Links.x.diorama.FindCharacterAnyState("DuraCampLeader"); } if (character2) { if (this.changeFromState[i] == "unassigned" && QuestLog.GetQuestState("C5_CaravanLeaderWalk") == QuestState.Unassigned) { this.changeFromState[i] = "active"; QuestLog.SetQuestState(text, QuestState.Active); if (!character2.gameObject.GetComponent()) { character2.gameObject.AddComponent().TalkToPartyPaduriiChildQuest(character2, (Vector3)character2.creatures.GetWalkNodeIndex(0).position); } } if (questState == QuestState.Success) { flag = true; } } } if (text == "F5_BanquetFriend") { Character character3 = null; if (sceneName.Contains("F4_BanquetIsle")) { if (this.changeFromState[i] == "unassigned" || this.changeFromState[i] == "active") { character3 = Links.x.diorama.FindCharacterAnyState("BanquetIsleFriend"); } else { character3 = Links.x.GetCreationID(1); } } if (character3) { if (character3.dead || character3.stunned) { flag = true; } else if (this.changeFromState[i] == "unassigned" || this.changeFromState[i] == "active") { if (QuestLog.GetQuestState("F5_BanquetFriend") == QuestState.Unassigned || QuestLog.GetQuestState("F5_BanquetFriend") == QuestState.Active) { if (this.changeFromState[i] == "unassigned") { this.changeFromState[i] = "active"; QuestLog.SetQuestState(text, QuestState.Active); } if (!character3.gameObject.GetComponent()) { character3.gameObject.AddComponent().BanquetIsleFriend(character3, (Vector3)character3.creatures.GetWalkNodeIndex(0).position); } } if (questState == QuestState.Success) { flag = true; } } else { if (this.changeFromState[i] == "success" && QuestLog.GetQuestState("F5_BanquetFriend") == QuestState.Success && !character3.gameObject.GetComponent()) { character3.gameObject.AddComponent().BanquetIsleFriendLeave(character3, character3.tr.position); } if (questState == QuestState.Complete) { flag = true; } } } } if (text == "F5_BanquetPriest") { Character character4 = null; if (sceneName.Contains("F4")) { character4 = Links.x.diorama.FindCharacterAnyState("LachoPriestStart"); } if (character4) { if ((this.changeFromState[i] == "unassigned" || this.changeFromState[i] == "active") && (QuestLog.GetQuestState("F5_BanquetPriest") == QuestState.Unassigned || QuestLog.GetQuestState("F5_BanquetPriest") == QuestState.Active)) { if (this.changeFromState[i] == "unassigned") { this.changeFromState[i] = "active"; QuestLog.SetQuestState(text, QuestState.Active); } if (!character4.gameObject.GetComponent()) { character4.gameObject.AddComponent().BanquetIslePriest(character4, (Vector3)character4.creatures.GetWalkNodeIndex(0).position); } } if (questState == QuestState.Success) { flag = true; } } } if (text == "C6_GobletGuildA") { Character character5 = null; if (sceneName.Contains("C6")) { character5 = Links.x.diorama.FindCharacterAnyState("LazureGobletGuildUndergroundA"); } if (character5) { bool flag2 = false; bool flag3 = false; if (character5) { if (character5.creatures.CheckDeactivation() || num >= -1f * this.changeAtHour[i]) { flag2 = true; } if (character5.dead) { flag3 = true; } } else { flag3 = true; } if (flag2) { flag = true; } if (flag3) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (this.OutOfSight(character5)) { if (character5) { character5.Missing(); } } else { flag = false; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; this.UpdateSaveFileHealth("C6_Tomb_LazureGobletGuildUndergroundA", 0, true); } } if (text == "C6_Dan") { Character character6 = null; if (sceneName.Contains("C6")) { character6 = Links.x.diorama.FindCharacterAnyState("LazureGuardAmputee"); } if (character6) { bool flag4 = false; bool flag5 = false; if (character6) { if (character6.creatures.CheckDeactivation() || (num >= -1f * this.changeAtHour[i] && !character6.stunned && !character6.deactivating)) { flag4 = true; } if (character6.dead) { flag5 = true; } } else { flag5 = true; } if (flag4) { flag = true; } if (flag5) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (this.OutOfSight(character6)) { if (character6) { character6.Missing(); } } else { flag = false; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; this.UpdateSaveFileHealth("LazureGuardAmputee", 0, true); } } if (text == "D5_RainAcolyte") { Character character7 = null; if (sceneName.Contains("D5")) { character7 = Links.x.diorama.FindCharacterAnyState("SoulBoundRainAcolyte"); } if (character7) { bool flag6 = false; bool flag7 = false; if (character7) { if (character7.creatures.CheckDeactivation() || (num >= -1f * this.changeAtHour[i] && !character7.stunned && !character7.deactivating)) { flag6 = true; } if (character7.dead) { flag7 = true; } } else { flag7 = true; } if (flag6) { flag = true; } if (flag7) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (this.OutOfSight(character7)) { if (character7) { character7.Missing(); } } else { flag = false; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; this.UpdateSaveFileHealth("SoulBoundRainAcolyte", 0, true); } } if (text == "D6_Licech") { Character character8 = null; if (sceneName.Contains("D6")) { character8 = Links.x.diorama.FindCharacterAnyState("RozafirStoreKeep"); } if (character8) { bool flag8 = false; bool flag9 = false; if (character8) { if (character8.creatures.CheckDeactivation() || (num >= -1f * this.changeAtHour[i] && !character8.stunned && !character8.deactivating)) { flag8 = true; } if (character8.dead) { flag9 = true; } } else { flag9 = true; } if (flag8) { flag = true; } if (flag9) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (this.OutOfSight(character8)) { if (character8) { character8.Missing(); } } else { flag = false; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; this.UpdateSaveFileHealth("RozafirStoreKeep", 0, true); } } if (text == "D5_RainAcolyte_C5" && this.changeFromState[i] == "active") { Character character9 = null; bool flag10 = false; if (sceneName.Contains("C5")) { character9 = Links.x.diorama.FindCharacterAnyState("SoulBoundRainAcolyte"); } Debug.Log(character9); if (character9) { bool flag11 = false; bool flag12 = false; if (character9) { if (character9.creatures.CheckDeactivation() || (num >= -1f * this.changeAtHour[i] && !character9.stunned && !character9.deactivating)) { flag11 = true; } if (character9.dead) { flag12 = true; } } else { flag12 = true; } if (flag11) { flag = true; flag10 = true; } if (flag12) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (this.OutOfSight(character9)) { if (character9) { character9.Missing(); flag10 = true; } } else { flag = false; flag10 = true; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; flag10 = true; this.UpdateSaveFileHealth("SoulBoundRainAcolyte", 0, true); } if (flag10) { Debug.Log("Start rain acolyte second area"); this.AddQuestToTimer("D5_RainAcolyte_C5", 300f, "activePart2", "activePart3", false); return; } } if (text == "D6_NewStoreKeep") { Character character10 = null; if (sceneName.Contains("D6")) { character10 = Links.x.diorama.FindCharacterAnyState("RozafirNewStorekeep"); } if (character10) { string text2 = "Day"; if (!character10.creatures.isDay) { text2 = "Night"; } if (character10.creatures.NearWalkNode(text2, character10, 25f, false)) { flag = true; } if (character10.dead) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } } else if (num >= -1f * this.changeAtHour[i]) { flag = true; } } if (text == "D6_LicechGuardsLeave") { Character character11 = null; Character character12 = null; if (sceneName.Contains("D6")) { character11 = Links.x.diorama.FindCharacterAnyState("RozafirStoreGuardA"); character12 = Links.x.diorama.FindCharacterAnyState("RozafirStoreGuardB"); } if (character11 || character12) { bool flag13 = false; bool flag14 = false; bool flag15 = false; bool flag16 = false; if (character11) { if (character11.creatures.CheckDeactivation() || num >= -1f * this.changeAtHour[i]) { flag13 = true; } if (character11.dead) { flag15 = true; } } else { flag15 = true; } if (character12) { if (character12.creatures.CheckDeactivation() || num >= -1f * this.changeAtHour[i]) { flag14 = true; } if (character12.dead) { flag16 = true; } } else { flag16 = true; } if (flag13 && flag14) { flag = true; } if (flag13 && flag16) { flag = true; } if (flag14 && flag15) { flag = true; } if (flag15 && flag16) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (this.OutOfSight(character11) && this.OutOfSight(character12)) { if (character11) { character11.Missing(); } if (character12) { character12.Missing(); } } else { flag = false; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; this.UpdateSaveFileHealth("D6_Rozafir_RozafirStoreGuardA", 0, true); this.UpdateSaveFileHealth("D6_Rozafir_RozafirStoreGuardB", 0, true); } } if (text.Contains("D6_Dolki")) { Character character13 = null; string text3 = "RozafirDolkiA"; if (text.Contains("DolkiB")) { text3 = "RozafirDolkiB"; } if (text.Contains("DolkiC")) { text3 = "RozafirDolkiC"; } if (text.Contains("DolkiD")) { text3 = "RozafirDolkiD"; } if (text.Contains("DolkiE")) { text3 = "RozafirDolkiE"; } if (text.Contains("DolkiF")) { text3 = "RozafirDolkiF"; } if (sceneName.Contains("D6") || sceneName.Contains("D5")) { character13 = Links.x.diorama.FindCharacterAnyState(text3); } if (character13) { bool flag17 = false; bool flag18 = false; if (character13) { if (this.changeToState[i] == "activePart3") { if (character13.creatures.CheckDeactivation() || num >= -1f * this.changeAtHour[i]) { flag17 = true; } if (character13.leashed && !character13.dead) { character13.leashed = false; } if (!character13.body.sneaking && !character13.dead) { character13.body.Sneaking(true); } } else { string text4 = "Day"; if (!character13.creatures.isDay) { text4 = "Night"; } if (character13.creatures.NearWalkNode(text4, character13, 25f, false)) { flag17 = true; } } if (character13.dead) { flag18 = true; } } else { flag18 = true; } if (flag17) { flag = true; } if (flag18) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (character13) { character13.Missing(); } if (this.changeToState[i] == "activePart3") { QuestLog.SetQuestState(text, QuestState.ActivePart3); this.AddQuestToTimer(text, 1f, "activePart3", "activePart4", true); flag = false; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; this.UpdateSaveFileHealth("D6_Rozafir_" + text3, 0, true); } } if (text == "D6_RenazinInformant") { Character character14 = null; if (sceneName.Contains("D6")) { character14 = Links.x.diorama.FindCharacterAnyState("RenazinInformantFarmer"); } if (character14) { bool flag19 = false; bool flag20 = false; if (character14) { if (character14.creatures.CheckDeactivation() || num >= -1f * this.changeAtHour[i]) { flag19 = true; } if (character14.dead) { flag20 = true; } } else { flag20 = true; } if (flag19) { flag = true; } if (flag20) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (this.OutOfSight(character14)) { if (character14) { character14.Missing(); } } else { flag = false; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; this.UpdateSaveFileHealth("D6_Rozafir_RenazinInformantFarmer", 0, true); } } bool flag21 = false; string text5 = ""; string text6 = ""; string text7 = ""; if (text == "D6_FarmerToGuard") { flag21 = true; text5 = "D6"; text6 = "RozafirFarmerI"; text7 = "D6_Rozafir_RozafirFarmerI"; } if (flag21) { Character character15 = null; if (sceneName.Contains(text5)) { character15 = Links.x.diorama.FindCharacterAnyState(text6); } if (character15) { bool flag22 = false; bool flag23 = false; if (character15) { if (character15.creatures.CheckDeactivation() || num >= -1f * this.changeAtHour[i]) { flag22 = true; } if (character15.dead) { flag23 = true; } } else { flag23 = true; } if (flag22) { flag = true; } if (flag23) { this.ClearTimer(i); flag = false; this.needToRemoveQuestItems = true; } if (flag) { if (this.OutOfSight(character15)) { if (character15) { character15.Missing(); } } else { flag = false; } } } if (num >= -1f * this.changeAtHour[i]) { flag = true; this.UpdateSaveFileHealth(text7, 0, true); } } if (flag) { QuestLog.SetQuestState(text, this.StringToQuestState(this.changeToState[i])); Debug.Log(string.Concat(new string[] { "Setting quest state from timer: ", text, " from ", questState.ToString(), " to ", QuestLog.GetQuestState(text).ToString() })); this.ClearTimer(i); this.needToRemoveQuestItems = true; } } else { this.ClearTimer(i); this.needToRemoveQuestItems = true; } } } if (this.needToRemoveQuestItems) { Links.x.diorama.CheckQuestActivations(); this.changeAtHour.RemoveAll((float item) => item == 0f); this.changeQuestName.RemoveAll((string item) => item == ""); this.changeToState.RemoveAll((string item) => item == ""); this.changeFromState.RemoveAll((string item) => item == ""); this.needToRemoveQuestItems = false; } this.constantQuestCheckTimer = Time.timeSinceLevelLoad + 0.5f; } // Token: 0x06000C78 RID: 3192 RVA: 0x000F4130 File Offset: 0x000F2330 public void CheckHourForQuestTimers() { float num = Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); for (int i = 0; i < this.changeQuestName.Count; i++) { if (this.testQuests && this.editor) { Debug.Log(string.Concat(new string[] { this.changeQuestName[i], " ", num.ToString(), " ", this.changeAtHour[i].ToString() })); } if (num >= this.changeAtHour[i] && this.changeAtHour[i] > 0f) { this.needToRemoveQuestItems = true; bool flag = true; string text = this.changeQuestName[i]; if (QuestLog.GetQuestState(text) == this.StringToQuestState(this.changeFromState[i]) || this.changeFromState[i] == "" || this.changeFromState[i] == "any") { QuestLog.SetQuestState(text, this.StringToQuestState(this.changeToState[i])); if (Records.x.editor) { Debug.Log(string.Concat(new string[] { "Setting quest state from timer: ", text, " to ", QuestLog.GetQuestState(text).ToString(), " ", this.changeAtHour[i].ToString(), " ", num.ToString() })); } if (text.Contains("D6_Dolki")) { this.AddQuestToTimer(text, 2f, "activePart2", "activePart3", true); flag = false; } if (text.Contains("D6_CropGoblinCamp")) { Character character = Links.x.diorama.FindCharacterAnyState("RozafirFarmerH"); if (character) { character.Leave(true); } } if (text.Contains("D6_FarmerToGuard")) { this.AddQuestToTimer(text, 1f, "success", "complete", true); flag = false; } if (text == "D6_NewStoreKeep") { this.AddQuestToTimer(text, 1f, "active", "complete", true); flag = false; } if (text == "D6_LicechGuardsLeave") { this.AddQuestToTimer(text, 1f, "active", "complete", true); flag = false; } if (text == "D6_RenazinInformant") { this.AddQuestToTimer(text, 1f, "activePart2", "activePart3", true); flag = false; } } else { Debug.Log("Quest timer for " + text + " hit but state is no longer applicable"); } if (flag) { this.ClearTimer(i); } } } if (this.needToRemoveQuestItems) { this.changeAtHour.RemoveAll((float item) => item == 0f); this.changeQuestName.RemoveAll((string item) => item == ""); this.changeToState.RemoveAll((string item) => item == ""); this.changeFromState.RemoveAll((string item) => item == ""); this.needToRemoveQuestItems = false; } } // Token: 0x06000C79 RID: 3193 RVA: 0x000F44D0 File Offset: 0x000F26D0 public bool HasQuestTimer(string questName, string fromName) { for (int i = 0; i < this.changeQuestName.Count; i++) { if (this.changeQuestName[i] == questName && this.changeFromState[i] == fromName) { return true; } } return false; } // Token: 0x06000C7A RID: 3194 RVA: 0x000F4520 File Offset: 0x000F2720 public void RemoveQuestTimer(string questName) { for (int i = 0; i < this.changeQuestName.Count; i++) { if (this.changeQuestName[i] == questName) { this.ClearTimer(i); } } this.needToRemoveQuestItems = true; } // Token: 0x06000C7B RID: 3195 RVA: 0x000F4568 File Offset: 0x000F2768 public string GetRandomMerchantQuip(string type) { string text = ""; if (type == "Expensive") { int num = Random.Range(0, 5); if (num == 0) { text = "Come back when you have more to spend."; } if (num == 1) { text = "You'll need a few more emeralds for that one."; } if (num == 2) { text = "That'll cost more than your purse holds."; } if (num == 3) { text = "Maybe next time, friend. I'd be throwing you in the debtor cells for that one."; } if (num == 4) { text = "Your eyes are larger than your gem purse."; } } if (type == "Purchased") { int num2 = Random.Range(0, 5); if (num2 == 0) { text = "Thank you."; } if (num2 == 1) { text = "Always a pleasure to sell to one of the guard."; } if (num2 == 2) { text = "A fine purchase, you won't regret the emeralds spent."; } if (num2 == 3) { text = "Your business is always welcome here."; } if (num2 == 4) { text = "It's a joy to sell to a patron with such a keen eye."; } } if (type == "Stolen") { int num3 = Random.Range(0, 2); if (num3 == 0) { text = "Thief!"; } if (num3 == 1) { text = "Filching fingers, I'll cut them off!"; } } return text; } // Token: 0x06000C7C RID: 3196 RVA: 0x000F462A File Offset: 0x000F282A public void SetShout(string s, float t) { this.recentShout = s; this.lastShoutTime = t; } // Token: 0x06000C7D RID: 3197 RVA: 0x000F463A File Offset: 0x000F283A public float GetSkillWeight(int skillNumber) { return this.skillWeights[skillNumber]; } // Token: 0x06000C7E RID: 3198 RVA: 0x000F4644 File Offset: 0x000F2844 public int GetRollMean(int d, int ds) { float num = 0f; if (d == 1) { num = Mathf.Ceil((float)d * (float)ds / 2f); } if (d == 2) { if (ds == 2) { num = 3f; } if (ds == 3) { num = 4f; } if (ds == 4) { num = 5f; } if (ds == 5) { num = 6f; } if (ds == 6) { num = 7f; } if (ds == 7) { num = 8f; } if (ds == 8) { num = 9f; } if (ds == 9) { num = 10f; } if (ds == 10) { num = 11f; } if (ds == 11) { num = 12f; } if (ds == 12) { num = 13f; } if (ds == 13) { num = 14f; } if (ds == 14) { num = 15f; } if (ds == 15) { num = 16f; } } if (d == 3) { if (ds == 2) { num = 4.5f; } if (ds == 3) { num = 6f; } if (ds == 4) { num = 7.5f; } if (ds == 5) { num = 9f; } if (ds == 6) { num = 10.5f; } if (ds == 7) { num = 12f; } if (ds == 8) { num = 13.5f; } if (ds == 9) { num = 15f; } if (ds == 10) { num = 16.5f; } if (ds == 11) { num = 18f; } if (ds == 12) { num = 19.5f; } if (ds == 13) { num = 21f; } if (ds == 14) { num = 22.5f; } if (ds == 15) { num = 24f; } } if (d == 4) { if (ds == 1) { num = 4f; } if (ds == 2) { num = 6f; } if (ds == 3) { num = 8f; } if (ds == 4) { num = 10f; } if (ds == 5) { num = 12f; } if (ds == 6) { num = 14f; } if (ds == 7) { num = 16f; } if (ds == 8) { num = 18f; } if (ds == 9) { num = 20f; } if (ds == 10) { num = 22f; } if (ds == 11) { num = 24f; } if (ds == 12) { num = 26f; } if (ds == 13) { num = 28f; } if (ds == 14) { num = 30f; } if (ds == 15) { num = 32f; } } if (d == 5) { if (ds == 1) { num = 5f; } if (ds == 2) { num = 7.5f; } if (ds == 3) { num = 10f; } if (ds == 4) { num = 12.5f; } if (ds == 5) { num = 15f; } if (ds == 6) { num = 17.5f; } if (ds == 7) { num = 20f; } if (ds == 8) { num = 22.5f; } if (ds == 9) { num = 25f; } if (ds == 10) { num = 27.5f; } if (ds == 11) { num = 30f; } if (ds == 12) { num = 32.5f; } if (ds == 13) { num = 35f; } if (ds == 14) { num = 37.5f; } if (ds == 15) { num = 40f; } } if (d == 6) { if (ds == 1) { num = 6f; } if (ds == 2) { num = 9f; } if (ds == 3) { num = 12f; } if (ds == 4) { num = 15f; } if (ds == 5) { num = 18f; } if (ds == 6) { num = 21f; } if (ds == 7) { num = 24f; } if (ds == 8) { num = 27f; } if (ds == 9) { num = 30f; } if (ds == 10) { num = 33f; } if (ds == 11) { num = 36f; } if (ds == 12) { num = 39f; } if (ds == 13) { num = 42f; } if (ds == 14) { num = 45f; } if (ds == 15) { num = 48f; } } if (d == 7) { if (ds == 1) { num = 7f; } if (ds == 2) { num = 10.5f; } if (ds == 3) { num = 14f; } if (ds == 4) { num = 17.5f; } if (ds == 5) { num = 21f; } if (ds == 6) { num = 24.5f; } if (ds == 7) { num = 28f; } if (ds == 8) { num = 31.5f; } if (ds == 9) { num = 35f; } if (ds == 10) { num = 38.5f; } if (ds == 11) { num = 42f; } if (ds == 12) { num = 45.5f; } if (ds == 13) { num = 49f; } if (ds == 14) { num = 52.5f; } if (ds == 15) { num = 56f; } } if (d == 8) { if (ds == 1) { num = 8f; } if (ds == 2) { num = 12f; } if (ds == 3) { num = 16f; } if (ds == 4) { num = 20f; } if (ds == 5) { num = 24f; } if (ds == 6) { num = 28f; } if (ds == 7) { num = 32f; } if (ds == 8) { num = 36f; } if (ds == 9) { num = 40f; } if (ds == 10) { num = 44f; } if (ds == 11) { num = 48f; } if (ds == 12) { num = 52f; } if (ds == 13) { num = 56f; } if (ds == 14) { num = 60f; } if (ds == 15) { num = 64f; } } if (d == 9) { if (ds == 1) { num = 9f; } if (ds == 2) { num = 13.5f; } if (ds == 3) { num = 18f; } if (ds == 4) { num = 22.5f; } if (ds == 5) { num = 27f; } if (ds == 6) { num = 31.5f; } if (ds == 7) { num = 36f; } if (ds == 8) { num = 40.5f; } if (ds == 9) { num = 45f; } if (ds == 10) { num = 49.5f; } if (ds == 11) { num = 54f; } if (ds == 12) { num = 58.5f; } if (ds == 13) { num = 63f; } if (ds == 14) { num = 67.5f; } if (ds == 15) { num = 72f; } } if (d == 10) { if (ds == 1) { num = 10f; } if (ds == 2) { num = 15f; } if (ds == 3) { num = 20f; } if (ds == 4) { num = 25f; } if (ds == 5) { num = 30f; } if (ds == 6) { num = 35f; } if (ds == 7) { num = 40f; } if (ds == 8) { num = 45f; } if (ds == 9) { num = 50f; } if (ds == 10) { num = 55f; } if (ds == 11) { num = 60f; } if (ds == 12) { num = 65f; } if (ds == 13) { num = 70f; } if (ds == 14) { num = 75f; } if (ds == 15) { num = 80f; } } if (d == 11) { if (ds == 1) { num = 11f; } if (ds == 2) { num = 16.5f; } if (ds == 3) { num = 22f; } if (ds == 4) { num = 27.5f; } if (ds == 5) { num = 33f; } if (ds == 6) { num = 38.5f; } if (ds == 7) { num = 44f; } if (ds == 8) { num = 49.5f; } if (ds == 9) { num = 55f; } if (ds == 10) { num = 60.5f; } if (ds == 11) { num = 66f; } if (ds == 12) { num = 71.5f; } if (ds == 13) { num = 77f; } if (ds == 14) { num = 82.5f; } if (ds == 15) { num = 88f; } } if (d == 12) { if (ds == 1) { num = 12f; } if (ds == 2) { num = 18f; } if (ds == 3) { num = 24f; } if (ds == 4) { num = 30f; } if (ds == 5) { num = 36f; } if (ds == 6) { num = 42f; } if (ds == 7) { num = 48f; } if (ds == 8) { num = 54f; } if (ds == 9) { num = 60f; } if (ds == 10) { num = 66f; } if (ds == 11) { num = 72f; } if (ds == 12) { num = 78f; } if (ds == 13) { num = 84f; } if (ds == 14) { num = 90f; } if (ds == 15) { num = 96f; } } if (d == 13) { if (ds == 1) { num = 13f; } if (ds == 2) { num = 19.5f; } if (ds == 3) { num = 26f; } if (ds == 4) { num = 32.5f; } if (ds == 5) { num = 39f; } if (ds == 6) { num = 45.5f; } if (ds == 7) { num = 52f; } if (ds == 8) { num = 58.5f; } if (ds == 9) { num = 65f; } if (ds == 10) { num = 71.5f; } if (ds == 11) { num = 78f; } if (ds == 12) { num = 84.5f; } if (ds == 13) { num = 91f; } if (ds == 14) { num = 97.5f; } if (ds == 15) { num = 104f; } } if (d == 14) { if (ds == 1) { num = 14f; } if (ds == 2) { num = 21f; } if (ds == 3) { num = 28f; } if (ds == 4) { num = 35f; } if (ds == 5) { num = 42f; } if (ds == 6) { num = 49f; } if (ds == 7) { num = 56f; } if (ds == 8) { num = 63f; } if (ds == 9) { num = 70f; } if (ds == 10) { num = 77f; } if (ds == 11) { num = 84f; } if (ds == 12) { num = 91f; } if (ds == 13) { num = 98f; } if (ds == 14) { num = 105f; } if (ds == 15) { num = 112f; } } if (d == 15) { if (ds == 1) { num = 15f; } if (ds == 2) { num = 22.5f; } if (ds == 3) { num = 30f; } if (ds == 4) { num = 37.5f; } if (ds == 5) { num = 45f; } if (ds == 6) { num = 52.5f; } if (ds == 7) { num = 60f; } if (ds == 8) { num = 67.5f; } if (ds == 9) { num = 75f; } if (ds == 10) { num = 82.5f; } if (ds == 11) { num = 90f; } if (ds == 12) { num = 97.5f; } if (ds == 13) { num = 105f; } if (ds == 14) { num = 112.5f; } if (ds == 15) { num = 120f; } } if (d > 15) { num = (float)(d + d * ds) / 2f; } if (num == 0f && ds <= 1) { num = (float)d; } if (num == 0f && Records.x.editor) { Debug.LogError("No Roll Found!! " + d.ToString() + "d" + ds.ToString()); } return (int)Mathf.Ceil(num); } // Token: 0x06000C7F RID: 3199 RVA: 0x000F4FB5 File Offset: 0x000F31B5 public float SongSkillMultiplier(float x) { return Mathf.Round(x / 20f * 10f) / 10f; } // Token: 0x06000C80 RID: 3200 RVA: 0x000F4FD0 File Offset: 0x000F31D0 public int GetElixirComponentID(string n) { int num = -1; if (n.Contains("Nap")) { num = Links.x.library.GetInvRowID("Mushroom"); } if (num == -1 && (n.Contains("Fire") || n.Contains("Spark"))) { num = Links.x.library.GetInvRowID("ShinyRock"); } if (num == -1 && n.Contains("Water")) { num = Links.x.library.GetInvRowID("Shell"); } if (num == -1 && n.Contains("Trip")) { num = Links.x.library.GetInvRowID("Acorn"); } if (num == -1 && n.Contains("Poison")) { num = Links.x.library.GetInvRowID("Frog"); } return num; } // Token: 0x06000C81 RID: 3201 RVA: 0x000F50A8 File Offset: 0x000F32A8 public QuestState StringToQuestState(string txtState) { QuestState questState = QuestState.Unassigned; if (txtState == "unassigned") { questState = QuestState.Unassigned; } if (txtState == "active") { questState = QuestState.Active; } if (txtState == "success") { questState = QuestState.Success; } if (txtState == "failure") { questState = QuestState.Failure; } if (txtState == "discussed") { questState = QuestState.Discussed; } if (txtState == "abandoned") { questState = QuestState.Abandoned; } if (txtState == "returnToNPC") { questState = QuestState.ReturnToNPC; } if (txtState == "activePart2") { questState = QuestState.ActivePart2; } if (txtState == "waitingForExileIsland") { questState = QuestState.WaitingForExileIsland; } if (txtState == "exileIsland") { questState = QuestState.ExileIsland; } if (txtState == "perpIsDead") { questState = QuestState.PerpIsDead; } if (txtState == "complete") { questState = QuestState.Complete; } if (txtState == "activePart3") { questState = QuestState.ActivePart3; } if (txtState == "activePart4") { questState = QuestState.ActivePart4; } if (txtState == "activePart5") { questState = QuestState.ActivePart5; } if (txtState == "activePart6") { questState = QuestState.ActivePart6; } return questState; } // Token: 0x06000C82 RID: 3202 RVA: 0x000F51D4 File Offset: 0x000F33D4 public bool FindDemoFiles() { string fullName = Directory.GetParent(Directory.GetParent(Directory.GetParent(Directory.GetParent(Application.persistentDataPath).FullName).FullName).FullName).FullName; string text = fullName + "/Library/Application Support/Hannah and Joseph Games/Banquet for Fools Demo"; if (this.windows) { text = fullName + "\\AppData\\LocalLow\\Hannah and Joseph Games\\Banquet for Fools Demo"; } string text2 = text + "/CheckpointSave"; string text3 = text + "/Version.es3"; string text4 = "/VinePrison.png"; string text5 = "/Entangle.png"; string text6 = "/PukeSpores.png"; string text7 = "/AttractionSpores.png"; string text8 = "/FrogTrap.png"; string text9 = "/CorpseNest.png"; string text10 = "/CheckpointSave.png"; if (this.windows) { text2 = text + "\\CheckpointSave"; text3 = text2 + "\\Version.es3"; text4 = "\\VinePrison.png"; text5 = "\\Entangle.png"; text6 = "\\PukeSpores.png"; text7 = "\\AttractionSpores.png"; text8 = "\\FrogTrap.png"; text9 = "\\CorpseNest.png"; text10 = "\\CheckpointSave.png"; } bool flag = false; if (Directory.Exists(text2)) { Debug.Log("Found checkpoint save " + text + " " + text2); flag = true; } if (flag) { string persistentDataPath = Application.persistentDataPath; string text11 = persistentDataPath + "/CheckpointSave"; if (Directory.Exists(text2)) { if (Directory.Exists(text11)) { string[] array = Directory.GetFiles(text11); for (int i = 0; i < array.Length; i++) { File.Delete(array[i]); } } else { Directory.CreateDirectory(text11); } if (Directory.Exists(text2)) { foreach (string text12 in Directory.GetFiles(text2)) { string fileName = Path.GetFileName(text12); string text13 = Path.Combine(text11, fileName); File.Copy(text12, text13); } } } else { Debug.Log("this save does not exist!"); } for (int j = 0; j < 7; j++) { string text14 = text4; if (j == 1) { text14 = text5; } if (j == 2) { text14 = text6; } if (j == 3) { text14 = text7; } if (j == 4) { text14 = text8; } if (j == 5) { text14 = text9; } if (j == 6) { text14 = text10; } string text15 = persistentDataPath + text14; string text16 = text + text14; if (File.Exists(text16)) { Debug.Log("Found " + text16 + " " + text15); string fileName2 = Path.GetFileName(text16); string text17 = Path.Combine(persistentDataPath, fileName2); if (!File.Exists(text15)) { File.Copy(text16, text17); } else { File.Delete(text15); File.Copy(text16, text17); } } } ES3File es3File = new ES3File(text3); if (es3File.KeyExists("CheckpointSave")) { string text18 = es3File.Load("CheckpointSave"); string text19 = es3File.Load("CheckpointSaveTime"); ES3File es3File2 = new ES3File("Version.es3"); if (!es3File2.KeyExists("CheckpointSave")) { es3File2.Save("CheckpointSave", text18); es3File2.Save("CheckpointSaveTime", text19); es3File2.Sync(); } } else { ES3File es3File3 = new ES3File("Version.es3"); if (!es3File3.KeyExists("CheckpointSave")) { es3File3.Save("CheckpointSave", "Checkpoint Save"); es3File3.Save("CheckpointSaveTime", ""); es3File3.Sync(); } } Links.x.saveLoad.UpdateSave("CheckpointSave"); } return flag; } // Token: 0x06000C83 RID: 3203 RVA: 0x000F5520 File Offset: 0x000F3720 public bool FindSerpentFiles() { string fullName = Directory.GetParent(Directory.GetParent(Directory.GetParent(Directory.GetParent(Application.persistentDataPath).FullName).FullName).FullName).FullName; string text = fullName + "/Library/Application Support/Whalenought Studios/Serpent in the Staglands"; if (this.windows) { text = fullName + "\\AppData\\LocalLow\\Whalenought Studios\\Serpent in the Staglands"; } string text2 = text + "/_Auto_Save"; string text3 = text2 + "/Game.txt"; string text4 = text + "/_Final_Save"; string text5 = text4 + "/Game.txt"; string text6 = text2 + "/Party"; string text7 = text2 + "/Party"; if (this.windows) { text2 = text + "\\_Auto_Save"; text3 = text2 + "\\Game.txt"; text4 = text + "\\_Final_Save"; text5 = text4 + "\\Game.txt"; text6 = text2 + "\\Party"; text7 = text4 + "\\Party"; } string text8 = ""; string text9 = ""; bool flag = false; if (Directory.Exists(text4)) { Debug.Log("Using final save"); flag = true; text8 = text5; text9 = text7; } else if (Directory.Exists(text2)) { Debug.Log("Using auto save"); flag = true; text8 = text3; text9 = text6; } if (flag) { byte[] array = ES3.LoadRawBytes(text8); string @string = Encoding.UTF8.GetString(array); new string[0]; char c = '~'; string[] array2 = @string.Split(c, StringSplitOptions.None); int num = 0; string text10 = ""; foreach (string text11 in array2) { if (text11.Contains("wolf") && text10.Contains("Wandering")) { this.sitsAnimal = "Wolf"; Debug.Log("found wolf"); } if (text11.Contains("lynx") && text10.Contains("Wandering")) { this.sitsAnimal = "Lynx"; Debug.Log("found lynx"); } if (text11.Contains("fox") && text10.Contains("Wandering")) { this.sitsAnimal = "Fox"; Debug.Log("found fox"); } if (text11.Contains("ram") && text10.Contains("Wandering")) { this.sitsAnimal = "ram"; Debug.Log("found ram"); } text10 = text11; if (text11.Contains("PartyIDs")) { new string[0]; char c2 = ','; foreach (string text12 in text11.Split(c2, StringSplitOptions.None)) { string text13 = ""; if (text12 == "1") { text13 = "Lookup"; } if (text12 == "2") { text13 = "Lookup"; } if (text12 == "3") { text13 = "Lookup"; } if (text12 == "4") { text13 = "Lookup"; } if (text12 == "5") { text13 = "Lookup"; } if (text12 == "6") { text13 = "Vilhelm"; } if (text12 == "7") { text13 = "Catalina"; } if (text12 == "8") { text13 = "Viorica"; } if (text12 == "9") { text13 = "Ionel"; } if (text12 == "10") { text13 = "Mikalus"; } if (text12 == "11") { text13 = "Sofia"; } if (text12 == "12") { text13 = "Oana"; } if (text12 == "13") { text13 = "Petr"; } if (text12 == "14") { text13 = "Kavel"; } if (text12 == "15") { text13 = "Michaela"; } if (text12 == "16") { text13 = "Filip"; } if (text12 == "17") { text13 = "Regina"; } if (text12 == "18") { text13 = "Istav"; } if (text12 == "19") { text13 = "Notol"; } if (text12 == "20") { text13 = "Mya"; } if (text12 == "21") { text13 = "Minodora"; } if (text12 == "22") { text13 = "Kreel"; } if (text12 == "23") { text13 = "Ruxandra"; } if (text12 == "24") { text13 = "Ovidiu"; } if (text12 == "25") { text13 = "Dragos"; } if (text12 == "26") { text13 = "Filip"; } if (text12 == "27") { text13 = "Chestimir"; } if (text12 == "28") { text13 = "Istav"; } if (text12 == "29") { text13 = "Notol"; } if (text12 == "30") { text13 = "Daciana"; } if (text12 == "31") { text13 = "Petr"; } if (text12 == "32") { text13 = "Violeta"; } if (text12 == "33") { text13 = "Silviu"; } if (text12 == "34") { text13 = "Serafim"; } if (text12 == "35") { text13 = "Vasile"; } if (text12 == "36") { text13 = "Liliana"; } if (text12 == "37") { text13 = "Stela"; } if (text12 == "38") { text13 = "Margareta"; } if (text12 == "39") { text13 = "Tereza"; } if (text12 == "40") { text13 = "Dinu"; } if (text13 == "Lookup") { string text14 = text12; byte[] array5 = ES3.LoadRawBytes(text9 + text12 + ".txt"); string string2 = Encoding.UTF8.GetString(array5); new string[0]; char c3 = '~'; string[] array6 = string2.Split(c3, StringSplitOptions.None); string text15 = ""; foreach (string text16 in array6) { if (text16.Contains("Name") && text15.Contains("Portrait")) { string text17 = ""; int num2 = 0; string text18 = text16; for (int l = 0; l < text18.Length; l++) { string text19 = text18[l].ToString(); string text20 = "a"; if (text19.Contains(text20)) { text17 += text20; } text20 = "A"; if (text19.Contains(text20)) { text17 += text20; } text20 = "b"; if (text19.Contains(text20)) { text17 += text20; } text20 = "B"; if (text19.Contains(text20)) { text17 += text20; } text20 = "c"; if (text19.Contains(text20)) { text17 += text20; } text20 = "C"; if (text19.Contains(text20)) { text17 += text20; } text20 = "d"; if (text19.Contains(text20)) { text17 += text20; } text20 = "D"; if (text19.Contains(text20)) { text17 += text20; } text20 = "e"; if (text19.Contains(text20)) { text17 += text20; } text20 = "E"; if (text19.Contains(text20)) { text17 += text20; } text20 = "f"; if (text19.Contains(text20)) { text17 += text20; } text20 = "F"; if (text19.Contains(text20)) { text17 += text20; } text20 = "g"; if (text19.Contains(text20)) { text17 += text20; } text20 = "G"; if (text19.Contains(text20)) { text17 += text20; } text20 = "h"; if (text19.Contains(text20)) { text17 += text20; } text20 = "H"; if (text19.Contains(text20)) { text17 += text20; } text20 = "i"; if (text19.Contains(text20)) { text17 += text20; } text20 = "I"; if (text19.Contains(text20)) { text17 += text20; } text20 = "j"; if (text19.Contains(text20)) { text17 += text20; } text20 = "J"; if (text19.Contains(text20)) { text17 += text20; } text20 = "k"; if (text19.Contains(text20)) { text17 += text20; } text20 = "K"; if (text19.Contains(text20)) { text17 += text20; } text20 = "l"; if (text19.Contains(text20)) { text17 += text20; } text20 = "L"; if (text19.Contains(text20)) { text17 += text20; } text20 = "m"; if (text19.Contains(text20)) { text17 += text20; } text20 = "M"; if (text19.Contains(text20)) { text17 += text20; } text20 = "n"; if (text19.Contains(text20)) { text17 += text20; } text20 = "N"; if (text19.Contains(text20)) { text17 += text20; } text20 = "o"; if (text19.Contains(text20)) { text17 += text20; } text20 = "O"; if (text19.Contains(text20)) { text17 += text20; } text20 = "p"; if (text19.Contains(text20)) { text17 += text20; } text20 = "P"; if (text19.Contains(text20)) { text17 += text20; } text20 = "q"; if (text19.Contains(text20)) { text17 += text20; } text20 = "Q"; if (text19.Contains(text20)) { text17 += text20; } text20 = "r"; if (text19.Contains(text20)) { text17 += text20; } text20 = "R"; if (text19.Contains(text20)) { text17 += text20; } text20 = "s"; if (text19.Contains(text20)) { text17 += text20; } text20 = "S"; if (text19.Contains(text20)) { text17 += text20; } text20 = "t"; if (text19.Contains(text20)) { text17 += text20; } text20 = "T"; if (text19.Contains(text20)) { text17 += text20; } text20 = "u"; if (text19.Contains(text20)) { text17 += text20; } text20 = "U"; if (text19.Contains(text20)) { text17 += text20; } text20 = "v"; if (text19.Contains(text20)) { text17 += text20; } text20 = "V"; if (text19.Contains(text20)) { text17 += text20; } text20 = "w"; if (text19.Contains(text20)) { text17 += text20; } text20 = "W"; if (text19.Contains(text20)) { text17 += text20; } text20 = "x"; if (text19.Contains(text20)) { text17 += text20; } text20 = "X"; if (text19.Contains(text20)) { text17 += text20; } text20 = "y"; if (text19.Contains(text20)) { text17 += text20; } text20 = "Y"; if (text19.Contains(text20)) { text17 += text20; } text20 = "z"; if (text19.Contains(text20)) { text17 += text20; } text20 = "Z"; if (text19.Contains(text20)) { text17 += text20; } num2++; } string text21 = Regex.Replace(text17, "Name", ""); Debug.Log(string.Concat(new string[] { "Created Avatar: ", text17, " ", text21, " ", text14 })); text13 = text21; if (text14 == "1") { this.sitsNecholai = text13; text13 = ""; Debug.Log("Found necholai: " + text13); } } text15 = text16; } } if (text13 != "") { Debug.Log("Found companion: " + text13); if (num == 0) { this.sitsCompanion1 = text13; } if (num == 1) { this.sitsCompanion2 = text13; } if (num == 2) { this.sitsCompanion3 = text13; } if (num == 3) { this.sitsCompanion4 = text13; } num++; } } } } } if (flag && this.sitsNecholai != "") { ES3File es3File = new ES3File("SerpentData.es3"); es3File.Save("SitsAnimal", this.sitsAnimal); es3File.Save("SitsCompanion1", this.sitsCompanion1); es3File.Save("SitsCompanion2", this.sitsCompanion2); es3File.Save("SitsCompanion3", this.sitsCompanion3); es3File.Save("SitsCompanion4", this.sitsCompanion4); es3File.Save("SitsNecholai", this.sitsNecholai); es3File.Sync(); return true; } return false; } // Token: 0x06000C84 RID: 3204 RVA: 0x000F6314 File Offset: 0x000F4514 public string GetWeaponControllerPrefix(Library.Inventory invRow1, Library.Inventory invRow2, string race, bool ignoreSecondHand) { string text = invRow1._CharacterAnimation; if (invRow2 != null && !ignoreSecondHand && invRow2._ID > 1) { if (invRow2._Tag == "Weapon" && invRow2._ID > 1) { text = "_Multihand"; } else if (invRow2._Tag == "Shield") { text = "_Shield_Blades"; bool flag = false; if (invRow1 != null && invRow1._MainSkill == "Whip") { flag = true; } if (flag) { text = "_Shield_FlailWhip"; } } } if (race == "Yeti") { bool flag2 = false; if (invRow1 != null && invRow1._MainSkill == "Pole") { flag2 = true; } bool flag3 = false; if (invRow2 != null && invRow2._MainSkill == "Pole") { flag3 = true; } string text2 = ""; int num = 0; if (invRow2 != null && !ignoreSecondHand) { text2 = invRow2._Tag; num = invRow2._ID; } if (text2 == "Weapon" && num > 1) { text = "_Multihand"; if (flag3 && flag2) { text = "_SpearDualWield"; } } else if (text2 == "Shield") { text = "_Shield_SwordScepter"; if (flag2) { text = "_SpearShield"; } } else if (invRow1._ID <= 1) { text = "_Unarmed"; } else if (flag2) { text = "_Spear"; } else { text = "_SingleHandWield"; } } return text; } // Token: 0x06000C85 RID: 3205 RVA: 0x000F6460 File Offset: 0x000F4660 public bool CanSave() { return (!Records.x.combat || (Records.x.combat && Links.x.combat.npcOnlyCombat)) && Links.x.cellar.NonSavingTileEffects() == 0 && Links.x.gaia.sceneLoaded && !Records.x.IsSaving() && !Records.x.removeControls && !Links.x.creation && !Records.x.miniGame && !Links.x.questEnd.on; } // Token: 0x06000C86 RID: 3206 RVA: 0x000F6501 File Offset: 0x000F4701 public bool InCombat(bool any) { if (!this.combat) { return false; } if (any) { return this.combat; } return (!Links.x.combat.npcOnlyCombat || any) && this.combat; } // Token: 0x06000C87 RID: 3207 RVA: 0x000F6534 File Offset: 0x000F4734 public bool IsTextLeft(Character main, Character target) { ref Vector3 ptr = Links.x.worldCamera.WorldToScreenPoint(main.tr.position); Vector3 vector = Links.x.worldCamera.WorldToScreenPoint(target.tr.position); return ptr.x >= vector.x; } // Token: 0x06000C88 RID: 3208 RVA: 0x000F6586 File Offset: 0x000F4786 public float ShowSeconds(int overallTime) { return Mathf.Round((float)overallTime * (0.00027777778f / Links.x.gameplay.sunlightAnimator.animatorSpeed) * 10f) / 10f; } // Token: 0x06000C89 RID: 3209 RVA: 0x000F65B6 File Offset: 0x000F47B6 public float RealSecondsToGameSeconds(float num) { return num / (0.00027777778f / Links.x.gameplay.sunlightAnimator.animatorSpeed); } // Token: 0x06000C8A RID: 3210 RVA: 0x000F65D4 File Offset: 0x000F47D4 public int GetConstantPathRadius(int wanted) { int num = 3; if (wanted == 1) { return 8000 * num; } if (wanted == 2) { return 16000 * num; } if (wanted == 3) { return 22000 * num; } if (wanted == 4) { return 31000 * num; } if (wanted == 5) { return 38000 * num; } if (wanted == 6) { return 44000 * num; } if (wanted == 7) { return 55000 * num; } if (wanted == 8) { return 62000 * num; } if (wanted == 9) { return 70000 * num; } if (wanted == 10) { return 80000 * num; } if (wanted == 11) { return 90000 * num; } return 100000 * num; } // Token: 0x06000C8B RID: 3211 RVA: 0x000F6674 File Offset: 0x000F4874 public float GetRadiusEstimate(float radius) { float num = radius / 2f / 3f / 3f; float num2 = 1f; if (radius < 10f) { return 3f * num2; } if (radius >= 10f && radius < 100f) { return 6f * num2; } if (radius >= 100f && radius < 200f) { return 7f * num2; } if (radius >= 200f && radius < 300f) { return 9f * num2; } if (radius >= 300f && radius < 400f) { return 10f * num2; } if (radius >= 400f && radius < 500f) { return 11f * num2; } if (radius >= 500f && radius < 600f) { return 12f * num2; } if (radius >= 600f && radius < 700f) { return 8f * num2; } if (radius >= 700f && radius < 800f) { return 9f * num2; } if (radius >= 800f && radius < 900f) { return 10f * num2; } if (radius >= 900f && radius < 1000f) { return 11f * num2; } if (radius >= 1000f && radius < 1100f) { return 12f * num2; } if (radius >= 1100f && radius < 1200f) { return 13f * num2; } if (radius >= 1200f && radius < 1300f) { return 14f * num2; } return num; } // Token: 0x06000C8C RID: 3212 RVA: 0x000F67E4 File Offset: 0x000F49E4 public Vector4 GetSpellScrollData(int x) { if (x == 1) { return new Vector4(15f, 4f, 0f, 0f); } if (x == 2) { return new Vector4(10f, 6f, 0f, 0f); } if (x == 3) { return new Vector4(1f, 3f, 0f, 0f); } if (x == 4) { return new Vector4(40f, 4f, 0f, 0f); } if (x == 5) { return new Vector4(15f, 3f, 0f, 0f); } if (x == 6) { return new Vector4(30f, 0f, 0f, 0f); } if (x == 7) { return new Vector4(1f, 1000f, 0f, 0f); } if (x == 8) { return new Vector4(1f, 1000f, 0f, 0f); } if (x == 9) { return new Vector4(10f, 0f, 0f, 0f); } return new Vector4(0f, 0f, 0f, 0f); } // Token: 0x06000C8D RID: 3213 RVA: 0x000F691C File Offset: 0x000F4B1C public string PaganDescription(Library.Pagan selectedPagan, float slider1, float slider2, float slider3) { this.str.Clear(); for (int i = 0; i < 3; i++) { string text = selectedPagan._Slider1; if (i == 1) { text = selectedPagan._Slider2; } if (i == 2) { text = selectedPagan._Slider3; } float num = slider1; if (i == 1) { num = slider2; } if (i == 2) { num = slider3; } if (text != "" && !this.FoundUniqueSlider(text, num, selectedPagan)) { if (text.Contains("Potency") && i == 0) { this.str.Append(" by "); } else if (text.Contains("Reduction") && i == 0) { this.str.Append(" of "); } else if (text == "Radius") { if (i > 0) { this.str.Append(", "); } } else if (text.Contains("Durability")) { if (i > 0) { this.str.Append(" and a "); } else { this.str.Append(" with a "); } this.str.Append(text.ToLower()); this.str.Append(" of "); } else if (text.Contains("Duration") || text.Contains("Time")) { this.str.Append(" for "); } else if (text.Contains("Skill") || text.Contains("Power")) { this.str.Append(" with a "); this.str.Append(text.ToLower()); this.str.Append(" of "); } else if (text.Contains("Tile")) { this.str.Append(" with a range of "); } else { this.str.Append(" with "); this.str.Append(text.ToLower()); this.str.Append(" of "); } this.str.Append(this.R2(num)); string text2 = this.Label(num, text); if (text2 != "") { this.str.Append(" "); this.str.Append(text2); } } } return this.str.ToString(); } // Token: 0x06000C8E RID: 3214 RVA: 0x000F6B8C File Offset: 0x000F4D8C public float SpellDifficulty(Library.Pagan paganRow, float s1, float s2, float s3) { float num = (float)paganRow._Difficulty; float num2 = 1f; if (paganRow._Slider2 != "") { num2 += 1f; } if (paganRow._Slider3 != "") { num2 += 1f; } for (int i = 0; i < 3; i++) { string text = ""; if (i == 0) { text = paganRow._Slider1; } if (i == 1) { text = paganRow._Slider2; } if (i == 2) { text = paganRow._Slider3; } float num3 = s1; if (i == 1) { num3 = s2; } if (i == 2) { num3 = s3; } float num4 = paganRow._Slider1Min; float slider1Max = paganRow._Slider1Max; if (i == 1) { num4 = paganRow._Slider2Min; float slider2Max = paganRow._Slider2Max; } if (i == 2) { num4 = paganRow._Slider3Min; float slider3Max = paganRow._Slider3Max; } num3 -= num4; num3 += 1f; if (text != "") { if (text == "Radius") { num += num3 * (20f / num2); } if (text.Contains("Duration") || text.Contains("Time")) { if (text.Contains("Spore")) { num += num3 * (6f / num2); } else { num += num3 * (3f / num2); } } if (text == "PartyTarget") { num += (num3 - 1f) * (10f / num2); } if (text.Contains("Damage") || text == "Deterioration" || text.Contains("Effects") || text.Contains("Power") || text.Contains("Healing")) { if (text.Contains("Fire")) { num += num3 * (10f / num2); } else if (text.Contains("Vine")) { num += num3 * (15f / num2); } else if (text.Contains("Swarm")) { num += num3 * (6f / num2); } else if (text.Contains("Deterioration")) { num += num3 * (15f / num2); } else { num += num3 * (10f / num2); } } if (text.Contains("Summons")) { if (text.Contains("Vine")) { num += num3 * (80f / num2); } else { num += num3 * (30f / num2); } } if (text.Contains("Level")) { num += num3 * (50f / num2); } if (text == "Targets") { num += num3 * (30f / num2); } if (text.Contains("Skill")) { num += num3 * (20f / num2); } } } return Mathf.Round(num * 0.3f); } // Token: 0x06000C8F RID: 3215 RVA: 0x000F6E48 File Offset: 0x000F5048 public float SpellCostWeight(string s) { float num = 0f; if (s.Contains("Duration") || s.Contains("Time")) { num = 7f; } if (s == "Radius") { num = 30f; } if (s == "Distance") { num = 20f; } if (s == "Tile") { num = 100f; } if (s == "PartyTarget") { num = 250f; } if (s == "Targets") { num = 200f; } if (s.Contains("Summons")) { num = 70f; } if (s.Contains("Damage") || s == "Deterioration" || s.Contains("Effects") || s.Contains("Power") || s.Contains("Healing")) { if (s.Contains("Fire")) { num = 26f; } else if (s.Contains("Swarm")) { num = 22f; } else { num = 25f; } } if (s == "Tether") { num = 10f; } if (s.Contains("Skill")) { num = 20f; } if (s.Contains("Movement")) { num = 100f; } return num * 0.75f; } // Token: 0x06000C90 RID: 3216 RVA: 0x000F6FA0 File Offset: 0x000F51A0 public float EnchantCostWeight(string type) { if (type.Contains("Duration") || type.Contains("Time")) { return 5f; } if (type == "Radius") { return 20f; } if (type == "Targets") { return 40f; } if (type.Contains("Summons")) { return 40f; } if (type == "Damage") { return 10f; } if (type == "Glare") { return 10f; } if (type.Contains("Potency") || type.Contains("Reduction")) { if (type.Contains("Light")) { return 12f; } if (type.Contains("Healing")) { return 10f; } if (type.Contains("Strength")) { return 15f; } if (type.Contains("Agility")) { return 8f; } if (type.Contains("Hit Chance")) { return 7f; } if (type.Contains("Poison")) { return 15f; } if (type.Contains("Music Resist")) { return 3f; } return 10f; } else { if (type == "Tile") { return 26f; } if (type == "Distance") { return 20f; } return 1f; } } // Token: 0x06000C91 RID: 3217 RVA: 0x000F70FF File Offset: 0x000F52FF public bool SpellWholeNumber(string s) { return s.Contains("Targets") || s.Contains("Tile") || s.Contains("Summons"); } // Token: 0x06000C92 RID: 3218 RVA: 0x000F712B File Offset: 0x000F532B private float R2(float x) { return Mathf.Round(x * 10f) / 10f; } // Token: 0x06000C93 RID: 3219 RVA: 0x000F7140 File Offset: 0x000F5340 private string Label(float val, string type) { string text = ""; if (type.Contains("Duration") || type.Contains("Time")) { text = "seconds"; if (val == 1f) { text = "second"; } } if (type == "Radius") { text = "half-poles reach"; if (val == 1f) { text = "half-pole reach"; } } if (type == "PartyTarget") { text = "targets"; if (val == 1f) { text = "target"; } } if (type == "Targets") { text = "target"; if (val == 1f) { text = "targets"; } } if (type.Contains("Summons")) { if (type == "Summons") { text = "summon clump"; if (val == 1f) { text = "summon clumps"; } } else { text = "summon"; if (val == 1f) { text = "summons"; } } } if (type == "Damage") { text = "damage"; } return text; } // Token: 0x06000C94 RID: 3220 RVA: 0x000F723C File Offset: 0x000F543C private bool FoundUniqueSlider(string n, float v, Library.Pagan selectedPagan) { v = Mathf.Round(v); if (n == "PartyTarget") { if (v == 1f) { this.str.Append(". Targets single party member"); } else { this.str.Append(". Targets party"); } return true; } if (n.Contains("Summons")) { if (selectedPagan._School == "Fauna") { if (v == 1f) { this.str.Append(". Creates one summon clump"); } else { this.str.Append(". Create "); this.str.Append(v); this.str.Append(" summon clumps"); } } else if (v == 1f) { this.str.Append(". Creates one summon"); } else { this.str.Append(". Create "); this.str.Append(v); this.str.Append(" summons"); } return true; } if (n == "Movement") { if (v < 0.5f) { this.str.Append(". Moves in random direction."); } else { this.str.Append(". Moves toward enemy targets."); } return true; } if (n == "Targets") { if (v == 1f) { this.str.Append(". Targets single enemy"); } else { this.str.Append(". Targets "); this.str.Append(v); this.str.Append(" enemies"); } return true; } return false; } // Token: 0x06000C95 RID: 3221 RVA: 0x000F73DB File Offset: 0x000F55DB public int GetRallyAttackCosts(int type, Character character) { return 1; } // Token: 0x06000C96 RID: 3222 RVA: 0x000F73DE File Offset: 0x000F55DE public bool HigherThanVersion(float demoNum, float num) { return (Records.x.demo && Records.x.gameVersionDemo > demoNum) || (!Records.x.demo && Records.x.gameVersion > num); } // Token: 0x06000C97 RID: 3223 RVA: 0x000F7418 File Offset: 0x000F5618 public float GetPotencyAdd(string type, float amt, int jewelrySlot) { if (amt == 0f) { return 0f; } if (jewelrySlot > 0) { return amt; } if (type == "Time") { return amt * 0.25f; } if (type == "HitChance" || type == "BlockChance" || type == "EvadeChance") { return amt * 0.5f; } if (type == "FlatMods") { return amt * 0.5f; } if (type == "Stats") { return amt * 1f; } if (type == "ModsDice") { return amt; } if (type == "StatsDice") { return amt; } if (type == "MoveSpeed") { return amt * 0.2f; } if (type == "ActionTime") { return amt * 0.05f; } if (type == "Artistry") { return amt * 1f; } if (type == "Charming") { return amt * 1f; } if (type == "NimbleFingers") { return amt * 1f; } if (type == "Spirit") { return amt * 3f; } if (type == "SpiritAbsorb") { return amt * 0.05f; } if (type == "RallySpeed") { return amt * 0.05f; } if (type == "Health") { return amt * 0.3f; } if (type == "SkillsDown") { return amt * 3f; } if (type == "SightHearing") { return amt; } if (type == "ReduceStuns") { return amt; } if (type == "ReduceArmor") { return amt * 0f; } if (type == "ReduceEqArmor") { return amt * 0.5f; } if (type == "Stamina") { return amt * 0.5f; } if (type == "StaminaSpeed") { return amt * 0.1f; } if (type == "StaminaReduce") { return amt * 0.1f; } if (type == "AddActionTime") { return amt * 0.1f; } return 0f; } // Token: 0x06000C98 RID: 3224 RVA: 0x000F7638 File Offset: 0x000F5838 public float ChargeAmount(float lvl) { return (lvl + 1f) * 2f; } // Token: 0x06000C99 RID: 3225 RVA: 0x000F7647 File Offset: 0x000F5847 public float BoroMaxWeight() { return Mathf.Round(0f + this.boroBonus.y * 300f); } // Token: 0x06000C9A RID: 3226 RVA: 0x000F7665 File Offset: 0x000F5865 public bool BoroInParty() { return QuestLog.GetQuestState("C6_GetBoat") == QuestState.Success || (this.editor && this.editorBoro); } // Token: 0x06000C9B RID: 3227 RVA: 0x000F7687 File Offset: 0x000F5887 public bool HasBanner(string areaName) { return this.banners.IndexOf(areaName) > -1; } // Token: 0x06000C9C RID: 3228 RVA: 0x000F769B File Offset: 0x000F589B public int GetBannerCount() { return this.banners.Count; } // Token: 0x06000C9D RID: 3229 RVA: 0x000F76A8 File Offset: 0x000F58A8 public void NewBoro(string borosID, Vector3 bonuses, Vector4 shrines, string n) { this.savedBoro.Add(borosID); float num = bonuses.x; float num2 = bonuses.y; float num3 = bonuses.z; this.savedBoro.Add(num.ToString()); this.savedBoro.Add(num2.ToString()); this.savedBoro.Add(num3.ToString()); num = shrines.x; num2 = shrines.y; num3 = shrines.z; float w = shrines.w; this.savedBoro.Add(num.ToString()); this.savedBoro.Add(num2.ToString()); this.savedBoro.Add(num3.ToString()); this.savedBoro.Add(w.ToString()); this.savedBoro.Add(n); } // Token: 0x06000C9E RID: 3230 RVA: 0x000F7780 File Offset: 0x000F5980 public void UpdateBoroInSavedList(string borosID, Vector3 bonuses, Vector4 shrines, string n) { bool flag = false; int num = 0; for (int i = 0; i < this.savedBoro.Count; i++) { if (num == 0 && borosID == this.savedBoro[i]) { flag = true; this.savedBoro[i + 1] = bonuses.x.ToString(); this.savedBoro[i + 2] = bonuses.y.ToString(); this.savedBoro[i + 3] = bonuses.z.ToString(); this.savedBoro[i + 4] = shrines.x.ToString(); this.savedBoro[i + 5] = shrines.y.ToString(); this.savedBoro[i + 6] = shrines.z.ToString(); this.savedBoro[i + 7] = shrines.w.ToString(); this.savedBoro[i + 8] = n; } if (num == 8) { num = 0; } else { num++; } } if (!flag) { this.NewBoro(borosID, bonuses, shrines, n); } } // Token: 0x06000C9F RID: 3231 RVA: 0x000F78AC File Offset: 0x000F5AAC public float BoroMaxSpeed() { return 1f; } // Token: 0x06000CA0 RID: 3232 RVA: 0x000F78B3 File Offset: 0x000F5AB3 public float BoroMaxSpirit() { return 1f; } // Token: 0x06000CA1 RID: 3233 RVA: 0x000F78BA File Offset: 0x000F5ABA public float BoroMaxStrength() { return 1f; } // Token: 0x06000CA2 RID: 3234 RVA: 0x000F78C4 File Offset: 0x000F5AC4 public string GetBoroModel(string borosID, bool withBoat, bool withPacks) { if (borosID == "BoroA") { return "Boro_orange_packed_M_Generic"; } if (borosID == "BoroB") { return "Boro_dark_noPack_M_generic"; } if (borosID == "BoroC") { return "Boro_gray_noPack_F_generic"; } if (borosID == "BoroD") { return "Boro_dark_noPack_M_generic"; } if (borosID == "BoroE") { return "Boro_orange_packed_M_Generic"; } if (borosID == "BoroF") { return "Boro_gray_noPack_F_generic"; } return "Boro_orange_packed_M_Generic"; } // Token: 0x06000CA3 RID: 3235 RVA: 0x000F7954 File Offset: 0x000F5B54 public void AddFirstBoro() { this.boroID = "BoroE"; Vector3 vector; Vector4 vector2; string text; int num; this.BoroStats(this.boroID, out vector, out vector2, out text, out num, true); this.boroName = text; this.boroBonus = vector; this.boroShrines = vector2; this.NewBoro(this.boroID, this.boroBonus, this.boroShrines, this.boroName); } // Token: 0x06000CA4 RID: 3236 RVA: 0x000F79B4 File Offset: 0x000F5BB4 public void CreateBoro(bool withBoat) { Vector3 vector = this.boroPosition; Quaternion quaternion = this.boroRotation; float y = this.boroBonus.y; Character boro = Links.x.gaia.boro; if (boro) { string xmlName = boro.stats.xmlName; this.UpdateBoroInSavedList(xmlName, this.boroBonus, this.boroShrines, this.boroName); GraphNode graphNode = boro.node; if ((boro.currentPosition - Links.x.main.currentPosition).sqrMagnitude > 900f || graphNode == null) { vector = boro.tr.position; quaternion = boro.tr.rotation; if (Links.x.dialogue.boro) { graphNode = Links.x.dialogue.boro.NearNode(Links.x.dialogue.boro.tr.position, true, 0, -1, 0); if (graphNode == null) { graphNode = Links.x.dialogue.boro.NearNode(Links.x.main.tr.position, true, 0, -1, 0); } if (graphNode == null) { graphNode = boro.node; } } } CreatureActions creatures = boro.creatures; Links.x.hudControl.ClearSheep(); boro.Missing(); boro.FinishDestroyingCharacter(); if (creatures) { creatures.SetState(0, "Gone"); } Vector3 vector2 = this.boroPosition; if (graphNode != null) { vector2 = (Vector3)graphNode.position; } CreatureActions creatureActions = Links.x.gaia.CreateCreature(vector2, quaternion, xmlName, false, 0f, 1); Component firstCharacter = creatureActions.GetFirstCharacter(); creatureActions.onlyTemporary = true; Links.x.diorama.AddCreature(creatureActions); string text = creatureActions.gameObject.name; text += "_"; text += Links.x.gameplay.seconds.ToString(); creatureActions.gameObject.name = text; firstCharacter.gameObject.name = text; creatureActions.UpdateName(); } if (Links.x.dialogue.boro) { CreatureActions creatures2 = Links.x.dialogue.boro.creatures; vector = Links.x.dialogue.boro.tr.position; quaternion = Links.x.dialogue.boro.tr.rotation; if (creatures2) { creatures2.SetState(0, "Gone"); } Links.x.dialogue.boro.Missing(); } CreatureActions creatureActions2 = Links.x.gaia.CreateCreature(vector, quaternion, this.boroID, true, 0f, 1); Links.x.gaia.boro = creatureActions2.GetFirstCharacter(); Links.x.gaia.boroControls = Links.x.gaia.boro.gameObject.AddComponent(); Links.x.gaia.boroControls.Setup(); Links.x.gaia.boro.isBoro = true; Vector3 vector3; Vector4 vector4; string text2; int num; this.BoroStats(this.boroID, out vector3, out vector4, out text2, out num, true); this.boroName = text2; this.boroBonus = vector3; this.boroShrines = vector4; this.UpdateBoroInSavedList(this.boroID, this.boroBonus, this.boroShrines, this.boroName); string text3; if (withBoat) { text3 = this.GetBoroModel(this.boroID, true, false); } else { text3 = this.GetBoroModel(this.boroID, false, true); } if (Links.x.gaia.boro.stats.model != text3) { Links.x.gaia.boro.stats.model = text3; Links.x.gaia.boro.SetupBody(); } Links.x.gaia.boro.BoroBoat(); Links.x.gaia.boro.stats.savedMerchantList = this.boroBag; if (y > this.boroBonus.y && y != 0f) { Links.x.merchant.Unload(); } Links.x.hudControl.ShowSheep(true); Links.x.beachCollider.SetActive(true); } // Token: 0x06000CA5 RID: 3237 RVA: 0x000F7E30 File Offset: 0x000F6030 public void ShowBoroStats(Character hoverBoro) { Character character = Links.x.diorama.FindCharacterHerder(); Links.x.hudControl.OpenBoroHoverCard(hoverBoro, character); } // Token: 0x06000CA6 RID: 3238 RVA: 0x000F7E60 File Offset: 0x000F6060 public void BoroStats(string borosID, out Vector3 bonuses, out Vector4 shrines, out string n, out int cost, bool lookInSave) { bonuses = Vector3.zero; shrines = Vector4.zero; n = "Boro"; cost = 0; int num = 10; bool flag = false; int num2 = 0; for (int i = 0; i < this.savedBoro.Count; i++) { if (num2 == 0 && lookInSave && !flag && borosID == this.savedBoro[i]) { flag = true; float num3 = 0f; float.TryParse(this.savedBoro[i + 1], out num3); bonuses.x = num3; float.TryParse(this.savedBoro[i + 2], out num3); bonuses.y = num3; float.TryParse(this.savedBoro[i + 3], out num3); bonuses.z = num3; float.TryParse(this.savedBoro[i + 4], out num3); shrines.x = num3; float.TryParse(this.savedBoro[i + 5], out num3); shrines.y = num3; float.TryParse(this.savedBoro[i + 6], out num3); shrines.z = num3; float.TryParse(this.savedBoro[i + 7], out num3); shrines.w = num3; n = this.savedBoro[i + 8]; cost = Mathf.RoundToInt((bonuses.x + bonuses.y + bonuses.z) * 100f) * num; } if (num2 == 8) { num2 = 0; } else { num2++; } } if (!flag) { if (borosID == "BoroA") { float num4 = 0.5f; float num5 = 0.07f; float num6 = 0.15f; cost = Mathf.RoundToInt((num4 + num5 + num6) * 100f) * num; bonuses = new Vector3(num4, num5, num6); } if (borosID == "BoroB") { float num7 = 0.18f; float num8 = 0.2f; float num9 = 0.3f; cost = Mathf.RoundToInt((num7 + num8 + num9) * 100f) * num; bonuses = new Vector3(num7, num8, num9); } if (borosID == "BoroC") { float num10 = 0.42f; float num11 = 0.05f; float num12 = 0.18f; cost = Mathf.RoundToInt((num10 + num11 + num12) * 100f) * num; bonuses = new Vector3(num10, num11, num12); } if (borosID == "BoroD") { float num13 = 0.1f; float num14 = 0.2f; float num15 = 0.4f; cost = Mathf.RoundToInt((num13 + num14 + num15) * 100f) * num; bonuses = new Vector3(num13, num14, num15); } if (borosID == "BoroE") { float num16 = 0.2f; float num17 = 0.4f; float num18 = 0.1f; cost = Mathf.RoundToInt((num16 + num17 + num18) * 100f) * num; bonuses = new Vector3(num16, num17, num18); } if (borosID == "BoroF") { float num19 = 0.05f; float num20 = 0.6f; float num21 = 0.07f; cost = Mathf.RoundToInt((num19 + num20 + num21) * 100f) * num; bonuses = new Vector3(num19, num20, num21); } } } // Token: 0x040013AA RID: 5034 public static Records x; // Token: 0x040013AB RID: 5035 [Header("GAME INFO")] public float gameVersion; // Token: 0x040013AC RID: 5036 public float gameVersionDemo; // Token: 0x040013AD RID: 5037 public bool demo; // Token: 0x040013AE RID: 5038 public bool extendedDemo; // Token: 0x040013AF RID: 5039 public bool alwaysPlayTranscodedVideo; // Token: 0x040013B0 RID: 5040 [Header("TESTING")] public bool skipMainMenu; // Token: 0x040013B1 RID: 5041 public MapExit.exitToNames editorMap; // Token: 0x040013B2 RID: 5042 public Records.saves editorQuickLoad; // Token: 0x040013B3 RID: 5043 private string editorQuickLoadFile; // Token: 0x040013B4 RID: 5044 private string editorSceneToLoad; // Token: 0x040013B5 RID: 5045 public bool defaultStartPoint; // Token: 0x040013B6 RID: 5046 public bool useTestCharacters; // Token: 0x040013B7 RID: 5047 public bool secrets; // Token: 0x040013B8 RID: 5048 public bool astarDebugging; // Token: 0x040013B9 RID: 5049 public bool combatConsoleDebugging; // Token: 0x040013BA RID: 5050 public bool combatQuipDebugging; // Token: 0x040013BB RID: 5051 public bool showRuleset; // Token: 0x040013BC RID: 5052 public bool effectsDebugging; // Token: 0x040013BD RID: 5053 public bool questDebugging; // Token: 0x040013BE RID: 5054 public bool filming; // Token: 0x040013BF RID: 5055 public bool showFPS; // Token: 0x040013C0 RID: 5056 public bool noCombat; // Token: 0x040013C1 RID: 5057 public bool noDamage; // Token: 0x040013C2 RID: 5058 public bool turnOffCharacters; // Token: 0x040013C3 RID: 5059 public bool turnOffAnimals; // Token: 0x040013C4 RID: 5060 public bool testPatrols; // Token: 0x040013C5 RID: 5061 public bool testQuests; // Token: 0x040013C6 RID: 5062 public bool serpentFiles; // Token: 0x040013C7 RID: 5063 public bool editorBoro; // Token: 0x040013C8 RID: 5064 [Header("READ AND WRITE")] public string openBook; // Token: 0x040013C9 RID: 5065 public string sceneToLoad; // Token: 0x040013CA RID: 5066 [Header("GAMEPLAY SETTINGS")] public bool grabbingSomething; // Token: 0x040013CB RID: 5067 public bool usingController; // Token: 0x040013CC RID: 5068 public bool gameOver; // Token: 0x040013CD RID: 5069 public bool pocketPause; // Token: 0x040013CE RID: 5070 public bool slowTimeMode; // Token: 0x040013CF RID: 5071 public bool removeControls; // Token: 0x040013D0 RID: 5072 public bool paused; // Token: 0x040013D1 RID: 5073 public bool inOverworldMap; // Token: 0x040013D2 RID: 5074 public bool holdCombat; // Token: 0x040013D3 RID: 5075 public bool kill; // Token: 0x040013D4 RID: 5076 public bool partyWait; // Token: 0x040013D5 RID: 5077 public bool movingWindows; // Token: 0x040013D6 RID: 5078 public bool friends; // Token: 0x040013D7 RID: 5079 public bool circle; // Token: 0x040013D8 RID: 5080 public int ai; // Token: 0x040013D9 RID: 5081 public bool shouting; // Token: 0x040013DA RID: 5082 public bool miniGame; // Token: 0x040013DB RID: 5083 public bool boroNearby; // Token: 0x040013DC RID: 5084 public bool partySailing; // Token: 0x040013DD RID: 5085 public bool partyBoatDown; // Token: 0x040013DE RID: 5086 public bool turnBased; // Token: 0x040013DF RID: 5087 public bool useBigTiles; // Token: 0x040013E0 RID: 5088 public bool partyCamping; // Token: 0x040013E1 RID: 5089 public bool dialogue; // Token: 0x040013E2 RID: 5090 public bool mainMenuOpen; // Token: 0x040013E3 RID: 5091 public bool waitForResurrect; // Token: 0x040013E4 RID: 5092 public float moveSpeedAdd; // Token: 0x040013E5 RID: 5093 public bool cyclingAttacks; // Token: 0x040013E6 RID: 5094 public float nodeSize = 0.4f; // Token: 0x040013E7 RID: 5095 public int playerDefaultConnections; // Token: 0x040013E8 RID: 5096 public float gridOffset = 17f; // Token: 0x040013E9 RID: 5097 public int maxSummons = 20; // Token: 0x040013EA RID: 5098 public int spiritFragment = 30; // Token: 0x040013EB RID: 5099 public float filmingAnimatorSpeed = 0.3f; // Token: 0x040013EC RID: 5100 public int durabilityThreshold = 10; // Token: 0x040013ED RID: 5101 public bool combat; // Token: 0x040013EE RID: 5102 public bool canLeaveCombat; // Token: 0x040013EF RID: 5103 public bool blueFog; // Token: 0x040013F0 RID: 5104 public bool mainCharacterDead; // Token: 0x040013F1 RID: 5105 public bool playerTurn; // Token: 0x040013F2 RID: 5106 public float lastQuipTime; // Token: 0x040013F3 RID: 5107 public bool saving; // Token: 0x040013F4 RID: 5108 private float updateGameTime; // Token: 0x040013F5 RID: 5109 public bool atMerchant; // Token: 0x040013F6 RID: 5110 public bool selling; // Token: 0x040013F7 RID: 5111 public bool typing; // Token: 0x040013F8 RID: 5112 public bool portraitDragging; // Token: 0x040013F9 RID: 5113 public int currentPathNode; // Token: 0x040013FA RID: 5114 public bool coloredCircles; // Token: 0x040013FB RID: 5115 public bool test; // Token: 0x040013FC RID: 5116 private bool pausedForMenus; // Token: 0x040013FD RID: 5117 public bool inMenus; // Token: 0x040013FE RID: 5118 public bool cameraFollowing; // Token: 0x040013FF RID: 5119 public Vector3 cameraPosition; // Token: 0x04001400 RID: 5120 public Vector3 cameraTargetPosition; // Token: 0x04001401 RID: 5121 public SceneCamera inspectCamera; // Token: 0x04001402 RID: 5122 public SceneCamera previousView; // Token: 0x04001403 RID: 5123 public bool inspecting; // Token: 0x04001404 RID: 5124 public Color hoverLightColor; // Token: 0x04001405 RID: 5125 public Color currColor; // Token: 0x04001406 RID: 5126 public int partyTotal; // Token: 0x04001407 RID: 5127 private StringFast str = new StringFast(64); // Token: 0x04001408 RID: 5128 public bool showRulesetInfo = true; // Token: 0x04001409 RID: 5129 public bool needsDefendTooltip; // Token: 0x0400140A RID: 5130 public bool needsSynergyTooltip; // Token: 0x0400140B RID: 5131 public bool needsCompanionTooltip; // Token: 0x0400140C RID: 5132 public bool needsAttackTooltip; // Token: 0x0400140D RID: 5133 public bool needsMoreTooltip; // Token: 0x0400140E RID: 5134 public bool needsCircleTooltip; // Token: 0x0400140F RID: 5135 public bool banquetIsle; // Token: 0x04001410 RID: 5136 public string recentShout; // Token: 0x04001411 RID: 5137 public float lastShoutTime; // Token: 0x04001412 RID: 5138 public bool freeAttack; // Token: 0x04001413 RID: 5139 public bool testingFreeAttack; // Token: 0x04001414 RID: 5140 public bool spin; // Token: 0x04001415 RID: 5141 [Header("QUEST TIMERS")] public List changeQuestName = new List(); // Token: 0x04001416 RID: 5142 public List changeAtHour = new List(); // Token: 0x04001417 RID: 5143 public List changeToState = new List(); // Token: 0x04001418 RID: 5144 public List changeFromState = new List(); // Token: 0x04001419 RID: 5145 private float constantQuestCheckTimer; // Token: 0x0400141A RID: 5146 private bool needToRemoveQuestItems; // Token: 0x0400141B RID: 5147 [Header("FORFEITS + FINES")] public List stunnedNPCs = new List(); // Token: 0x0400141C RID: 5148 public List stunnedTime = new List(); // Token: 0x0400141D RID: 5149 public List stunnedSaveFiles = new List(); // Token: 0x0400141E RID: 5150 public List exiles = new List(); // Token: 0x0400141F RID: 5151 public List exilesPurseState = new List(); // Token: 0x04001420 RID: 5152 public List victims = new List(); // Token: 0x04001421 RID: 5153 public List victimBadgeState = new List(); // Token: 0x04001422 RID: 5154 public List victimTown = new List(); // Token: 0x04001423 RID: 5155 public List victimBadgeStartTime = new List(); // Token: 0x04001424 RID: 5156 public int badgeCount; // Token: 0x04001425 RID: 5157 [Header("UI SETTINGS")] public float uiHeight; // Token: 0x04001426 RID: 5158 private float startDither; // Token: 0x04001427 RID: 5159 private float endDither; // Token: 0x04001428 RID: 5160 private float currentDither; // Token: 0x04001429 RID: 5161 private float fadeAmount; // Token: 0x0400142A RID: 5162 private bool fading; // Token: 0x0400142B RID: 5163 [Header("LISTS")] public List openMenus = new List(); // Token: 0x0400142C RID: 5164 public List closeButtons = new List(); // Token: 0x0400142D RID: 5165 private float[] skillWeights = new float[] { 0.25f, 0.25f, 0.25f, 0.25f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 2f, 2f, 0.5f, 0.5f, 0.5f, 0.5f, 10f, 2f, 5f, 3f, 3f, 3f, 1f, 1f, 1f, 1f, 5f, 5f, 5f, 5f, 5f, 1f }; // Token: 0x0400142E RID: 5166 private List party; // Token: 0x0400142F RID: 5167 public List creaturesMapNew = new List(); // Token: 0x04001430 RID: 5168 public List creaturesMapOld = new List(); // Token: 0x04001431 RID: 5169 public List creaturesMapXml = new List(); // Token: 0x04001432 RID: 5170 public List creaturesMapName = new List(); // Token: 0x04001433 RID: 5171 public List creaturesMapHostility = new List(); // Token: 0x04001434 RID: 5172 public List creaturesMapPosition = new List(); // Token: 0x04001435 RID: 5173 public List creaturesMapState = new List(); // Token: 0x04001436 RID: 5174 public List creaturesMapChangeTime = new List(); // Token: 0x04001437 RID: 5175 public List creaturesMapGameObject = new List(); // Token: 0x04001438 RID: 5176 public List creaturesMapLife = new List(); // Token: 0x04001439 RID: 5177 public List creaturesMapIndex = new List(); // Token: 0x0400143A RID: 5178 public List creaturesMapChangeDelay = new List(); // Token: 0x0400143B RID: 5179 public List creaturesMapMovingFrom = new List(); // Token: 0x0400143C RID: 5180 public List creaturesMapMovingFromPosition = new List(); // Token: 0x0400143D RID: 5181 public List deadCompanions = new List(); // Token: 0x0400143E RID: 5182 private List witnesses = new List(); // Token: 0x0400143F RID: 5183 private ES3File saveFile; // Token: 0x04001440 RID: 5184 private ES3File saveFileTemporary; // Token: 0x04001441 RID: 5185 private List health = new List(); // Token: 0x04001442 RID: 5186 private List states = new List(); // Token: 0x04001443 RID: 5187 private List temperaments = new List(); // Token: 0x04001444 RID: 5188 private List positions = new List(); // Token: 0x04001445 RID: 5189 private List maps = new List(); // Token: 0x04001446 RID: 5190 private List effects = new List(); // Token: 0x04001447 RID: 5191 public string[] characterNames = new string[0]; // Token: 0x04001448 RID: 5192 private List returningCreatures = new List(); // Token: 0x04001449 RID: 5193 public List destroyCharacters = new List(); // Token: 0x0400144A RID: 5194 public List deadCharacters = new List(); // Token: 0x0400144B RID: 5195 public List needsSaveNames = new List(); // Token: 0x0400144C RID: 5196 private List billboards = new List(); // Token: 0x0400144D RID: 5197 private List itemBillboards = new List(); // Token: 0x0400144E RID: 5198 private Transform camTr; // Token: 0x0400144F RID: 5199 private Vector3 forw; // Token: 0x04001450 RID: 5200 private Vector3 up; // Token: 0x04001451 RID: 5201 private List defenseCircle = new List(); // Token: 0x04001452 RID: 5202 private List circleTiles; // Token: 0x04001453 RID: 5203 [Header("SHEEP + BOAT")] public Vector3 boroPosition; // Token: 0x04001454 RID: 5204 public Quaternion boroRotation; // Token: 0x04001455 RID: 5205 public Vector3 boroLastBeachPoint; // Token: 0x04001456 RID: 5206 public Vector3 boatPosition; // Token: 0x04001457 RID: 5207 public Quaternion boatRotation; // Token: 0x04001458 RID: 5208 public string boroScene; // Token: 0x04001459 RID: 5209 public string boroBag; // Token: 0x0400145A RID: 5210 public string boroID; // Token: 0x0400145B RID: 5211 public float boroWeight; // Token: 0x0400145C RID: 5212 public string boroName; // Token: 0x0400145D RID: 5213 public bool boroInvisible; // Token: 0x0400145E RID: 5214 public Vector3 boroBonus = new Vector3(0f, 1f, 0f); // Token: 0x0400145F RID: 5215 public Vector4 boroShrines; // Token: 0x04001460 RID: 5216 public List banners = new List(); // Token: 0x04001461 RID: 5217 public List savedBoro = new List(); // Token: 0x04001462 RID: 5218 [Header("PLATFORMS")] public bool windows; // Token: 0x04001463 RID: 5219 public bool windows7; // Token: 0x04001464 RID: 5220 public bool linux; // Token: 0x04001465 RID: 5221 public bool editor; // Token: 0x04001466 RID: 5222 public bool steamDeck; // Token: 0x04001467 RID: 5223 [Header("SERPENT INFO")] public string sitsAnimal; // Token: 0x04001468 RID: 5224 public string sitsCompanion1; // Token: 0x04001469 RID: 5225 public string sitsCompanion2; // Token: 0x0400146A RID: 5226 public string sitsCompanion3; // Token: 0x0400146B RID: 5227 public string sitsCompanion4; // Token: 0x0400146C RID: 5228 public string sitsNecholai; // Token: 0x020001E6 RID: 486 public enum saves { // Token: 0x040031E3 RID: 12771 QuickSave, // Token: 0x040031E4 RID: 12772 None, // Token: 0x040031E5 RID: 12773 Save1, // Token: 0x040031E6 RID: 12774 Save2, // Token: 0x040031E7 RID: 12775 Save3, // Token: 0x040031E8 RID: 12776 Save4, // Token: 0x040031E9 RID: 12777 Save5, // Token: 0x040031EA RID: 12778 Save6, // Token: 0x040031EB RID: 12779 Save7, // Token: 0x040031EC RID: 12780 Save8, // Token: 0x040031ED RID: 12781 Save9, // Token: 0x040031EE RID: 12782 Save10 } }