4566 lines
129 KiB
C#
4566 lines
129 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using DarkTonic.MasterAudio;
|
|
using PixelCrushers.DialogueSystem;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
// Token: 0x020000D3 RID: 211
|
|
public class RoleSheet : MonoBehaviour
|
|
{
|
|
// Token: 0x06001367 RID: 4967 RVA: 0x00175388 File Offset: 0x00173588
|
|
private void Awake()
|
|
{
|
|
this.targetAlpha = -1f;
|
|
this.contents1.SetActive(false);
|
|
this.contents2.SetActive(false);
|
|
this.contents3.SetActive(false);
|
|
this.contents4.SetActive(false);
|
|
this.characterCamera.SetActive(false);
|
|
this.portraitParent = this.portraits[0].gameObject.transform.parent;
|
|
this.CloseRemoveFromParty();
|
|
this.anim.enabled = false;
|
|
if (this.levelUpMenu)
|
|
{
|
|
this.levelUpMenu.gameObject.SetActive(false);
|
|
}
|
|
this.booksMenu.gameObject.SetActive(false);
|
|
this.outputHovers.SetActive(false);
|
|
for (int i = 0; i < this.skillProgress.Count; i++)
|
|
{
|
|
this.skillProgressBtns.Add(this.skillProgress[i].gameObject.GetComponent<Button>());
|
|
}
|
|
this.cb0 = this.skillProgressBtns[0].colors;
|
|
this.cb1 = this.skillProgressBtns[0].colors;
|
|
Color color = this.cb1.normalColor;
|
|
color.a = 0.33f;
|
|
this.cb1.normalColor = color;
|
|
}
|
|
|
|
// Token: 0x06001368 RID: 4968 RVA: 0x001754D4 File Offset: 0x001736D4
|
|
private void Start()
|
|
{
|
|
Links.x.characterSheet = this;
|
|
this.canvas.enabled = false;
|
|
this.anim.enabled = false;
|
|
if (!Records.x.windows)
|
|
{
|
|
this.scrollRect1.scrollSensitivity = 9f;
|
|
this.scrollRect2.scrollSensitivity = 9f;
|
|
this.scrollRect3.scrollSensitivity = 9f;
|
|
}
|
|
this.portraitOrder = Links.x.portraitOrder;
|
|
}
|
|
|
|
// Token: 0x06001369 RID: 4969 RVA: 0x00175550 File Offset: 0x00173750
|
|
public void SetupTexture()
|
|
{
|
|
if (QualitySettings.antiAliasing == 0)
|
|
{
|
|
Links.x.camera3D.targetTexture = this.noAA;
|
|
}
|
|
else if (QualitySettings.antiAliasing == 2)
|
|
{
|
|
Links.x.camera3D.targetTexture = this.aa2;
|
|
}
|
|
else if (QualitySettings.antiAliasing == 4)
|
|
{
|
|
Links.x.camera3D.targetTexture = this.aa4;
|
|
}
|
|
else if (QualitySettings.antiAliasing == 8)
|
|
{
|
|
Links.x.camera3D.targetTexture = this.aa8;
|
|
}
|
|
this.vignette.texture = Links.x.camera3D.targetTexture;
|
|
RenderTexture active = RenderTexture.active;
|
|
RenderTexture.active = Links.x.camera3D.targetTexture;
|
|
GL.Clear(true, true, Color.black);
|
|
RenderTexture.active = active;
|
|
}
|
|
|
|
// Token: 0x0600136A RID: 4970 RVA: 0x0017561C File Offset: 0x0017381C
|
|
public void StartMenu(bool fromStart)
|
|
{
|
|
this.fromGameStart = fromStart;
|
|
if (!fromStart)
|
|
{
|
|
this.anim.enabled = true;
|
|
}
|
|
else
|
|
{
|
|
this.anim.enabled = true;
|
|
this.anim.Play("Open", 0, 1f);
|
|
}
|
|
if (!fromStart)
|
|
{
|
|
this.canvas.enabled = true;
|
|
}
|
|
else
|
|
{
|
|
this.canvas.enabled = false;
|
|
}
|
|
this.openTime = Time.realtimeSinceStartup;
|
|
if (!fromStart)
|
|
{
|
|
Links.x.gameplay.lastMenu = "CharacterSheet";
|
|
}
|
|
if (!fromStart && this.contents1.activeSelf)
|
|
{
|
|
return;
|
|
}
|
|
if (!fromStart)
|
|
{
|
|
Links.x.gameplay.openingAnotherMenu = true;
|
|
}
|
|
Links.x.gameplay.CloseAllMenus();
|
|
if (!Records.x.inMenus && Links.x.gaia.sceneLoaded && !fromStart)
|
|
{
|
|
Links.x.gameplay.OpenDock();
|
|
}
|
|
bool flag = false;
|
|
if (Links.x.joy && (Links.x.gameplay.dockStart || Links.x.gameplay.itemsStart))
|
|
{
|
|
flag = true;
|
|
}
|
|
if (flag)
|
|
{
|
|
if (this.anim.gameObject.activeSelf && !fromStart)
|
|
{
|
|
this.anim.Play("Open", 0, 1f);
|
|
}
|
|
}
|
|
else if (this.anim.gameObject.activeSelf && !fromStart)
|
|
{
|
|
this.anim.Play("Open");
|
|
}
|
|
this.startMain = Links.x.main;
|
|
if (!this.startMain)
|
|
{
|
|
this.startMain = Links.x.GetProtagonist();
|
|
}
|
|
if (!this.startMain.party)
|
|
{
|
|
this.startMain = Links.x.GetProtagonist();
|
|
}
|
|
Links.x.inventory.gameObject.SetActive(true);
|
|
this.open = true;
|
|
this.contents1.SetActive(true);
|
|
this.contents2.SetActive(true);
|
|
this.contents3.SetActive(true);
|
|
this.contents4.SetActive(true);
|
|
this.note.SetActive(false);
|
|
if (Links.x.joy)
|
|
{
|
|
Links.x.hudControl.UpdateMenuSwitcher("Character Sheet");
|
|
}
|
|
if (!this.fromGameStart)
|
|
{
|
|
Links.x.renderPortraits.ToggleCrossFades(true);
|
|
}
|
|
this.descriptionText.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.statusGrid.gameObject.transform.parent.gameObject.SetActive(true);
|
|
for (int i = 0; i < this.buttonsForController.Count; i++)
|
|
{
|
|
this.buttonsForController[i].interactable = Links.x.joy;
|
|
}
|
|
this.colorTarget = this.levelUpColor2;
|
|
this.SetSlotButtons(false);
|
|
if (!this.merchant)
|
|
{
|
|
if (this.enchanting)
|
|
{
|
|
this.characterPeddlerSpawn1.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn2.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn3.gameObject.SetActive(true);
|
|
this.spawn = this.characterPeddlerSpawn3.GetChild(0);
|
|
}
|
|
else
|
|
{
|
|
this.characterPeddlerSpawn1.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn2.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn3.gameObject.SetActive(false);
|
|
this.characterSpawn.gameObject.SetActive(true);
|
|
this.spawn = this.characterSpawn.GetChild(0);
|
|
}
|
|
}
|
|
this.characterCreationSpawn.gameObject.SetActive(false);
|
|
if (this.currentModel != null)
|
|
{
|
|
if (this.currentModel.GetComponent<Animator>())
|
|
{
|
|
this.currentModel.GetComponent<Animator>().updateMode = AnimatorUpdateMode.Normal;
|
|
}
|
|
this.RecycleModel(Links.x.main.name);
|
|
this.currentModel = null;
|
|
}
|
|
this.ChangeScreenSize();
|
|
if (!this.merchant)
|
|
{
|
|
bool flag2 = this.minstrel;
|
|
}
|
|
if (!this.fromGameStart)
|
|
{
|
|
Links.x.camera3D.enabled = true;
|
|
}
|
|
this.SetupTexture();
|
|
if (this.blacksmith)
|
|
{
|
|
this.blacksmithOverlay.SetActive(true);
|
|
this.repairInstructions = this.blacksmithInstructions;
|
|
}
|
|
else if (this.pagan)
|
|
{
|
|
this.paganOverlay.SetActive(true);
|
|
this.repairInstructions = this.paganInstructions;
|
|
}
|
|
else
|
|
{
|
|
this.blacksmithOverlay.SetActive(false);
|
|
}
|
|
if (this.pagan)
|
|
{
|
|
this.paganOverlay.SetActive(true);
|
|
this.repairInstructions = this.paganInstructions;
|
|
}
|
|
else
|
|
{
|
|
this.paganOverlay.SetActive(false);
|
|
}
|
|
if (!this.minstrel && !this.pagan && !this.blacksmith && !this.merchant)
|
|
{
|
|
this.CheckLevelUp();
|
|
}
|
|
for (int j = 0; j < this.extraHovers.Count; j++)
|
|
{
|
|
if (!this.extraHovers[j].activeSelf)
|
|
{
|
|
this.extraHovers[j].SetActive(true);
|
|
}
|
|
}
|
|
this.character = this.startMain;
|
|
foreach (Portrait portrait in this.portraits)
|
|
{
|
|
portrait.SetSelection();
|
|
}
|
|
if (!fromStart)
|
|
{
|
|
Records.x.AddMenu(base.gameObject);
|
|
}
|
|
if (this.merchant)
|
|
{
|
|
for (int k = 0; k < this.merchantOnly.Count; k++)
|
|
{
|
|
if (!this.merchantOnly[k].activeSelf)
|
|
{
|
|
this.merchantOnly[k].SetActive(true);
|
|
}
|
|
}
|
|
int count = this.characterSheetOnly.Count;
|
|
for (int l = 0; l < count; l++)
|
|
{
|
|
if (this.characterSheetOnly[l].activeSelf)
|
|
{
|
|
this.characterSheetOnly[l].SetActive(false);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
for (int m = 0; m < this.merchantOnly.Count; m++)
|
|
{
|
|
if (this.merchantOnly[m].activeSelf)
|
|
{
|
|
this.merchantOnly[m].SetActive(false);
|
|
}
|
|
}
|
|
int count2 = this.characterSheetOnly.Count;
|
|
for (int n = 0; n < count2; n++)
|
|
{
|
|
if (!this.characterSheetOnly[n].activeSelf)
|
|
{
|
|
this.characterSheetOnly[n].SetActive(true);
|
|
}
|
|
}
|
|
}
|
|
if (this.enchanting)
|
|
{
|
|
this.DraggingButtons(true);
|
|
}
|
|
if (this.minstrel || this.merchant)
|
|
{
|
|
this.eqiuppedFolder.SetActive(false);
|
|
for (int num = 0; num < this.portraits.Count; num++)
|
|
{
|
|
if (this.portraits[num].character && this.minstrel && this.portraits[num].character.stats.HasSongbook())
|
|
{
|
|
this.startMain = this.portraits[num].character;
|
|
this.character = this.startMain;
|
|
break;
|
|
}
|
|
}
|
|
foreach (Portrait portrait2 in this.portraits)
|
|
{
|
|
portrait2.SetSelection();
|
|
}
|
|
if (Links.x.joy)
|
|
{
|
|
for (int num2 = 0; num2 < this.characterSheetButtons.Count; num2++)
|
|
{
|
|
this.characterSheetButtons[num2].interactable = false;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.songSpellShop.SetActive(false);
|
|
this.eqiuppedFolder.SetActive(true);
|
|
}
|
|
this.TurnOnCamera();
|
|
if (Links.x.gaia.sceneLoaded && !fromStart)
|
|
{
|
|
this.SwitchCharacter(this.character, true, true);
|
|
}
|
|
Links.x.fellowship.FreshBlinks();
|
|
if (this.minstrel)
|
|
{
|
|
this.songSpellShop.SetActive(true);
|
|
this.booksMenu.OpenSongs();
|
|
this.SetupSongShop();
|
|
}
|
|
this.SwitchController(Links.x.joy);
|
|
}
|
|
|
|
// Token: 0x0600136B RID: 4971 RVA: 0x00175E38 File Offset: 0x00174038
|
|
public void TurnOffMainCamera()
|
|
{
|
|
if (!this.fromGameStart)
|
|
{
|
|
Links.x.worldCamera.cullingMask = 1;
|
|
Links.x.cameraEffects.ToggleObscurance();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600136C RID: 4972 RVA: 0x00175E61 File Offset: 0x00174061
|
|
public void TurnOnMainCamera()
|
|
{
|
|
Links.x.worldCamera.cullingMask = Links.x.mainCameraMask;
|
|
}
|
|
|
|
// Token: 0x0600136D RID: 4973 RVA: 0x00175E84 File Offset: 0x00174084
|
|
public void SetPortraitNav(bool state)
|
|
{
|
|
if (this.merchant || this.minstrel || this.blacksmith)
|
|
{
|
|
state = false;
|
|
}
|
|
for (int i = 0; i < this.portraits.Count; i++)
|
|
{
|
|
Navigation navigation = this.portraits[i].btn.navigation;
|
|
if (state)
|
|
{
|
|
navigation.mode = Navigation.Mode.Automatic;
|
|
}
|
|
else
|
|
{
|
|
navigation.mode = Navigation.Mode.None;
|
|
}
|
|
this.portraits[i].btn.navigation = navigation;
|
|
this.portraits[i].btn.interactable = true;
|
|
this.portraits[i].btn.enabled = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600136E RID: 4974 RVA: 0x00175F38 File Offset: 0x00174138
|
|
public void SwitchController(bool joy)
|
|
{
|
|
if (joy)
|
|
{
|
|
for (int i = 0; i < this.portraits.Count; i++)
|
|
{
|
|
Navigation navigation = this.portraits[i].btn.navigation;
|
|
navigation.mode = Navigation.Mode.None;
|
|
this.portraits[i].btn.navigation = navigation;
|
|
}
|
|
this.controllerSwitchL.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.controllerSwitchR.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.controllerSwitchL.text = "<sprite=" + Links.x.gameplay.GetControllerSprite("Synergy", Links.x.gameplay.controllerName).ToString() + ">";
|
|
this.controllerSwitchR.text = "<sprite=" + Links.x.gameplay.GetControllerSprite("Dodge", Links.x.gameplay.controllerName).ToString() + ">";
|
|
this.controllerSwitchL.enabled = true;
|
|
this.controllerSwitchR.enabled = true;
|
|
return;
|
|
}
|
|
for (int j = 0; j < this.portraits.Count; j++)
|
|
{
|
|
Navigation navigation2 = this.portraits[j].btn.navigation;
|
|
navigation2.mode = Navigation.Mode.None;
|
|
this.portraits[j].btn.navigation = navigation2;
|
|
}
|
|
this.controllerSwitchL.enabled = false;
|
|
this.controllerSwitchR.enabled = false;
|
|
}
|
|
|
|
// Token: 0x0600136F RID: 4975 RVA: 0x001760E8 File Offset: 0x001742E8
|
|
public void ChangeScreenSize()
|
|
{
|
|
float num = (float)Screen.width / (float)Screen.height / 1.7777778f;
|
|
float num2 = (float)Screen.width / (float)Screen.height;
|
|
this.screenW = Screen.width;
|
|
this.screenH = Screen.height;
|
|
}
|
|
|
|
// Token: 0x06001370 RID: 4976 RVA: 0x00176128 File Offset: 0x00174328
|
|
public void ToggleStatusEffects()
|
|
{
|
|
if (!this.minstrel && !this.pagan && !this.blacksmith && !this.merchant)
|
|
{
|
|
MasterAudio.PlaySoundAndForget("Paper Open", 0.8f, new float?(1f), 0f, "", null);
|
|
this.statusEffectsOpen = true;
|
|
if (!this.statusEffectsList.activeSelf)
|
|
{
|
|
if (this.rulesetOpen)
|
|
{
|
|
this.CloseOutput();
|
|
}
|
|
this.statusEffectsList.SetActive(true);
|
|
this.statusEffectsAnimator.Play("OpenSubMenu");
|
|
this.UpdateStatusEffects();
|
|
if (Links.x.joy && !this.fromGameStart)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.statusEffectsListScrollbar.gameObject);
|
|
}
|
|
for (int i = 0; i < this.buttonsForController.Count; i++)
|
|
{
|
|
this.buttonsForController[i].interactable = false;
|
|
}
|
|
return;
|
|
}
|
|
this.CloseStatusEffects();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001371 RID: 4977 RVA: 0x00176238 File Offset: 0x00174438
|
|
private void UpdateStatusEffects()
|
|
{
|
|
this.str.Clear();
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Append("<size=1.3em><font=Bold>Status Effects: </font></size>\n\n");
|
|
}
|
|
for (int i = 0; i < this.statusDescriptions.Count; i++)
|
|
{
|
|
this.str.Append(this.statusDescriptions[i]);
|
|
this.str.Append("\n\n");
|
|
}
|
|
this.fullEffectsList.text = this.str.ToString();
|
|
}
|
|
|
|
// Token: 0x06001372 RID: 4978 RVA: 0x001762C4 File Offset: 0x001744C4
|
|
public void CloseStatusEffects()
|
|
{
|
|
MasterAudio.PlaySoundAndForget("Paper Open 2", 0.6f, new float?(1f), 0f, "", null);
|
|
this.statusEffectsAnimator.Play("CloseSubMenu");
|
|
this.statusEffectsOpen = false;
|
|
if (Links.x.joy && !this.fromGameStart)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.rulesetBtn.gameObject);
|
|
}
|
|
for (int i = 0; i < this.buttonsForController.Count; i++)
|
|
{
|
|
this.buttonsForController[i].interactable = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001373 RID: 4979 RVA: 0x00176370 File Offset: 0x00174570
|
|
public void ToggleOutput()
|
|
{
|
|
MasterAudio.PlaySoundAndForget("Paper Open", 0.8f, new float?(1f), 0f, "", null);
|
|
this.rulesetOpen = true;
|
|
if (!this.outputHovers.activeSelf)
|
|
{
|
|
if (this.statusEffectsOpen)
|
|
{
|
|
this.CloseStatusEffects();
|
|
}
|
|
this.outputHovers.SetActive(true);
|
|
this.outputAnimator.Play("OpenSubMenu");
|
|
if (Links.x.joy && !this.fromGameStart)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.firstRulesetBtn.gameObject);
|
|
}
|
|
for (int i = 0; i < this.buttonsForController.Count; i++)
|
|
{
|
|
this.buttonsForController[i].interactable = false;
|
|
}
|
|
return;
|
|
}
|
|
this.CloseOutput();
|
|
}
|
|
|
|
// Token: 0x06001374 RID: 4980 RVA: 0x00176450 File Offset: 0x00174650
|
|
public void CloseOutput()
|
|
{
|
|
MasterAudio.PlaySoundAndForget("Paper Open 2", 0.6f, new float?(1f), 0f, "", null);
|
|
this.outputAnimator.Play("CloseSubMenu");
|
|
this.rulesetOpen = false;
|
|
this.statHovers.SetActive(true);
|
|
this.strengthText.gameObject.transform.parent.gameObject.SetActive(true);
|
|
this.paganText.gameObject.transform.parent.gameObject.SetActive(true);
|
|
this.agilityText.gameObject.transform.parent.gameObject.SetActive(true);
|
|
this.sensoryText.gameObject.transform.parent.gameObject.SetActive(true);
|
|
this.dexterityText.gameObject.transform.parent.gameObject.SetActive(true);
|
|
this.auraText.gameObject.transform.parent.gameObject.SetActive(true);
|
|
if (Links.x.joy && !this.fromGameStart)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.rulesetBtn.gameObject);
|
|
}
|
|
for (int i = 0; i < this.buttonsForController.Count; i++)
|
|
{
|
|
this.buttonsForController[i].interactable = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001375 RID: 4981 RVA: 0x001765C8 File Offset: 0x001747C8
|
|
public void RecycleModel(string n)
|
|
{
|
|
if (!this.currentModel.GetComponent<Body>())
|
|
{
|
|
Links.x.archives.RecycleBoat(this.currentModel, Links.x.merchant.boat.model, n);
|
|
}
|
|
else
|
|
{
|
|
Links.x.archives.RecycleBody(this.currentModel, this.body.model, n);
|
|
}
|
|
if (this.currentModel)
|
|
{
|
|
this.currentModel.SetActive(false);
|
|
}
|
|
this.currentModel = null;
|
|
this.body = null;
|
|
this.bodyTime = float.PositiveInfinity;
|
|
}
|
|
|
|
// Token: 0x06001376 RID: 4982 RVA: 0x00176668 File Offset: 0x00174868
|
|
public void SetSlotButtons(bool state)
|
|
{
|
|
if (Links.x.mk)
|
|
{
|
|
return;
|
|
}
|
|
if (this.gridState == null)
|
|
{
|
|
this.gridState = Links.x.inventory.gridState;
|
|
}
|
|
int num = this.slotButtons.Count;
|
|
for (int i = 0; i < num; i++)
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
this.slotButtons[i].enabled = true;
|
|
if (state)
|
|
{
|
|
this.slotButtons[i].interactable = state;
|
|
}
|
|
else
|
|
{
|
|
this.slotButtons[i].interactable = true;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.slotButtons[i].enabled = false;
|
|
}
|
|
}
|
|
if (this.merchant)
|
|
{
|
|
num = this.peddlerButtons.Count;
|
|
for (int j = 0; j < num; j++)
|
|
{
|
|
this.peddlerButtons[j].interactable = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001377 RID: 4983 RVA: 0x00176744 File Offset: 0x00174944
|
|
public void DraggingButtons(bool isDragging)
|
|
{
|
|
if (Links.x.mk)
|
|
{
|
|
return;
|
|
}
|
|
if (isDragging)
|
|
{
|
|
for (int i = 0; i < this.characterSheetButtons.Count; i++)
|
|
{
|
|
this.characterSheetButtons[i].interactable = false;
|
|
}
|
|
if (Links.x.inventory.dragging)
|
|
{
|
|
this.character.characterSheetPortrait.button.interactable = false;
|
|
}
|
|
for (int j = 0; j < this.portraits.Count; j++)
|
|
{
|
|
Navigation navigation = this.portraits[j].btn.navigation;
|
|
navigation.mode = Navigation.Mode.Automatic;
|
|
if (this.merchant || this.minstrel || this.blacksmith)
|
|
{
|
|
navigation.mode = Navigation.Mode.None;
|
|
}
|
|
this.portraits[j].btn.navigation = navigation;
|
|
}
|
|
return;
|
|
}
|
|
if (!this.blacksmith && !this.enchanting && !this.note.activeSelf && !Links.x.arrowKit.open && !this.merchant)
|
|
{
|
|
for (int k = 0; k < this.characterSheetButtons.Count; k++)
|
|
{
|
|
this.characterSheetButtons[k].interactable = true;
|
|
}
|
|
}
|
|
this.character.characterSheetPortrait.button.interactable = true;
|
|
for (int l = 0; l < this.portraits.Count; l++)
|
|
{
|
|
Navigation navigation2 = this.portraits[l].btn.navigation;
|
|
navigation2.mode = Navigation.Mode.None;
|
|
this.portraits[l].btn.navigation = navigation2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001378 RID: 4984 RVA: 0x001768E8 File Offset: 0x00174AE8
|
|
public void TurnOnCamera()
|
|
{
|
|
if (!this.fromGameStart)
|
|
{
|
|
this.characterCamera.SetActive(true);
|
|
}
|
|
this.SwitchCharacter(this.character, true, true);
|
|
if (this.merchant || this.minstrel)
|
|
{
|
|
this.characterSpawn.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn1.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn2.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn3.gameObject.SetActive(false);
|
|
this.spawn = null;
|
|
if (this.merchant)
|
|
{
|
|
if (Links.x.merchant.merchantCharacter)
|
|
{
|
|
if (Links.x.merchant.merchantCharacter.stats.xmlName.Contains("Peddler") || Links.x.merchant.merchantCharacter.stats.xmlName.Contains("Merchant"))
|
|
{
|
|
this.characterPeddlerSpawn1.gameObject.SetActive(true);
|
|
this.spawn = this.characterPeddlerSpawn1.GetChild(0);
|
|
}
|
|
else
|
|
{
|
|
this.characterPeddlerSpawn3.gameObject.SetActive(true);
|
|
this.spawn = this.characterPeddlerSpawn3.GetChild(0);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.characterPeddlerSpawn3.gameObject.SetActive(true);
|
|
this.spawn = this.characterPeddlerSpawn3.GetChild(0);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.characterPeddlerSpawn3.gameObject.SetActive(true);
|
|
this.spawn = this.characterPeddlerSpawn3.GetChild(0);
|
|
}
|
|
this.levelUpButton.SetActive(false);
|
|
Character merchantCharacter = Links.x.merchant.merchantCharacter;
|
|
if (merchantCharacter)
|
|
{
|
|
string text = merchantCharacter.stats.model;
|
|
if (merchantCharacter.stats.xmlName.Contains("Boro"))
|
|
{
|
|
text = Records.x.GetBoroModel(Records.x.boroID, false, true);
|
|
}
|
|
if (this.currentModel != null)
|
|
{
|
|
string text2 = "";
|
|
this.RecycleModel(text2);
|
|
}
|
|
this.currentModel = Links.x.archives.InstantiateBody(text, this.spawn);
|
|
this.currentModel.transform.localPosition = new Vector3(0f, -3.1f, 0f);
|
|
this.currentModel.transform.localRotation = Quaternion.Euler(new Vector3(0f, -16f, 0f));
|
|
this.body = this.currentModel.GetComponent<Body>();
|
|
this.body.Reset();
|
|
this.bodyTime = Time.realtimeSinceStartup;
|
|
this.bodyCharacter = merchantCharacter;
|
|
this.body.model = text;
|
|
this.body.name = text;
|
|
string text3 = "_Volling_Dialogue_Peddler";
|
|
if (!this.merchant || (this.merchant && !Links.x.merchant.merchantCharacter.stats.xmlName.Contains("Peddler") && !Links.x.merchant.merchantCharacter.stats.xmlName.Contains("Merchant")))
|
|
{
|
|
text3 = "_Volling_Dialogue_Basic";
|
|
}
|
|
if (this.merchant && Links.x.merchant.isBoro())
|
|
{
|
|
text3 = "_Boro_Unarmed";
|
|
}
|
|
AnimatorOverrideController overrideController = Links.x.archives.GetOverrideController(text3);
|
|
if (!this.body.anim)
|
|
{
|
|
this.body.anim = this.body.gameObject.GetComponent<Animator>();
|
|
}
|
|
this.body.anim.runtimeAnimatorController = overrideController;
|
|
this.body.anim.cullingMode = AnimatorCullingMode.AlwaysAnimate;
|
|
this.body.anim.updateMode = AnimatorUpdateMode.UnscaledTime;
|
|
this.body.gameObject.SetActive(true);
|
|
this.body.inMenu = true;
|
|
this.body.isPortrait = false;
|
|
this.body.gameObject.layer = 5;
|
|
this.body.SetGrounderState(false);
|
|
this.body.SetupHead(this.bodyCharacter.stats.headModel);
|
|
this.body.GatherRenderers(true);
|
|
this.body.SetupTextures(merchantCharacter.stats.race, merchantCharacter.stats.sex, merchantCharacter.stats.characterRow, merchantCharacter.stats.skinTexture, merchantCharacter.stats.hairTexture, true);
|
|
this.body.anim.speed = 1f;
|
|
if (text3 == "_Volling_Dialogue_Peddler")
|
|
{
|
|
this.body.anim.Play("Greeting 1");
|
|
}
|
|
this.body.gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
|
|
if (Links.x.merchant.isBoro())
|
|
{
|
|
this.body.transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
|
|
}
|
|
else if (this.merchant)
|
|
{
|
|
Links.x.characterSheet.StartQuip("What would you like to sell?", FaceAnimations.AnimationNames.Blink);
|
|
}
|
|
else if (this.minstrel)
|
|
{
|
|
Links.x.characterSheet.StartQuip("Would you like to buy a song?", FaceAnimations.AnimationNames.Blink);
|
|
}
|
|
if (this.body.headAnim)
|
|
{
|
|
this.body.headAnim.FreshBlink();
|
|
return;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
string text4 = Links.x.merchant.boat.model;
|
|
text4 += "_Loot";
|
|
if (this.currentModel != null)
|
|
{
|
|
this.RecycleModel("");
|
|
}
|
|
this.bodyCharacter = null;
|
|
this.currentModel = Links.x.archives.InstantiateBoat(text4, this.spawn);
|
|
if (this.currentModel)
|
|
{
|
|
this.currentModel.transform.localPosition = new Vector3(0f, -3.1f, 0f);
|
|
this.currentModel.transform.localRotation = Quaternion.Euler(new Vector3(0f, 27f, 0f));
|
|
this.currentModel.SetActive(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001379 RID: 4985 RVA: 0x00176F08 File Offset: 0x00175108
|
|
public void OpenWarbook()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600137A RID: 4986 RVA: 0x00176F0A File Offset: 0x0017510A
|
|
public void OpenSpellbook()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600137B RID: 4987 RVA: 0x00176F0C File Offset: 0x0017510C
|
|
public Body UpdateBody(string model)
|
|
{
|
|
Quaternion quaternion = Quaternion.identity;
|
|
if (this.currentModel != null)
|
|
{
|
|
quaternion = this.currentModel.transform.localRotation;
|
|
if (this.currentModel.GetComponent<Animator>())
|
|
{
|
|
this.currentModel.GetComponent<Animator>().updateMode = AnimatorUpdateMode.Normal;
|
|
}
|
|
this.RecycleModel(this.character.name);
|
|
}
|
|
if (Time.realtimeSinceStartup > this.openTime + 0.3f)
|
|
{
|
|
Links.x.cameraCrossfade.StartCrossFade();
|
|
}
|
|
this.currentModel = Links.x.archives.InstantiateBody(model, this.spawn);
|
|
this.currentModel.transform.localPosition = new Vector3(0f, -3.1f, 0f);
|
|
this.currentModel.transform.localRotation = Quaternion.Euler(new Vector3(0f, 27f, 0f));
|
|
this.body = this.currentModel.GetComponent<Body>();
|
|
this.body.Reset();
|
|
this.bodyTime = Time.realtimeSinceStartup;
|
|
this.bodyCharacter = this.character;
|
|
this.body.model = model;
|
|
this.body.name = model;
|
|
string weaponControllerPrefix = Records.x.GetWeaponControllerPrefix(this.character.invRow1, this.character.invRow2, this.character.stats.race, false);
|
|
AnimatorOverrideController overrideController = Links.x.archives.GetOverrideController(this.character.animationPrefix + weaponControllerPrefix);
|
|
if (this.body)
|
|
{
|
|
this.body.animationPrefix = this.character.animationPrefix;
|
|
if (!this.body.anim)
|
|
{
|
|
this.body.anim = this.body.gameObject.GetComponent<Animator>();
|
|
if (!this.body.anim)
|
|
{
|
|
Debug.Log("no animator");
|
|
}
|
|
}
|
|
this.body.inMenu = true;
|
|
this.body.isPortrait = false;
|
|
this.body.anim.applyRootMotion = true;
|
|
this.body.anim.updateMode = AnimatorUpdateMode.UnscaledTime;
|
|
this.body.gameObject.layer = 25;
|
|
this.body.SetupHead(this.bodyCharacter.stats.headModel);
|
|
this.body.GatherRenderers(true);
|
|
this.body.SetupTextures(this.character.stats.race, this.character.stats.sex, this.character.stats.characterRow, this.character.stats.skinTexture, this.character.stats.hairTexture, false);
|
|
this.body.SetGrounderState(false);
|
|
this.SetupEquippedItems(this.body, true);
|
|
this.body.needToUpdateItemColliders = 1;
|
|
this.body.anim.runtimeAnimatorController = overrideController;
|
|
this.body.anim.enabled = false;
|
|
this.body.anim.enabled = true;
|
|
if (this.body.headAnim)
|
|
{
|
|
this.body.headAnim.FreshBlink();
|
|
}
|
|
}
|
|
this.currentModel.transform.localRotation = quaternion;
|
|
this.PlayFaceAnimation(FaceAnimations.AnimationNames.Blink);
|
|
if (this.body)
|
|
{
|
|
this.body.anim.Rebind();
|
|
this.body.anim.Update(0f);
|
|
}
|
|
return this.body;
|
|
}
|
|
|
|
// Token: 0x0600137C RID: 4988 RVA: 0x001772A4 File Offset: 0x001754A4
|
|
public void CheckLevelUp()
|
|
{
|
|
bool flag = false;
|
|
if (!this.character)
|
|
{
|
|
return;
|
|
}
|
|
if (this.character.stats.levelUps != "")
|
|
{
|
|
flag = true;
|
|
}
|
|
if (this.merchant || this.blacksmith || this.pagan || this.minstrel)
|
|
{
|
|
flag = false;
|
|
}
|
|
this.levelUpButton.SetActive(flag);
|
|
}
|
|
|
|
// Token: 0x0600137D RID: 4989 RVA: 0x0017730D File Offset: 0x0017550D
|
|
public void PlayFaceAnimation(FaceAnimations.AnimationNames faceAnimName)
|
|
{
|
|
if (!this.body)
|
|
{
|
|
return;
|
|
}
|
|
if (this.body.headAnim)
|
|
{
|
|
this.body.headAnim.PlayAnimation(faceAnimName);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600137E RID: 4990 RVA: 0x00177340 File Offset: 0x00175540
|
|
private bool InCanvas(GameObject g)
|
|
{
|
|
bool flag = false;
|
|
Transform transform = g.transform;
|
|
Transform transform2 = this.canvas.gameObject.transform;
|
|
for (int i = 0; i < 30; i++)
|
|
{
|
|
if (!flag)
|
|
{
|
|
if (!transform.parent)
|
|
{
|
|
break;
|
|
}
|
|
if (transform.parent == transform2)
|
|
{
|
|
flag = true;
|
|
}
|
|
else
|
|
{
|
|
transform = transform.parent;
|
|
}
|
|
}
|
|
}
|
|
return flag;
|
|
}
|
|
|
|
// Token: 0x0600137F RID: 4991 RVA: 0x001773A0 File Offset: 0x001755A0
|
|
public GameObject DefaultSelection()
|
|
{
|
|
if (this.minstrel && this.forSaleAbilities.Count > 0)
|
|
{
|
|
return this.forSaleAbilities[0].gameObject;
|
|
}
|
|
if (this.blacksmith)
|
|
{
|
|
return this.blacksmithButton;
|
|
}
|
|
if (this.minstrel)
|
|
{
|
|
return null;
|
|
}
|
|
if (this.slotButtons[6].interactable)
|
|
{
|
|
return this.slotButtons[6].gameObject;
|
|
}
|
|
return this.rulesetBtn.gameObject;
|
|
}
|
|
|
|
// Token: 0x06001380 RID: 4992 RVA: 0x00177420 File Offset: 0x00175620
|
|
public void SwitchCharacter(Character newCharacter, bool fromStart, bool loading)
|
|
{
|
|
if (!newCharacter)
|
|
{
|
|
return;
|
|
}
|
|
if (this.levelUpMenu)
|
|
{
|
|
return;
|
|
}
|
|
if (Links.x.inventory.dragging)
|
|
{
|
|
return;
|
|
}
|
|
this.selectedWord = -1;
|
|
this.wordIndex = -1;
|
|
if (this.itemTooltip.activeSelf)
|
|
{
|
|
this.itemTooltip.SetActive(false);
|
|
}
|
|
bool flag = false;
|
|
if (this.character == newCharacter && !loading)
|
|
{
|
|
flag = true;
|
|
}
|
|
Character character = this.character;
|
|
this.character = newCharacter;
|
|
this.CheckLevelUp();
|
|
if (character)
|
|
{
|
|
character.body.GatherRenderers(false);
|
|
}
|
|
if (this.quip)
|
|
{
|
|
this.quip.ReturnToCellar();
|
|
this.quip = null;
|
|
this.quipStartTime = -1f;
|
|
}
|
|
foreach (Portrait portrait in this.portraits)
|
|
{
|
|
portrait.SetSelection();
|
|
}
|
|
if (!this.fromGameStart)
|
|
{
|
|
if (!fromStart)
|
|
{
|
|
Links.x.inventory.SwitchCharacter();
|
|
}
|
|
else
|
|
{
|
|
Links.x.inventory.Open();
|
|
}
|
|
}
|
|
if (!this.fromGameStart)
|
|
{
|
|
Links.x.camera3D.enabled = true;
|
|
}
|
|
if (!this.merchant && !this.minstrel && Links.x.gaia.sceneLoaded && !flag)
|
|
{
|
|
if (this.currentModel != null)
|
|
{
|
|
if (this.currentModel.GetComponent<Animator>())
|
|
{
|
|
this.currentModel.GetComponent<Animator>().updateMode = AnimatorUpdateMode.Normal;
|
|
}
|
|
this.RecycleModel(character.name);
|
|
}
|
|
string text = this.character.stats.model;
|
|
if (this.character.stats.model.Contains("Boro"))
|
|
{
|
|
text = Records.x.GetBoroModel(Records.x.boroID, false, true);
|
|
}
|
|
this.currentModel = Links.x.archives.InstantiateBody(text, this.spawn);
|
|
if (Time.realtimeSinceStartup > this.openTime + 0.3f)
|
|
{
|
|
Links.x.cameraCrossfade.StartCrossFade();
|
|
}
|
|
this.currentModel.SetActive(true);
|
|
this.body = this.currentModel.GetComponent<Body>();
|
|
this.body.Reset();
|
|
this.bodyTime = Time.realtimeSinceStartup;
|
|
this.bodyCharacter = this.character;
|
|
this.body.model = text;
|
|
this.body.name = text;
|
|
this.body.animationPrefix = this.character.animationPrefix;
|
|
string weaponControllerPrefix = Records.x.GetWeaponControllerPrefix(this.character.invRow1, this.character.invRow2, this.character.stats.race, false);
|
|
AnimatorOverrideController overrideController = Links.x.archives.GetOverrideController(this.body.animationPrefix + weaponControllerPrefix);
|
|
if (this.body)
|
|
{
|
|
if (!this.body.anim)
|
|
{
|
|
this.body.anim = this.body.gameObject.GetComponent<Animator>();
|
|
if (!this.body.anim)
|
|
{
|
|
Debug.Log("no animator");
|
|
}
|
|
}
|
|
this.body.inMenu = true;
|
|
this.body.isPortrait = false;
|
|
this.body.anim.updateMode = AnimatorUpdateMode.UnscaledTime;
|
|
this.body.anim.applyRootMotion = true;
|
|
this.body.SetGrounderState(false);
|
|
this.body.gameObject.layer = 5;
|
|
this.body.SetupHead(this.bodyCharacter.stats.headModel);
|
|
this.body.GatherRenderers(true);
|
|
this.body.SetupTextures(this.character.stats.race, this.character.stats.sex, this.character.stats.characterRow, this.character.stats.skinTexture, this.character.stats.hairTexture, false);
|
|
this.body.anim.runtimeAnimatorController = overrideController;
|
|
this.SetupEquippedItems(this.body, true);
|
|
this.body.gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
|
|
this.body.anim.enabled = false;
|
|
this.body.anim.enabled = true;
|
|
if (this.body.headAnim)
|
|
{
|
|
this.body.headAnim.FreshBlink();
|
|
}
|
|
if (this.body)
|
|
{
|
|
this.body.anim.Rebind();
|
|
if (this.body.gameObject.activeInHierarchy)
|
|
{
|
|
this.body.anim.Update(0f);
|
|
}
|
|
}
|
|
}
|
|
this.currentModel.transform.localPosition = new Vector3(0f, -3.1f, 0f);
|
|
this.currentModel.transform.localRotation = Quaternion.Euler(new Vector3(0f, 27f, 0f));
|
|
}
|
|
this.GetStats();
|
|
this.GetProficiency();
|
|
this.ShowAutoCast();
|
|
this.booksMenu.Equipped();
|
|
if (Links.x.joy && !this.fromGameStart)
|
|
{
|
|
GameObject currentSelectedGameObject = EventSystem.current.currentSelectedGameObject;
|
|
GameObject gameObject = this.DefaultSelection();
|
|
if (currentSelectedGameObject)
|
|
{
|
|
if ((!currentSelectedGameObject.activeInHierarchy || !currentSelectedGameObject.activeSelf || !this.InCanvas(currentSelectedGameObject)) && gameObject)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, gameObject);
|
|
UITriggerButton component = gameObject.gameObject.GetComponent<UITriggerButton>();
|
|
if (component)
|
|
{
|
|
Links.x.hudControl.SetJoyBox(component);
|
|
}
|
|
else
|
|
{
|
|
Links.x.hudControl.SetJoyBox(gameObject.GetComponent<RectTransform>(), Vector4.zero, false, false);
|
|
}
|
|
}
|
|
}
|
|
else if (gameObject)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, gameObject);
|
|
UITriggerButton component2 = gameObject.gameObject.GetComponent<UITriggerButton>();
|
|
if (component2)
|
|
{
|
|
Links.x.hudControl.SetJoyBox(component2);
|
|
}
|
|
else
|
|
{
|
|
Links.x.hudControl.SetJoyBox(gameObject.GetComponent<RectTransform>(), Vector4.zero, false, false);
|
|
}
|
|
}
|
|
}
|
|
if (this.songSpellShop.activeSelf)
|
|
{
|
|
this.UpdateSongShop();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001381 RID: 4993 RVA: 0x00177ACC File Offset: 0x00175CCC
|
|
public void GetProficiency()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001382 RID: 4994 RVA: 0x00177AD0 File Offset: 0x00175CD0
|
|
private void Link(string n)
|
|
{
|
|
this.str.Append("\n<color ");
|
|
this.str.Append(this.hoverColor);
|
|
this.str.Append(">");
|
|
this.str.Append(n);
|
|
this.str.Append(":");
|
|
this.str.Append("</color> ");
|
|
}
|
|
|
|
// Token: 0x06001383 RID: 4995 RVA: 0x00177B40 File Offset: 0x00175D40
|
|
private void LinkSkills(string n, int index)
|
|
{
|
|
if (this.ThreeHighest(index) && !this.levelingUp)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append(n);
|
|
return;
|
|
}
|
|
this.str.Append("\n<color ");
|
|
this.str.Append(this.hoverColor);
|
|
this.str.Append(">");
|
|
this.str.Append(n);
|
|
this.str.Append("</color> ");
|
|
}
|
|
|
|
// Token: 0x06001384 RID: 4996 RVA: 0x00177BD0 File Offset: 0x00175DD0
|
|
private void LinkOutput(string n)
|
|
{
|
|
this.str.Append("<color ");
|
|
this.str.Append(this.hoverColor);
|
|
this.str.Append(">");
|
|
this.str.Append(n);
|
|
this.str.Append(":");
|
|
this.str.Append("</color> ");
|
|
}
|
|
|
|
// Token: 0x06001385 RID: 4997 RVA: 0x00177C40 File Offset: 0x00175E40
|
|
private void Adjusted(int adjusted)
|
|
{
|
|
this.str.Append("<color ");
|
|
if (adjusted < 0)
|
|
{
|
|
this.str.Append(this.redColor);
|
|
}
|
|
else if (adjusted > 0)
|
|
{
|
|
this.str.Append(this.greenColor);
|
|
}
|
|
this.str.Append(">");
|
|
}
|
|
|
|
// Token: 0x06001386 RID: 4998 RVA: 0x00177C9D File Offset: 0x00175E9D
|
|
private void AdjustedEnd()
|
|
{
|
|
this.str.Append("</color> ");
|
|
}
|
|
|
|
// Token: 0x06001387 RID: 4999 RVA: 0x00177CB0 File Offset: 0x00175EB0
|
|
private bool ThreeHighest(int index)
|
|
{
|
|
return !this.levelingUp && (index == this.multiplier1 || index == this.multiplier2 || index == this.multiplier2);
|
|
}
|
|
|
|
// Token: 0x06001388 RID: 5000 RVA: 0x00177CDC File Offset: 0x00175EDC
|
|
public void GetStats()
|
|
{
|
|
this.str.Clear();
|
|
this.nameText.text = this.character.stats.displayName;
|
|
this.GetStatNums();
|
|
this.multiplier1 = -1;
|
|
this.multiplier2 = -1;
|
|
this.multiplier3 = -1;
|
|
this.character.stats.GetHighestSkills(out this.multiplier1, out this.multiplier2, out this.multiplier3);
|
|
if (this.levelingUp)
|
|
{
|
|
this.multiplier1 = this.levelUpMenu.multiplier1;
|
|
this.multiplier2 = this.levelUpMenu.multiplier2;
|
|
this.multiplier3 = this.levelUpMenu.multiplier3;
|
|
}
|
|
this.str.Clear();
|
|
if ((float)this.character.stats.HealthCurrent() / (float)this.character.stats.HealthMax() > 0.5f)
|
|
{
|
|
this.str.Append("<size=140%>Health: ");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("<color=#E34317><size=140%>Health: ");
|
|
}
|
|
this.str.Append(this.character.stats.HealthCurrent());
|
|
this.str.Append("</size>/");
|
|
this.str.Append(this.character.stats.HealthMax());
|
|
if ((float)this.character.stats.HealthCurrent() / (float)this.character.stats.HealthMax() < 0.5f)
|
|
{
|
|
this.str.Append("</color>\n");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
}
|
|
this.str.Append("<size=140%>Level ");
|
|
this.str.Append(this.character.stats.level);
|
|
this.str.Append(" </size>[");
|
|
this.str.Append(this.character.stats.XP);
|
|
this.str.Append("/");
|
|
this.str.Append(this.character.stats.XPToNextLevel());
|
|
this.str.Append("]");
|
|
this.healthStaminaText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<size=0%>.</size>");
|
|
this.str.Append("\n");
|
|
this.LinkSkills("Short Sword", 4);
|
|
this.LinkSkills("Long Sword", 5);
|
|
this.LinkSkills("Scepter", 6);
|
|
this.LinkSkills("Whip", 35);
|
|
this.LinkSkills("Ax", 7);
|
|
this.LinkSkills("Pole", 8);
|
|
this.LinkSkills("Sling", 11);
|
|
this.LinkSkills("Bow", 10);
|
|
this.LinkSkills("Unarmed", 13);
|
|
this.LinkSkills("Elyxirs", 12);
|
|
this.LinkSkills("Multi-Hand", 9);
|
|
this.str.Append("\n\n");
|
|
this.LinkSkills("Small Shield", 15);
|
|
this.LinkSkills("Large Shield", 14);
|
|
this.str.Append("\n\n");
|
|
this.LinkSkills("Robes", 0);
|
|
this.LinkSkills("Crimscale", 2);
|
|
this.LinkSkills("Pearl", 1);
|
|
this.LinkSkills("Stonewood", 3);
|
|
this.skillText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("\n");
|
|
if (Links.x.diorama.sceneName != "F4_BanquetIsle")
|
|
{
|
|
this.LinkSkills("Fauna", 31);
|
|
this.LinkSkills("Vines", 32);
|
|
this.LinkSkills("Spores", 34);
|
|
}
|
|
else
|
|
{
|
|
this.LinkSkills("Flesh", 31);
|
|
this.LinkSkills("Morphing", 32);
|
|
this.LinkSkills("Illumination", 34);
|
|
}
|
|
this.str.Append("\n\n");
|
|
this.LinkSkills("Intercessions", 30);
|
|
this.str.Append("\n\n");
|
|
this.LinkSkills("Fish", 23);
|
|
this.LinkSkills("Forest", 24);
|
|
this.LinkSkills("Shrooms", 25);
|
|
this.str.Append("\n\n");
|
|
this.LinkSkills("Flute", 26);
|
|
this.LinkSkills("Horn", 27);
|
|
this.LinkSkills("Shepard Pipes", 29);
|
|
this.str.Append("\n\n");
|
|
this.LinkSkills("Lockpicking", 20);
|
|
this.LinkSkills("Sneaking", 21);
|
|
this.LinkSkills("Bartering", 22);
|
|
this.skillText2.text = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("Weapons\n\n\n\n\n\n\n\n\n\n\n\n\nShields\n\n\n\nArmor");
|
|
this.skillHeadersText.text = this.str.ToString();
|
|
this.str.Append("Weapons\n\n\n\n\n\n\n\n\n\n\n\nShields\n\n\nArmor");
|
|
this.str.Clear();
|
|
if (Links.x.diorama.sceneName == "F4_BanquetIsle")
|
|
{
|
|
this.str.Append("Magic\n\n\n\n\nDivine\n\n\nBinding\n\n\n\n\nInstruments\n\n\n\n\nRogue");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("Runic\n\n\n\n\nDivine\n\n\nBinding\n\n\n\n\nInstruments\n\n\n\n\nRogue");
|
|
}
|
|
this.skillHeadersText2.text = this.str.ToString();
|
|
this.GetSkillNums();
|
|
this.GetOutput();
|
|
this.str.Clear();
|
|
this.str.Append("<font=Bold><uppercase><color=#988D7D>Bonuses & Ailments</color></uppercase></font>");
|
|
this.str.Append("\n");
|
|
this.SetupStatusIcons();
|
|
if (Links.x.joy && this.statusEffectsOpen)
|
|
{
|
|
this.UpdateStatusEffects();
|
|
}
|
|
for (int i = 0; i < this.skillProgress.Count; i++)
|
|
{
|
|
float num = this.character.stats.GetSkillProgress(this.skillID[i]);
|
|
if (this.levelingUp)
|
|
{
|
|
num = 0f;
|
|
}
|
|
this.skillProgress[i].fillAmount = num;
|
|
this.SetButtonColorBlock(this.skillProgressBtns[i], num);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001389 RID: 5001 RVA: 0x0017832C File Offset: 0x0017652C
|
|
public void SetupStatusIcons()
|
|
{
|
|
if (!this.minstrel && !this.pagan && !this.blacksmith && !this.merchant)
|
|
{
|
|
this.statusDescriptions.Clear();
|
|
this.statusEffects.Clear();
|
|
this.effects = this.character.portrait.effectIcons;
|
|
this.effectsImages = this.character.portrait.effectIconImages;
|
|
int count = this.effects.Count;
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
if (this.effects[i].effect._ShowInStatus && !this.effects[i].effect._Permanent)
|
|
{
|
|
this.str.Clear();
|
|
this.statusDescriptions.Add("");
|
|
this.statusEffects.Add(null);
|
|
int num = this.statusEffects.Count - 1;
|
|
Effects effects = this.effects[i];
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Append("<size=1em>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("<size=1.3em>");
|
|
}
|
|
this.str.Append("<font=Bold><color ");
|
|
this.str.Append(this.hoverColor);
|
|
this.str.Append(">");
|
|
if (effects.effect._IsIntercession)
|
|
{
|
|
this.str.Append("Intercession: ");
|
|
}
|
|
this.str.Append(effects.effect._DisplayName);
|
|
if (Links.x.mk)
|
|
{
|
|
this.str.Append("</color></font></size>\n\n<font=Bold>Effects:</font>");
|
|
this.str.Append("\n");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("</color></font></size>\n");
|
|
}
|
|
this.str.Append(effects.displayEffects);
|
|
if (effects.effect._OverallTime > 0f)
|
|
{
|
|
int num2 = effects.effectStartTime + effects.timeToWait - (int)Links.x.gameplay.seconds;
|
|
num2 = (int)Mathf.Ceil(Records.x.ShowSeconds(num2));
|
|
if (effects.displayEffects != "")
|
|
{
|
|
this.str.Append("</color>");
|
|
}
|
|
this.str.Append("\n\n<font=Bold>Duration:</font>\n");
|
|
if ((float)num2 < 60f)
|
|
{
|
|
this.str.Append(num2);
|
|
if ((float)num2 != 1f)
|
|
{
|
|
this.str.Append(" seconds remaining");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(" second remaining");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
float num3 = (float)num2 / 60f;
|
|
num3 = Mathf.Round(num3);
|
|
this.str.Append(num3);
|
|
if (num3 != 1f)
|
|
{
|
|
this.str.Append(" minutes remaining");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(" minute remaining");
|
|
}
|
|
}
|
|
}
|
|
else if (effects.effect._IsIntercession)
|
|
{
|
|
if (effects.displayEffects != "")
|
|
{
|
|
this.str.Append("</color>");
|
|
}
|
|
this.str.Append("\n\n<font=Bold>Duration:</font>\nEffects remain while item is equipped");
|
|
}
|
|
if (effects.durability != 0f)
|
|
{
|
|
this.str.Append("\nCurrent durability: ");
|
|
this.str.Append(effects.durability);
|
|
}
|
|
this.statusDescriptions[num] = this.str.ToString();
|
|
this.statusEffects[num] = effects;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
this.statusDescriptions.Clear();
|
|
this.statusEffects.Clear();
|
|
}
|
|
|
|
// Token: 0x0600138A RID: 5002 RVA: 0x001786F4 File Offset: 0x001768F4
|
|
public void GetOutput()
|
|
{
|
|
this.str.Clear();
|
|
this.str.Append("<size=0%>.</size>");
|
|
this.str.Append("<font=Bold><uppercase><color=#988D7D>Background</color></uppercase></font>");
|
|
this.Link("Race");
|
|
this.str.Append(this.character.stats.race);
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Condition</color></uppercase></font>");
|
|
this.Link("Health");
|
|
this.str.Append(this.character.stats.HealthCurrent());
|
|
this.str.Append("/");
|
|
this.str.Append(this.character.stats.HealthMax());
|
|
this.Link("Rally Speed");
|
|
this.str.Append(this.character.stats.RallySpeed());
|
|
this.str.Append("x");
|
|
this.Link("Vision");
|
|
this.str.Append(this.character.stats.SightRadius(true, false, false));
|
|
if (this.character.stats.SightRadius(true, false, false) == 1f)
|
|
{
|
|
this.str.Append(" pole");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(" poles");
|
|
}
|
|
this.Link("Stamina");
|
|
this.str.Append(this.character.stats.stamina);
|
|
this.str.Append("/");
|
|
this.str.Append(this.character.stats.MaxStamina());
|
|
this.Link("Weight");
|
|
this.str.Append(this.character.stats.CharacterWeight());
|
|
if (this.character.stats.CharacterWeight() == 1f)
|
|
{
|
|
this.str.Append(" stone");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(" stones");
|
|
}
|
|
this.Link("Carrying Weight");
|
|
this.str.Append(this.character.stats.CarryingWeight());
|
|
if ((float)this.character.stats.CarryingWeight() == 1f)
|
|
{
|
|
this.str.Append(" stone");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(" stones");
|
|
}
|
|
this.Link("Ghost Resistance");
|
|
this.str.Append(this.character.stats.GhostResistance(true));
|
|
this.str.Append("%");
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Melee & Range Attacks</color></uppercase></font>");
|
|
this.Link("Chance to Hit");
|
|
this.str.Append(this.character.stats.WeaponHitChance(true, this.character.stats.GetCurrentHand()));
|
|
this.hitChanceText.text = (Mathf.Round(this.character.stats.WeaponHitChance(true, this.character.stats.GetCurrentHand()) * 10f) / 10f).ToString();
|
|
this.Link("Chance to Evade");
|
|
float num;
|
|
this.str.Append(this.character.stats.EvasionChance(true, 0f, out num));
|
|
float num2;
|
|
this.evadeChanceText.text = this.character.stats.EvasionChance(true, 0f, out num2).ToString();
|
|
this.Link("Damage");
|
|
float num3;
|
|
this.str.Append(this.character.stats.DamageRollString(0, out num3));
|
|
this.str.Append(" x Severity");
|
|
this.dmgChanceText.text = this.character.stats.DamageRollString(0, out num3);
|
|
this.acText.text = Mathf.Round(this.character.stats.ArmorAura(1) + (this.character.stats.ArmorNumber(true, true) - this.character.stats.ArmorReduction()) * 10f).ToString() + "%";
|
|
if (Links.x.diorama.sceneName != "F4_BanquetIsle")
|
|
{
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Pagan</color></uppercase></font>");
|
|
this.Link("Difficulty Check (Fauna)");
|
|
this.str.Append(this.character.stats.PaganHitChance(true, "Fauna"));
|
|
this.Link("Difficulty Check (Vines)");
|
|
this.str.Append(this.character.stats.PaganHitChance(true, "Vines"));
|
|
this.Link("Difficulty Check (Spores)");
|
|
this.str.Append(this.character.stats.PaganHitChance(true, "Spores"));
|
|
this.Link("Hit Chance");
|
|
this.str.Append(this.character.stats.PaganRollString());
|
|
this.str.Append(" + Overpower");
|
|
this.paganPowerText.text = this.character.stats.PaganRollString().ToString();
|
|
this.Link("Resistance");
|
|
float num4;
|
|
float num5;
|
|
this.str.Append(this.character.stats.PaganResistance(true, "", out num4, out num5));
|
|
float num6;
|
|
float num7;
|
|
this.paganResistText.text = this.character.stats.PaganResistance(true, "", out num6, out num7).ToString();
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Magic</color></uppercase></font>");
|
|
this.Link("Difficulty Check (Flesh)");
|
|
this.str.Append(this.character.stats.PaganHitChance(true, "Fauna"));
|
|
this.Link("Difficulty Check (Morphing)");
|
|
this.str.Append(this.character.stats.PaganHitChance(true, "Vines"));
|
|
this.Link("Difficulty Check (Illumination)");
|
|
this.str.Append(this.character.stats.PaganHitChance(true, "Spores"));
|
|
this.Link("Hit Chance");
|
|
this.str.Append(this.character.stats.PaganRollString());
|
|
this.str.Append(" + Overpower");
|
|
this.paganPowerText.text = this.character.stats.PaganRollString().ToString();
|
|
this.Link("Resistance");
|
|
float num8;
|
|
float num9;
|
|
this.str.Append(this.character.stats.PaganResistance(true, "", out num8, out num9));
|
|
float num10;
|
|
float num11;
|
|
this.paganResistText.text = this.character.stats.PaganResistance(true, "", out num10, out num11).ToString();
|
|
}
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Divine</color></uppercase></font>");
|
|
this.Link("Intercession Power");
|
|
this.str.Append(this.character.stats.EnchantWearingAbility());
|
|
this.intercessionText.text = this.character.stats.EnchantWearingAbility().ToString();
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Speed</color></uppercase></font>");
|
|
this.Link("Move Speed");
|
|
this.str.Append(this.character.stats.R1(this.character.stats.character.stats.MoveSpeed(true)));
|
|
this.str.Append(" poles/second");
|
|
this.Link("Sailing Speed");
|
|
float num13;
|
|
float num14;
|
|
float num15;
|
|
float num16;
|
|
float num12 = Links.x.gaia.boat.speed + Links.x.fellowship.GetSailingSpeed(out num13, out num14, out num15, out num16);
|
|
num12 = Mathf.Round(num12 * 100f) / 100f;
|
|
this.str.Append(num12);
|
|
this.str.Append(" knots");
|
|
this.Link("Action Speed");
|
|
this.str.Append(this.character.stats.AttackSpeed(this.character.stats.GetCurrentHand(), true, false));
|
|
this.str.Append(" seconds");
|
|
this.attackSpeedText.text = this.character.stats.AttackSpeed(this.character.stats.GetCurrentHand(), true, false).ToString() + "s";
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Instruments</color></uppercase></font>");
|
|
this.Link("Influence");
|
|
this.str.Append("Instrument Power + Outcome");
|
|
this.songPowerText.text = this.character.stats.MusicPowerString().ToString();
|
|
this.Link("Resistance");
|
|
this.str.Append("1-");
|
|
float num17;
|
|
this.str.Append(this.character.stats.InstrumentResistance(true, out num17));
|
|
float num18;
|
|
this.songResistText.text = "1-" + this.character.stats.InstrumentResistance(true, out num18).ToString();
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Binding</color></uppercase></font>");
|
|
this.Link("Charming Forest Creatures");
|
|
this.str.Append(this.character.stats.Charming("Forest", true));
|
|
this.Link("Charming Fish Creatures");
|
|
this.str.Append(this.character.stats.Charming("Fish", true));
|
|
this.Link("Charming Shroom Creatures");
|
|
this.str.Append(this.character.stats.Charming("Shroom", true));
|
|
this.charmText.text = this.character.stats.Charming("", true).ToString();
|
|
this.str.Append("\n\n<font=Bold><uppercase><color=#988D7D>Skill Checks</color></uppercase></font>");
|
|
this.Link("Bartering Discount");
|
|
float num19 = Mathf.Round(this.character.stats.Disposition(Links.x.diorama.sceneName) * 100f);
|
|
this.dispositionText.text = num19.ToString();
|
|
TextMeshProUGUI textMeshProUGUI = this.dispositionText;
|
|
textMeshProUGUI.text += "%";
|
|
this.str.Append(num19);
|
|
this.str.Append("%");
|
|
this.Link("Weapon Repair");
|
|
this.str.Append(this.character.stats.Repair("", true));
|
|
this.str.Append(" x (Weapon's Skill)");
|
|
this.Link("Armor Repair");
|
|
this.str.Append(this.character.stats.SocketingRepair(0, true, ""));
|
|
this.str.Append(" x (Armor's Skill)");
|
|
this.Link("Sneaking Duration");
|
|
float num20 = 0f;
|
|
this.character.stats.Sneaking(true, out num20);
|
|
this.str.Append(num20);
|
|
this.str.Append(" seconds");
|
|
this.sneakText.text = num20.ToString() + "s";
|
|
this.Link("Lockpicking");
|
|
this.str.Append(this.character.stats.Lockpicking(true));
|
|
this.lockpickText.text = this.character.stats.Lockpicking(true).ToString();
|
|
this.Link("Creature Searching");
|
|
this.str.Append(this.character.stats.SearchNumber("Charmer", true, "Forest"));
|
|
this.Link("Search Environment");
|
|
this.str.Append(this.character.stats.SearchNumber("Rogue", true, "Grass"));
|
|
this.outputText.text = this.str.ToString();
|
|
}
|
|
|
|
// Token: 0x0600138B RID: 5003 RVA: 0x00179384 File Offset: 0x00177584
|
|
public void GetStatNums()
|
|
{
|
|
this.str.Clear();
|
|
int num = 0;
|
|
if (this.levelingUp)
|
|
{
|
|
string text = "Strength";
|
|
this.LevelUpStartStats(text);
|
|
this.str.Append(Mathf.Round(this.character.stats.GetStatOnly(text)));
|
|
this.LevelUpEndStats(text);
|
|
this.strengthText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text = "Agility";
|
|
this.LevelUpStartStats(text);
|
|
this.str.Append(Mathf.Round(this.character.stats.GetStatOnly(text)));
|
|
this.LevelUpEndStats(text);
|
|
this.agilityText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text = "Aura";
|
|
this.LevelUpStartStats(text);
|
|
this.str.Append(Mathf.Round(this.character.stats.GetStatOnly(text)));
|
|
this.LevelUpEndStats(text);
|
|
this.auraText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text = "Pagan";
|
|
this.LevelUpStartStats(text);
|
|
this.str.Append(Mathf.Round(this.character.stats.GetStatOnly(text)));
|
|
this.LevelUpEndStats(text);
|
|
this.paganText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text = "Sensory";
|
|
this.LevelUpStartStats(text);
|
|
this.str.Append(Mathf.Round(this.character.stats.GetStatOnly(text)));
|
|
this.LevelUpEndStats(text);
|
|
this.sensoryText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text = "Dexterity";
|
|
this.LevelUpStartStats(text);
|
|
this.str.Append(Mathf.Round(this.character.stats.GetStatOnly(text)));
|
|
this.LevelUpEndStats(text);
|
|
this.dexterityText.text = this.str.ToString();
|
|
}
|
|
else
|
|
{
|
|
string text2 = Mathf.Round(this.character.stats.Stat("Strength", true, out num)).ToString();
|
|
if (num != 0)
|
|
{
|
|
this.Adjusted(num);
|
|
}
|
|
this.str.Append(text2);
|
|
if (num != 0)
|
|
{
|
|
this.AdjustedEnd();
|
|
}
|
|
this.strengthText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text2 = Mathf.Round(this.character.stats.Stat("Agility", true, out num)).ToString();
|
|
if (num != 0)
|
|
{
|
|
this.Adjusted(num);
|
|
}
|
|
this.str.Append(text2);
|
|
if (num != 0)
|
|
{
|
|
this.AdjustedEnd();
|
|
}
|
|
this.agilityText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text2 = Mathf.Round(this.character.stats.Stat("Aura", true, out num)).ToString();
|
|
if (num != 0)
|
|
{
|
|
this.Adjusted(num);
|
|
}
|
|
this.str.Append(text2);
|
|
if (num != 0)
|
|
{
|
|
this.AdjustedEnd();
|
|
}
|
|
this.auraText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text2 = Mathf.Round(this.character.stats.Stat("Pagan", true, out num)).ToString();
|
|
if (num != 0)
|
|
{
|
|
this.Adjusted(num);
|
|
}
|
|
this.str.Append(text2);
|
|
if (num != 0)
|
|
{
|
|
this.AdjustedEnd();
|
|
}
|
|
this.paganText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text2 = Mathf.Round(this.character.stats.Stat("Sensory", true, out num)).ToString();
|
|
if (num != 0)
|
|
{
|
|
this.Adjusted(num);
|
|
}
|
|
this.str.Append(text2);
|
|
if (num != 0)
|
|
{
|
|
this.AdjustedEnd();
|
|
}
|
|
this.sensoryText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
text2 = Mathf.Round(this.character.stats.Stat("Dexterity", true, out num)).ToString();
|
|
if (num != 0)
|
|
{
|
|
this.Adjusted(num);
|
|
}
|
|
this.str.Append(text2);
|
|
if (num != 0)
|
|
{
|
|
this.AdjustedEnd();
|
|
}
|
|
this.dexterityText.text = this.str.ToString();
|
|
}
|
|
if (Links.x.diorama.sceneName == "F4_BanquetIsle")
|
|
{
|
|
this.paganHeader.text = "Occult";
|
|
return;
|
|
}
|
|
this.paganHeader.text = "Pagan";
|
|
}
|
|
|
|
// Token: 0x0600138C RID: 5004 RVA: 0x00179853 File Offset: 0x00177A53
|
|
private void LevelUpStartStats(string n)
|
|
{
|
|
if (this.levelingUp && !this.levelUpMenu.levelUpSkills && this.hoverText == n)
|
|
{
|
|
this.str.Append("<color=#FFEBA8>");
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600138D RID: 5005 RVA: 0x00179889 File Offset: 0x00177A89
|
|
private void LevelUpEndStats(string n)
|
|
{
|
|
if (this.levelingUp && !this.levelUpMenu.levelUpSkills && this.hoverText == n)
|
|
{
|
|
this.str.Append("</color>");
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600138E RID: 5006 RVA: 0x001798BF File Offset: 0x00177ABF
|
|
private void LevelUpStart(string n)
|
|
{
|
|
if (this.levelingUp && this.levelUpMenu.levelUpSkills && this.hoverText == n)
|
|
{
|
|
this.str.Append("<color=#FFEBA8>");
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600138F RID: 5007 RVA: 0x001798F5 File Offset: 0x00177AF5
|
|
private void LevelUpEnd(string n)
|
|
{
|
|
if (this.levelingUp && this.levelUpMenu.levelUpSkills && this.hoverText == n)
|
|
{
|
|
this.str.Append("</color>");
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001390 RID: 5008 RVA: 0x0017992C File Offset: 0x00177B2C
|
|
public void GetSkillNums()
|
|
{
|
|
this.str.Clear();
|
|
string text = "Short Sword";
|
|
this.str.Append("\n");
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(4));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Long Sword";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(5));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Scepter";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(6));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Whip";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(35));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Ax";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(7));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Pole";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(8));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Slings";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(11));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Bow";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(10));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Hand-To-Hand";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(13));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Elixirs";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(12));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Multi-Hand";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(9));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n\n");
|
|
this.str.Append("\n");
|
|
text = "Small Shield";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(15));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Large Shield";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(14));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n\n");
|
|
this.str.Append("\n");
|
|
text = "Robes";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(0));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Crimscale";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(2));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Pearl";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(1));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Stonewood";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(3));
|
|
this.LevelUpEnd(text);
|
|
this.skillNumbersText.text = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("\n");
|
|
text = "Fauna";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(17));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Vines";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(18));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Spores";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(19));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n\n");
|
|
this.str.Append("\n");
|
|
text = "Bindings";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(16));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n\n");
|
|
this.str.Append("\n");
|
|
text = "Charm Fish";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(23));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Charm Forest";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(24));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Charm Shrooms";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(25));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n\n");
|
|
this.str.Append("\n");
|
|
text = "Flute";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(26));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Horn";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(27));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Shepard Pipes";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(29));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n\n");
|
|
this.str.Append("\n");
|
|
text = "Lockpicking";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(20));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Sneaking";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(21));
|
|
this.LevelUpEnd(text);
|
|
this.str.Append("\n");
|
|
text = "Bartering";
|
|
this.LevelUpStart(text);
|
|
this.str.Append(this.character.stats.GetSkill(22));
|
|
this.LevelUpEnd(text);
|
|
this.skillNumbersText2.text = this.str.ToString();
|
|
}
|
|
|
|
// Token: 0x06001391 RID: 5009 RVA: 0x0017A1B4 File Offset: 0x001783B4
|
|
public float GetFillAmount(int prof)
|
|
{
|
|
return (float)prof / 100f;
|
|
}
|
|
|
|
// Token: 0x06001392 RID: 5010 RVA: 0x0017A1C0 File Offset: 0x001783C0
|
|
public string GetStars(int prof)
|
|
{
|
|
if (prof == 0)
|
|
{
|
|
return "";
|
|
}
|
|
if (prof == 1)
|
|
{
|
|
return "*";
|
|
}
|
|
if (prof == 2)
|
|
{
|
|
return "**";
|
|
}
|
|
if (prof == 3)
|
|
{
|
|
return "***";
|
|
}
|
|
if (prof == 4)
|
|
{
|
|
return "***\n*";
|
|
}
|
|
if (prof == 5)
|
|
{
|
|
return "***\n**";
|
|
}
|
|
if (prof == 6)
|
|
{
|
|
return "***\n***";
|
|
}
|
|
if (prof == 7)
|
|
{
|
|
return "***\n***\n*";
|
|
}
|
|
if (prof == 8)
|
|
{
|
|
return "***\n***\n**";
|
|
}
|
|
if (prof == 9)
|
|
{
|
|
return "***\n***\n***";
|
|
}
|
|
return "";
|
|
}
|
|
|
|
// Token: 0x06001393 RID: 5011 RVA: 0x0017A236 File Offset: 0x00178436
|
|
public Portrait GetPortrait(int num)
|
|
{
|
|
return this.portraits[num];
|
|
}
|
|
|
|
// Token: 0x06001394 RID: 5012 RVA: 0x0017A244 File Offset: 0x00178444
|
|
public void OpenRemoveFromParty()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001395 RID: 5013 RVA: 0x0017A246 File Offset: 0x00178446
|
|
public void CloseRemoveFromParty()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001396 RID: 5014 RVA: 0x0017A248 File Offset: 0x00178448
|
|
public void RemoveFromParty()
|
|
{
|
|
this.character.RemoveFromParty(false);
|
|
this.CloseRemoveFromParty();
|
|
this.StartEndMenu(false, false);
|
|
}
|
|
|
|
// Token: 0x06001397 RID: 5015 RVA: 0x0017A264 File Offset: 0x00178464
|
|
public void StartLevelUp()
|
|
{
|
|
if (this.rulesetOpen)
|
|
{
|
|
this.CloseOutput();
|
|
}
|
|
if (this.statusEffectsOpen)
|
|
{
|
|
this.CloseStatusEffects();
|
|
}
|
|
this.note.SetActive(false);
|
|
if (!this.levelUpMenu)
|
|
{
|
|
GameObject gameObject = Object.Instantiate<GameObject>(this.levelUpPrefab, Vector3.zero, Quaternion.Euler(Vector3.zero), base.gameObject.transform);
|
|
gameObject.transform.localPosition = new Vector3(0f, 0f, 0f);
|
|
gameObject.transform.localScale = new Vector3(1.025f, 1.025f, 1.025f);
|
|
gameObject.transform.SetSiblingIndex(7);
|
|
this.levelUpMenu = gameObject.GetComponent<LevelUp>();
|
|
}
|
|
if (Links.x.joy)
|
|
{
|
|
Links.x.hudControl.CloseMenuSwitcher();
|
|
}
|
|
for (int i = 0; i < this.turnOffDuringLevelup.Count; i++)
|
|
{
|
|
this.turnOffDuringLevelup[i].interactable = false;
|
|
}
|
|
this.levelUpMenu.StartMenu();
|
|
this.levelUpButton.SetActive(false);
|
|
this.descBackground.enabled = false;
|
|
if (Links.x.joy)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.firstSkillBtn.gameObject);
|
|
}
|
|
for (int j = 0; j < this.skillProgress.Count; j++)
|
|
{
|
|
this.skillProgress[j].fillAmount = 0f;
|
|
this.SetButtonColorBlock(this.skillProgressBtns[j], 0f);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001398 RID: 5016 RVA: 0x0017A3F6 File Offset: 0x001785F6
|
|
public void ClickedSkill(GameObject go)
|
|
{
|
|
if (this.levelingUp)
|
|
{
|
|
this.levelUpMenu.ClickedSkill(go);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001399 RID: 5017 RVA: 0x0017A40C File Offset: 0x0017860C
|
|
public void ClickedStat(GameObject go)
|
|
{
|
|
if (this.levelingUp)
|
|
{
|
|
this.levelUpMenu.ClickedStat(go);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600139A RID: 5018 RVA: 0x0017A424 File Offset: 0x00178624
|
|
public void EndLevelUp(bool fromClose)
|
|
{
|
|
if (!fromClose && Links.x.joy)
|
|
{
|
|
Links.x.hudControl.menuSwitcher.SetActive(true);
|
|
Links.x.hudControl.menuSwitcherLower.SetActive(true);
|
|
}
|
|
Object.Destroy(this.levelUpMenu.gameObject);
|
|
this.levelUpMenu = null;
|
|
this.levelingUp = false;
|
|
this.CheckLevelUp();
|
|
this.descBackground.enabled = true;
|
|
for (int i = 0; i < this.turnOffDuringLevelup.Count; i++)
|
|
{
|
|
this.turnOffDuringLevelup[i].interactable = true;
|
|
}
|
|
for (int j = 0; j < this.skillProgress.Count; j++)
|
|
{
|
|
float num = this.character.stats.GetSkillProgress(this.skillID[j]);
|
|
if (this.levelingUp)
|
|
{
|
|
num = 0f;
|
|
}
|
|
this.skillProgress[j].fillAmount = num;
|
|
this.SetButtonColorBlock(this.skillProgressBtns[j], num);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600139B RID: 5019 RVA: 0x0017A528 File Offset: 0x00178728
|
|
private void SetButtonColorBlock(Button btn, float amt)
|
|
{
|
|
if (amt <= 0f)
|
|
{
|
|
btn.colors = this.cb0;
|
|
return;
|
|
}
|
|
btn.colors = this.cb1;
|
|
}
|
|
|
|
// Token: 0x0600139C RID: 5020 RVA: 0x0017A54C File Offset: 0x0017874C
|
|
public void StartEndMenu(bool firstEnd, bool fromCloseButton)
|
|
{
|
|
this.TurnOnMainCamera();
|
|
if (fromCloseButton && (Links.x.inventory.repairing || Links.x.inventory.mineralizing) && Links.x.joy)
|
|
{
|
|
Links.x.inventory.repairing = false;
|
|
Links.x.inventory.mineralizing = false;
|
|
Links.x.hudControl.MenuText();
|
|
return;
|
|
}
|
|
Links.x.renderPortraits.ToggleCrossFades(false);
|
|
Links.x.camera3D.enabled = false;
|
|
this.characterCamera.SetActive(false);
|
|
this.characterSpawn.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn1.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn2.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn3.gameObject.SetActive(false);
|
|
this.songSpellShop.SetActive(false);
|
|
this.boat = null;
|
|
this.repairCharacter = null;
|
|
if (this.booksMenu.open)
|
|
{
|
|
this.booksMenu.CloseMenu();
|
|
}
|
|
if (this.levelUpMenu)
|
|
{
|
|
this.EndLevelUp(true);
|
|
}
|
|
if (Links.x.arrowKit.open)
|
|
{
|
|
Links.x.arrowKit.StartClose();
|
|
}
|
|
if (this.statusEffectsOpen)
|
|
{
|
|
this.CloseStatusEffects();
|
|
}
|
|
if (this.character)
|
|
{
|
|
this.character.body.GatherRenderers(false);
|
|
}
|
|
if (this.enchanting)
|
|
{
|
|
Links.x.inventory.enchantMenu.CloseMenu();
|
|
}
|
|
this.enchanting = false;
|
|
this.savedCharacter = this.character;
|
|
this.open = false;
|
|
this.minstrel = false;
|
|
this.blacksmith = false;
|
|
this.pagan = false;
|
|
Records.x.RemoveMenu(base.gameObject);
|
|
if (fromCloseButton)
|
|
{
|
|
Links.x.gameplay.openingAnotherMenu = false;
|
|
Links.x.gameplay.CloseDock();
|
|
}
|
|
bool flag = false;
|
|
if (Links.x.joy && (Links.x.gameplay.dockStart || Links.x.gameplay.itemsStart))
|
|
{
|
|
flag = true;
|
|
}
|
|
if (!firstEnd && (!Links.x.joy || (Links.x.joy && !flag)))
|
|
{
|
|
this.anim.Play("Close");
|
|
}
|
|
else
|
|
{
|
|
this.open = false;
|
|
}
|
|
if (Links.x.joy && flag)
|
|
{
|
|
this.anim.Play("Close", 0, 1f);
|
|
this.EndRoleSheetMenu();
|
|
}
|
|
if (!flag)
|
|
{
|
|
Links.x.hudControl.JoyBox(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600139D RID: 5021 RVA: 0x0017A7E8 File Offset: 0x001789E8
|
|
public void SetSelectionButton()
|
|
{
|
|
GameObject gameObject = this.DefaultSelection();
|
|
if (gameObject.activeSelf && gameObject.activeInHierarchy && this.open && Links.x.gaia.sceneLoaded)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, gameObject);
|
|
UITriggerButton component = gameObject.gameObject.GetComponent<UITriggerButton>();
|
|
if (component)
|
|
{
|
|
Links.x.hudControl.SetJoyBox(component);
|
|
return;
|
|
}
|
|
Links.x.hudControl.SetJoyBox(gameObject.GetComponent<RectTransform>(), Vector4.zero, false, false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600139E RID: 5022 RVA: 0x0017A87C File Offset: 0x00178A7C
|
|
private void LateUpdate()
|
|
{
|
|
if (this.open)
|
|
{
|
|
if (this.scrollTriggerButton)
|
|
{
|
|
Links.x.hudControl.JoyBounds(this.scrollTriggerButton.rt, this.scrollTriggerButton.boxOffset, false);
|
|
Links.x.hudControl.JoyBox(true);
|
|
this.scrollTriggerButton = null;
|
|
}
|
|
if (this.screenW != Screen.width || this.screenH != Screen.height)
|
|
{
|
|
this.ChangeScreenSize();
|
|
}
|
|
if (this.targetAlpha == 1f)
|
|
{
|
|
this.currentAlpha = Mathf.Lerp(this.currentAlpha, this.targetAlpha, Time.unscaledDeltaTime * 5f);
|
|
if (this.currentAlpha >= 0f)
|
|
{
|
|
this.descCanvasGroup.alpha = this.currentAlpha;
|
|
}
|
|
else
|
|
{
|
|
this.descCanvasGroup.alpha = 0f;
|
|
}
|
|
if (this.currentAlpha > 0.01f && !this.itemTooltip.activeSelf)
|
|
{
|
|
this.itemTooltip.SetActive(true);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.currentAlpha = Mathf.Lerp(this.currentAlpha, this.targetAlpha, Time.unscaledDeltaTime * 1f);
|
|
if (this.currentAlpha >= 0f)
|
|
{
|
|
this.descCanvasGroup.alpha = this.currentAlpha;
|
|
}
|
|
else
|
|
{
|
|
this.descCanvasGroup.alpha = 0f;
|
|
}
|
|
if (this.currentAlpha < 0.01f && this.itemTooltip.activeSelf)
|
|
{
|
|
this.CloseDesc();
|
|
}
|
|
}
|
|
if (this.quipStartTime > -1f && this.quip && Time.realtimeSinceStartup > this.quipStartTime + 4f)
|
|
{
|
|
this.quip.End();
|
|
this.quipStartTime = -1f;
|
|
}
|
|
}
|
|
if (this.open && !this.merchant && !this.levelUpMenu)
|
|
{
|
|
this.t += Time.unscaledDeltaTime * 2f;
|
|
if (this.colorTarget == this.levelUpColor1)
|
|
{
|
|
this.skillText.color = Color.Lerp(this.levelUpColor2, this.levelUpColor1, this.t);
|
|
}
|
|
else
|
|
{
|
|
this.skillText.color = Color.Lerp(this.levelUpColor1, this.levelUpColor2, this.t);
|
|
}
|
|
if (this.colorTarget == this.levelUpColor1 && this.skillText.color == this.levelUpColor1)
|
|
{
|
|
this.t = 0f;
|
|
this.colorTarget = this.levelUpColor2;
|
|
}
|
|
if (this.colorTarget == this.levelUpColor2 && this.skillText.color == this.levelUpColor2)
|
|
{
|
|
this.t = 0f;
|
|
this.colorTarget = this.levelUpColor1;
|
|
}
|
|
this.skillText2.color = this.skillText.color;
|
|
}
|
|
else
|
|
{
|
|
this.skillText.color = this.levelUpColor1;
|
|
this.skillText2.color = this.levelUpColor1;
|
|
}
|
|
if (Links.x.menuCamera != null && this.open && !Links.x.inventory.splitter.open && !Links.x.inventory.spinning && !this.merchant && Links.x.gaia.sceneLoaded && Links.x.mk)
|
|
{
|
|
this.currentHover = Links.x.gameplay.currentEventObject;
|
|
this.pointer = new PointerEventData(EventSystem.current);
|
|
this.pointer.position = Input.mousePosition;
|
|
this.raycastResults.Clear();
|
|
EventSystem.current.RaycastAll(this.pointer, this.raycastResults);
|
|
if (this.raycastResults.Count > 0)
|
|
{
|
|
int num = 0;
|
|
foreach (RaycastResult raycastResult in this.raycastResults)
|
|
{
|
|
if (num == 0)
|
|
{
|
|
this.currentHover = raycastResult.gameObject;
|
|
}
|
|
if (Input.GetKey(KeyCode.T))
|
|
{
|
|
GameObject gameObject = raycastResult.gameObject;
|
|
Debug.Log(((gameObject != null) ? gameObject.ToString() : null) + " " + num.ToString());
|
|
}
|
|
num++;
|
|
}
|
|
}
|
|
bool flag = false;
|
|
if (true)
|
|
{
|
|
if (this.currentHover && this.currentHover != this.prevHover)
|
|
{
|
|
if (this.levelingUp && this.prevHover)
|
|
{
|
|
this.levelUpMenu.HoverSet(false, this.prevHover.name);
|
|
this.GetStatNums();
|
|
this.GetSkillNums();
|
|
}
|
|
flag = this.GetDescriptionController(this.currentHover, true);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (this.currentHover && Input.GetMouseButtonDown(0))
|
|
{
|
|
if (this.levelingUp && this.prevHover)
|
|
{
|
|
this.levelUpMenu.HoverSet(false, this.prevHover.name);
|
|
this.GetStatNums();
|
|
this.GetSkillNums();
|
|
}
|
|
flag = this.GetDescriptionController(this.currentHover, true);
|
|
}
|
|
if (this.currentHover && this.currentHover != this.prevHover)
|
|
{
|
|
string name = this.currentHover.name;
|
|
string text = "";
|
|
bool flag2 = false;
|
|
float num2 = 0f;
|
|
bool flag3 = false;
|
|
Links.x.manual.GetDescription(true, name, this.character, out text, out flag2, out flag3, out num2);
|
|
bool flag4 = false;
|
|
if (text != "")
|
|
{
|
|
this.isHovering = true;
|
|
flag4 = true;
|
|
this.str.Clear();
|
|
if (Links.x.mk)
|
|
{
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
int keyIconIndex = Links.x.keyControl.GetKeyIconIndex("LMB");
|
|
this.str.Append(keyIconIndex);
|
|
this.str.Append("></size></voffset>");
|
|
this.str.Append("See Details");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
int controllerSprite = Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite);
|
|
this.str.Append("></size></voffset>");
|
|
this.str.Append("See Details");
|
|
}
|
|
}
|
|
if (name.Contains("Abilities"))
|
|
{
|
|
this.isHovering = true;
|
|
flag4 = true;
|
|
string text2 = "";
|
|
if (name.Contains("Vines"))
|
|
{
|
|
text2 = "Vines";
|
|
}
|
|
if (name.Contains("Fauna"))
|
|
{
|
|
text2 = "Fauna";
|
|
}
|
|
if (name.Contains("Spores"))
|
|
{
|
|
text2 = "Spores";
|
|
}
|
|
if (name.Contains("Drum"))
|
|
{
|
|
text2 = "Drum";
|
|
}
|
|
if (name.Contains("Flute"))
|
|
{
|
|
text2 = "Flute";
|
|
}
|
|
if (name.Contains("Horn"))
|
|
{
|
|
text2 = "Horn";
|
|
}
|
|
if (name.Contains("Melee"))
|
|
{
|
|
text2 = "Melee";
|
|
}
|
|
if (name.Contains("Range"))
|
|
{
|
|
text2 = "Range";
|
|
}
|
|
if (name.Contains("Defense"))
|
|
{
|
|
text2 = "Defense";
|
|
}
|
|
this.str.Clear();
|
|
if (Links.x.mk)
|
|
{
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
int keyIconIndex2 = Links.x.keyControl.GetKeyIconIndex("LMB");
|
|
this.str.Append(keyIconIndex2);
|
|
this.str.Append("></size></voffset>");
|
|
this.str.Append("See ");
|
|
this.str.Append(Links.x.manual.DisplayName(text2));
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
int controllerSprite2 = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite2);
|
|
this.str.Append("></size></voffset>");
|
|
this.str.Append("See ");
|
|
this.str.Append(Links.x.manual.DisplayName(text2));
|
|
}
|
|
}
|
|
name.Contains("Status Icon");
|
|
if (this.isHovering && flag4)
|
|
{
|
|
Links.x.inventory.SetDragMessageText(this.str.ToString(), null);
|
|
if (this.tooltipCorout != null)
|
|
{
|
|
base.StopCoroutine(this.tooltipCorout);
|
|
this.tooltipCorout = null;
|
|
}
|
|
flag = true;
|
|
}
|
|
}
|
|
}
|
|
if (Input.GetMouseButtonUp(0) && Links.x.mk)
|
|
{
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
}
|
|
if (this.prevHover && this.currentHover != this.prevHover && !flag && this.prevHover && this.isHovering)
|
|
{
|
|
if (this.levelingUp)
|
|
{
|
|
this.levelUpMenu.HoverSet(false, this.prevHover.name);
|
|
this.GetStatNums();
|
|
this.GetSkillNums();
|
|
}
|
|
this.targetAlpha = -2f;
|
|
this.hoverText = "";
|
|
this.waitToEndHover = 0f;
|
|
Links.x.gameplay.uiCanClick = false;
|
|
this.isHovering = false;
|
|
if (this.tooltipCorout != null)
|
|
{
|
|
base.StopCoroutine(this.tooltipCorout);
|
|
this.tooltipCorout = null;
|
|
}
|
|
this.tooltipCorout = this.CloseHoverTip();
|
|
base.StartCoroutine(this.tooltipCorout);
|
|
this.currentHover = null;
|
|
}
|
|
this.prevHover = this.currentHover;
|
|
}
|
|
else if (this.contents1.activeSelf)
|
|
{
|
|
this.currentHover = Links.x.gameplay.currentEventObject;
|
|
bool flag5 = false;
|
|
if (this.currentHover && this.currentHover != this.prevHover)
|
|
{
|
|
if (this.levelingUp && this.prevHover)
|
|
{
|
|
this.levelUpMenu.HoverSet(false, this.prevHover.name);
|
|
this.GetStatNums();
|
|
this.GetSkillNums();
|
|
}
|
|
flag5 = this.GetDescriptionController(this.currentHover, true);
|
|
if (flag5)
|
|
{
|
|
Links.x.inventory.CloseTooltipController();
|
|
this.descriptionTextInv.text = "";
|
|
this.descriptionTextInv2.text = "";
|
|
this.descriptionTextInv3.text = "";
|
|
}
|
|
}
|
|
if (this.prevHover && this.currentHover != this.prevHover && !flag5 && this.prevHover && this.isHovering)
|
|
{
|
|
if (this.levelingUp)
|
|
{
|
|
this.levelUpMenu.HoverSet(false, this.prevHover.name);
|
|
this.GetStatNums();
|
|
this.GetSkillNums();
|
|
}
|
|
this.targetAlpha = -2f;
|
|
this.hoverText = "";
|
|
this.waitToEndHover = 0f;
|
|
Links.x.gameplay.uiCanClick = false;
|
|
this.isHovering = false;
|
|
if (this.tooltipCorout != null)
|
|
{
|
|
base.StopCoroutine(this.tooltipCorout);
|
|
this.tooltipCorout = null;
|
|
}
|
|
this.tooltipCorout = this.CloseHoverTip();
|
|
base.StartCoroutine(this.tooltipCorout);
|
|
this.currentHover = null;
|
|
this.currentHover = null;
|
|
}
|
|
this.prevHover = this.currentHover;
|
|
if (Links.x.joy)
|
|
{
|
|
GameObject currentSelectedGameObject = EventSystem.current.currentSelectedGameObject;
|
|
bool flag6 = false;
|
|
if (currentSelectedGameObject == null)
|
|
{
|
|
flag6 = true;
|
|
}
|
|
if (!flag6)
|
|
{
|
|
bool flag7 = false;
|
|
if (!currentSelectedGameObject.gameObject.activeSelf || !currentSelectedGameObject.gameObject.activeInHierarchy || !this.open)
|
|
{
|
|
flag7 = true;
|
|
}
|
|
if (!flag7 && currentSelectedGameObject.gameObject.name.Contains("Portrait") && !Links.x.inventory.dragging)
|
|
{
|
|
flag7 = true;
|
|
}
|
|
if (flag7)
|
|
{
|
|
this.SetSelectionButton();
|
|
flag6 = true;
|
|
}
|
|
}
|
|
if (!flag6)
|
|
{
|
|
if (currentSelectedGameObject.transform.parent == null)
|
|
{
|
|
flag6 = true;
|
|
}
|
|
if (!flag6)
|
|
{
|
|
if ((!(currentSelectedGameObject.transform.parent.gameObject == this.contentPanel.gameObject) || !this.merchant) && !(currentSelectedGameObject.transform.parent.gameObject == this.contentPanelSpells.gameObject) && !(currentSelectedGameObject.transform.parent.gameObject == this.contentPanelRuleset.gameObject) && !(currentSelectedGameObject.transform.parent.gameObject == this.contentPanelShop.gameObject))
|
|
{
|
|
flag6 = true;
|
|
}
|
|
if (currentSelectedGameObject == this.lastSelected)
|
|
{
|
|
flag6 = true;
|
|
}
|
|
if (!flag6)
|
|
{
|
|
if (currentSelectedGameObject.transform.parent.gameObject == this.contentPanel.gameObject && this.merchant)
|
|
{
|
|
this.selectedRectTransform = currentSelectedGameObject.GetComponent<RectTransform>();
|
|
float num3 = Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) + this.selectedRectTransform.rect.height;
|
|
float y = this.contentPanel.anchoredPosition.y;
|
|
float num4 = this.contentPanel.anchoredPosition.y + this.scrollRectTransform.rect.height;
|
|
if (num3 > num4)
|
|
{
|
|
float num5 = num3 - this.scrollRectTransform.rect.height;
|
|
this.contentPanel.anchoredPosition = new Vector2(this.contentPanel.anchoredPosition.x, num5);
|
|
}
|
|
else if (Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) < y)
|
|
{
|
|
this.contentPanel.anchoredPosition = new Vector2(this.contentPanel.anchoredPosition.x, Mathf.Abs(this.selectedRectTransform.anchoredPosition.y));
|
|
}
|
|
}
|
|
else if (currentSelectedGameObject.transform.parent.gameObject == this.contentPanelRuleset.gameObject)
|
|
{
|
|
this.selectedRectTransform = currentSelectedGameObject.GetComponent<RectTransform>();
|
|
float num6 = Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) + this.selectedRectTransform.rect.height;
|
|
float y2 = this.contentPanelRuleset1.anchoredPosition.y;
|
|
float num7 = this.contentPanelRuleset1.anchoredPosition.y + this.scrollRectTransformRuleset.rect.height;
|
|
if (num6 > num7)
|
|
{
|
|
float num8 = num6 - this.scrollRectTransformRuleset.rect.height;
|
|
this.contentPanelRuleset1.anchoredPosition = new Vector2(this.contentPanelRuleset1.anchoredPosition.x, num8);
|
|
}
|
|
else if (Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) < y2)
|
|
{
|
|
float num9 = 30f;
|
|
this.contentPanelRuleset1.anchoredPosition = new Vector2(this.contentPanelRuleset1.anchoredPosition.x, Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) - num9);
|
|
}
|
|
}
|
|
else if (currentSelectedGameObject.transform.parent.gameObject == this.contentPanelSpells.gameObject)
|
|
{
|
|
this.selectedRectTransform = currentSelectedGameObject.GetComponent<RectTransform>();
|
|
float num10 = Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) + this.selectedRectTransform.rect.height;
|
|
float y3 = this.contentPanelSpells.anchoredPosition.y;
|
|
float num11 = this.contentPanelSpells.anchoredPosition.y + this.scrollRectTransformSpells.rect.height;
|
|
if (num10 > num11)
|
|
{
|
|
float num12 = num10 - this.scrollRectTransformSpells.rect.height;
|
|
this.contentPanelSpells.anchoredPosition = new Vector2(this.contentPanelSpells.anchoredPosition.x, num12 + 60f);
|
|
}
|
|
else if (Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) < y3)
|
|
{
|
|
this.contentPanelSpells.anchoredPosition = new Vector2(this.contentPanelSpells.anchoredPosition.x, Mathf.Abs(this.selectedRectTransform.anchoredPosition.y));
|
|
}
|
|
}
|
|
else if (currentSelectedGameObject.transform.parent.gameObject == this.contentPanelShop.gameObject)
|
|
{
|
|
this.selectedRectTransform = currentSelectedGameObject.GetComponent<RectTransform>();
|
|
float num13 = Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) + this.selectedRectTransform.rect.height;
|
|
float y4 = this.contentPanelShop.anchoredPosition.y;
|
|
float num14 = this.contentPanelShop.anchoredPosition.y + this.scrollRectTransformShop.rect.height;
|
|
if (num13 > num14)
|
|
{
|
|
float num15 = num13 - this.scrollRectTransformShop.rect.height;
|
|
this.contentPanelShop.anchoredPosition = new Vector2(this.contentPanelShop.anchoredPosition.x, num15);
|
|
}
|
|
else if (Mathf.Abs(this.selectedRectTransform.anchoredPosition.y) < y4)
|
|
{
|
|
this.contentPanelShop.anchoredPosition = new Vector2(this.contentPanelShop.anchoredPosition.x, Mathf.Abs(this.selectedRectTransform.anchoredPosition.y));
|
|
}
|
|
}
|
|
this.lastSelected = currentSelectedGameObject;
|
|
if ((currentSelectedGameObject.transform.parent.gameObject == this.contentPanel.gameObject && this.merchant) || currentSelectedGameObject.transform.parent.gameObject == this.contentPanelSpells.gameObject || currentSelectedGameObject.transform.parent.gameObject == this.contentPanelRuleset.gameObject || currentSelectedGameObject.transform.parent.gameObject == this.contentPanelShop.gameObject)
|
|
{
|
|
UITriggerButton component = currentSelectedGameObject.GetComponent<UITriggerButton>();
|
|
if (component)
|
|
{
|
|
this.scrollTriggerButton = component;
|
|
Links.x.hudControl.JoyBounds(this.scrollTriggerButton.rt, this.scrollTriggerButton.boxOffset, false);
|
|
Links.x.hudControl.JoyBox(true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.hudControl.JoyBox(false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (Links.x.joy && !Links.x.inventory.dragging)
|
|
{
|
|
if (Links.x.gameplay.aimStart)
|
|
{
|
|
int num16 = this.thisPortraitOrder.IndexOf(this.character);
|
|
int num17;
|
|
if (num16 == 3)
|
|
{
|
|
num17 = 0;
|
|
}
|
|
else
|
|
{
|
|
num17 = num16 + 1;
|
|
}
|
|
if (num17 > -1 && num17 <= 3 && num17 < this.thisPortraitOrder.Count)
|
|
{
|
|
this.SwitchCharacter(this.thisPortraitOrder[num17], false, false);
|
|
}
|
|
}
|
|
if (Links.x.gameplay.targetDodgeStart)
|
|
{
|
|
int num18 = this.thisPortraitOrder.IndexOf(this.character);
|
|
int num19;
|
|
if (num18 == 0)
|
|
{
|
|
num19 = 3;
|
|
}
|
|
else
|
|
{
|
|
num19 = num18 - 1;
|
|
}
|
|
if (num19 > -1 && num19 <= 3 && num19 < this.thisPortraitOrder.Count)
|
|
{
|
|
this.SwitchCharacter(this.thisPortraitOrder[num19], false, false);
|
|
}
|
|
}
|
|
if (Links.x.gameplay.hudLeftStart)
|
|
{
|
|
this.ToggleStatusEffects();
|
|
}
|
|
}
|
|
}
|
|
if (this.open && this.body && !this.merchant && !this.minstrel)
|
|
{
|
|
if (!this.body.gameObject.activeSelf || this.body.tr.parent == Links.x.cellar.tr)
|
|
{
|
|
this.UpdateBody(this.body.model);
|
|
}
|
|
if (this.body.headObject && (!this.body.headObject.gameObject.activeSelf || this.body.headObject.transform.parent == Links.x.cellar.tr))
|
|
{
|
|
this.UpdateBody(this.body.model);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600139F RID: 5023 RVA: 0x0017BD88 File Offset: 0x00179F88
|
|
private IEnumerator CloseHoverTip()
|
|
{
|
|
yield return new WaitForSecondsRealtime(0.15f);
|
|
if (!this.isHovering)
|
|
{
|
|
Links.x.inventory.SetDragMessageText("", null);
|
|
this.normalDescription.SetActive(true);
|
|
this.extendedDescription.SetActive(false);
|
|
this.effectsDescription.SetActive(false);
|
|
}
|
|
this.tooltipCorout = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060013A0 RID: 5024 RVA: 0x0017BD98 File Offset: 0x00179F98
|
|
public bool GetDescriptionController(GameObject obj, bool setLevelUpHover)
|
|
{
|
|
string name = obj.name;
|
|
this.hoverText = name;
|
|
if (name == "Race")
|
|
{
|
|
this.hoverText = this.character.stats.race;
|
|
}
|
|
if (name == "Background")
|
|
{
|
|
this.hoverText = this.character.stats.raceTrait;
|
|
}
|
|
if (this.hoverText == null)
|
|
{
|
|
return false;
|
|
}
|
|
string text = "";
|
|
bool flag = false;
|
|
float num = 0f;
|
|
bool flag2 = false;
|
|
Links.x.manual.GetDescription(true, this.hoverText, this.character, out text, out flag, out flag2, out num);
|
|
if (!Links.x.inventory.hitItem && !Links.x.inventory.hitEquipped)
|
|
{
|
|
this.descriptionTextInv.text = "";
|
|
this.descriptionTextInv2.text = "";
|
|
this.descriptionTextInv3.text = "";
|
|
}
|
|
if (text != "")
|
|
{
|
|
if (!this.itemTooltip.activeSelf)
|
|
{
|
|
this.itemTooltip.SetActive(true);
|
|
}
|
|
this.descriptionEffectsText.text = "";
|
|
this.targetAlpha = 1f;
|
|
if (!flag && !flag2)
|
|
{
|
|
this.descriptionTextRuleset.text = text;
|
|
this.extendedDescription.SetActive(true);
|
|
this.normalDescription.SetActive(false);
|
|
}
|
|
else
|
|
{
|
|
this.descriptionText.text = text;
|
|
this.normalDescription.SetActive(true);
|
|
this.extendedDescription.SetActive(false);
|
|
}
|
|
this.effectsDescription.SetActive(false);
|
|
this.isHovering = true;
|
|
Links.x.inventory.doLookAt = true;
|
|
if (!this.levelingUp)
|
|
{
|
|
if (flag)
|
|
{
|
|
this.levelProgress.SetActive(true);
|
|
this.levelFill.fillAmount = num;
|
|
this.levelText.text = Mathf.Round(num * 100f).ToString() + "% of all skill use";
|
|
}
|
|
else
|
|
{
|
|
this.levelProgress.SetActive(false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (setLevelUpHover)
|
|
{
|
|
this.levelUpMenu.HoverSet(true, this.hoverText);
|
|
}
|
|
string text2 = "";
|
|
float num2 = 0f;
|
|
float num3 = 0f;
|
|
if (flag2 && !this.levelUpMenu.levelUpSkills)
|
|
{
|
|
this.GetStatNums();
|
|
float originalStat = this.levelUpMenu.GetOriginalStat(this.hoverText);
|
|
float currentStat = this.levelUpMenu.GetCurrentStat(this.hoverText);
|
|
if (this.levelUpMenu.statChosen1 == this.hoverText)
|
|
{
|
|
num2 = currentStat;
|
|
num3 = originalStat;
|
|
text2 = "Return " + this.hoverText + " upgrade";
|
|
}
|
|
else
|
|
{
|
|
num2 = originalStat;
|
|
num3 = currentStat;
|
|
text2 = "Upgrade " + this.hoverText;
|
|
}
|
|
}
|
|
if (!flag2 && this.levelUpMenu.levelUpSkills && flag)
|
|
{
|
|
this.GetSkillNums();
|
|
int skillIndex = this.levelUpMenu.GetSkillIndex(this.hoverText);
|
|
float originalSkill = this.levelUpMenu.GetOriginalSkill(skillIndex);
|
|
float currentSkill = this.levelUpMenu.GetCurrentSkill(skillIndex);
|
|
string text3 = Links.x.manual.DisplayNameFromIndex(skillIndex, this.character);
|
|
if (this.levelUpMenu.skillChosen1 == this.hoverText || this.levelUpMenu.skillChosen2 == this.hoverText || this.levelUpMenu.skillChosen3 == this.hoverText)
|
|
{
|
|
num2 = currentSkill;
|
|
num3 = originalSkill;
|
|
text2 = "Return upgrade";
|
|
}
|
|
else
|
|
{
|
|
num2 = originalSkill;
|
|
num3 = currentSkill;
|
|
if (Records.x.banquetIsle && skillIndex == 17)
|
|
{
|
|
text3 = "Flesh";
|
|
}
|
|
if (Records.x.banquetIsle && skillIndex == 18)
|
|
{
|
|
text3 = "Morphing";
|
|
}
|
|
if (Records.x.banquetIsle && skillIndex == 19)
|
|
{
|
|
text3 = "Illumination";
|
|
}
|
|
text2 = "Upgrade " + text3;
|
|
}
|
|
}
|
|
if (text2 != "")
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Clear();
|
|
this.str.Append("\n\n");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite);
|
|
this.str.Append("></size></voffset>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Clear();
|
|
this.str.Append("\n\n");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex = Links.x.keyControl.GetKeyIconIndex("LMB");
|
|
this.str.Append(keyIconIndex);
|
|
this.str.Append("></size></voffset>");
|
|
}
|
|
this.str.Append(text2);
|
|
this.str.Append(" (<color #D4CDC1>");
|
|
this.str.Append(num2);
|
|
this.str.Append("</color> to <color #D4CDC1>");
|
|
this.str.Append(num3);
|
|
this.str.Append("</color>)");
|
|
TextMeshProUGUI textMeshProUGUI = this.descriptionText;
|
|
textMeshProUGUI.text += this.str.ToString();
|
|
}
|
|
this.levelProgress.SetActive(false);
|
|
}
|
|
return true;
|
|
}
|
|
if (this.hoverText == "Equipped Ability")
|
|
{
|
|
if (!Links.x.inventory.hitItem && !Links.x.inventory.hitEquipped)
|
|
{
|
|
this.descriptionTextInv.text = "";
|
|
this.descriptionTextInv2.text = "";
|
|
this.descriptionTextInv3.text = "";
|
|
}
|
|
this.targetAlpha = 1f;
|
|
text = "<size=1.2em><font=Bold>Active";
|
|
SkillButton component = obj.GetComponent<SkillButton>();
|
|
if (component.isInstrument)
|
|
{
|
|
text += " Song: </font></size>";
|
|
}
|
|
else
|
|
{
|
|
text += " Word of Power: </font></size>";
|
|
}
|
|
text += component.fullText;
|
|
text += "\n\n";
|
|
text += component.readyText;
|
|
this.descriptionText.text = text;
|
|
this.isHovering = true;
|
|
this.levelProgress.SetActive(false);
|
|
this.effectsDescription.SetActive(false);
|
|
}
|
|
else if (this.hoverText == "Ruleset")
|
|
{
|
|
this.targetAlpha = 1f;
|
|
obj.GetComponent<Image>();
|
|
this.descriptionText.text = "View full ruleset...";
|
|
this.isHovering = true;
|
|
this.levelProgress.SetActive(false);
|
|
this.normalDescription.SetActive(true);
|
|
this.extendedDescription.SetActive(false);
|
|
this.effectsDescription.SetActive(false);
|
|
}
|
|
if (obj.transform.parent && obj.transform.parent.gameObject.name == "Status Grid")
|
|
{
|
|
this.effectsDescription.SetActive(true);
|
|
this.normalDescription.SetActive(false);
|
|
this.extendedDescription.SetActive(false);
|
|
Links.x.inventory.itemInfoCompare.gameObject.SetActive(false);
|
|
if (!Links.x.inventory.hitItem && !Links.x.inventory.hitEquipped)
|
|
{
|
|
this.descriptionTextInv.text = "";
|
|
this.descriptionTextInv2.text = "";
|
|
this.descriptionTextInv3.text = "";
|
|
}
|
|
this.targetAlpha = 1f;
|
|
Image component2 = obj.GetComponent<Image>();
|
|
Character character = obj.transform.parent.gameObject.transform.parent.gameObject.GetComponent<Portrait>().character;
|
|
int effectIndex = character.characterSheetPortrait.GetEffectIndex(component2);
|
|
if (effectIndex < this.statusDescriptions.Count && effectIndex > -1)
|
|
{
|
|
Effects effectAtIndex = character.characterSheetPortrait.GetEffectAtIndex(effectIndex);
|
|
this.str.Clear();
|
|
if (effectAtIndex)
|
|
{
|
|
this.str.Append("<size=1.3em><font=Bold><color ");
|
|
this.str.Append(this.hoverColor);
|
|
this.str.Append(">");
|
|
if (effectAtIndex.effect._IsIntercession)
|
|
{
|
|
this.str.Append("Intercession: ");
|
|
}
|
|
this.str.Append(effectAtIndex.effect._DisplayName);
|
|
this.str.Append("</color></font></size>\n\n<font=Bold>Effects:</font>");
|
|
this.str.Append("\n");
|
|
this.str.Append(effectAtIndex.displayEffects);
|
|
if (effectAtIndex.effect._OverallTime > 0f)
|
|
{
|
|
int num4 = effectAtIndex.effectStartTime + effectAtIndex.timeToWait - (int)Links.x.gameplay.seconds;
|
|
num4 = (int)Mathf.Ceil(Records.x.ShowSeconds(num4));
|
|
if (effectAtIndex.displayEffects != "")
|
|
{
|
|
this.str.Append("</color>");
|
|
}
|
|
this.str.Append("\n\n<font=Bold>Duration:</font>\n");
|
|
if ((float)num4 < 60f)
|
|
{
|
|
this.str.Append(num4);
|
|
if ((float)num4 != 1f)
|
|
{
|
|
this.str.Append(" seconds remaining");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(" second remaining");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
float num5 = (float)num4 / 60f;
|
|
num5 = Mathf.Round(num5);
|
|
this.str.Append(num5);
|
|
if (num5 != 1f)
|
|
{
|
|
this.str.Append(" minutes remaining");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(" minute remaining");
|
|
}
|
|
}
|
|
}
|
|
else if (effectAtIndex.effect._IsIntercession)
|
|
{
|
|
if (effectAtIndex.displayEffects != "")
|
|
{
|
|
this.str.Append("</color>");
|
|
}
|
|
this.str.Append("\n\n<font=Bold>Duration:</font>\nEffects remain while item is equipped");
|
|
}
|
|
if (effectAtIndex.durability != 0f)
|
|
{
|
|
this.str.Append("\nCurrent durability: ");
|
|
this.str.Append(effectAtIndex.durability);
|
|
}
|
|
}
|
|
this.descriptionEffectsText.text = this.str.ToString();
|
|
}
|
|
this.isHovering = true;
|
|
this.levelProgress.SetActive(false);
|
|
RectTransform component3 = this.effectsDescription.GetComponent<RectTransform>();
|
|
component3.sizeDelta = new Vector2(component3.sizeDelta.x, this.descriptionEffectsText.preferredHeight);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// Token: 0x060013A1 RID: 5025 RVA: 0x0017C86C File Offset: 0x0017AA6C
|
|
public void CloseNote()
|
|
{
|
|
this.note.SetActive(false);
|
|
if (Links.x.joy)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.attackSpeedText.gameObject.transform.parent.gameObject);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013A2 RID: 5026 RVA: 0x0017C8BF File Offset: 0x0017AABF
|
|
private IEnumerator EndCloseNote()
|
|
{
|
|
this.note.gameObject.GetComponent<Animator>().Play("CloseSubMenu");
|
|
MasterAudio.PlaySoundAndForget("Paper Open 2", 1f, new float?(1f), 0f, "", null);
|
|
yield return new WaitForSecondsRealtime(0.5f);
|
|
this.closingNoteRoutine = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060013A3 RID: 5027 RVA: 0x0017C8D0 File Offset: 0x0017AAD0
|
|
public void OpenNote(Library.Inventory itemRow)
|
|
{
|
|
this.SetPortraitNav(false);
|
|
if (Records.x.editor && Records.x.testQuests)
|
|
{
|
|
Debug.Log(itemRow._SetVariable);
|
|
}
|
|
if (itemRow._SetVariable != "" && DialogueLua.GetVariable(itemRow._SetVariable).asInt == 0)
|
|
{
|
|
DialogueLua.SetVariable(itemRow._SetVariable, 1);
|
|
}
|
|
if (itemRow._SetQuest != "")
|
|
{
|
|
bool flag = true;
|
|
if (QuestLog.GetQuestState(itemRow._SetQuest) == QuestState.PerpIsDead)
|
|
{
|
|
flag = false;
|
|
}
|
|
if (QuestLog.GetQuestState(itemRow._SetQuest) == QuestState.Failure)
|
|
{
|
|
flag = false;
|
|
}
|
|
if (QuestLog.GetQuestState(itemRow._SetQuest) == QuestState.Complete)
|
|
{
|
|
flag = false;
|
|
}
|
|
if (QuestLog.GetQuestState(itemRow._SetQuest) == QuestState.WaitingForExileIsland)
|
|
{
|
|
flag = false;
|
|
}
|
|
if (QuestLog.GetQuestState(itemRow._SetQuest) == QuestState.ExileIsland)
|
|
{
|
|
flag = false;
|
|
}
|
|
if (QuestLog.GetQuestState(itemRow._SetQuest) == QuestState.Success)
|
|
{
|
|
flag = false;
|
|
}
|
|
if (flag)
|
|
{
|
|
QuestLog.SetQuestState(itemRow._SetQuest, Records.x.StringToQuestState(itemRow._SetQuestState));
|
|
}
|
|
}
|
|
MasterAudio.PlaySoundAndForget("Paper Open 2", 1f, new float?(1f), 0f, "", null);
|
|
this.note.SetActive(true);
|
|
if (this.noteAnimator.gameObject.activeInHierarchy)
|
|
{
|
|
this.noteAnimator.Play("OpenMiddleScroll");
|
|
}
|
|
bool flag2 = true;
|
|
if (itemRow._NotePath.Contains("Image_"))
|
|
{
|
|
flag2 = false;
|
|
}
|
|
if (flag2)
|
|
{
|
|
this.noteScroll.SetActive(true);
|
|
this.noteImage.SetActive(false);
|
|
if (this.noteAnimator.gameObject.activeInHierarchy)
|
|
{
|
|
this.noteAnimator.Play("OpenMiddleScroll");
|
|
}
|
|
TextAsset textAsset = Resources.Load<TextAsset>("Text Files/" + itemRow._NotePath);
|
|
Debug.Log("Text Files/" + itemRow._NotePath);
|
|
this.noteText.text = textAsset.text;
|
|
this.savedNoteText = textAsset.text;
|
|
this.savedNoteImage = "";
|
|
this.savedNoteRune = "";
|
|
}
|
|
else
|
|
{
|
|
this.noteScroll.SetActive(false);
|
|
this.noteImage.SetActive(true);
|
|
string notePath = itemRow._NotePath;
|
|
string text = "Image_";
|
|
string text2 = notePath.Replace(text, "");
|
|
string text3 = "Text Files/" + text2;
|
|
Sprite sprite = Resources.Load<Sprite>(text3);
|
|
if (sprite == null)
|
|
{
|
|
string text4 = Application.persistentDataPath + "/AutoSave/";
|
|
text4 += text2;
|
|
text4 += ".png";
|
|
sprite = Links.x.archives.AddRune(text2, text4, "", text2);
|
|
this.noteSprite.sprite = sprite;
|
|
this.savedNoteRune = text2;
|
|
if (sprite)
|
|
{
|
|
float width = sprite.rect.width;
|
|
float height = sprite.rect.height;
|
|
float num = 410f;
|
|
float num2 = height * num / 512f;
|
|
this.noteSprite.gameObject.GetComponent<RectTransform>().sizeDelta = new Vector2(num, num2);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.noteSprite.sprite = sprite;
|
|
float width2 = sprite.rect.width;
|
|
float height2 = sprite.rect.height;
|
|
float num3 = width2 / 410f;
|
|
float num4 = 410f;
|
|
float num5 = height2 / num3;
|
|
this.noteSprite.gameObject.GetComponent<RectTransform>().sizeDelta = new Vector2(num4, num5);
|
|
this.savedNoteImage = text3;
|
|
this.savedNoteRune = "";
|
|
}
|
|
this.savedNoteText = "";
|
|
}
|
|
if (Links.x.joy)
|
|
{
|
|
Links.x.inventory.ToggleCharacterSheetButtonStateForDrag(true);
|
|
this.closeText.SetActive(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013A4 RID: 5028 RVA: 0x0017CCB8 File Offset: 0x0017AEB8
|
|
public void ToggleAutoCast()
|
|
{
|
|
if (Links.x.mk)
|
|
{
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
}
|
|
if (this.character.stats.autoCastAI)
|
|
{
|
|
this.character.stats.autoCastAI = false;
|
|
Links.x.removeFX.gameObject.SetActive(true);
|
|
Links.x.removeFX.gameObject.GetComponent<HannahAnimator>().Play("Idle");
|
|
Links.x.removeFX.position = this.autoCastToggle.gameObject.transform.position;
|
|
}
|
|
else
|
|
{
|
|
this.character.stats.autoCastAI = true;
|
|
Links.x.itemPickupFX.gameObject.SetActive(true);
|
|
Links.x.itemPickupFX.gameObject.GetComponent<HannahAnimator>().Play("Idle");
|
|
Links.x.itemPickupFX.position = this.autoCastToggle.gameObject.transform.position;
|
|
}
|
|
this.ShowAutoCast();
|
|
}
|
|
|
|
// Token: 0x060013A5 RID: 5029 RVA: 0x0017CDC6 File Offset: 0x0017AFC6
|
|
public void ShowAutoCast()
|
|
{
|
|
if (this.character.stats.autoCastAI)
|
|
{
|
|
this.autoCastToggle.enabled = true;
|
|
return;
|
|
}
|
|
this.autoCastToggle.enabled = false;
|
|
}
|
|
|
|
// Token: 0x060013A6 RID: 5030 RVA: 0x0017CDF4 File Offset: 0x0017AFF4
|
|
public void PinToDock()
|
|
{
|
|
Debug.Log(string.Concat(new string[]
|
|
{
|
|
"Pin to dock ",
|
|
Links.x.hudControl.savedNoteImage,
|
|
" ",
|
|
this.savedNoteImage,
|
|
" ",
|
|
this.savedNoteText
|
|
}));
|
|
Links.x.itemPickupFX.gameObject.SetActive(true);
|
|
Links.x.itemPickupFX.gameObject.GetComponent<HannahAnimator>().Play("Idle");
|
|
Links.x.itemPickupFX.position = this.pinButton.transform.position;
|
|
if ((Links.x.hudControl.savedNoteImage == this.savedNoteImage && this.savedNoteImage != "") || (Links.x.hudControl.savedNoteText == this.savedNoteText && this.savedNoteText != ""))
|
|
{
|
|
Links.x.hudControl.ClosePinnedNote();
|
|
if (this.open)
|
|
{
|
|
Links.x.characterSheet.StartQuip("I'll put that back in my bag", FaceAnimations.AnimationNames.Frown);
|
|
return;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Links.x.hudControl.PinToDock(this.savedNoteImage, this.savedNoteRune, this.savedNoteText);
|
|
if (this.open)
|
|
{
|
|
Links.x.characterSheet.StartQuip("I'll keep that close to hand", FaceAnimations.AnimationNames.Frown);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013A7 RID: 5031 RVA: 0x0017CF68 File Offset: 0x0017B168
|
|
public void CloseDesc()
|
|
{
|
|
if (this.itemTooltip.activeSelf)
|
|
{
|
|
Links.x.inventory.doLookAt = false;
|
|
this.itemTooltip.SetActive(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013A8 RID: 5032 RVA: 0x0017CF93 File Offset: 0x0017B193
|
|
public void TimeScale()
|
|
{
|
|
}
|
|
|
|
// Token: 0x060013A9 RID: 5033 RVA: 0x0017CF98 File Offset: 0x0017B198
|
|
public void EndRoleSheetMenu()
|
|
{
|
|
this.startMain = null;
|
|
if (this.closingNoteRoutine != null)
|
|
{
|
|
this.note.SetActive(false);
|
|
this.closingNoteRoutine = null;
|
|
}
|
|
this.characterCamera.SetActive(false);
|
|
Links.x.camera3D.enabled = false;
|
|
this.characterSpawn.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn1.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn2.gameObject.SetActive(false);
|
|
this.characterPeddlerSpawn3.gameObject.SetActive(false);
|
|
if (this.minstrel)
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
for (int i = 0; i < this.buttonsForController.Count; i++)
|
|
{
|
|
if (this.buttonsForController[i])
|
|
{
|
|
this.buttonsForController[i].interactable = true;
|
|
}
|
|
}
|
|
for (int j = 0; j < this.slotButtons.Count; j++)
|
|
{
|
|
if (this.buttonsForController[j])
|
|
{
|
|
this.slotButtons[j].interactable = true;
|
|
}
|
|
}
|
|
for (int k = 0; k < this.characterSheetButtons.Count; k++)
|
|
{
|
|
if (this.buttonsForController[k])
|
|
{
|
|
this.characterSheetButtons[k].interactable = true;
|
|
}
|
|
}
|
|
for (int l = 0; l < this.turnOffDuringLevelup.Count; l++)
|
|
{
|
|
if (this.buttonsForController[l])
|
|
{
|
|
this.turnOffDuringLevelup[l].interactable = true;
|
|
}
|
|
}
|
|
}
|
|
this.minstrel = false;
|
|
}
|
|
if (this.currentModel != null)
|
|
{
|
|
if (this.currentModel.GetComponent<Animator>())
|
|
{
|
|
this.currentModel.GetComponent<Animator>().updateMode = AnimatorUpdateMode.Normal;
|
|
}
|
|
this.RecycleModel(this.character.name);
|
|
}
|
|
this.ClearPriceTags();
|
|
int count = this.forSaleAbilities.Count;
|
|
if (count > 0)
|
|
{
|
|
for (int m = 0; m < count; m++)
|
|
{
|
|
this.forSaleAbilities[m].forSale = false;
|
|
Links.x.cellar.ReturnPooledUIObject(49, this.forSaleAbilities[m].gameObject);
|
|
}
|
|
this.forSaleAbilities.Clear();
|
|
}
|
|
if (this.quip)
|
|
{
|
|
this.quip.ReturnToCellar();
|
|
this.quip = null;
|
|
this.quipStartTime = -1f;
|
|
}
|
|
foreach (Portrait portrait in this.portraits)
|
|
{
|
|
portrait.time.SetActive(false);
|
|
}
|
|
Links.x.inventory.Close();
|
|
this.contents1.SetActive(false);
|
|
this.contents2.SetActive(false);
|
|
this.contents3.SetActive(false);
|
|
this.contents4.SetActive(false);
|
|
this.statusGrid.gameObject.transform.parent.gameObject.SetActive(false);
|
|
if (this.merchant)
|
|
{
|
|
Links.x.merchant.CloseBag();
|
|
}
|
|
this.merchant = false;
|
|
this.blacksmith = false;
|
|
this.pagan = false;
|
|
this.pagan = false;
|
|
this.characterCamera.SetActive(false);
|
|
this.open = false;
|
|
this.canvas.enabled = false;
|
|
this.anim.enabled = false;
|
|
this.fromGameStart = false;
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Links.x.combat.GetTargets(false, false, null);
|
|
}
|
|
if (!Records.x.inMenus)
|
|
{
|
|
Links.x.hudControl.JoyBox(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013AA RID: 5034 RVA: 0x0017D358 File Offset: 0x0017B558
|
|
public void Clear(TextMeshProUGUI text)
|
|
{
|
|
if (text == null)
|
|
{
|
|
return;
|
|
}
|
|
if (text.textInfo == null)
|
|
{
|
|
return;
|
|
}
|
|
if (this.clearWord >= 0)
|
|
{
|
|
TMP_LinkInfo tmp_LinkInfo = text.textInfo.linkInfo[this.clearWord];
|
|
int linkTextLength = tmp_LinkInfo.linkTextLength;
|
|
int linkTextfirstCharacterIndex = tmp_LinkInfo.linkTextfirstCharacterIndex;
|
|
this.hoverText = tmp_LinkInfo.GetLinkText();
|
|
this.vertexColors = text.textInfo.meshInfo[0].colors32;
|
|
for (int i = 0; i < linkTextLength; i++)
|
|
{
|
|
int vertexIndex = text.textInfo.characterInfo[linkTextfirstCharacterIndex + i].vertexIndex;
|
|
Color32 color = this.normalColor;
|
|
this.vertexColors[vertexIndex] = color;
|
|
this.vertexColors[vertexIndex + 1] = color;
|
|
this.vertexColors[vertexIndex + 2] = color;
|
|
this.vertexColors[vertexIndex + 3] = color;
|
|
}
|
|
Mesh mesh = text.textInfo.meshInfo[0].mesh;
|
|
mesh.colors32 = this.vertexColors;
|
|
text.canvasRenderer.SetMesh(mesh);
|
|
}
|
|
this.clearWord = -1;
|
|
this.selectedWord = -1;
|
|
this.wordIndex = -1;
|
|
}
|
|
|
|
// Token: 0x060013AB RID: 5035 RVA: 0x0017D490 File Offset: 0x0017B690
|
|
public void CheckHover(TextMeshProUGUI text)
|
|
{
|
|
this.wordIndex = TMP_TextUtilities.FindIntersectingLink(text, Input.mousePosition, Links.x.menuCamera);
|
|
float num = 5f * (float)Screen.width / 1000f;
|
|
if (this.wordIndex == -1)
|
|
{
|
|
this.wordIndex = TMP_TextUtilities.FindIntersectingLink(text, Input.mousePosition + new Vector3(num, num, 0f), Links.x.menuCamera);
|
|
}
|
|
if (this.wordIndex == -1)
|
|
{
|
|
this.wordIndex = TMP_TextUtilities.FindIntersectingLink(text, Input.mousePosition + new Vector3(-1f * num, num, 0f), Links.x.menuCamera);
|
|
}
|
|
if (this.wordIndex == -1)
|
|
{
|
|
this.wordIndex = TMP_TextUtilities.FindIntersectingLink(text, Input.mousePosition + new Vector3(num, -1f * num, 0f), Links.x.menuCamera);
|
|
}
|
|
if (this.wordIndex == -1)
|
|
{
|
|
this.wordIndex = TMP_TextUtilities.FindIntersectingLink(text, Input.mousePosition + new Vector3(-1f * num, -1f * num, 0f), Links.x.menuCamera);
|
|
}
|
|
int num2 = this.wordIndex;
|
|
if (this.selectedWord != this.wordIndex && this.selectedWord >= 0)
|
|
{
|
|
this.clearWord = this.selectedWord;
|
|
this.Clear(text);
|
|
}
|
|
if (num2 != -1 && this.selectedWord != num2)
|
|
{
|
|
this.waitToEndHover = 0f;
|
|
this.selectedWord = num2;
|
|
TMP_LinkInfo tmp_LinkInfo = text.textInfo.linkInfo[num2];
|
|
int linkTextLength = tmp_LinkInfo.linkTextLength;
|
|
int linkTextfirstCharacterIndex = tmp_LinkInfo.linkTextfirstCharacterIndex;
|
|
this.hoverText = tmp_LinkInfo.GetLinkText();
|
|
this.vertexColors = text.textInfo.meshInfo[0].colors32;
|
|
for (int i = 0; i < linkTextLength; i++)
|
|
{
|
|
int vertexIndex = text.textInfo.characterInfo[linkTextfirstCharacterIndex + i].vertexIndex;
|
|
Color32 color = this.highlightColor;
|
|
this.vertexColors[vertexIndex] = color;
|
|
this.vertexColors[vertexIndex + 1] = color;
|
|
this.vertexColors[vertexIndex + 2] = color;
|
|
this.vertexColors[vertexIndex + 3] = color;
|
|
}
|
|
Mesh mesh = text.textInfo.meshInfo[0].mesh;
|
|
mesh.colors32 = this.vertexColors;
|
|
text.canvasRenderer.SetMesh(mesh);
|
|
this.isHovering = true;
|
|
Links.x.gameplay.uiCanClick = true;
|
|
return;
|
|
}
|
|
if (this.waitToEndHover == 0f && this.wordIndex == -1)
|
|
{
|
|
this.waitToEndHover = Time.realtimeSinceStartup;
|
|
this.clearWord = this.selectedWord;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013AC RID: 5036 RVA: 0x0017D749 File Offset: 0x0017B949
|
|
public void ShowProficiencyInfo(string type, RectTransform profRT)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060013AD RID: 5037 RVA: 0x0017D74B File Offset: 0x0017B94B
|
|
public void SetupEquippedItems(Body body, bool skipArmor)
|
|
{
|
|
Links.x.inventory.SetupEquippedItems(body, true, 0, skipArmor);
|
|
}
|
|
|
|
// Token: 0x060013AE RID: 5038 RVA: 0x0017D760 File Offset: 0x0017B960
|
|
public void EndHover(RectTransform profRT)
|
|
{
|
|
Links.x.inventory.doLookAt = false;
|
|
if (profRT)
|
|
{
|
|
Links.x.characterTooltip.EndHoverText(profRT.gameObject, false);
|
|
return;
|
|
}
|
|
Links.x.characterTooltip.EndHoverText(null, true);
|
|
}
|
|
|
|
// Token: 0x060013AF RID: 5039 RVA: 0x0017D7B0 File Offset: 0x0017B9B0
|
|
public void OrderPortraits()
|
|
{
|
|
this.thisPortraitOrder.Clear();
|
|
foreach (Character character in this.portraitOrder.OrderByDescending((Character ch) => ch.stats.partyID))
|
|
{
|
|
if (character.characterSheetPortrait)
|
|
{
|
|
character.characterSheetPortrait.gameObject.transform.SetAsFirstSibling();
|
|
}
|
|
this.thisPortraitOrder.Add(character);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013B0 RID: 5040 RVA: 0x0017D854 File Offset: 0x0017BA54
|
|
public void PlayRandomClick()
|
|
{
|
|
int num = Random.Range(0, 5);
|
|
string text = "";
|
|
if (num == 0)
|
|
{
|
|
text = "Clicks Stone A";
|
|
}
|
|
if (num == 1)
|
|
{
|
|
text = "Clicks Stone B";
|
|
}
|
|
if (num == 2)
|
|
{
|
|
text = "Clicks Stone C";
|
|
}
|
|
if (num == 3)
|
|
{
|
|
text = "Clicks Stone D";
|
|
}
|
|
if (num == 4)
|
|
{
|
|
text = "Clicks Stone E";
|
|
}
|
|
MasterAudio.PlaySoundAndForget(text, Random.Range(0.1f, 0.2f), new float?(1f), 0f, "", null);
|
|
}
|
|
|
|
// Token: 0x060013B1 RID: 5041 RVA: 0x0017D8D1 File Offset: 0x0017BAD1
|
|
public void CloseEnchantMenu()
|
|
{
|
|
Links.x.inventory.enchantMenu.FinishCloseMenu();
|
|
}
|
|
|
|
// Token: 0x060013B2 RID: 5042 RVA: 0x0017D8E8 File Offset: 0x0017BAE8
|
|
public void SetupSongShop()
|
|
{
|
|
string[] array = new string[0];
|
|
string xmlName = Links.x.merchant.merchantCharacter.stats.xmlName;
|
|
if (xmlName == "MinstrelLazure")
|
|
{
|
|
array = new string[] { "AmplifyDmg", "Rally", "SlowSong", "RallyUp", "SpeedUp", "SkillsDown", "ActionSpeedUp", "HitChanceDown", "SummonBat", "SummonRaven" };
|
|
}
|
|
if (xmlName == "WestRuinsMinstrel")
|
|
{
|
|
array = new string[] { "StaminaUp", "Fear", "SummonRedbird" };
|
|
}
|
|
string text = "Songs";
|
|
for (int i = 0; i < this.buttonsForController.Count; i++)
|
|
{
|
|
this.buttonsForController[i].interactable = false;
|
|
}
|
|
Links.x.inventory.gameObject.SetActive(false);
|
|
for (int j = 0; j < array.Length; j++)
|
|
{
|
|
GameObject pooledGameObject = Links.x.cellar.GetPooledGameObject(49);
|
|
pooledGameObject.SetActive(true);
|
|
pooledGameObject.transform.SetParent(this.shopGrid, false);
|
|
SkillButton component = pooledGameObject.GetComponent<SkillButton>();
|
|
component.inSpellMenu = false;
|
|
if (text == "Spells")
|
|
{
|
|
component.abilityName = array[j];
|
|
component.uniqueName = array[j];
|
|
component.index = j;
|
|
component.forSale = true;
|
|
component.character = this.character;
|
|
component.spellStats = new Vector4(0f, 0f, 0f, 0f);
|
|
component.inSpellMenu = false;
|
|
}
|
|
if (text == "Songs")
|
|
{
|
|
component.abilityName = array[j];
|
|
component.index = j;
|
|
component.forSale = true;
|
|
component.character = this.character;
|
|
component.componentID = -1;
|
|
component.uniqueName = array[j];
|
|
}
|
|
component.inWindow = false;
|
|
component.Setup(true, true);
|
|
this.forSaleAbilities.Add(component);
|
|
pooledGameObject.transform.localPosition = new Vector3(pooledGameObject.transform.localPosition.x, pooledGameObject.transform.localPosition.y, 0f);
|
|
}
|
|
this.UpdateSongShop();
|
|
}
|
|
|
|
// Token: 0x060013B3 RID: 5043 RVA: 0x0017DB50 File Offset: 0x0017BD50
|
|
public void UpdateSongShop()
|
|
{
|
|
this.ClearPriceTags();
|
|
bool flag = false;
|
|
for (int i = 0; i < this.forSaleAbilities.Count; i++)
|
|
{
|
|
GameObject gameObject = null;
|
|
bool flag2 = true;
|
|
bool flag3 = false;
|
|
bool flag4 = false;
|
|
if (!this.character.stats.HasSongbook() && this.forSaleAbilities[i].isInstrument)
|
|
{
|
|
flag2 = false;
|
|
flag3 = true;
|
|
}
|
|
if (flag2 && this.character.stats.HasAbility(this.forSaleAbilities[i].abilityName))
|
|
{
|
|
flag4 = true;
|
|
flag2 = false;
|
|
}
|
|
this.forSaleAbilities[i].canBuy = flag2;
|
|
if (flag2)
|
|
{
|
|
bool flag5 = false;
|
|
for (int j = 0; j < this.forSaleTags.Count; j++)
|
|
{
|
|
if (!this.forSaleTags[j].activeSelf && this.forSaleTags[j].name.Contains("Price"))
|
|
{
|
|
gameObject = this.forSaleTags[j];
|
|
gameObject.SetActive(true);
|
|
gameObject.transform.SetParent(this.forSaleAbilities[i].gameObject.transform);
|
|
flag5 = true;
|
|
break;
|
|
}
|
|
}
|
|
if (!flag5)
|
|
{
|
|
gameObject = Object.Instantiate<GameObject>(this.costPrefab, Vector3.zero, Quaternion.identity, this.forSaleAbilities[i].gameObject.transform);
|
|
gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
|
|
gameObject.layer = 5;
|
|
this.forSaleTags.Add(gameObject);
|
|
}
|
|
float num = this.character.stats.SongCost(this.forSaleAbilities[i].abilityRow);
|
|
gameObject.transform.GetChild(1).gameObject.GetComponent<TextMeshProUGUI>().text = num.ToString();
|
|
if (!flag)
|
|
{
|
|
flag = true;
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.forSaleAbilities[i].gameObject);
|
|
Links.x.hudControl.SetJoyBox(this.forSaleAbilities[i].gameObject.GetComponent<UITriggerButton>());
|
|
}
|
|
}
|
|
else if (flag3)
|
|
{
|
|
bool flag6 = false;
|
|
for (int k = 0; k < this.forSaleTags.Count; k++)
|
|
{
|
|
if (!this.forSaleTags[k].activeSelf && this.forSaleTags[k].name.Contains("No Book"))
|
|
{
|
|
gameObject = this.forSaleTags[k];
|
|
gameObject.SetActive(true);
|
|
gameObject.transform.SetParent(this.forSaleAbilities[i].gameObject.transform);
|
|
flag6 = true;
|
|
break;
|
|
}
|
|
}
|
|
if (!flag6)
|
|
{
|
|
gameObject = Object.Instantiate<GameObject>(this.noBookPrefab, Vector3.zero, Quaternion.identity, this.forSaleAbilities[i].gameObject.transform);
|
|
gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
|
|
gameObject.layer = 5;
|
|
this.forSaleTags.Add(gameObject);
|
|
}
|
|
}
|
|
else if (flag4)
|
|
{
|
|
bool flag7 = false;
|
|
for (int l = 0; l < this.forSaleTags.Count; l++)
|
|
{
|
|
if (!this.forSaleTags[l].activeSelf && this.forSaleTags[l].name.Contains("Owned"))
|
|
{
|
|
gameObject = this.forSaleTags[l];
|
|
gameObject.SetActive(true);
|
|
gameObject.transform.SetParent(this.forSaleAbilities[i].gameObject.transform);
|
|
flag7 = true;
|
|
break;
|
|
}
|
|
}
|
|
if (!flag7)
|
|
{
|
|
gameObject = Object.Instantiate<GameObject>(this.ownedPrefab, Vector3.zero, Quaternion.identity, this.forSaleAbilities[i].gameObject.transform);
|
|
gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
|
|
gameObject.layer = 5;
|
|
this.forSaleTags.Add(gameObject);
|
|
}
|
|
}
|
|
gameObject.GetComponent<RectTransform>().anchoredPosition3D = new Vector3(-20f, 2f, 0f);
|
|
this.forSaleAbilities[i].ForSaleInteractable(flag2);
|
|
}
|
|
if (!flag && this.forSaleAbilities.Count > 0)
|
|
{
|
|
Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.forSaleAbilities[0].gameObject);
|
|
Links.x.hudControl.SetJoyBox(this.forSaleAbilities[0].gameObject.GetComponent<UITriggerButton>());
|
|
}
|
|
if (Links.x.joy)
|
|
{
|
|
for (int m = 0; m < this.buttonsForController.Count; m++)
|
|
{
|
|
if (this.buttonsForController[m])
|
|
{
|
|
this.buttonsForController[m].interactable = false;
|
|
}
|
|
}
|
|
for (int n = 0; n < this.slotButtons.Count; n++)
|
|
{
|
|
if (this.buttonsForController[n])
|
|
{
|
|
this.slotButtons[n].interactable = false;
|
|
}
|
|
}
|
|
for (int num2 = 0; num2 < this.characterSheetButtons.Count; num2++)
|
|
{
|
|
if (this.buttonsForController[num2])
|
|
{
|
|
this.characterSheetButtons[num2].interactable = false;
|
|
}
|
|
}
|
|
for (int num3 = 0; num3 < this.turnOffDuringLevelup.Count; num3++)
|
|
{
|
|
if (this.turnOffDuringLevelup[num3])
|
|
{
|
|
this.turnOffDuringLevelup[num3].interactable = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013B4 RID: 5044 RVA: 0x0017E118 File Offset: 0x0017C318
|
|
private void ClearPriceTags()
|
|
{
|
|
for (int i = 0; i < this.forSaleTags.Count; i++)
|
|
{
|
|
this.forSaleTags[i].SetActive(false);
|
|
this.forSaleTags[i].transform.SetParent(this.shopGrid, true);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013B5 RID: 5045 RVA: 0x0017E16A File Offset: 0x0017C36A
|
|
public void PlayVignetteAnimation(string animName)
|
|
{
|
|
if (this.body)
|
|
{
|
|
this.body.anim.Play(animName, -1, 0f);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013B6 RID: 5046 RVA: 0x0017E190 File Offset: 0x0017C390
|
|
public void StartQuip(string text, FaceAnimations.AnimationNames animToPlayAfter)
|
|
{
|
|
if (this.open)
|
|
{
|
|
if (this.quipCoroutine != null)
|
|
{
|
|
Links.x.dialogue.npcTalking = false;
|
|
if (this.body)
|
|
{
|
|
this.body.lookAtController.EndLook();
|
|
}
|
|
base.StopCoroutine(this.quipCoroutine);
|
|
this.quipCoroutine = null;
|
|
}
|
|
this.quipCoroutine = this.Quip(text, animToPlayAfter);
|
|
base.StartCoroutine(this.quipCoroutine);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060013B7 RID: 5047 RVA: 0x0017E208 File Offset: 0x0017C408
|
|
private IEnumerator Quip(string text, FaceAnimations.AnimationNames animToPlayAfter)
|
|
{
|
|
if (text == "EquipJewelry")
|
|
{
|
|
text = Links.x.quips.GetQuip("Equip Jewelry", this.character.quipIndex);
|
|
}
|
|
if (text == "EquipItem")
|
|
{
|
|
text = Links.x.quips.GetQuip("Equip Item", this.character.quipIndex);
|
|
}
|
|
bool flag = false;
|
|
if (text == "")
|
|
{
|
|
flag = true;
|
|
}
|
|
this.quip = Links.x.characterSheet.merchantQuip;
|
|
if (!this.quip)
|
|
{
|
|
flag = true;
|
|
}
|
|
this.quip.gameObject.SetActive(false);
|
|
if (!Links.x.characterSheet.bodyCharacter)
|
|
{
|
|
flag = true;
|
|
}
|
|
if (!flag && Links.x.characterSheet.body)
|
|
{
|
|
if (Links.x.inventory.typewriter && !Links.x.inventory.typewriter.isPlaying)
|
|
{
|
|
Object.Destroy(Links.x.inventory.typewriter);
|
|
}
|
|
yield return new WaitForEndOfFrame();
|
|
if (this.quip && this.body)
|
|
{
|
|
TextMeshProUGUI component = this.quip.gameObject.transform.GetChild(0).gameObject.GetComponent<TextMeshProUGUI>();
|
|
component.text = "";
|
|
Transform transform = this.quip.transform;
|
|
Vector3 localPosition = transform.transform.localPosition;
|
|
float num = (float)text.Length * 0.2f;
|
|
float num2 = 70f;
|
|
component.text = text;
|
|
string text2 = "";
|
|
int num3 = 0;
|
|
int num4 = text.Length;
|
|
bool flag2 = false;
|
|
int num5 = 24;
|
|
foreach (char c in text)
|
|
{
|
|
if (num3 > num5 && c.ToString() == " ")
|
|
{
|
|
num4 = num3;
|
|
num3 = 0;
|
|
flag2 = true;
|
|
text2 += "\n";
|
|
}
|
|
num3++;
|
|
text2 += c.ToString();
|
|
}
|
|
num = (float)num4 * 12f + 30f;
|
|
if (flag2)
|
|
{
|
|
num2 = 100f;
|
|
}
|
|
component.text = text2;
|
|
transform.gameObject.GetComponent<RectTransform>().sizeDelta = new Vector2(num, num2);
|
|
component.enabled = true;
|
|
if (this.body)
|
|
{
|
|
this.body.lookAtController.SetNewTarget(this.characterCamera.gameObject.transform, 0f, 0f, false);
|
|
}
|
|
component.text = text2;
|
|
this.quip.Setup(Links.x.characterSheet.body);
|
|
this.quip.menu = true;
|
|
this.quip.gameObject.SetActive(true);
|
|
this.quipStartTime = Time.realtimeSinceStartup;
|
|
if (animToPlayAfter == FaceAnimations.AnimationNames.Smile)
|
|
{
|
|
if (Links.x.characterSheet.body.headAnim)
|
|
{
|
|
Links.x.characterSheet.body.headAnim.emotion = "Happy";
|
|
}
|
|
}
|
|
else if (animToPlayAfter == FaceAnimations.AnimationNames.Frown)
|
|
{
|
|
if (Links.x.characterSheet.body.headAnim)
|
|
{
|
|
Links.x.characterSheet.body.headAnim.emotion = "Sad";
|
|
}
|
|
}
|
|
else if (Links.x.characterSheet.body.headAnim)
|
|
{
|
|
Links.x.characterSheet.body.headAnim.emotion = "";
|
|
}
|
|
if (Links.x.inventory.typewriter)
|
|
{
|
|
Links.x.inventory.typewriter.enabled = true;
|
|
}
|
|
float timeToLerp = 1.25f;
|
|
float percentage = 0f;
|
|
float startTime = Time.realtimeSinceStartup;
|
|
while (percentage < 1f)
|
|
{
|
|
percentage = (Time.realtimeSinceStartup - startTime) / timeToLerp;
|
|
Links.x.dialogue.npcTalking = true;
|
|
yield return null;
|
|
}
|
|
Links.x.dialogue.npcTalking = false;
|
|
if (this.body)
|
|
{
|
|
this.body.lookAtController.EndLook();
|
|
}
|
|
if (animToPlayAfter != FaceAnimations.AnimationNames.None)
|
|
{
|
|
Links.x.characterSheet.PlayFaceAnimation(animToPlayAfter);
|
|
}
|
|
}
|
|
}
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060013B8 RID: 5048 RVA: 0x0017E228 File Offset: 0x0017C428
|
|
private void OnDisable()
|
|
{
|
|
if (this.currentModel != null)
|
|
{
|
|
if (this.currentModel.GetComponent<Animator>())
|
|
{
|
|
this.currentModel.GetComponent<Animator>().updateMode = AnimatorUpdateMode.Normal;
|
|
}
|
|
if (this.character)
|
|
{
|
|
this.RecycleModel(this.character.name);
|
|
}
|
|
else
|
|
{
|
|
this.RecycleModel("");
|
|
}
|
|
this.currentModel = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x040020AD RID: 8365
|
|
[Header("OBJECTS")]
|
|
public Canvas canvas;
|
|
|
|
// Token: 0x040020AE RID: 8366
|
|
public CanvasGroup canvasGroup;
|
|
|
|
// Token: 0x040020AF RID: 8367
|
|
public GameObject contents1;
|
|
|
|
// Token: 0x040020B0 RID: 8368
|
|
public GameObject contents2;
|
|
|
|
// Token: 0x040020B1 RID: 8369
|
|
public GameObject contents3;
|
|
|
|
// Token: 0x040020B2 RID: 8370
|
|
public GameObject contents4;
|
|
|
|
// Token: 0x040020B3 RID: 8371
|
|
public List<Portrait> portraits = new List<Portrait>();
|
|
|
|
// Token: 0x040020B4 RID: 8372
|
|
public Transform characterSpawn;
|
|
|
|
// Token: 0x040020B5 RID: 8373
|
|
public Transform characterCreationSpawn;
|
|
|
|
// Token: 0x040020B6 RID: 8374
|
|
public Transform characterCreationAnimalSpawn;
|
|
|
|
// Token: 0x040020B7 RID: 8375
|
|
public Transform characterPeddlerSpawn1;
|
|
|
|
// Token: 0x040020B8 RID: 8376
|
|
public Transform characterPeddlerSpawn2;
|
|
|
|
// Token: 0x040020B9 RID: 8377
|
|
public Transform characterPeddlerSpawn3;
|
|
|
|
// Token: 0x040020BA RID: 8378
|
|
public Transform spawn;
|
|
|
|
// Token: 0x040020BB RID: 8379
|
|
public GameObject characterCamera;
|
|
|
|
// Token: 0x040020BC RID: 8380
|
|
public GameObject characterCreationDefault;
|
|
|
|
// Token: 0x040020BD RID: 8381
|
|
public RenderTexture noAA;
|
|
|
|
// Token: 0x040020BE RID: 8382
|
|
public RenderTexture aa2;
|
|
|
|
// Token: 0x040020BF RID: 8383
|
|
public RenderTexture aa4;
|
|
|
|
// Token: 0x040020C0 RID: 8384
|
|
public RenderTexture aa8;
|
|
|
|
// Token: 0x040020C1 RID: 8385
|
|
public RawImage vignette;
|
|
|
|
// Token: 0x040020C2 RID: 8386
|
|
public Animator anim;
|
|
|
|
// Token: 0x040020C3 RID: 8387
|
|
public Animator outputAnimator;
|
|
|
|
// Token: 0x040020C4 RID: 8388
|
|
public Transform startTr;
|
|
|
|
// Token: 0x040020C5 RID: 8389
|
|
public List<Image> proficiencyImages = new List<Image>();
|
|
|
|
// Token: 0x040020C6 RID: 8390
|
|
public List<TextMeshProUGUI> proficiencyText = new List<TextMeshProUGUI>();
|
|
|
|
// Token: 0x040020C7 RID: 8391
|
|
public GameObject statHovers;
|
|
|
|
// Token: 0x040020C8 RID: 8392
|
|
public GameObject outputHovers;
|
|
|
|
// Token: 0x040020C9 RID: 8393
|
|
public GameObject removeFromPartyButton;
|
|
|
|
// Token: 0x040020CA RID: 8394
|
|
public TextMeshProUGUI removeFromPartyText;
|
|
|
|
// Token: 0x040020CB RID: 8395
|
|
public TextMeshProUGUI blacksmithInstructions;
|
|
|
|
// Token: 0x040020CC RID: 8396
|
|
public TextMeshProUGUI paganInstructions;
|
|
|
|
// Token: 0x040020CD RID: 8397
|
|
public TextMeshProUGUI repairInstructions;
|
|
|
|
// Token: 0x040020CE RID: 8398
|
|
public TextMeshProUGUI outputText;
|
|
|
|
// Token: 0x040020CF RID: 8399
|
|
public TextMeshProUGUI statusText;
|
|
|
|
// Token: 0x040020D0 RID: 8400
|
|
public TextMeshProUGUI skillText;
|
|
|
|
// Token: 0x040020D1 RID: 8401
|
|
public TextMeshProUGUI skillText2;
|
|
|
|
// Token: 0x040020D2 RID: 8402
|
|
public TextMeshProUGUI skillNumbersText;
|
|
|
|
// Token: 0x040020D3 RID: 8403
|
|
public TextMeshProUGUI skillNumbersText2;
|
|
|
|
// Token: 0x040020D4 RID: 8404
|
|
public TextMeshProUGUI skillHeadersText;
|
|
|
|
// Token: 0x040020D5 RID: 8405
|
|
public TextMeshProUGUI skillHeadersText2;
|
|
|
|
// Token: 0x040020D6 RID: 8406
|
|
public TextMeshProUGUI nameText;
|
|
|
|
// Token: 0x040020D7 RID: 8407
|
|
public TextMeshProUGUI strengthText;
|
|
|
|
// Token: 0x040020D8 RID: 8408
|
|
public TextMeshProUGUI agilityText;
|
|
|
|
// Token: 0x040020D9 RID: 8409
|
|
public TextMeshProUGUI auraText;
|
|
|
|
// Token: 0x040020DA RID: 8410
|
|
public TextMeshProUGUI sensoryText;
|
|
|
|
// Token: 0x040020DB RID: 8411
|
|
public TextMeshProUGUI dexterityText;
|
|
|
|
// Token: 0x040020DC RID: 8412
|
|
public TextMeshProUGUI paganText;
|
|
|
|
// Token: 0x040020DD RID: 8413
|
|
public TextMeshProUGUI paganHeader;
|
|
|
|
// Token: 0x040020DE RID: 8414
|
|
public TextMeshProUGUI healthStaminaText;
|
|
|
|
// Token: 0x040020DF RID: 8415
|
|
public TextMeshProUGUI hitChanceText;
|
|
|
|
// Token: 0x040020E0 RID: 8416
|
|
public TextMeshProUGUI evadeChanceText;
|
|
|
|
// Token: 0x040020E1 RID: 8417
|
|
public TextMeshProUGUI dmgChanceText;
|
|
|
|
// Token: 0x040020E2 RID: 8418
|
|
public TextMeshProUGUI acText;
|
|
|
|
// Token: 0x040020E3 RID: 8419
|
|
public TextMeshProUGUI attackSpeedText;
|
|
|
|
// Token: 0x040020E4 RID: 8420
|
|
public TextMeshProUGUI paganPowerText;
|
|
|
|
// Token: 0x040020E5 RID: 8421
|
|
public TextMeshProUGUI songPowerText;
|
|
|
|
// Token: 0x040020E6 RID: 8422
|
|
public TextMeshProUGUI charmText;
|
|
|
|
// Token: 0x040020E7 RID: 8423
|
|
public TextMeshProUGUI intercessionText;
|
|
|
|
// Token: 0x040020E8 RID: 8424
|
|
public TextMeshProUGUI lockpickText;
|
|
|
|
// Token: 0x040020E9 RID: 8425
|
|
public TextMeshProUGUI sneakText;
|
|
|
|
// Token: 0x040020EA RID: 8426
|
|
public TextMeshProUGUI dispositionText;
|
|
|
|
// Token: 0x040020EB RID: 8427
|
|
public TextMeshProUGUI paganResistText;
|
|
|
|
// Token: 0x040020EC RID: 8428
|
|
public TextMeshProUGUI songResistText;
|
|
|
|
// Token: 0x040020ED RID: 8429
|
|
public GameObject blacksmithOverlay;
|
|
|
|
// Token: 0x040020EE RID: 8430
|
|
public GameObject paganOverlay;
|
|
|
|
// Token: 0x040020EF RID: 8431
|
|
public Transform portraitParent;
|
|
|
|
// Token: 0x040020F0 RID: 8432
|
|
public ScrollRectNoDragging scrollRect1;
|
|
|
|
// Token: 0x040020F1 RID: 8433
|
|
public ScrollRectNoDragging scrollRect2;
|
|
|
|
// Token: 0x040020F2 RID: 8434
|
|
public ScrollRectNoDragging scrollRect3;
|
|
|
|
// Token: 0x040020F3 RID: 8435
|
|
public OverHeadUI merchantQuip;
|
|
|
|
// Token: 0x040020F4 RID: 8436
|
|
public Animator merchantQuipAnim;
|
|
|
|
// Token: 0x040020F5 RID: 8437
|
|
public Image skillButton;
|
|
|
|
// Token: 0x040020F6 RID: 8438
|
|
public Image statButton;
|
|
|
|
// Token: 0x040020F7 RID: 8439
|
|
public Image outputButton;
|
|
|
|
// Token: 0x040020F8 RID: 8440
|
|
public Image statusButton;
|
|
|
|
// Token: 0x040020F9 RID: 8441
|
|
public Color toggleBtnNormal;
|
|
|
|
// Token: 0x040020FA RID: 8442
|
|
public Color toggleBtnSelected;
|
|
|
|
// Token: 0x040020FB RID: 8443
|
|
public List<Button> buttonsForController = new List<Button>();
|
|
|
|
// Token: 0x040020FC RID: 8444
|
|
public List<Button> slotButtons = new List<Button>();
|
|
|
|
// Token: 0x040020FD RID: 8445
|
|
public List<Button> peddlerButtons = new List<Button>();
|
|
|
|
// Token: 0x040020FE RID: 8446
|
|
public List<Button> characterSheetButtons = new List<Button>();
|
|
|
|
// Token: 0x040020FF RID: 8447
|
|
public List<Button> turnOffDuringLevelup = new List<Button>();
|
|
|
|
// Token: 0x04002100 RID: 8448
|
|
public float t;
|
|
|
|
// Token: 0x04002101 RID: 8449
|
|
public Color levelUpColor1;
|
|
|
|
// Token: 0x04002102 RID: 8450
|
|
public Color levelUpColor2;
|
|
|
|
// Token: 0x04002103 RID: 8451
|
|
public Color colorTarget;
|
|
|
|
// Token: 0x04002104 RID: 8452
|
|
public GameObject levelProgress;
|
|
|
|
// Token: 0x04002105 RID: 8453
|
|
public Image levelFill;
|
|
|
|
// Token: 0x04002106 RID: 8454
|
|
public TextMeshProUGUI levelText;
|
|
|
|
// Token: 0x04002107 RID: 8455
|
|
public TextMeshProUGUI raceText;
|
|
|
|
// Token: 0x04002108 RID: 8456
|
|
public List<GameObject> extraHovers = new List<GameObject>();
|
|
|
|
// Token: 0x04002109 RID: 8457
|
|
private int screenW;
|
|
|
|
// Token: 0x0400210A RID: 8458
|
|
private int screenH;
|
|
|
|
// Token: 0x0400210B RID: 8459
|
|
public GameObject levelUpButton;
|
|
|
|
// Token: 0x0400210C RID: 8460
|
|
public LevelUp levelUpMenu;
|
|
|
|
// Token: 0x0400210D RID: 8461
|
|
public GameObject levelUpPrefab;
|
|
|
|
// Token: 0x0400210E RID: 8462
|
|
public Image fluteAbilities;
|
|
|
|
// Token: 0x0400210F RID: 8463
|
|
public Image hornAbilities;
|
|
|
|
// Token: 0x04002110 RID: 8464
|
|
public Image drumAbilities;
|
|
|
|
// Token: 0x04002111 RID: 8465
|
|
public Image vinesAbilities;
|
|
|
|
// Token: 0x04002112 RID: 8466
|
|
public Image faunaAbilities;
|
|
|
|
// Token: 0x04002113 RID: 8467
|
|
public Image sporesAbilities;
|
|
|
|
// Token: 0x04002114 RID: 8468
|
|
public Image meleeAbilities;
|
|
|
|
// Token: 0x04002115 RID: 8469
|
|
public Image rangeAbilities;
|
|
|
|
// Token: 0x04002116 RID: 8470
|
|
public Image defenseAbilities;
|
|
|
|
// Token: 0x04002117 RID: 8471
|
|
public Image autoCastToggle;
|
|
|
|
// Token: 0x04002118 RID: 8472
|
|
public Books booksMenu;
|
|
|
|
// Token: 0x04002119 RID: 8473
|
|
public List<Image> skillProgress = new List<Image>();
|
|
|
|
// Token: 0x0400211A RID: 8474
|
|
private List<Button> skillProgressBtns = new List<Button>();
|
|
|
|
// Token: 0x0400211B RID: 8475
|
|
public List<int> skillID = new List<int>();
|
|
|
|
// Token: 0x0400211C RID: 8476
|
|
public GameObject pinButton;
|
|
|
|
// Token: 0x0400211D RID: 8477
|
|
public GameObject rulesetBtn;
|
|
|
|
// Token: 0x0400211E RID: 8478
|
|
private Character savedCharacter;
|
|
|
|
// Token: 0x0400211F RID: 8479
|
|
public TextMeshProUGUI controllerSwitchL;
|
|
|
|
// Token: 0x04002120 RID: 8480
|
|
public TextMeshProUGUI controllerSwitchR;
|
|
|
|
// Token: 0x04002121 RID: 8481
|
|
[Header("MERCHANT SCREEN")]
|
|
public bool merchant;
|
|
|
|
// Token: 0x04002122 RID: 8482
|
|
public bool blacksmith;
|
|
|
|
// Token: 0x04002123 RID: 8483
|
|
public bool pagan;
|
|
|
|
// Token: 0x04002124 RID: 8484
|
|
public bool minstrel;
|
|
|
|
// Token: 0x04002125 RID: 8485
|
|
public bool enchanting;
|
|
|
|
// Token: 0x04002126 RID: 8486
|
|
public GameObject blacksmithButton;
|
|
|
|
// Token: 0x04002127 RID: 8487
|
|
public string peddler;
|
|
|
|
// Token: 0x04002128 RID: 8488
|
|
public List<GameObject> merchantOnly = new List<GameObject>();
|
|
|
|
// Token: 0x04002129 RID: 8489
|
|
public List<GameObject> characterSheetOnly = new List<GameObject>();
|
|
|
|
// Token: 0x0400212A RID: 8490
|
|
private List<bool> gridState;
|
|
|
|
// Token: 0x0400212B RID: 8491
|
|
public RectTransform scrollRectTransform;
|
|
|
|
// Token: 0x0400212C RID: 8492
|
|
public RectTransform scrollRectTransformSpells;
|
|
|
|
// Token: 0x0400212D RID: 8493
|
|
public RectTransform scrollRectTransformRuleset;
|
|
|
|
// Token: 0x0400212E RID: 8494
|
|
public RectTransform scrollRectTransformShop;
|
|
|
|
// Token: 0x0400212F RID: 8495
|
|
public RectTransform contentPanel;
|
|
|
|
// Token: 0x04002130 RID: 8496
|
|
public RectTransform contentPanelSpells;
|
|
|
|
// Token: 0x04002131 RID: 8497
|
|
public RectTransform contentPanelRuleset;
|
|
|
|
// Token: 0x04002132 RID: 8498
|
|
public RectTransform contentPanelRuleset1;
|
|
|
|
// Token: 0x04002133 RID: 8499
|
|
public RectTransform contentPanelShop;
|
|
|
|
// Token: 0x04002134 RID: 8500
|
|
public RectTransform selectedRectTransform;
|
|
|
|
// Token: 0x04002135 RID: 8501
|
|
public GameObject lastSelected;
|
|
|
|
// Token: 0x04002136 RID: 8502
|
|
public Character repairCharacter;
|
|
|
|
// Token: 0x04002137 RID: 8503
|
|
public Boat boat;
|
|
|
|
// Token: 0x04002138 RID: 8504
|
|
public GameObject songSpellShop;
|
|
|
|
// Token: 0x04002139 RID: 8505
|
|
public GameObject eqiuppedFolder;
|
|
|
|
// Token: 0x0400213A RID: 8506
|
|
public Transform shopGrid;
|
|
|
|
// Token: 0x0400213B RID: 8507
|
|
public GameObject costPrefab;
|
|
|
|
// Token: 0x0400213C RID: 8508
|
|
public GameObject ownedPrefab;
|
|
|
|
// Token: 0x0400213D RID: 8509
|
|
public GameObject noBookPrefab;
|
|
|
|
// Token: 0x0400213E RID: 8510
|
|
public List<SkillButton> forSaleAbilities = new List<SkillButton>();
|
|
|
|
// Token: 0x0400213F RID: 8511
|
|
public List<GameObject> forSaleTags = new List<GameObject>();
|
|
|
|
// Token: 0x04002140 RID: 8512
|
|
public TextMeshProUGUI shopHeader;
|
|
|
|
// Token: 0x04002141 RID: 8513
|
|
private IEnumerator quipCoroutine;
|
|
|
|
// Token: 0x04002142 RID: 8514
|
|
private OverHeadUI quip;
|
|
|
|
// Token: 0x04002143 RID: 8515
|
|
private float quipStartTime;
|
|
|
|
// Token: 0x04002144 RID: 8516
|
|
private float flipStatusTime;
|
|
|
|
// Token: 0x04002145 RID: 8517
|
|
[Header("HOVERING")]
|
|
public string hoverColor = "#908777";
|
|
|
|
// Token: 0x04002146 RID: 8518
|
|
public string greenColor;
|
|
|
|
// Token: 0x04002147 RID: 8519
|
|
public string redColor;
|
|
|
|
// Token: 0x04002148 RID: 8520
|
|
public Color highlightColor;
|
|
|
|
// Token: 0x04002149 RID: 8521
|
|
public Color normalColor;
|
|
|
|
// Token: 0x0400214A RID: 8522
|
|
public GameObject itemTooltip;
|
|
|
|
// Token: 0x0400214B RID: 8523
|
|
public TextMeshProUGUI descriptionText;
|
|
|
|
// Token: 0x0400214C RID: 8524
|
|
public TextMeshProUGUI descriptionTextRuleset;
|
|
|
|
// Token: 0x0400214D RID: 8525
|
|
public TextMeshProUGUI descriptionTextInv;
|
|
|
|
// Token: 0x0400214E RID: 8526
|
|
public TextMeshProUGUI descriptionTextInv2;
|
|
|
|
// Token: 0x0400214F RID: 8527
|
|
public TextMeshProUGUI descriptionTextInv3;
|
|
|
|
// Token: 0x04002150 RID: 8528
|
|
public TextMeshProUGUI descriptionEffectsText;
|
|
|
|
// Token: 0x04002151 RID: 8529
|
|
private float waitToEndHover;
|
|
|
|
// Token: 0x04002152 RID: 8530
|
|
public RectTransform tooltipRT;
|
|
|
|
// Token: 0x04002153 RID: 8531
|
|
public RectTransform textRT;
|
|
|
|
// Token: 0x04002154 RID: 8532
|
|
private bool isHovering;
|
|
|
|
// Token: 0x04002155 RID: 8533
|
|
private Color32[] vertexColors;
|
|
|
|
// Token: 0x04002156 RID: 8534
|
|
private int selectedWord;
|
|
|
|
// Token: 0x04002157 RID: 8535
|
|
private int wordIndex;
|
|
|
|
// Token: 0x04002158 RID: 8536
|
|
private int clearWord;
|
|
|
|
// Token: 0x04002159 RID: 8537
|
|
private string hoverText;
|
|
|
|
// Token: 0x0400215A RID: 8538
|
|
public GameObject currentHover;
|
|
|
|
// Token: 0x0400215B RID: 8539
|
|
public GameObject prevHover;
|
|
|
|
// Token: 0x0400215C RID: 8540
|
|
private List<RaycastResult> raycastResults = new List<RaycastResult>();
|
|
|
|
// Token: 0x0400215D RID: 8541
|
|
private PointerEventData pointer;
|
|
|
|
// Token: 0x0400215E RID: 8542
|
|
public bool levelingUp;
|
|
|
|
// Token: 0x0400215F RID: 8543
|
|
public bool canLevelUpSkill;
|
|
|
|
// Token: 0x04002160 RID: 8544
|
|
public bool canLevelUpStat;
|
|
|
|
// Token: 0x04002161 RID: 8545
|
|
public TextMeshProUGUI tooltipText;
|
|
|
|
// Token: 0x04002162 RID: 8546
|
|
private IEnumerator tooltipCorout;
|
|
|
|
// Token: 0x04002163 RID: 8547
|
|
public float targetAlpha;
|
|
|
|
// Token: 0x04002164 RID: 8548
|
|
public float currentAlpha;
|
|
|
|
// Token: 0x04002165 RID: 8549
|
|
public CanvasGroup descCanvasGroup;
|
|
|
|
// Token: 0x04002166 RID: 8550
|
|
public Image descBackground;
|
|
|
|
// Token: 0x04002167 RID: 8551
|
|
private UITriggerButton scrollTriggerButton;
|
|
|
|
// Token: 0x04002168 RID: 8552
|
|
[Header("NOTE")]
|
|
public GameObject note;
|
|
|
|
// Token: 0x04002169 RID: 8553
|
|
public Animator noteAnimator;
|
|
|
|
// Token: 0x0400216A RID: 8554
|
|
public TextMeshProUGUI noteText;
|
|
|
|
// Token: 0x0400216B RID: 8555
|
|
private IEnumerator closingNoteRoutine;
|
|
|
|
// Token: 0x0400216C RID: 8556
|
|
public GameObject noteScroll;
|
|
|
|
// Token: 0x0400216D RID: 8557
|
|
public GameObject noteImage;
|
|
|
|
// Token: 0x0400216E RID: 8558
|
|
public Image noteSprite;
|
|
|
|
// Token: 0x0400216F RID: 8559
|
|
public string savedNoteImage;
|
|
|
|
// Token: 0x04002170 RID: 8560
|
|
public string savedNoteText;
|
|
|
|
// Token: 0x04002171 RID: 8561
|
|
public string savedNoteRune;
|
|
|
|
// Token: 0x04002172 RID: 8562
|
|
[Header("STATUS")]
|
|
public GameObject statusPrefab;
|
|
|
|
// Token: 0x04002173 RID: 8563
|
|
public List<Image> openStatus = new List<Image>();
|
|
|
|
// Token: 0x04002174 RID: 8564
|
|
public List<Image> usedStatus = new List<Image>();
|
|
|
|
// Token: 0x04002175 RID: 8565
|
|
public List<string> statusDescriptions = new List<string>();
|
|
|
|
// Token: 0x04002176 RID: 8566
|
|
public List<Effects> statusEffects = new List<Effects>();
|
|
|
|
// Token: 0x04002177 RID: 8567
|
|
public GridLayoutGroup statusGrid;
|
|
|
|
// Token: 0x04002178 RID: 8568
|
|
private List<Effects> effects;
|
|
|
|
// Token: 0x04002179 RID: 8569
|
|
public Transform statusGridTr;
|
|
|
|
// Token: 0x0400217A RID: 8570
|
|
private List<Image> effectsImages;
|
|
|
|
// Token: 0x0400217B RID: 8571
|
|
private List<string> iconNames;
|
|
|
|
// Token: 0x0400217C RID: 8572
|
|
public GameObject statusEffectsList;
|
|
|
|
// Token: 0x0400217D RID: 8573
|
|
public GameObject statusEffectsListScrollbar;
|
|
|
|
// Token: 0x0400217E RID: 8574
|
|
public Animator statusEffectsAnimator;
|
|
|
|
// Token: 0x0400217F RID: 8575
|
|
public TextMeshProUGUI fullEffectsList;
|
|
|
|
// Token: 0x04002180 RID: 8576
|
|
[Header("MISC")]
|
|
public bool open;
|
|
|
|
// Token: 0x04002181 RID: 8577
|
|
private bool fromGameStart;
|
|
|
|
// Token: 0x04002182 RID: 8578
|
|
private StringFast str = new StringFast(64);
|
|
|
|
// Token: 0x04002183 RID: 8579
|
|
private Character startMain;
|
|
|
|
// Token: 0x04002184 RID: 8580
|
|
public GameObject currentModel;
|
|
|
|
// Token: 0x04002185 RID: 8581
|
|
public Body body;
|
|
|
|
// Token: 0x04002186 RID: 8582
|
|
public Character character;
|
|
|
|
// Token: 0x04002187 RID: 8583
|
|
public Character bodyCharacter;
|
|
|
|
// Token: 0x04002188 RID: 8584
|
|
private List<int> diceCountMods;
|
|
|
|
// Token: 0x04002189 RID: 8585
|
|
private List<int> diceSideMods;
|
|
|
|
// Token: 0x0400218A RID: 8586
|
|
private List<string> diceTypeMods;
|
|
|
|
// Token: 0x0400218B RID: 8587
|
|
private List<Character> portraitOrder;
|
|
|
|
// Token: 0x0400218C RID: 8588
|
|
private List<Character> thisPortraitOrder = new List<Character>();
|
|
|
|
// Token: 0x0400218D RID: 8589
|
|
public int multiplier1;
|
|
|
|
// Token: 0x0400218E RID: 8590
|
|
public int multiplier2;
|
|
|
|
// Token: 0x0400218F RID: 8591
|
|
public int multiplier3;
|
|
|
|
// Token: 0x04002190 RID: 8592
|
|
public float bodyTime;
|
|
|
|
// Token: 0x04002191 RID: 8593
|
|
public bool rulesetOpen;
|
|
|
|
// Token: 0x04002192 RID: 8594
|
|
public bool statusEffectsOpen;
|
|
|
|
// Token: 0x04002193 RID: 8595
|
|
public GameObject firstRulesetBtn;
|
|
|
|
// Token: 0x04002194 RID: 8596
|
|
public GameObject firstSkillBtn;
|
|
|
|
// Token: 0x04002195 RID: 8597
|
|
public GameObject closeText;
|
|
|
|
// Token: 0x04002196 RID: 8598
|
|
public GameObject extendedDescription;
|
|
|
|
// Token: 0x04002197 RID: 8599
|
|
public GameObject normalDescription;
|
|
|
|
// Token: 0x04002198 RID: 8600
|
|
public GameObject effectsDescription;
|
|
|
|
// Token: 0x04002199 RID: 8601
|
|
public Button firstEquipButton;
|
|
|
|
// Token: 0x0400219A RID: 8602
|
|
private float openTime;
|
|
|
|
// Token: 0x0400219B RID: 8603
|
|
private ColorBlock cb0;
|
|
|
|
// Token: 0x0400219C RID: 8604
|
|
private ColorBlock cb1;
|
|
}
|