9166 lines
271 KiB
C#
9166 lines
271 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DarkTonic.MasterAudio;
|
|
using Pathfinding;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.InputSystem;
|
|
|
|
// Token: 0x02000030 RID: 48
|
|
public class Gameplay : MonoBehaviour
|
|
{
|
|
// Token: 0x0600075B RID: 1883 RVA: 0x0009B387 File Offset: 0x00099587
|
|
private void Awake()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600075C RID: 1884 RVA: 0x0009B38C File Offset: 0x0009958C
|
|
private void Start()
|
|
{
|
|
Shader.SetGlobalFloat("_Combat", 0f);
|
|
this.playerInput = base.gameObject.GetComponent<PlayerInput>();
|
|
this.move = this.playerInput.actions["Move"];
|
|
this.action = this.playerInput.actions["Action"];
|
|
this.interact = this.playerInput.actions["Interact"];
|
|
this.showAllItems = this.playerInput.actions["Show Items"];
|
|
this.switchTarget = this.playerInput.actions["Dodge"];
|
|
this.aim = this.playerInput.actions["Aim"];
|
|
this.dock = this.playerInput.actions["Dock"];
|
|
this.cancel = this.playerInput.actions["Cancel"];
|
|
this.rightJoyStick = this.playerInput.actions["Target"];
|
|
this.quickSave = this.playerInput.actions["Quick Save"];
|
|
this.allMenus = this.playerInput.actions["Menus"];
|
|
this.switchPartyUp = this.playerInput.actions["Party Up"];
|
|
this.switchPartyDown = this.playerInput.actions["Party Down"];
|
|
this.partyItemsLeft = this.playerInput.actions["Dock Left"];
|
|
this.partyItemsRight = this.playerInput.actions["Dock Right"];
|
|
this.menus = this.playerInput.actions["Options"];
|
|
this.hudLeft = this.playerInput.actions["HUD Left"];
|
|
this.hudRight = this.playerInput.actions["HUD Right"];
|
|
this.joystickTarget.SetActive(false);
|
|
this.messageDefenseHoldMK.SetActive(false);
|
|
this.messageDefenseHoldJoy.SetActive(false);
|
|
this.messageDefenseHoldQuickMK.SetActive(false);
|
|
this.AllOff();
|
|
this.keyCodes = this.keyControl.keys;
|
|
this.keyConverted = this.keyControl.keyStrings;
|
|
this.openMenus = Records.x.openMenus;
|
|
Links.x.gameplay = this;
|
|
this.gameHours = 5f;
|
|
this.party = Links.x.party;
|
|
for (int i = 0; i < 4; i++)
|
|
{
|
|
GameObject gameObject = Object.Instantiate<GameObject>(this.effectsTilePrefab, new Vector3(10000f, 0f, 0f), Quaternion.identity, base.transform);
|
|
gameObject.SetActive(false);
|
|
this.effectTileWaypoints.Add(gameObject);
|
|
this.effectTileWaypointAnimators.Add(gameObject.transform.GetChild(0).gameObject.GetComponent<Animator>());
|
|
}
|
|
this.effectTileTooFar = Object.Instantiate<GameObject>(this.effectsTilePrefabTooFar, new Vector3(10000f, 0f, 0f), Quaternion.identity, base.transform);
|
|
this.effectTileTooFar.SetActive(false);
|
|
this.currentTileEffects = Links.x.cellar.currentTileEffects;
|
|
GameObject gameObject2 = new GameObject("World Look At");
|
|
this.lookAt = gameObject2.transform;
|
|
this.lookAt.SetParent(base.transform, true);
|
|
this.selectionCircle.SetActive(false);
|
|
this.controllers = Input.GetJoystickNames();
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
this.circleBreakObject.SetActive(false);
|
|
}
|
|
|
|
// Token: 0x0600075D RID: 1885 RVA: 0x0009B740 File Offset: 0x00099940
|
|
public void SetInteractableSelected(EventSystem eventSystem, GameObject goj)
|
|
{
|
|
eventSystem.enabled = false;
|
|
eventSystem.sendNavigationEvents = false;
|
|
eventSystem.SetSelectedGameObject(null);
|
|
eventSystem.SetSelectedGameObject(goj);
|
|
eventSystem.sendNavigationEvents = true;
|
|
eventSystem.enabled = true;
|
|
}
|
|
|
|
// Token: 0x0600075E RID: 1886 RVA: 0x0009B76C File Offset: 0x0009996C
|
|
private void Update()
|
|
{
|
|
this.seconds = this.Seconds();
|
|
if (!Records.x.paused)
|
|
{
|
|
int count = this.levelUpSkills.Count;
|
|
}
|
|
if (this.screenW != Screen.width || this.screenH != Screen.height)
|
|
{
|
|
this.screenW = Screen.width;
|
|
this.screenH = Screen.height;
|
|
Links.x.hudControl.ChangeWindowSize();
|
|
}
|
|
this.currentEventObject = EventSystem.current.currentSelectedGameObject;
|
|
if (this.mk)
|
|
{
|
|
if (this.uiHover != EventSystem.current.IsPointerOverGameObject())
|
|
{
|
|
this.uiHover = EventSystem.current.IsPointerOverGameObject();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.uiHover = false;
|
|
if (this.firstEventObject && !this.currentEventObject)
|
|
{
|
|
this.firstEventObject.GetComponent<UITriggerButton>().FirstSelect();
|
|
}
|
|
}
|
|
if (this.prevEventObject != this.currentEventObject)
|
|
{
|
|
if (this.prevEventObject)
|
|
{
|
|
UITriggerButton component = this.prevEventObject.GetComponent<UITriggerButton>();
|
|
if (component)
|
|
{
|
|
component.SetSelected(false);
|
|
}
|
|
}
|
|
if (this.currentEventObject && this.currentEventObject.activeSelf)
|
|
{
|
|
UITriggerButton component2 = this.currentEventObject.GetComponent<UITriggerButton>();
|
|
bool flag = true;
|
|
if (Records.x.mainMenuOpen)
|
|
{
|
|
flag = Links.x.mainMenu && (Links.x.mainMenu.newGameButton.gameObject.activeSelf || component2.GetButton() == Links.x.mainMenu.newGameButton);
|
|
}
|
|
if (Records.x.dialogue && !Links.x.dialogue.responsesOn && this.currentEventObject.name.Contains("Response Button"))
|
|
{
|
|
flag = false;
|
|
}
|
|
if (Links.x.keyboardScript.gameObject.activeSelf)
|
|
{
|
|
flag = Links.x.keyboardScript.IsKey(this.currentEventObject);
|
|
}
|
|
if (component2 && flag)
|
|
{
|
|
component2.SetSelected(true);
|
|
}
|
|
}
|
|
}
|
|
this.prevEventObject = this.currentEventObject;
|
|
if (this.mk)
|
|
{
|
|
this.closeTheGap = true;
|
|
}
|
|
else
|
|
{
|
|
this.closeTheGap = false;
|
|
}
|
|
this.currentControllerCount = Input.GetJoystickNames().Length;
|
|
if (Links.x.gaia.sceneLoaded)
|
|
{
|
|
if (this.currentControllerCount > 0 && this.prevControllerCount == 0)
|
|
{
|
|
if (Records.x.usingController)
|
|
{
|
|
if (!this.joy)
|
|
{
|
|
Links.x.gameFeed.ShowNotice("Controller detected");
|
|
Debug.Log("Controller detected");
|
|
this.joy = true;
|
|
this.mk = false;
|
|
Links.x.joy = true;
|
|
Links.x.mk = false;
|
|
this.SetControlsText(false);
|
|
Links.x.hudControl.SwitchController(true);
|
|
Links.x.partyColliderAdventure.itemCollector.UpdateSize();
|
|
if (Records.x.mainMenuOpen)
|
|
{
|
|
GameObject gameObject = GameObject.Find("Main Menu");
|
|
EventSystem.current.SetSelectedGameObject(gameObject.GetComponent<MainMenu>().newGameButton.gameObject);
|
|
gameObject.GetComponent<MainMenu>().newGameButton.gameObject.GetComponent<UITriggerButton>().SetSelected(true);
|
|
}
|
|
}
|
|
}
|
|
else if (Records.x.mainMenuOpen)
|
|
{
|
|
GameObject gameObject2 = GameObject.Find("Main Menu");
|
|
if (gameObject2)
|
|
{
|
|
if (!this.joy)
|
|
{
|
|
Links.x.gameFeed.ShowNotice("Controller detected");
|
|
Links.x.joy = true;
|
|
this.joy = true;
|
|
Links.x.mk = false;
|
|
this.mk = false;
|
|
this.SetControlsText(false);
|
|
Links.x.partyColliderAdventure.itemCollector.UpdateSize();
|
|
Links.x.options.UseController();
|
|
Links.x.hudControl.SwitchController(true);
|
|
Records.x.usingController = true;
|
|
EventSystem.current.SetSelectedGameObject(gameObject2.GetComponent<MainMenu>().newGameButton.gameObject);
|
|
gameObject2.GetComponent<MainMenu>().newGameButton.gameObject.GetComponent<UITriggerButton>().SetSelected(true);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Links.x.gameFeed.ShowNotice("Open settings menu to activate controller scheme");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Links.x.partyColliderAdventure.itemCollector.UpdateSize();
|
|
Links.x.gameFeed.ShowNotice("Open settings menu to activate controller scheme");
|
|
}
|
|
}
|
|
if (this.currentControllerCount == 0 && this.prevControllerCount > 0)
|
|
{
|
|
Links.x.gameFeed.ShowNotice("Controller removed");
|
|
this.currentSpriteSheetAsset = 0;
|
|
this.SetControlsText(false);
|
|
Links.x.hudControl.SwitchController(false);
|
|
}
|
|
}
|
|
this.prevControllerCount = this.currentControllerCount;
|
|
this.triggerCancel = this.cancel.ReadValue<float>();
|
|
this.triggerAction = this.action.ReadValue<float>();
|
|
this.triggerInteract = this.interact.ReadValue<float>();
|
|
this.triggerItems = this.showAllItems.ReadValue<float>();
|
|
this.triggerDodge = this.switchTarget.ReadValue<float>();
|
|
this.triggerAim = this.aim.ReadValue<float>();
|
|
this.triggerDock = this.dock.ReadValue<float>();
|
|
this.triggerQuickSave = this.quickSave.ReadValue<float>();
|
|
this.rightJoystick = this.rightJoyStick.ReadValue<Vector2>();
|
|
this.triggerAllMenus = this.allMenus.ReadValue<float>();
|
|
this.triggerParty1 = this.switchPartyUp.ReadValue<float>();
|
|
this.triggerParty2 = this.switchPartyDown.ReadValue<float>();
|
|
this.triggerPartyItems3 = this.partyItemsLeft.ReadValue<float>();
|
|
this.triggerPartyItems4 = this.partyItemsRight.ReadValue<float>();
|
|
this.triggerMenus = this.menus.ReadValue<float>();
|
|
this.triggerHudLeft = this.hudLeft.ReadValue<float>();
|
|
this.triggerHudRight = this.hudRight.ReadValue<float>();
|
|
if (this.triggerAction > 0f && this.prevTriggerAction == 0f)
|
|
{
|
|
if (!Records.x.inMenus)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
}
|
|
this.actionStart = true;
|
|
}
|
|
else
|
|
{
|
|
this.actionStart = false;
|
|
}
|
|
if (this.triggerAction > 0f && this.prevTriggerAction == 0f)
|
|
{
|
|
this.actionDown = true;
|
|
}
|
|
if (this.triggerAction == 0f && this.prevTriggerAction > 0f)
|
|
{
|
|
this.actionUp = true;
|
|
this.waitingForActionUp = false;
|
|
}
|
|
if (this.triggerAction == 0f && this.prevTriggerAction == 0f)
|
|
{
|
|
this.actionDown = false;
|
|
this.actionUp = false;
|
|
}
|
|
if (this.triggerInteract > 0f && this.prevTriggerInteract == 0f)
|
|
{
|
|
if (!Records.x.inMenus)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
}
|
|
this.interactStart = true;
|
|
}
|
|
else
|
|
{
|
|
this.interactStart = false;
|
|
}
|
|
if (this.triggerItems > 0f && this.prevTriggerItems == 0f)
|
|
{
|
|
if (!Records.x.inMenus)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
}
|
|
this.itemsStart = true;
|
|
this.itemsDown = true;
|
|
this.itemsUp = false;
|
|
}
|
|
if (this.prevTriggerItems > 0f && this.triggerItems == 0f)
|
|
{
|
|
if (!Records.x.inMenus)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
}
|
|
this.itemsDown = false;
|
|
this.itemsUp = true;
|
|
}
|
|
if (this.triggerItems == 0f && this.prevTriggerItems == 0f)
|
|
{
|
|
this.itemsDown = false;
|
|
this.itemsUp = false;
|
|
}
|
|
if (this.triggerItems > 0f && this.prevTriggerItems > 0f)
|
|
{
|
|
this.itemsStart = false;
|
|
}
|
|
if (this.triggerDodge > 0f && this.prevTriggerDodge == 0f)
|
|
{
|
|
this.StoneSound();
|
|
this.targetDodgeStart = true;
|
|
this.targetDodgeHold = true;
|
|
this.targetDodgeUp = false;
|
|
}
|
|
if (this.triggerDodge > 0f && this.prevTriggerDodge > 0f)
|
|
{
|
|
this.targetDodgeStart = false;
|
|
}
|
|
if (this.prevTriggerDodge > 0f && this.triggerDodge == 0f)
|
|
{
|
|
this.targetDodgeHold = false;
|
|
this.targetDodgeUp = true;
|
|
this.targetDodgeStart = false;
|
|
}
|
|
if (this.triggerDodge == 0f && this.prevTriggerDodge == 0f)
|
|
{
|
|
this.targetDodgeUp = false;
|
|
this.targetDodgeStart = false;
|
|
}
|
|
if (this.triggerAim > 0f && this.prevTriggerAim == 0f)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
this.aimStart = true;
|
|
this.aimUp = false;
|
|
this.aimHold = true;
|
|
}
|
|
if (this.triggerAim > 0f && this.prevTriggerAim > 0f)
|
|
{
|
|
this.aimStart = false;
|
|
}
|
|
if (this.prevTriggerAim > 0f && this.triggerAim == 0f)
|
|
{
|
|
this.aimUp = true;
|
|
this.aimStart = false;
|
|
this.aimHold = false;
|
|
}
|
|
if (this.triggerAim == 0f && this.prevTriggerAim == 0f)
|
|
{
|
|
this.aimUp = false;
|
|
this.aimStart = false;
|
|
this.aimHold = false;
|
|
}
|
|
if (this.triggerDock > 0f && this.prevTriggerDock == 0f)
|
|
{
|
|
this.dockStart = true;
|
|
this.dockDown = true;
|
|
this.dockUp = false;
|
|
}
|
|
if (this.triggerDock > 0f && this.prevTriggerDock > 0f)
|
|
{
|
|
this.dockStart = false;
|
|
}
|
|
if (this.prevTriggerDock > 0f && this.triggerDock == 0f)
|
|
{
|
|
this.dockDown = false;
|
|
this.dockUp = true;
|
|
this.dockStart = false;
|
|
}
|
|
if (this.triggerDock == 0f && this.prevTriggerDock == 0f)
|
|
{
|
|
this.dockDown = false;
|
|
this.dockUp = false;
|
|
this.dockStart = false;
|
|
}
|
|
if (this.triggerCancel > 0f && this.prevTriggerCancel == 0f)
|
|
{
|
|
if (!Records.x.inMenus)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
}
|
|
this.cancelStart = true;
|
|
}
|
|
else
|
|
{
|
|
this.cancelStart = false;
|
|
}
|
|
if (this.triggerQuickSave > 0f && this.prevTriggerQuickSave == 0f)
|
|
{
|
|
this.quickSaveStart = true;
|
|
}
|
|
else
|
|
{
|
|
this.quickSaveStart = false;
|
|
}
|
|
if (this.triggerHudLeft > 0f && this.prevTriggerHudLeft == 0f)
|
|
{
|
|
this.hudLeftStart = true;
|
|
}
|
|
else
|
|
{
|
|
this.hudLeftStart = false;
|
|
}
|
|
if (this.triggerHudRight > 0f && this.prevTriggerHudRight == 0f)
|
|
{
|
|
this.hudRightStart = true;
|
|
}
|
|
else
|
|
{
|
|
this.hudRightStart = false;
|
|
}
|
|
if (this.triggerAllMenus > 0f && this.prevTriggerAllMenus == 0f)
|
|
{
|
|
if (!Records.x.inMenus)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
}
|
|
this.allMenusStart = true;
|
|
this.allMenusDown = true;
|
|
this.allMenusUp = false;
|
|
}
|
|
else
|
|
{
|
|
this.allMenusStart = false;
|
|
this.allMenusDown = true;
|
|
}
|
|
if (this.prevTriggerAllMenus > 0f && this.triggerAllMenus == 0f)
|
|
{
|
|
if (!Records.x.inMenus)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
}
|
|
this.allMenusDown = false;
|
|
this.allMenusDown = false;
|
|
this.allMenusUp = true;
|
|
}
|
|
if (this.triggerAllMenus == 0f && this.prevTriggerAllMenus == 0f)
|
|
{
|
|
this.allMenusDown = false;
|
|
this.allMenusUp = false;
|
|
}
|
|
if (this.triggerItems == 0f && !Records.x.inMenus)
|
|
{
|
|
if (this.triggerParty1 > 0f && this.prevTriggerParty1 == 0f)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
this.party1Down = true;
|
|
}
|
|
else
|
|
{
|
|
this.party1Down = false;
|
|
}
|
|
if (this.triggerParty2 > 0f && this.prevTriggerParty2 == 0f)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
this.party2Down = true;
|
|
}
|
|
else
|
|
{
|
|
this.party2Down = false;
|
|
}
|
|
if (this.triggerPartyItems3 > 0f && this.prevTriggerPartyItems3 == 0f)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
this.partyItems3Down = true;
|
|
}
|
|
else
|
|
{
|
|
this.partyItems3Down = false;
|
|
}
|
|
if (this.triggerPartyItems4 > 0f && this.prevTriggerPartyItems4 == 0f)
|
|
{
|
|
this.StoneSoundQuieter();
|
|
this.partyItems4Down = true;
|
|
}
|
|
else
|
|
{
|
|
this.partyItems4Down = false;
|
|
}
|
|
}
|
|
if (this.triggerMenus > 0f && this.prevTriggerMenus == 0f)
|
|
{
|
|
this.StoneSound();
|
|
this.menusDown = true;
|
|
}
|
|
else
|
|
{
|
|
this.menusDown = false;
|
|
}
|
|
if (Links.x.gaia.boro && Links.x.main)
|
|
{
|
|
if (!this.sailing)
|
|
{
|
|
if (Records.x.partySailing)
|
|
{
|
|
Links.x.gaia.SetEnvironmentPlaylist(true, false, false);
|
|
this.sailing = true;
|
|
}
|
|
else if (Physics.Raycast(Links.x.main.tr.position + new Vector3(0f, 10f, 0f), Vector3.up * -1f, 20f, 16384))
|
|
{
|
|
Links.x.gaia.SetEnvironmentPlaylist(true, false, false);
|
|
this.sailing = true;
|
|
}
|
|
}
|
|
else if (!Records.x.partySailing)
|
|
{
|
|
RaycastHit raycastHit;
|
|
Physics.Raycast(Links.x.main.tr.position + new Vector3(0f, 10f, 0f), Vector3.up * -1f, out raycastHit, 20f, 16384);
|
|
if (!raycastHit.collider)
|
|
{
|
|
Links.x.gaia.SetEnvironmentPlaylist(false, Links.x.main.inTown, false);
|
|
this.sailing = false;
|
|
}
|
|
}
|
|
}
|
|
if (!Records.x.saving && Links.x.joy && Input.GetKeyDown(KeyCode.Escape) && Links.x.gaia.sceneLoaded && !Links.x.combat.inPocketAttack && !Links.x.rallyStage.playing && !Links.x.qte.playing && !Links.x.questEnd.on)
|
|
{
|
|
Links.x.options.mk.isOn = true;
|
|
Links.x.options.UseMK();
|
|
this.joy = false;
|
|
Links.x.joy = false;
|
|
this.mk = true;
|
|
Links.x.mk = true;
|
|
this.SetControlsText(false);
|
|
Links.x.partyColliderAdventure.itemCollector.UpdateSize();
|
|
Records.x.usingController = false;
|
|
}
|
|
if (!Records.x.saving && this.mk && Input.GetKeyDown(KeyCode.Escape) && (!Records.x.typing || (Records.x.typing && Links.x.creation)) && !Records.x.miniGame && !Links.x.combat.inPocketAttack && !Links.x.questEnd.on && !Records.x.dialogue)
|
|
{
|
|
if (this.openMenus.Count == 0)
|
|
{
|
|
if (Records.x.dialogue)
|
|
{
|
|
if (!Records.x.editor && Records.x.secrets)
|
|
{
|
|
}
|
|
}
|
|
else if (Links.x.options.contents1.activeSelf)
|
|
{
|
|
Links.x.options.StartEndMenu(true);
|
|
}
|
|
else
|
|
{
|
|
this.OpenDock();
|
|
if (Records.x.mainMenuOpen)
|
|
{
|
|
Links.x.options.OpenMenu();
|
|
}
|
|
else
|
|
{
|
|
Links.x.saveLoad.OpenMenu();
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.openingAnotherMenu = false;
|
|
if (Links.x.spellcrafting.open)
|
|
{
|
|
if (!Links.x.spellcrafting.confirming)
|
|
{
|
|
Links.x.spellcrafting.StartEndMenu(false);
|
|
}
|
|
}
|
|
else if (Links.x.options.contents1.activeSelf)
|
|
{
|
|
this.CloseAllMenus();
|
|
this.CloseDock();
|
|
}
|
|
else
|
|
{
|
|
this.CloseAllMenus();
|
|
this.CloseDock();
|
|
}
|
|
}
|
|
}
|
|
this.quickReposition = false;
|
|
this.quickGroup = false;
|
|
this.quickCommandAttack = false;
|
|
if ((!Links.x.pathfind || this.makeCircleMode || Input.GetKey(Links.x.gameplay.keyControl.GetHotkey("Commands"))) && this.mk && !this.spellcasting && !Records.x.miniGame && !Links.x.pocketWheel.rallyWheelOpen && !Records.x.partySailing)
|
|
{
|
|
if (!this.messageDefenseHoldQuickMK.activeSelf && Links.x.gaia.sceneLoaded && !Records.x.inMenus && !Records.x.removeControls && !Records.x.typing && Input.GetKey(Links.x.gameplay.keyControl.GetHotkey("Commands")))
|
|
{
|
|
this.messageDefenseHoldQuickMK.SetActive(true);
|
|
this.messageDefenseHoldQuickAnimMK.Play("ControlsSlideMK");
|
|
}
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.groupMouseTime = Time.timeSinceLevelLoad;
|
|
}
|
|
if (Time.timeSinceLevelLoad > this.groupMouseTime + 0.25f && (Input.GetMouseButton(0) || Input.GetMouseButtonUp(0)))
|
|
{
|
|
this.quickGroup = true;
|
|
}
|
|
if (Input.GetMouseButton(0) || Input.GetMouseButtonUp(0))
|
|
{
|
|
this.quickGroup = true;
|
|
}
|
|
if (!this.quickGroup && this.attackDirection.activeSelf)
|
|
{
|
|
this.attackDirection.SetActive(false);
|
|
}
|
|
}
|
|
if (Input.GetKeyUp(Links.x.gameplay.keyControl.GetHotkey("Commands")))
|
|
{
|
|
if (this.attackDirection.activeSelf)
|
|
{
|
|
this.attackDirection.SetActive(false);
|
|
}
|
|
if (this.messageDefenseHoldQuickMK.activeSelf)
|
|
{
|
|
this.messageDefenseHoldQuickAnimMK.Play("ControlsSlideOutMK");
|
|
}
|
|
}
|
|
if (!Records.x.saving && !Records.x.mainMenuOpen)
|
|
{
|
|
if (this.joy && Mathf.Abs(this.rightJoystick.x) > 0.5f && Links.x.hudControl.gameFeedPopout.activeSelf && Links.x.hudControl.scrollbar)
|
|
{
|
|
Links.x.hudControl.scrollbar.value += this.rightJoystick.x * 0.1f;
|
|
}
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Links.x.domeTr.Rotate(new Vector3(0f, 10f * Time.deltaTime, 3f * Time.deltaTime));
|
|
}
|
|
bool flag2 = false;
|
|
bool flag3 = false;
|
|
bool flag4 = false;
|
|
bool flag5 = false;
|
|
bool flag6 = false;
|
|
SelectionCircle selectionCircle = null;
|
|
this.mouseNode = null;
|
|
this.hitWater = false;
|
|
this.hitBeach = false;
|
|
bool flag7 = false;
|
|
if (this.mk)
|
|
{
|
|
if (Input.GetMouseButton(0) || Input.GetMouseButtonDown(0))
|
|
{
|
|
if (Links.x.hasMain)
|
|
{
|
|
if (Links.x.main.physicsMove)
|
|
{
|
|
flag7 = true;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
flag7 = false;
|
|
}
|
|
}
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.startMouseDownTime = Time.timeSinceLevelLoad;
|
|
}
|
|
if ((Input.GetMouseButtonDown(0) || Input.GetMouseButton(0)) && this.startMouseDownTime > 0f && (Time.timeSinceLevelLoad >= this.startMouseDownTime + 0.25f || Records.x.pocketPause))
|
|
{
|
|
this.holdingMouseButton = true;
|
|
this.startMouseDownTime = 0f;
|
|
}
|
|
if (Input.GetMouseButtonUp(0))
|
|
{
|
|
if (Links.x.hasMain && Time.timeSinceLevelLoad < this.startMouseDownTime + 0.25f && Links.x.main.moving)
|
|
{
|
|
Links.x.main.SetWaypoint(Vector3.zero);
|
|
}
|
|
this.startMouseDownTime = 0f;
|
|
this.holdingMouseButton = false;
|
|
}
|
|
}
|
|
if (Records.x.shouting && Input.GetMouseButtonDown(1))
|
|
{
|
|
if (this.tp1.open)
|
|
{
|
|
this.tp1.EndMenu();
|
|
}
|
|
if (this.tp2.open)
|
|
{
|
|
this.tp2.EndMenu();
|
|
}
|
|
if (this.tp3.open)
|
|
{
|
|
this.tp3.EndMenu();
|
|
}
|
|
if (this.tp4.open)
|
|
{
|
|
this.tp4.EndMenu();
|
|
}
|
|
}
|
|
if (this.mk)
|
|
{
|
|
if (!this.uiHover && !Records.x.inMenus && !Records.x.miniGame && !Records.x.removeControls && !Links.x.pocketWheel.rallyWheelOpen)
|
|
{
|
|
if (Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Party 1")))
|
|
{
|
|
Character hotKeyCharacter = Links.x.GetHotKeyCharacter(0);
|
|
if (hotKeyCharacter && !hotKeyCharacter.dead)
|
|
{
|
|
Links.x.fellowship.SingleSelected(hotKeyCharacter);
|
|
hotKeyCharacter.AddToSelected(false, true);
|
|
hotKeyCharacter.SetAsLeader();
|
|
Links.x.rtsCamera.Follow(Links.x.main.tr, Links.x.main, true);
|
|
}
|
|
}
|
|
if (Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Party 2")))
|
|
{
|
|
Character hotKeyCharacter2 = Links.x.GetHotKeyCharacter(1);
|
|
if (hotKeyCharacter2 && !hotKeyCharacter2.dead)
|
|
{
|
|
Links.x.fellowship.SingleSelected(hotKeyCharacter2);
|
|
hotKeyCharacter2.AddToSelected(false, true);
|
|
hotKeyCharacter2.SetAsLeader();
|
|
Links.x.rtsCamera.Follow(Links.x.main.tr, Links.x.main, true);
|
|
}
|
|
}
|
|
if (Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Party 3")))
|
|
{
|
|
Character hotKeyCharacter3 = Links.x.GetHotKeyCharacter(2);
|
|
if (hotKeyCharacter3 && !hotKeyCharacter3.dead)
|
|
{
|
|
Links.x.fellowship.SingleSelected(hotKeyCharacter3);
|
|
hotKeyCharacter3.AddToSelected(false, true);
|
|
hotKeyCharacter3.SetAsLeader();
|
|
Links.x.rtsCamera.Follow(Links.x.main.tr, Links.x.main, true);
|
|
}
|
|
}
|
|
if (Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Party 4")))
|
|
{
|
|
Character hotKeyCharacter4 = Links.x.GetHotKeyCharacter(3);
|
|
if (hotKeyCharacter4 && !hotKeyCharacter4.dead)
|
|
{
|
|
Links.x.fellowship.SingleSelected(hotKeyCharacter4);
|
|
hotKeyCharacter4.AddToSelected(false, true);
|
|
hotKeyCharacter4.SetAsLeader();
|
|
Links.x.rtsCamera.Follow(Links.x.main.tr, Links.x.main, true);
|
|
}
|
|
}
|
|
float axisRaw = Input.GetAxisRaw(Links.x.rtsCamera.cameraControls.ZoomInputAxis);
|
|
if (Mathf.Abs(axisRaw) > 0f && (Time.timeSinceLevelLoad > this.portraitChangeTime || this.portraitChangeTime == 0f))
|
|
{
|
|
bool flag8 = false;
|
|
if (Links.x.main && Links.x.main.timelineIcon && Links.x.main.timelineIcon.overridePause)
|
|
{
|
|
flag8 = true;
|
|
}
|
|
if (!flag8)
|
|
{
|
|
this.portraitChangeTime = Time.timeSinceLevelLoad + 0.05f;
|
|
Links.x.hudControl.ArrangePortraits();
|
|
Character character;
|
|
if (axisRaw > 0f)
|
|
{
|
|
character = Links.x.hudControl.upCharacter;
|
|
}
|
|
else
|
|
{
|
|
character = Links.x.hudControl.downCharacter;
|
|
}
|
|
if (character)
|
|
{
|
|
Links.x.fellowship.SingleSelected(character);
|
|
character.AddToSelected(false, true);
|
|
character.SetAsLeader();
|
|
Links.x.rtsCamera.Follow(Links.x.main.tr, Links.x.main, true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.ray = Links.x.worldCamera.ScreenPointToRay(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0f));
|
|
RaycastHit raycastHit2;
|
|
if (Physics.Raycast(this.ray, out raycastHit2, 500f, -2146957312) && !this.spellTargetingGround)
|
|
{
|
|
if (raycastHit2.collider.gameObject.layer == 11)
|
|
{
|
|
flag6 = false;
|
|
}
|
|
else
|
|
{
|
|
flag6 = true;
|
|
this.mousePoint = raycastHit2.point;
|
|
selectionCircle = raycastHit2.collider.gameObject.GetComponent<SelectionCircle>();
|
|
if (selectionCircle)
|
|
{
|
|
if (selectionCircle.character)
|
|
{
|
|
this.mouseNode = selectionCircle.character.node;
|
|
}
|
|
else if (selectionCircle.boat)
|
|
{
|
|
this.mouseNode = Links.x.fellowship.NearNode(selectionCircle.boat.tr.position, false, true, false, 0, -1);
|
|
}
|
|
}
|
|
Links.x.fellowship.mouseNode = this.mouseNode;
|
|
}
|
|
}
|
|
if (!flag6 && Physics.Raycast(this.ray, out raycastHit2, 500f, 4194449))
|
|
{
|
|
if (raycastHit2.collider.gameObject.layer == 4)
|
|
{
|
|
if (Physics.Raycast(this.ray, 500f, 128))
|
|
{
|
|
flag4 = true;
|
|
}
|
|
else
|
|
{
|
|
flag3 = true;
|
|
}
|
|
}
|
|
if (raycastHit2.collider.gameObject.layer == 7 || flag4)
|
|
{
|
|
flag4 = true;
|
|
}
|
|
else
|
|
{
|
|
flag2 = true;
|
|
}
|
|
this.mousePoint = raycastHit2.point;
|
|
bool flag9 = false;
|
|
if (this.spellTargetingGround && this.currentAbility != null && this.currentAbility.Contains("Moss"))
|
|
{
|
|
flag9 = true;
|
|
}
|
|
this.mouseNode = Links.x.fellowship.NearNode(this.mousePoint, false, flag3, flag9, 0, -1);
|
|
Links.x.fellowship.mouseNode = this.mouseNode;
|
|
if (flag3 && !Records.x.partySailing && Records.x.BoroInParty() && Links.x.gaia.partyBoat)
|
|
{
|
|
bool flag10 = false;
|
|
if (Links.x.gaia.boat.CanSail(out flag10) && flag10)
|
|
{
|
|
this.hitWater = true;
|
|
}
|
|
}
|
|
}
|
|
if (Links.x.fogOfWar && Links.x.main && this.mk)
|
|
{
|
|
Vector3 point = this.mousePoint;
|
|
RaycastHit raycastHit3;
|
|
if (Physics.Raycast(this.ray, out raycastHit3, 500f, -2143215471))
|
|
{
|
|
point = raycastHit3.point;
|
|
}
|
|
if (Links.x.rtsCamera.currentBoundsName == "")
|
|
{
|
|
if (!Links.x.fogOfWar.IsVisible(point))
|
|
{
|
|
this.mouseVisible = false;
|
|
}
|
|
else
|
|
{
|
|
this.mouseVisible = true;
|
|
}
|
|
if (!Links.x.fogOfWar.IsVisibleWorm(point))
|
|
{
|
|
this.mouseWormVisible = false;
|
|
}
|
|
else
|
|
{
|
|
this.mouseWormVisible = true;
|
|
}
|
|
if (Input.GetKey(KeyCode.Alpha7) && Records.x.editor)
|
|
{
|
|
Debug.Log(this.mouseVisible.ToString() + " " + this.mouseWormVisible.ToString());
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!Links.x.fogOfWarInterior.IsVisible(point))
|
|
{
|
|
this.mouseVisible = false;
|
|
}
|
|
else
|
|
{
|
|
this.mouseVisible = true;
|
|
}
|
|
if (!Links.x.fogOfWarInterior.IsVisibleWorm(point))
|
|
{
|
|
this.mouseWormVisible = false;
|
|
}
|
|
else
|
|
{
|
|
this.mouseWormVisible = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (this.selectionCircle.activeSelf)
|
|
{
|
|
this.selectionCircle.transform.position = Links.x.main.tr.position;
|
|
}
|
|
this.playerInAction = false;
|
|
this.attackingCharacter = Links.x.main;
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Character character2 = Links.x.main;
|
|
bool flag11 = false;
|
|
if (Links.x.combat.inPocketAttack && Links.x.pocketWheel.selectedRallyCharacter)
|
|
{
|
|
character2 = Links.x.pocketWheel.selectedRallyCharacter;
|
|
this.attackingCharacter = character2;
|
|
flag11 = true;
|
|
}
|
|
if (!flag11 && (character2.inAction || character2.inRecovery || character2.IsAttacking(character2.body.currentHash)) && character2.timelineIcon && character2.timelineIcon.overridePause)
|
|
{
|
|
this.playerInAction = true;
|
|
}
|
|
this.startPocketPause = false;
|
|
}
|
|
this.descWindowOpen = false;
|
|
if (Links.x.hudControl.descriptionWindowOpen)
|
|
{
|
|
this.pointer = new PointerEventData(EventSystem.current);
|
|
this.pointer.position = Input.mousePosition;
|
|
this.raycastResults.Clear();
|
|
EventSystem.current.RaycastAll(this.pointer, this.raycastResults);
|
|
bool flag12 = false;
|
|
if (this.mk && this.raycastResults.Count > 0)
|
|
{
|
|
foreach (RaycastResult raycastResult in this.raycastResults)
|
|
{
|
|
string name = raycastResult.gameObject.name;
|
|
if (name.Contains(" Btn") || name.Contains("Light Attack") || name.Contains("Special Attack") || name.Contains("Rally Attack") || name.Contains("Rare Ammo") || name.Contains("Heavy Attack") || name.Contains("Medium Attack") || name.Contains("Spellbag") || name.Contains("Songbook") || Links.x.pocketWheel.Charming() || name.Contains("Item 1") || name.Contains("Item 2") || name.Contains("Item 3") || name.Contains("Sneak") || name.Contains("Shout"))
|
|
{
|
|
flag12 = true;
|
|
}
|
|
}
|
|
}
|
|
if (this.joy)
|
|
{
|
|
this.descWindowOpen = true;
|
|
}
|
|
if ((!flag12 && this.mk) || (this.joy && this.cancelStart))
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
}
|
|
if (Links.x.hudControl.tutorialTipOpen)
|
|
{
|
|
if (Links.x.mk && Input.GetMouseButtonUp(1))
|
|
{
|
|
Links.x.hudControl.CloseTutorialTooltip();
|
|
}
|
|
return;
|
|
}
|
|
if (!Records.x.inspecting && Links.x.hasMain)
|
|
{
|
|
SceneCamera sceneCamera = null;
|
|
if (Links.x.main.tr)
|
|
{
|
|
RaycastHit raycastHit2;
|
|
if (Physics.Raycast(Links.x.main.tr.position + new Vector3(0f, 50f, 0f), Vector3.up * -1f, out raycastHit2, 200f, 134217728))
|
|
{
|
|
RaycastHit raycastHit4;
|
|
if (raycastHit2.collider.gameObject.name.Contains("Camera Collider"))
|
|
{
|
|
sceneCamera = raycastHit2.collider.gameObject.transform.parent.gameObject.GetComponent<SceneCamera>();
|
|
}
|
|
else if (Physics.Raycast(raycastHit2.point - new Vector3(0f, 1f, 0f), Vector3.up * -1f, out raycastHit4, 100f, 134217728) && raycastHit4.collider.gameObject.name.Contains("Camera Collider"))
|
|
{
|
|
sceneCamera = raycastHit4.collider.gameObject.transform.parent.gameObject.GetComponent<SceneCamera>();
|
|
}
|
|
}
|
|
if (sceneCamera && !Records.x.inspectCamera && !sceneCamera.gameObject.name.Contains("Frog") && Links.x.gaia.sceneLoaded && Links.x.gaia.pathfindingReady)
|
|
{
|
|
Links.x.inspectTextAnimator.gameObject.SetActive(true);
|
|
Links.x.inspectTextAnimator.Play("InspectOn");
|
|
}
|
|
if (!sceneCamera && Records.x.inspectCamera && !Records.x.inspectCamera.gameObject.name.Contains("Frog") && Links.x.gaia.sceneLoaded && Links.x.gaia.pathfindingReady)
|
|
{
|
|
Links.x.inspectTextAnimator.Play("InspectOff");
|
|
}
|
|
if (!sceneCamera && Links.x.inspectTextAnimator.gameObject.activeSelf)
|
|
{
|
|
Links.x.inspectTextAnimator.Play("InspectOff");
|
|
}
|
|
if (sceneCamera && sceneCamera.gameObject.name.Contains("Frog"))
|
|
{
|
|
Records.x.inspectCamera = sceneCamera;
|
|
if (Links.x.main.desiredGraph == 0)
|
|
{
|
|
Records.x.previousView = Links.x.diorama.GetOutdoorView();
|
|
}
|
|
else
|
|
{
|
|
Records.x.previousView = Links.x.diorama.GetIndoorView();
|
|
}
|
|
Links.x.diorama.ToggleSceneCameras(Records.x.inspectCamera.isInterior, Records.x.inspectCamera.id);
|
|
Links.x.rtsCamera.CopyPerspectiveCamera(Links.x.diorama.activeView.sceneCamera, null, null);
|
|
Links.x.cameraEffects.ToggleInteriorExterior(Links.x.main);
|
|
Records.x.inspecting = true;
|
|
}
|
|
Records.x.inspectCamera = sceneCamera;
|
|
}
|
|
}
|
|
else if (Records.x.inspectCamera && Records.x.inspectCamera != Links.x.diorama.activeView && !Links.x.worldCamera.orthographic && !Links.x.cameraEffects.transitioning)
|
|
{
|
|
if (Links.x.main.desiredGraph == 0)
|
|
{
|
|
Records.x.previousView = Links.x.diorama.GetOutdoorView();
|
|
}
|
|
else
|
|
{
|
|
Records.x.previousView = Links.x.diorama.GetIndoorView();
|
|
}
|
|
Links.x.diorama.ToggleSceneCameras(Records.x.inspectCamera.isInterior, Records.x.inspectCamera.id);
|
|
Links.x.rtsCamera.CopyPerspectiveCamera(Records.x.inspectCamera.sceneCamera, null, null);
|
|
Links.x.cameraEffects.ToggleInteriorExterior(Links.x.main);
|
|
Records.x.inspecting = true;
|
|
}
|
|
if (Records.x.editor && Input.GetKey(KeyCode.K))
|
|
{
|
|
string[] array = new string[31];
|
|
array[0] = this.uiHover.ToString();
|
|
array[1] = " ";
|
|
int num = 2;
|
|
Camera worldCamera = Links.x.worldCamera;
|
|
array[num] = ((worldCamera != null) ? worldCamera.ToString() : null);
|
|
array[3] = " ";
|
|
array[4] = Links.x.gaia.sceneLoaded.ToString();
|
|
array[5] = " ";
|
|
array[6] = this.clickStartOnUIHover.ToString();
|
|
array[7] = " ";
|
|
array[8] = Links.x.gaia.pathfindingReady.ToString();
|
|
array[9] = " ";
|
|
array[10] = Records.x.paused.ToString();
|
|
array[11] = " ";
|
|
array[12] = Records.x.dialogue.ToString();
|
|
array[13] = " ";
|
|
array[14] = Records.x.inOverworldMap.ToString();
|
|
array[15] = " ";
|
|
array[16] = this.playerInAction.ToString();
|
|
array[17] = " ";
|
|
array[18] = Records.x.inMenus.ToString();
|
|
array[19] = " ";
|
|
array[20] = this.hudLeftOpen.ToString();
|
|
array[21] = " ";
|
|
array[22] = this.hudRightOpen.ToString();
|
|
array[23] = " ";
|
|
array[24] = this.descWindowOpen.ToString();
|
|
array[25] = " ";
|
|
array[26] = flag7.ToString();
|
|
array[27] = " ";
|
|
array[28] = this.CanClick().ToString();
|
|
array[29] = " ";
|
|
array[30] = this.CanInteractWithWorld("Character").ToString();
|
|
Debug.Log(string.Concat(array));
|
|
}
|
|
if (!this.uiHover && Links.x.worldCamera && Links.x.gaia.sceneLoaded && Links.x.gaia.pathfindingReady && !Records.x.paused && !Records.x.dialogue && !Records.x.inOverworldMap && !this.playerInAction && !Records.x.inMenus && !this.hudLeftOpen && !this.hudRightOpen && !this.descWindowOpen && !flag7)
|
|
{
|
|
bool flag13 = false;
|
|
Vector2 vector = new Vector2(Input.mousePosition.x / (float)Screen.width, Input.mousePosition.y / (float)Screen.height);
|
|
float num2 = 0.02f;
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.clickCount++;
|
|
if (this.clickCount == 2)
|
|
{
|
|
if (Time.realtimeSinceStartup < this.clickTime + 0.3f && Vector2.Distance(vector, this.prevClickPosition) < num2)
|
|
{
|
|
this.doubleClick = true;
|
|
this.clickTime = Time.realtimeSinceStartup;
|
|
}
|
|
else
|
|
{
|
|
this.clickCount = 0;
|
|
this.doubleClick = false;
|
|
}
|
|
}
|
|
else if (this.clickCount == 1)
|
|
{
|
|
this.clickTime = Time.realtimeSinceStartup;
|
|
this.prevClickPosition = vector;
|
|
}
|
|
}
|
|
if ((this.clickCount > 0 || this.doubleClick) && (Time.realtimeSinceStartup >= this.clickTime + 0.3f || Vector2.Distance(vector, this.prevClickPosition) >= num2))
|
|
{
|
|
this.doubleClick = false;
|
|
this.clickCount = 0;
|
|
}
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.clickUpTime = Time.realtimeSinceStartup + 0.4f;
|
|
}
|
|
this.hitItem = false;
|
|
this.hitFloor = false;
|
|
this.hitCharacter = false;
|
|
this.hitExit = false;
|
|
this.hitInteractable = false;
|
|
this.hitBoat = false;
|
|
this.hitGameCardHover = false;
|
|
bool flag14 = false;
|
|
if (this.mk && this.makeCircleMode && Input.GetMouseButtonDown(1) && !this.uiHover)
|
|
{
|
|
this.EndCircleMode();
|
|
return;
|
|
}
|
|
if (this.joy && this.makeCircleMode && this.cancelStart && !this.uiHover)
|
|
{
|
|
this.EndCircleMode();
|
|
return;
|
|
}
|
|
if (this.mk && Records.x.movingWindows && (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && !this.uiHover)
|
|
{
|
|
Records.x.movingWindows = false;
|
|
Links.x.hudControl.ToggleWindowVisual(false);
|
|
Links.x.hudControl.ToggleWindowInteractables(true);
|
|
this.clickedDownWindows = true;
|
|
return;
|
|
}
|
|
if (this.clickedDownWindows)
|
|
{
|
|
if (!Input.GetMouseButton(0) && !Input.GetMouseButton(1))
|
|
{
|
|
this.clickedDownWindows = false;
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
if (false && (Links.x.gameFeed.noticeTextShowing || Links.x.hudControl.descriptionWindowOpen))
|
|
{
|
|
this.TurnOffHoverTiles();
|
|
if (Links.x.hudControl.descriptionWindowOpen && !this.uiHover)
|
|
{
|
|
if (Input.GetMouseButtonUp(0) || Input.GetMouseButtonUp(1))
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
if (this.joy && (this.cancelStart || this.actionStart))
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if ((this.mk && Input.GetMouseButtonDown(0)) || (this.joy && this.actionDown))
|
|
{
|
|
Shader.SetGlobalFloat("_MouseDown", 1f);
|
|
this.clickStartOnUIHover = false;
|
|
this.mouseDown = Time.realtimeSinceStartup;
|
|
this.mouseDownPosition = new Vector3(Input.mousePosition.x / (float)Screen.width, Input.mousePosition.y / (float)Screen.height, 0f);
|
|
}
|
|
else if ((Input.GetMouseButtonUp(0) && this.mk) || (this.joy && this.actionUp))
|
|
{
|
|
Shader.SetGlobalFloat("_MouseDown", 0f);
|
|
this.mouseDown = 0f;
|
|
}
|
|
GraphNode graphNode = null;
|
|
bool flag15 = false;
|
|
if (Links.x.diorama)
|
|
{
|
|
this.dioramaCharacters = Links.x.diorama.characters;
|
|
}
|
|
if (Records.x.pocketPause && this.joy && !this.spellTargetingGround && !this.makeCircleMode)
|
|
{
|
|
if (Links.x.pocketWheel.selected == "Command Attack" || Links.x.pocketWheel.selected == "Light Attack" || (Links.x.pocketWheel.selected == "Special Attack 1" && Links.x.pocketWheel.canTarget) || Links.x.pocketWheel.selected == "Medium Attack" || Links.x.pocketWheel.selected == "Heavy Attack" || Links.x.pocketWheel.Charming() || (Links.x.pocketWheel.selected == "Spellbag" && (this.spellTargetingParty || this.spellTargetingEnemy)))
|
|
{
|
|
if (Links.x.fellowship.move.magnitude > 0.1f)
|
|
{
|
|
this.GetControllerTarget(false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.GetControllerTarget(false);
|
|
}
|
|
}
|
|
if (((Links.x.mk && flag6) || (this.joy && Links.x.partyColliderAdventure.closestBoat)) && this.CanInteractWithWorld("Character") && (selectionCircle || (this.joy && Links.x.partyColliderAdventure.closestBoat && Links.x.partyColliderAdventure.InRangeToHover(Links.x.partyColliderAdventure.closestBoat))))
|
|
{
|
|
bool flag16 = false;
|
|
if (selectionCircle && selectionCircle.character)
|
|
{
|
|
flag16 = true;
|
|
}
|
|
if (flag16)
|
|
{
|
|
graphNode = selectionCircle.character.node;
|
|
flag15 = false;
|
|
this.gameCardCharacter = selectionCircle.character;
|
|
this.hitGameCardHover = true;
|
|
}
|
|
else if (Records.x.BoroInParty())
|
|
{
|
|
if (this.mk)
|
|
{
|
|
this.boat = selectionCircle.boat;
|
|
}
|
|
else
|
|
{
|
|
this.boat = Links.x.partyColliderAdventure.closestBoat;
|
|
}
|
|
bool flag17 = Links.x.hudControl.BoatIsNear(this.boat);
|
|
if (Links.x.mk)
|
|
{
|
|
flag17 = true;
|
|
}
|
|
if (flag17)
|
|
{
|
|
if (this.boat != this.prevBoat && this.prevBoat)
|
|
{
|
|
this.prevBoat.HoverOut();
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightBoat(false, this.prevBoat);
|
|
}
|
|
}
|
|
if (this.boat != this.prevBoat && this.boat)
|
|
{
|
|
this.boat.HoverIn();
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightBoat(true, this.boat);
|
|
}
|
|
}
|
|
this.prevBoat = this.boat;
|
|
this.hitBoat = true;
|
|
}
|
|
}
|
|
}
|
|
if (this.hitBoat && (this.joy || this.mouseVisible) && ((this.mk && Input.GetMouseButtonUp(0)) || (this.joy && this.interactStart && Links.x.partyColliderAdventure.InRange(Links.x.partyColliderAdventure.closestBoat))) && this.CanClick() && Links.x.hasMain)
|
|
{
|
|
this.clickedCharacter = null;
|
|
Links.x.gameplay.StoneSoundQuieter();
|
|
if (this.boat.NearNode(this.boat.tr.position, false, 0, -1) != null)
|
|
{
|
|
Character main = Links.x.main;
|
|
if (Records.x.partySailing)
|
|
{
|
|
Character boro = Links.x.gaia.boro;
|
|
}
|
|
this.BoatFollowFinished(this.boat);
|
|
}
|
|
}
|
|
if (!this.hitBoat && this.prevBoat)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightBoat(false, this.prevBoat);
|
|
}
|
|
this.prevBoat.HoverOut();
|
|
this.prevBoat = null;
|
|
this.boat = null;
|
|
}
|
|
bool flag18 = false;
|
|
RaycastHit raycastHit2;
|
|
if ((this.joy || (!this.joy && !this.hitCharacter && !this.hitItem && !this.hitBoat && !this.hitInteractable && this.mouseWormVisible && !Records.x.pocketPause)) && !this.clickedUpCharacter && !Links.x.fellowship.drawingSquare && !this.spellTargetingGround && !this.spellTargetingParty && !this.spellTargetingEnemy && this.CanInteractWithWorld("Exit") && (Physics.Raycast(this.ray, out raycastHit2, 500f, 8192) || (this.joy && Links.x.partyColliderAdventure.closestMapExit)))
|
|
{
|
|
if (this.mk)
|
|
{
|
|
this.mousePoint = raycastHit2.point;
|
|
this.exit = raycastHit2.collider.gameObject.GetComponent<MapExitActions>();
|
|
if (!this.exit)
|
|
{
|
|
MapExitIcon component3 = raycastHit2.collider.gameObject.GetComponent<MapExitIcon>();
|
|
if (component3)
|
|
{
|
|
this.exit = component3.mapExit;
|
|
if (!this.exit && component3.beach)
|
|
{
|
|
flag18 = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (Links.x.partyColliderAdventure.InRangeToHover(Links.x.partyColliderAdventure.closestMapExit))
|
|
{
|
|
this.exit = Links.x.partyColliderAdventure.closestMapExit;
|
|
}
|
|
if (this.exit)
|
|
{
|
|
GraphNode graphNode2 = Links.x.main.NearNode(this.exit.mapExit.doorPoint, false, 0, -1, 0);
|
|
if (graphNode2.GraphIndex == 1U && Links.x.diorama.GetIndoorView().GetInteriorBoundsName((Vector3)graphNode2.position) != Links.x.main.indoorID)
|
|
{
|
|
this.exit = null;
|
|
}
|
|
}
|
|
bool flag19 = Links.x.hudControl.ExitIsNear(this.exit);
|
|
if (Links.x.mk)
|
|
{
|
|
flag19 = this.mouseWormVisible;
|
|
}
|
|
if (flag18)
|
|
{
|
|
flag19 = true;
|
|
}
|
|
if (flag19)
|
|
{
|
|
if (this.exit)
|
|
{
|
|
if (this.exit.mapExit)
|
|
{
|
|
if (this.exit.mapExit.waterExit && this.exit != this.prevExit)
|
|
{
|
|
this.exit.SetDoorPoint(this.mousePoint);
|
|
}
|
|
if (this.exit != this.prevExit && this.prevExit)
|
|
{
|
|
this.prevExit.Hover(false);
|
|
this.prevExit.Hover(false);
|
|
if (this.prevExit.doorActions)
|
|
{
|
|
this.mapDoor = null;
|
|
this.prevMapDoor = null;
|
|
}
|
|
}
|
|
if (this.exit != this.prevExit)
|
|
{
|
|
if (this.exit.doorActions)
|
|
{
|
|
this.mapDoor = this.exit.doorActions;
|
|
this.prevMapDoor = this.exit.doorActions;
|
|
}
|
|
this.exit.Hover(true);
|
|
Links.x.hudControl.HighlightExit(true, this.exit);
|
|
}
|
|
else if (this.exit.doorActions && this.exit.doorActions.currentHealth == Links.x.itemCard.savedHealth)
|
|
{
|
|
bool locked = this.exit.doorActions.door.locked;
|
|
bool savedLockState = Links.x.itemCard.savedLockState;
|
|
}
|
|
this.prevExit = this.exit;
|
|
this.hitExit = true;
|
|
}
|
|
else
|
|
{
|
|
MapExitActions mapExitActions = this.exit;
|
|
Debug.Log(((mapExitActions != null) ? mapExitActions.ToString() : null) + " missing map exit reference");
|
|
}
|
|
}
|
|
else if (!flag18)
|
|
{
|
|
this.hitExit = false;
|
|
}
|
|
else
|
|
{
|
|
this.hitExit = true;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.exit = null;
|
|
}
|
|
}
|
|
if (this.hitExit)
|
|
{
|
|
if (Input.GetKey(KeyCode.T) && Records.x.editor)
|
|
{
|
|
Debug.Log(this.interactStart.ToString() + " " + this.CanClick().ToString());
|
|
}
|
|
if ((this.joy && this.interactStart && Links.x.partyColliderAdventure.InRange(Links.x.partyColliderAdventure.closestMapExit)) || (this.mk && Input.GetMouseButtonDown(0) && this.CanClick() && Links.x.hasMain && !Records.x.pocketPause))
|
|
{
|
|
bool flag20 = false;
|
|
if (Records.x.demo)
|
|
{
|
|
flag20 = true;
|
|
Links.x.main.StartQuip("Alas, this will take us beyond the demo");
|
|
}
|
|
else if (Records.x.extendedDemo && !flag18 && this.exit.mapExit.exitTo != MapExit.exitToNames.Interiors && this.exit.mapExit.exitTo != MapExit.exitToNames.Exterior)
|
|
{
|
|
flag20 = true;
|
|
Links.x.main.StartQuip("Alas, this will take us beyond the extended demo");
|
|
}
|
|
if (!flag20)
|
|
{
|
|
this.clickedCharacter = null;
|
|
Links.x.gameplay.StoneSoundQuieter();
|
|
bool flag21 = false;
|
|
bool flag22 = false;
|
|
if (this.exit)
|
|
{
|
|
if (this.exit.doorActions && this.exit.doorActions.door.locked)
|
|
{
|
|
flag21 = true;
|
|
}
|
|
if (this.exit.nodeLink && !flag21 && Links.x.main.node != null)
|
|
{
|
|
GraphNode endNode = this.exit.nodeLink.endNode;
|
|
}
|
|
if (this.exit.connectionExit && this.exit.connectionExit.GetComponent<MapExitActions>().nodeLink && !flag21 && Links.x.main.node != null)
|
|
{
|
|
NodeLink nodeLink = this.exit.connectionExit.GetComponent<MapExitActions>().nodeLink;
|
|
}
|
|
}
|
|
if (!flag21 && !flag22)
|
|
{
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.clickStartOnUIHover = true;
|
|
}
|
|
if (this.exit)
|
|
{
|
|
if (this.exit.mapExit.waterExit)
|
|
{
|
|
if (Physics.Raycast(this.ray, out raycastHit2, 500f, 4194321))
|
|
{
|
|
this.mousePoint = raycastHit2.point;
|
|
this.currentExitNode = Links.x.main.NearNode(this.mousePoint, false, 0, -1, 0);
|
|
}
|
|
else
|
|
{
|
|
this.currentExitNode = Links.x.main.NearNode(this.mousePoint, false, 0, -1, 0);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Physics.Raycast(this.exit.mapExit.doorPoint + new Vector3(0f, 20f, 0f), Vector3.up * -1f, out raycastHit2, 500f, 4194321);
|
|
Links.x.main.setArea = -1;
|
|
this.currentExitNode = Links.x.main.NearNode(this.exit.mapExit.doorPoint, false, 0, -1, 0);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.currentExitNode = Links.x.main.node;
|
|
}
|
|
if (this.spellcasting || this.throwingElixir)
|
|
{
|
|
Links.x.main.actions.RemoveAbility();
|
|
if (this.actionCharacter)
|
|
{
|
|
this.actionCharacter.portrait.skillBag.RemoveSelectedButton();
|
|
}
|
|
}
|
|
this.spellcasting = false;
|
|
if (this.spellTargetingGround || this.spellTargetingEnemy || this.spellTargetingParty)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.throwingElixir = false;
|
|
if (this.currentExitNode != null)
|
|
{
|
|
if (flag18)
|
|
{
|
|
if (Links.x.gaia.boat.CanEnterLeaveBoat())
|
|
{
|
|
if (Records.x.partySailing)
|
|
{
|
|
Links.x.gaia.boat.GetOffBoat();
|
|
}
|
|
else
|
|
{
|
|
Links.x.gaia.boat.GetOnWater();
|
|
}
|
|
}
|
|
else if (Records.x.partySailing)
|
|
{
|
|
Links.x.gameFeed.ShowNotice("Guards cannot leave boat yet");
|
|
}
|
|
else
|
|
{
|
|
Links.x.gameFeed.ShowNotice("Guards are not ready to sail");
|
|
}
|
|
}
|
|
else if (!this.closeTheGap)
|
|
{
|
|
Links.x.gameplay.MapExitFinished(this.exit, Links.x.main, false);
|
|
}
|
|
else
|
|
{
|
|
for (int i = 0; i < this.party.Count; i++)
|
|
{
|
|
if (this.party[i].IsSentient() && this.party[i].mainSelected)
|
|
{
|
|
if (this.exit.mapExit.waterExit)
|
|
{
|
|
this.exit.SetDoorPoint((Vector3)this.currentExitNode.position);
|
|
}
|
|
this.party[i].selectedBeforeDoor = true;
|
|
this.party[i].StartGetPathToTarget(this.currentExitNode, null, null, null, null, null, null, null, this.party[i], this.exit, this.CanScatterPartyToMakePath("Exit"), true, false, "Exit", false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Debug.Log("cannot find exit position");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.str.Clear();
|
|
if (flag21)
|
|
{
|
|
this.str.Append("Door is locked");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("Exit is blocked");
|
|
}
|
|
Links.x.gameFeed.AddFeed(this.str.ToString());
|
|
MasterAudio.PlaySoundAndForget("Interactives", 1f, new float?(1f), 0f, "Chest Locked", null);
|
|
if (flag21 && this.exit.doorActions.lockCollider)
|
|
{
|
|
Links.x.cellar.GetAnimatedText("", "Locked", false).gameObject.transform.position = this.exit.doorActions.lockCollider.bounds.center + new Vector3(0f, Random.Range(1.5f, 1.8f), 0f);
|
|
}
|
|
else
|
|
{
|
|
Links.x.cellar.GetAnimatedText("", "Blocked", false).gameObject.transform.position = this.exit.mapExit.doorPoint + new Vector3(0f, 3f, 0f);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!this.hitExit && this.prevExit)
|
|
{
|
|
this.prevExit.doorActions;
|
|
this.prevExit.Hover(false);
|
|
Links.x.hudControl.HighlightExit(false, this.prevExit);
|
|
if (this.intersectingExit)
|
|
{
|
|
this.intersectingExit.Near(true);
|
|
}
|
|
this.prevExit.Hover(false);
|
|
Links.x.hudControl.HighlightExit(false, this.prevExit);
|
|
this.prevExit = null;
|
|
this.exit = null;
|
|
this.mapDoor = null;
|
|
this.prevMapDoor = null;
|
|
}
|
|
if (Links.x.diorama && !this.spellTargetingGround && this.joy && this.CanInteractWithWorld("Character") && !this.hitExit)
|
|
{
|
|
if ((this.party1Down || this.party2Down) && !Links.x.pocketWheel.spellbook.activeSelf && !this.gameFeedScrolling && !this.badgeScrolling && !Records.x.removeControls)
|
|
{
|
|
Character character3 = null;
|
|
Links.x.hudControl.ArrangePortraits();
|
|
if (this.party1Down)
|
|
{
|
|
character3 = Links.x.hudControl.upCharacter;
|
|
}
|
|
if (this.party2Down)
|
|
{
|
|
character3 = Links.x.hudControl.downCharacter;
|
|
}
|
|
if (character3)
|
|
{
|
|
bool flag23 = false;
|
|
if (Links.x.main && Links.x.main.timelineIcon && Links.x.main.timelineIcon.overridePause)
|
|
{
|
|
flag23 = true;
|
|
}
|
|
if (!flag23)
|
|
{
|
|
flag15 = false;
|
|
this.gameCardCharacter = character3;
|
|
this.hitGameCardHover = true;
|
|
graphNode = character3.node;
|
|
Links.x.fellowship.SingleSelected(character3);
|
|
character3.AddToSelected(false, true);
|
|
character3.SetAsLeader();
|
|
}
|
|
}
|
|
}
|
|
if (!Records.x.pocketPause && Links.x.partyColliderAdventure.closestCharacter && Links.x.partyColliderAdventure.InRangeToHover(Links.x.partyColliderAdventure.closestCharacter))
|
|
{
|
|
flag15 = false;
|
|
this.gameCardCharacter = Links.x.partyColliderAdventure.closestCharacter;
|
|
this.hitGameCardHover = true;
|
|
graphNode = Links.x.partyColliderAdventure.closestCharacter.node;
|
|
}
|
|
if (Records.x.pocketPause && this.domeEnemy && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
flag15 = false;
|
|
this.gameCardCharacter = this.domeEnemy;
|
|
this.hitGameCardHover = true;
|
|
graphNode = this.domeEnemy.node;
|
|
}
|
|
if (Records.x.pocketPause && this.domeParty && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
flag15 = false;
|
|
this.gameCardCharacter = this.domeParty;
|
|
this.hitGameCardHover = true;
|
|
graphNode = this.domeParty.node;
|
|
}
|
|
}
|
|
if (graphNode != null && (Links.x.combat.inPocketAttack || Records.x.pocketPause))
|
|
{
|
|
if (Links.x.combat.inPocketAttack)
|
|
{
|
|
if (Links.x.pocketWheel.selectedRallyCharacter)
|
|
{
|
|
}
|
|
}
|
|
else if (Links.x.main.IsAttacking(Links.x.main.body.currentHash))
|
|
{
|
|
graphNode = null;
|
|
}
|
|
}
|
|
if (!this.hitCharacter && graphNode != null && !this.hitBoat && !this.hitExit && this.CanInteractWithWorld("Character"))
|
|
{
|
|
this.mousePoint = (Vector3)graphNode.position;
|
|
this.character = this.gameCardCharacter;
|
|
this.gameCardCharacter = this.character;
|
|
this.hitGameCardHover = true;
|
|
if (Records.x.InCombat(false) && (this.playerInAction || Links.x.main.IsAttacking(Links.x.main.body.currentHash)))
|
|
{
|
|
this.hitGameCardHover = false;
|
|
this.gameCardCharacter = null;
|
|
}
|
|
bool flag24 = false;
|
|
if (Records.x.pocketPause)
|
|
{
|
|
if (Links.x.combat.CanAttackTarget(this.character) && (this.attackingCharacter.CanAttack() || Links.x.combat.inPocketAttack))
|
|
{
|
|
flag24 = true;
|
|
}
|
|
if (this.character.party)
|
|
{
|
|
if (this.spellTargetingParty && this.actionCharacter)
|
|
{
|
|
if ((this.character.tr.position - this.actionCharacter.tr.position).sqrMagnitude < this.actionCharacter.stats.SpellRadius(this.spellPaganRow) * this.actionCharacter.stats.SpellRadius(this.spellPaganRow))
|
|
{
|
|
flag24 = true;
|
|
}
|
|
if (this.actionCharacter == this.character)
|
|
{
|
|
flag24 = true;
|
|
}
|
|
}
|
|
else if (this.character != Links.x.main && Links.x.combat.CharacterHasSynergy(this.character))
|
|
{
|
|
flag24 = true;
|
|
}
|
|
this.quickCommandAttack = false;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (this.character.hostility < 2 && !this.character.attackingUntilBribe && ((!this.character.stats.animal && this.character.npc) || this.character.isBoro || this.character.stats.dialogueFile != ""))
|
|
{
|
|
flag24 = Links.x.hudControl.CharacterIsNear(this.character);
|
|
if (Links.x.mk)
|
|
{
|
|
flag24 = this.mouseVisible;
|
|
}
|
|
}
|
|
if (Links.x.combat.CanAttackTarget(this.character))
|
|
{
|
|
flag24 = true;
|
|
}
|
|
if (this.character.party)
|
|
{
|
|
flag24 = Links.x.combat.pickingRally;
|
|
}
|
|
}
|
|
if (flag24)
|
|
{
|
|
this.mousePoint = this.character.tr.position;
|
|
if (this.character != this.prevCharacter && this.prevCharacter)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightCharacter(false, this.prevCharacter);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightCharacter(false, this.prevCharacter);
|
|
}
|
|
if (Records.x.pocketPause && this.joy)
|
|
{
|
|
this.joystickTarget.SetActive(false);
|
|
}
|
|
this.prevCharacter.HoverOut(false);
|
|
}
|
|
if (this.character != this.prevCharacter && this.character)
|
|
{
|
|
this.character.HoverIn();
|
|
if (Records.x.pocketPause && this.joy && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
this.SetPositionAtWorldPoint(this.character.body.GetNeck().position + new Vector3(0f, 2.1f, 0f), this.joystickTargetRT);
|
|
this.joystickTarget.SetActive(true);
|
|
}
|
|
else if (this.joystickTarget.activeSelf)
|
|
{
|
|
this.joystickTarget.SetActive(false);
|
|
}
|
|
if (this.character.portrait && Links.x.mk)
|
|
{
|
|
this.character.portrait.HoverFromCharacter(true);
|
|
}
|
|
if (Records.x.InCombat(false) && !this.character.party)
|
|
{
|
|
this.targetingCharacter = this.character;
|
|
}
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightCharacter(true, this.character);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightCharacter(true, this.character);
|
|
}
|
|
}
|
|
this.prevCharacter = this.character;
|
|
this.hitCharacter = true;
|
|
}
|
|
else
|
|
{
|
|
this.character = null;
|
|
this.hitCharacter = false;
|
|
}
|
|
}
|
|
if (!this.hitCharacter && this.targetingGroundCharacterHover)
|
|
{
|
|
this.targetingGroundCharacterHover = false;
|
|
}
|
|
if (this.charming && !this.actionCharacter)
|
|
{
|
|
this.charming = false;
|
|
}
|
|
if (this.waitingForClickUpOnCharacter)
|
|
{
|
|
if (Links.x.mk && Input.GetMouseButtonUp(0))
|
|
{
|
|
this.waitingForClickUpOnCharacter = false;
|
|
}
|
|
if (Links.x.mk && Input.GetMouseButton(0) && !this.hitCharacter)
|
|
{
|
|
this.waitingForClickUpOnCharacter = false;
|
|
}
|
|
}
|
|
if (this.hitCharacter && !Links.x.fellowship.drawingSquare && this.CanInteractWithWorld("Character") && !this.hitExit && this.character)
|
|
{
|
|
string selected = Links.x.pocketWheel.selected;
|
|
if (((this.mk && Input.GetMouseButtonDown(0)) || (this.joy && ((this.interactStart && this.character == Links.x.partyColliderAdventure.closestCharacter && Links.x.partyColliderAdventure.InRange(Links.x.partyColliderAdventure.closestCharacter)) || (!this.inPartyDock && this.actionStart && !this.waitingForActionUp && (!Records.x.pocketPause || (Records.x.pocketPause && Links.x.pocketWheel.targetSelection)) && (selected == "Light Attack" || (Links.x.pocketWheel.selected == "Special Attack 1" && Links.x.pocketWheel.canTarget) || selected == "Medium Attack" || selected == "Command Attack" || selected == "Heavy Attack" || Links.x.pocketWheel.Charming() || (selected == "Spellbag" && (this.spellTargetingParty || this.spellTargetingEnemy))) && (this.character == this.domeParty || this.character == this.domeEnemy))))) && this.CanClick() && (!this.character.stunned || (this.character.stunned && Records.x.kill)))
|
|
{
|
|
this.WorldClick();
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.clickStartOnUIHover = true;
|
|
}
|
|
if (this.spellTargetingGround && ((this.joy && this.actionStart) || Input.GetMouseButtonDown(0)))
|
|
{
|
|
this.StartGroundTargetTiles(this.actionCharacter, this.character.tr.position, false, this.tileEffectRadius, this.actionCharacter.stats.SpellRadius(this.spellPaganRow));
|
|
}
|
|
else if ((this.character.isBoro || this.character.npc) && Links.x.hasMain)
|
|
{
|
|
if (!this.quickCommandAttack && (this.character.isBoro || (this.character.hostility < 2 && !this.attacking && !this.character.attackingUntilBribe && this.character.stats.dialogueFile != "")) && !Records.x.pocketPause && ((this.joy && this.interactStart) || Input.GetMouseButtonDown(0)))
|
|
{
|
|
if (this.closeTheGap)
|
|
{
|
|
this.talkCharacter = null;
|
|
Character character4 = Links.x.main;
|
|
if (Records.x.partySailing)
|
|
{
|
|
character4 = Links.x.gaia.boro;
|
|
}
|
|
if (!this.character.sleeping)
|
|
{
|
|
if (!this.character.hasActions)
|
|
{
|
|
this.character.ClearNodePath();
|
|
}
|
|
if (this.character.creatures)
|
|
{
|
|
this.character.creatures.SetWaitTime();
|
|
}
|
|
character4.StartGetPathToTarget(this.character.node, this.character, null, null, null, null, null, null, character4, null, false, true, false, "Dialogue", false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
flag14 = true;
|
|
this.FollowCharacterPathFinished(this.character, Links.x.main);
|
|
this.talkCharacter = null;
|
|
}
|
|
}
|
|
else if (this.character.cannotAttack)
|
|
{
|
|
Links.x.gameFeed.AddFeed(this.character.stats.displayName + " cannot be attacked");
|
|
}
|
|
else if (this.quickCommandAttack || (Records.x.pocketPause && Links.x.combat.CanAttackTarget(this.character)))
|
|
{
|
|
if (this.character.hostility < 2 && !this.character.attackingUntilBribe)
|
|
{
|
|
for (int j = 0; j < this.party.Count; j++)
|
|
{
|
|
if (this.party[j] && this.party[j].IsSentient())
|
|
{
|
|
this.party[j].UpdateLKP(this.character, this.character.node, "Attack", true);
|
|
}
|
|
}
|
|
}
|
|
if (!this.quickCommandAttack)
|
|
{
|
|
this.domeEnemy = null;
|
|
this.domeParty = null;
|
|
this.NewPaths();
|
|
this.clickedCharacter = this.character;
|
|
this.ClearInteractionNodes();
|
|
this.targetingCharacter = this.character;
|
|
}
|
|
Character character5 = Links.x.main;
|
|
if (Links.x.pocketWheel.rallyWheelOpen)
|
|
{
|
|
character5 = Links.x.pocketWheel.selectedRallyCharacter;
|
|
}
|
|
for (int k = 0; k < this.party.Count; k++)
|
|
{
|
|
Character character6 = this.party[k];
|
|
if (character6 && !character6.isBoro)
|
|
{
|
|
if (this.quickCommandAttack)
|
|
{
|
|
if (!character6.hasActions)
|
|
{
|
|
Links.x.combat.GivePartyActions(character6, false);
|
|
}
|
|
if (character6.commandMove != null)
|
|
{
|
|
character6.commandMove = null;
|
|
character6.ClearNodePath();
|
|
if (character6.waypoint)
|
|
{
|
|
character6.waypoint.transform.position = this.farPosition;
|
|
}
|
|
}
|
|
if (character6.actions)
|
|
{
|
|
character6.actions.SetSelectedTarget(true, this.character, null, null);
|
|
if (character6.actions && !character6.mainSelected)
|
|
{
|
|
Links.x.combat.GetNextAction(character6);
|
|
}
|
|
}
|
|
if (character6.mainSelected)
|
|
{
|
|
if (this.arcCorout != null)
|
|
{
|
|
this.ReturnLineRenderers();
|
|
base.StopCoroutine(this.arcCorout);
|
|
}
|
|
this.arcCorout = this.ArcToTarget(this.character.torsoPosition);
|
|
base.StartCoroutine(this.arcCorout);
|
|
}
|
|
}
|
|
else if (character6 == character5 && (character6.CanAttack() || Links.x.combat.inPocketAttack || Links.x.pocketWheel.rallyWheelOpen) && character6.IsSentient())
|
|
{
|
|
if (!character6.hasActions)
|
|
{
|
|
Links.x.combat.GivePartyActions(character6, false);
|
|
}
|
|
if (this.spellTargetingEnemy && character6.attackTime >= 1f && character6.hasActions && ((this.joy && this.actionStart) || Input.GetMouseButtonDown(0)))
|
|
{
|
|
if (true)
|
|
{
|
|
this.actionCharacter.portrait.skillBag.selectedSkillButton.SetActionAbility();
|
|
this.actionCharacter.actions.CastSpell(this.character, false, this.character.node, Vector3.zero, true, false);
|
|
this.ClearEffectTiles(true, null, false);
|
|
this.EndControllerTargeting();
|
|
this.RemoveSpellTargets();
|
|
}
|
|
}
|
|
else if (character6.actions)
|
|
{
|
|
if (Links.x.pocketWheel.Charming() && Records.x.pocketPause && ((this.joy && this.actionStart) || Input.GetMouseButtonDown(0)))
|
|
{
|
|
if (this.character.stats.characterRow._Race == "Forest" || this.character.stats.characterRow._Race == "Fish" || this.character.stats.characterRow._Race == "Shroom")
|
|
{
|
|
character6.actions.SelectActionRealTime(this.character, null);
|
|
}
|
|
}
|
|
else if (Links.x.pocketWheel.selected == "Medium Attack" && Records.x.pocketPause && ((this.joy && this.actionStart) || Input.GetMouseButtonDown(0)))
|
|
{
|
|
character6.actions.SelectPin(this.character);
|
|
}
|
|
else if (Records.x.pocketPause && ((this.mk && Input.GetMouseButtonDown(0)) || (this.joy && this.actionStart)))
|
|
{
|
|
if (Links.x.pocketWheel.selected != "Heavy Attack")
|
|
{
|
|
if (Links.x.combat.inPocketAttack)
|
|
{
|
|
this.rallyTargetSelected = this.character;
|
|
}
|
|
else
|
|
{
|
|
character6.actions.SelectActionRealTime(this.character, null);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
character6.actions.SelectCharge(this.character);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.waitingForClickUpOnCharacter = true;
|
|
}
|
|
}
|
|
if (!Links.x.main.HasAmmoOrMelee(Links.x.main.invRow1, false))
|
|
{
|
|
Links.x.gameFeed.AddFeed(this.character.stats.displayName + " is out of " + Links.x.main.GetAmmoType());
|
|
}
|
|
}
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
if (this.spellTargetingGround || this.spellTargetingParty || this.spellTargetingEnemy)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.EndControllerTargeting();
|
|
}
|
|
else if (!this.character.npc && (this.mk || (this.joy && !this.inPartyDock && !this.waitingForActionUp && this.actionStart)) && !this.character.offMap && !Records.x.paused)
|
|
{
|
|
if (this.spellTargetingParty && ((this.joy && this.actionStart) || Input.GetMouseButtonDown(0)))
|
|
{
|
|
this.actionCharacter.portrait.skillBag.selectedSkillButton.SetActionAbility();
|
|
this.actionCharacter.actions.CastSpell(this.character, false, this.character.node, Vector3.zero, true, false);
|
|
this.ClearEffectTiles(true, null, false);
|
|
this.EndControllerTargeting();
|
|
this.RemoveSpellTargets();
|
|
}
|
|
else if (Records.x.pocketPause)
|
|
{
|
|
if (Links.x.combat.CharacterHasSynergy(this.character) && !this.character.mainSelected && (this.joy || Input.GetMouseButtonDown(0)))
|
|
{
|
|
this.SelectRallyCharacter(this.character);
|
|
}
|
|
}
|
|
else if (!Records.x.pocketPause && this.character.party && this.mk && ((this.joy && this.actionStart) || Input.GetMouseButtonDown(0)))
|
|
{
|
|
Links.x.fellowship.SingleSelected(this.character);
|
|
this.character.AddToSelected(false, true);
|
|
this.character.SetAsLeader();
|
|
if (this.doubleClick)
|
|
{
|
|
Links.x.rtsCamera.Follow(this.character.tr, this.character, true);
|
|
}
|
|
flag14 = true;
|
|
}
|
|
if (this.mk)
|
|
{
|
|
this.clickedUpCharacter = true;
|
|
}
|
|
}
|
|
}
|
|
else if (this.spellTargetingGround)
|
|
{
|
|
this.targetingGroundCharacterHover = true;
|
|
this.StartGroundTargetTiles(this.actionCharacter, this.character.tr.position, true, this.tileEffectRadius, this.actionCharacter.stats.SpellRadius(this.spellPaganRow));
|
|
}
|
|
}
|
|
if (!this.hitCharacter)
|
|
{
|
|
this.targetingCharacter = null;
|
|
if (this.prevCharacter)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightCharacter(false, this.prevCharacter);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightCharacter(false, this.prevCharacter);
|
|
}
|
|
this.prevCharacter.HoverOut(false);
|
|
this.prevCharacter = null;
|
|
this.character = null;
|
|
if (Records.x.pocketPause && this.joy)
|
|
{
|
|
this.joystickTarget.SetActive(false);
|
|
}
|
|
this.attacking = false;
|
|
this.attacking = false;
|
|
this.ClearInteractionNodes();
|
|
}
|
|
}
|
|
if (this.hitGameCardHover)
|
|
{
|
|
if (this.prevGameCardCharacter != this.gameCardCharacter)
|
|
{
|
|
if (this.prevGameCardCharacter)
|
|
{
|
|
if (this.prevGameCardCharacter.npc)
|
|
{
|
|
Links.x.gameCard.EndHover(this.prevGameCardCharacter, false);
|
|
}
|
|
this.prevGameCardCharacter.body.Hover(false, true);
|
|
}
|
|
if (this.gameCardCharacter)
|
|
{
|
|
if (this.gameCardCharacter.npc || this.gameCardCharacter.isBoro)
|
|
{
|
|
Links.x.gameCard.StartHover(this.gameCardCharacter, "");
|
|
}
|
|
if (!Records.x.InCombat(false) || (Records.x.InCombat(false) && (this.quickCommandAttack || Records.x.pocketPause) && (this.quickCommandAttack || (this.gameCardCharacter.party && this.spellTargetingParty) || Links.x.combat.CanAttackTarget(this.gameCardCharacter))))
|
|
{
|
|
this.gameCardCharacter.body.Hover(true, true);
|
|
}
|
|
}
|
|
}
|
|
this.prevGameCardCharacter = this.gameCardCharacter;
|
|
bool flag25 = false;
|
|
for (int l = 0; l < this.party.Count; l++)
|
|
{
|
|
if (this.party[l].body.sneaking)
|
|
{
|
|
flag25 = true;
|
|
}
|
|
}
|
|
bool flag26 = flag25;
|
|
if (this.gameCardCharacter && (this.gameCardCharacter.npc && !Records.x.InCombat(false) && this.gameCardCharacter.hostility > 0 && flag26))
|
|
{
|
|
if (this.coneCharacter != this.gameCardCharacter)
|
|
{
|
|
Links.x.lineOfSightCone.rotation = this.gameCardCharacter.body.tr.rotation;
|
|
if (this.gameCardCharacter.moving)
|
|
{
|
|
Links.x.lineOfSightCone.rotation = this.gameCardCharacter.smoothRot;
|
|
}
|
|
Links.x.lineOfSightCone.position = this.gameCardCharacter.tr.position;
|
|
Links.x.lineOfSightCamera.farClipPlane = this.gameCardCharacter.stats.SightRadius(false, false, false);
|
|
}
|
|
this.coneCharacter = this.gameCardCharacter;
|
|
}
|
|
}
|
|
else if (this.prevGameCardCharacter)
|
|
{
|
|
Links.x.gameCard.EndHover(this.prevGameCardCharacter, false);
|
|
this.prevGameCardCharacter.body.Hover(false, true);
|
|
this.prevGameCardCharacter = null;
|
|
}
|
|
if ((this.joy || !this.hitCharacter) && !this.clickedUpCharacter && !flag14 && !Links.x.fellowship.drawingSquare && !this.spellTargetingGround && !this.spellTargetingParty && !this.spellTargetingEnemy && !this.hitBoat && !this.charming && this.CanInteractWithWorld("Item") && !Links.x.main.summoned)
|
|
{
|
|
Item item = null;
|
|
RaycastHit raycastHit5;
|
|
if (this.mk && Physics.Raycast(this.ray, out raycastHit5, 500f, 2048))
|
|
{
|
|
this.mousePoint = raycastHit5.point;
|
|
item = raycastHit5.collider.gameObject.GetComponent<Item>();
|
|
if (!item)
|
|
{
|
|
item = raycastHit5.collider.gameObject.transform.parent.gameObject.GetComponent<Item>();
|
|
}
|
|
if (!this.mouseWormVisible && !this.WormVisible(raycastHit5.point))
|
|
{
|
|
item = null;
|
|
}
|
|
if (item)
|
|
{
|
|
if (!Links.x.partyColliderAdventure.itemCollector.CheckInteractiveLineOfSight(item))
|
|
{
|
|
item = null;
|
|
}
|
|
if (item && Records.x.pocketPause && !Links.x.partyColliderAdventure.InRange(item))
|
|
{
|
|
item = null;
|
|
}
|
|
}
|
|
}
|
|
if (item || (this.joy && Links.x.partyColliderAdventure.closestItem))
|
|
{
|
|
if (this.joy)
|
|
{
|
|
if (Links.x.partyColliderAdventure.InRangeToHover(Links.x.partyColliderAdventure.closestItem))
|
|
{
|
|
this.item = Links.x.partyColliderAdventure.closestItem;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.item = item;
|
|
}
|
|
if (!Links.x.inventory.groundBag.ItemInList(this.item) && this.joy)
|
|
{
|
|
this.item = null;
|
|
}
|
|
if (this.item != this.prevItem && this.prevItem)
|
|
{
|
|
Links.x.inventory.groundBag.RemoveLabels();
|
|
this.prevItem.HoverOut();
|
|
Links.x.inventory.groundBag.SetCollectorUpdate();
|
|
}
|
|
if (this.item != this.prevItem && this.item)
|
|
{
|
|
Links.x.inventory.groundBag.RemoveLabels();
|
|
this.item.HoverIn();
|
|
Links.x.inventory.groundBag.SetCollectorUpdate();
|
|
}
|
|
if (this.item)
|
|
{
|
|
this.prevItem = this.item;
|
|
this.hitItem = true;
|
|
}
|
|
}
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.mouseDownItem = this.item;
|
|
}
|
|
}
|
|
if (this.hitItem && ((this.mk && Input.GetMouseButtonUp(0) && this.item == this.mouseDownItem) || (this.joy && this.interactStart && Links.x.partyColliderAdventure.InRange(Links.x.partyColliderAdventure.closestItem))) && this.CanClick() && Links.x.hasMain)
|
|
{
|
|
Links.x.gameplay.StoneSoundQuieter();
|
|
GraphNode dropNode = this.item.dropNode;
|
|
Character character7 = Links.x.main;
|
|
if (Records.x.partySailing)
|
|
{
|
|
character7 = Links.x.gaia.boro;
|
|
}
|
|
if (this.closeTheGap)
|
|
{
|
|
character7.StartGetPathToTarget(dropNode, null, this.item, null, null, null, null, null, character7, null, Links.x.gameplay.CanScatterPartyToMakePath("Item"), true, false, "Item", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.gameplay.ItemPathFinished(this.item, Links.x.main);
|
|
}
|
|
this.clickedCharacter = null;
|
|
if (this.spellcasting || this.throwingElixir)
|
|
{
|
|
Links.x.main.actions.RemoveAbility();
|
|
}
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
if (this.spellTargetingGround || this.spellTargetingEnemy || this.spellTargetingParty)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
if (this.actionCharacter)
|
|
{
|
|
this.actionCharacter.portrait.skillBag.RemoveSelectedButton();
|
|
}
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.clickStartOnUIHover = true;
|
|
}
|
|
}
|
|
if (!this.hitItem)
|
|
{
|
|
this.mouseDownItem = null;
|
|
if (this.prevItem)
|
|
{
|
|
this.prevItem.HoverOut();
|
|
this.prevItem = null;
|
|
this.item = null;
|
|
Links.x.inventory.groundBag.SetCollectorUpdate();
|
|
}
|
|
}
|
|
bool flag27 = false;
|
|
if (Records.x.pocketPause)
|
|
{
|
|
if (this.attackingCharacter.CanAttack() && (!Links.x.pocketWheel.rallyWheelOpen || (Links.x.pocketWheel.rallyWheelOpen && Links.x.pocketWheel.canTarget)))
|
|
{
|
|
flag27 = true;
|
|
}
|
|
if (!flag27 && Links.x.pocketWheel.rallyWheelOpen && Links.x.pocketWheel.canTarget)
|
|
{
|
|
flag27 = true;
|
|
}
|
|
}
|
|
if (!this.hitCharacter && !this.clickedUpCharacter && (this.joy || !this.hitItem) && !Links.x.fellowship.drawingSquare && !this.spellTargetingGround && !this.spellTargetingParty && !this.spellTargetingEnemy && !this.hitBoat && !this.charming && this.CanInteractWithWorld("Interactive Object"))
|
|
{
|
|
bool flag28 = false;
|
|
if (this.mk && Physics.Raycast(this.ray, 500f, 2162688) && Physics.Raycast(this.ray, out raycastHit2, 500f, 2163200) && (raycastHit2.collider.gameObject.layer == 16 || raycastHit2.collider.gameObject.layer == 21 || this.mouseWormVisible || this.WormVisible(raycastHit2.point)))
|
|
{
|
|
flag28 = true;
|
|
}
|
|
if ((!Records.x.pocketPause || flag27) && (flag28 || (this.joy && !Records.x.pocketPause && (Links.x.partyColliderAdventure.closestBreakable || Links.x.partyColliderAdventure.closestDoor || Links.x.partyColliderAdventure.closestChest || Links.x.partyColliderAdventure.closestPuzzle)) || (this.joy && Records.x.pocketPause && Links.x.pocketWheel.targetSelection && (this.domeBreakable || this.domeDoor || this.domeChest || this.domePuzzle))))
|
|
{
|
|
if (this.mk)
|
|
{
|
|
Physics.Raycast(this.ray, out raycastHit2, 500f, 2162688);
|
|
this.mousePoint = raycastHit2.point;
|
|
this.breakable = raycastHit2.collider.gameObject.GetComponent<BreakableActions>();
|
|
if (!this.breakable)
|
|
{
|
|
this.breakable = raycastHit2.collider.gameObject.transform.parent.gameObject.GetComponent<BreakableActions>();
|
|
}
|
|
if (!this.breakable)
|
|
{
|
|
this.chest = raycastHit2.collider.gameObject.transform.parent.gameObject.GetComponent<ChestActions>();
|
|
}
|
|
if (!this.breakable && !this.chest)
|
|
{
|
|
this.door = raycastHit2.collider.gameObject.GetComponent<DoorActions>();
|
|
}
|
|
if (!this.breakable && !this.chest && !this.door)
|
|
{
|
|
this.puzzle = raycastHit2.collider.gameObject.GetComponent<PuzzleActions>();
|
|
}
|
|
if (this.breakable != this.prevBreakable && this.prevBreakable)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightBreakable(false, this.prevBreakable);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightBreakable(false, this.prevBreakable);
|
|
}
|
|
this.prevBreakable.HoverOut();
|
|
Links.x.itemCard.EndHover(null, null, null, this.prevBreakable, null, true);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
this.breakable = Links.x.partyColliderAdventure.closestBreakable;
|
|
this.door = Links.x.partyColliderAdventure.closestDoor;
|
|
this.chest = Links.x.partyColliderAdventure.closestChest;
|
|
this.puzzle = Links.x.partyColliderAdventure.closestPuzzle;
|
|
}
|
|
else
|
|
{
|
|
this.breakable = this.domeBreakable;
|
|
this.door = this.domeDoor;
|
|
this.chest = this.domeChest;
|
|
this.puzzle = this.domePuzzle;
|
|
}
|
|
if (this.breakable != this.prevBreakable && this.prevBreakable)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightBreakable(false, this.prevBreakable);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightBreakable(false, this.prevBreakable);
|
|
}
|
|
this.prevBreakable.HoverOut();
|
|
Links.x.itemCard.EndHover(null, null, null, this.prevBreakable, null, true);
|
|
}
|
|
}
|
|
this.mapDoor = null;
|
|
bool flag29 = true;
|
|
if (this.breakable || this.chest || this.door || this.puzzle)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
if (this.breakable)
|
|
{
|
|
flag29 = Links.x.hudControl.BreakableIsNear(this.breakable);
|
|
}
|
|
if (this.chest)
|
|
{
|
|
flag29 = Links.x.hudControl.ChestIsNear(this.chest);
|
|
}
|
|
if (this.door)
|
|
{
|
|
flag29 = Links.x.hudControl.DoorIsNear(this.door);
|
|
}
|
|
if (this.puzzle)
|
|
{
|
|
flag29 = Links.x.hudControl.PuzzleIsNear(this.puzzle);
|
|
}
|
|
if (Links.x.mk)
|
|
{
|
|
flag29 = this.mouseWormVisible;
|
|
}
|
|
}
|
|
if (Records.x.pocketPause)
|
|
{
|
|
if (this.breakable)
|
|
{
|
|
flag29 = Links.x.combat.BreakableIsNear(this.breakable, this.attackingCharacter);
|
|
}
|
|
if (this.chest)
|
|
{
|
|
flag29 = Links.x.combat.ChestIsNear(this.chest, this.attackingCharacter);
|
|
}
|
|
if (this.door)
|
|
{
|
|
flag29 = Links.x.combat.DoorIsNear(this.door, this.attackingCharacter);
|
|
}
|
|
if (this.puzzle)
|
|
{
|
|
flag29 = Links.x.combat.PuzzleIsNear(this.puzzle, this.attackingCharacter);
|
|
}
|
|
if (Links.x.pocketWheel.rallyWheelOpen)
|
|
{
|
|
if (Links.x.pocketWheel.selectedRally.Contains("Both") || Links.x.pocketWheel.selectedRally.Contains("Crippl") || Links.x.pocketWheel.selectedRally.Contains("Wound"))
|
|
{
|
|
flag29 = false;
|
|
}
|
|
else
|
|
{
|
|
if (this.breakable && this.breakable.sheen == 1f)
|
|
{
|
|
flag29 = true;
|
|
}
|
|
if (this.chest && this.chest.sheen == 1f)
|
|
{
|
|
flag29 = true;
|
|
}
|
|
if (this.door && this.door.sheen == 1f)
|
|
{
|
|
flag29 = true;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
bool flag30 = false;
|
|
if (this.breakable && (float)this.breakable.currentHealth < Records.x.ChargeAmount((float)this.attackingCharacter.stats.level))
|
|
{
|
|
flag30 = true;
|
|
}
|
|
if (Links.x.pocketWheel.Charming() || (Links.x.pocketWheel.selected == "Heavy Attack" && !flag30) || Links.x.pocketWheel.selected == "Medium Attack")
|
|
{
|
|
flag29 = false;
|
|
}
|
|
}
|
|
}
|
|
if (this.mk && flag29)
|
|
{
|
|
Vector3 vector2 = Vector3.zero;
|
|
if (this.breakable)
|
|
{
|
|
vector2 = this.breakable.gameObject.transform.position + new Vector3(0f, 2f, 0f);
|
|
}
|
|
if (this.chest)
|
|
{
|
|
vector2 = this.chest.gameObject.transform.position + new Vector3(0f, 2f, 0f);
|
|
}
|
|
if (this.door)
|
|
{
|
|
vector2 = this.door.gameObject.transform.position + new Vector3(0f, 2f, 0f);
|
|
}
|
|
if (this.puzzle)
|
|
{
|
|
vector2 = this.puzzle.gameObject.transform.position + new Vector3(0f, this.puzzle.interactionPointY, 0f);
|
|
}
|
|
GraphNode graphNode3 = Links.x.main.NearNode(vector2, false, 0, -1, 0);
|
|
if (graphNode3 != null && graphNode3.GraphIndex == 1U && Links.x.diorama.GetIndoorView().GetInteriorBoundsName((Vector3)graphNode3.position) != Links.x.main.indoorID)
|
|
{
|
|
flag29 = false;
|
|
this.breakable = null;
|
|
this.chest = null;
|
|
this.door = null;
|
|
this.puzzle = null;
|
|
this.hitInteractable = false;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
flag29 = false;
|
|
}
|
|
if (flag29)
|
|
{
|
|
if (Records.x.pocketPause && this.joy && !Links.x.main.inAction && !Links.x.main.inRecovery && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
this.joystickTarget.SetActive(true);
|
|
}
|
|
else if (this.joystickTarget.activeSelf)
|
|
{
|
|
this.joystickTarget.SetActive(false);
|
|
}
|
|
if (this.breakable)
|
|
{
|
|
if (this.breakable != this.prevBreakable && this.breakable)
|
|
{
|
|
if (this.breakable.breakable.armor > 0 && this.breakable.resourceLocation < 0)
|
|
{
|
|
Links.x.itemCard.StartHover(null, null, null, this.breakable, null);
|
|
}
|
|
this.breakable.HoverIn(true);
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightBreakable(true, this.breakable);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightBreakable(true, this.breakable);
|
|
}
|
|
}
|
|
else if (this.breakable == this.prevBreakable && Links.x.itemCard.savedHealth != this.breakable.currentHealth && this.breakable.breakable.armor > 0 && this.breakable.resourceLocation < 0)
|
|
{
|
|
Links.x.itemCard.StartHover(null, null, null, this.breakable, null);
|
|
}
|
|
if (Records.x.pocketPause && this.joy && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
this.SetPositionAtWorldPoint(this.breakable.transform.position + new Vector3(0f, 1.5f, 0f), this.joystickTargetRT);
|
|
}
|
|
this.door = null;
|
|
this.chest = null;
|
|
this.puzzle = null;
|
|
}
|
|
if (this.door)
|
|
{
|
|
if (this.door != this.prevDoor)
|
|
{
|
|
Links.x.itemCard.StartHover(null, null, this.door, null, null);
|
|
this.door.HoverIn(true);
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightDoor(true, this.door);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightDoor(true, this.door);
|
|
}
|
|
}
|
|
else if (Links.x.itemCard.savedHealth != this.door.currentHealth || Links.x.itemCard.savedLockState != this.door.door.locked)
|
|
{
|
|
Links.x.itemCard.StartHover(null, null, this.door, null, null);
|
|
}
|
|
if (Records.x.pocketPause && this.joy && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
this.SetPositionAtWorldPoint(this.door.lockColliderPosition + new Vector3(0f, 0.5f, 0f), this.joystickTargetRT);
|
|
}
|
|
this.chest = null;
|
|
this.breakable = null;
|
|
this.puzzle = null;
|
|
}
|
|
if (this.puzzle != this.prevPuzzle && this.prevPuzzle)
|
|
{
|
|
this.prevPuzzle.HoverOut();
|
|
}
|
|
if (this.puzzle)
|
|
{
|
|
if (this.puzzle != this.prevPuzzle)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightPuzzle(false, this.prevPuzzle);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightPuzzle(false, this.prevPuzzle);
|
|
}
|
|
Links.x.itemCard.StartHover(null, null, null, null, this.puzzle);
|
|
this.puzzle.HoverIn();
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightPuzzle(true, this.puzzle);
|
|
}
|
|
}
|
|
if (Records.x.pocketPause && this.joy && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
this.SetPositionAtWorldPoint(this.puzzle.transform.position + new Vector3(0f, 1.5f, 0f), this.joystickTargetRT);
|
|
}
|
|
this.door = null;
|
|
this.chest = null;
|
|
this.breakable = null;
|
|
}
|
|
if (this.chest)
|
|
{
|
|
if (this.chest != this.prevChest)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightChest(false, this.prevChest);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightChest(false, this.prevChest);
|
|
}
|
|
Links.x.itemCard.StartHover(null, this.chest, null, null, null);
|
|
this.chest.HoverIn(true);
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightChest(true, this.chest);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightChest(true, this.chest);
|
|
}
|
|
}
|
|
else if (this.chest == this.prevChest && (Links.x.itemCard.savedHealth != this.chest.currentHealth || Links.x.itemCard.savedLockState != this.chest.chest.locked))
|
|
{
|
|
Links.x.itemCard.StartHover(null, this.chest, null, null, null);
|
|
}
|
|
if (Records.x.pocketPause && this.joy && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
this.SetPositionAtWorldPoint(this.chest.transform.position + new Vector3(0f, 1.5f, 0f), this.joystickTargetRT);
|
|
}
|
|
this.door = null;
|
|
this.breakable = null;
|
|
this.puzzle = null;
|
|
}
|
|
if (this.door != this.prevDoor && this.prevDoor)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightDoor(false, this.prevDoor);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightDoor(false, this.prevDoor);
|
|
}
|
|
this.prevDoor.HoverOut();
|
|
}
|
|
if (this.chest != this.prevChest && this.prevChest)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightChest(false, this.prevChest);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightChest(false, this.prevChest);
|
|
}
|
|
this.prevChest.HoverOut();
|
|
}
|
|
this.prevDoor = this.door;
|
|
this.prevChest = this.chest;
|
|
this.prevPuzzle = this.puzzle;
|
|
this.prevBreakable = this.breakable;
|
|
this.hitInteractable = true;
|
|
}
|
|
}
|
|
}
|
|
if (this.hitInteractable)
|
|
{
|
|
bool flag31 = false;
|
|
if (this.breakable && this.breakable.breakable.armor > 0)
|
|
{
|
|
flag31 = true;
|
|
}
|
|
if (((this.mk && Input.GetMouseButtonDown(0)) || (this.joy && ((this.actionStart && Records.x.pocketPause && Links.x.pocketWheel.targetSelection && !this.waitingForActionUp) || (this.interactStart && !Records.x.pocketPause)))) && this.CanClick() && Links.x.hasMain && Links.x.main.IsSentient())
|
|
{
|
|
bool flag32 = this.joy;
|
|
if (this.breakable || this.chest || this.door || this.puzzle)
|
|
{
|
|
this.clickedCharacter = null;
|
|
this.WorldClick();
|
|
if (this.breakable)
|
|
{
|
|
this.currentInteractionNode = Links.x.main.NearNode(this.breakable.transform.position, false, 0, -1, 0);
|
|
}
|
|
else if (this.chest)
|
|
{
|
|
this.currentInteractionNode = Links.x.main.NearNode(this.chest.point.transform.position, false, 0, -1, 0);
|
|
}
|
|
else if (this.door)
|
|
{
|
|
if (this.door.node != null)
|
|
{
|
|
this.currentInteractionNode = this.door.node;
|
|
}
|
|
else
|
|
{
|
|
this.currentInteractionNode = this.door.GetNode();
|
|
}
|
|
}
|
|
else if (this.puzzle)
|
|
{
|
|
this.currentInteractionNode = Links.x.main.NearNode(this.puzzle.transform.position, false, 0, -1, 0);
|
|
this.puzzle.node = this.currentInteractionNode;
|
|
}
|
|
if ((this.mk || (this.joy && !Records.x.pocketPause)) && (this.currentInteractionNode != null || !this.closeTheGap))
|
|
{
|
|
Character character8 = Links.x.main;
|
|
if (Records.x.partySailing)
|
|
{
|
|
character8 = Links.x.gaia.boro;
|
|
}
|
|
if (this.closeTheGap)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
if (this.breakable)
|
|
{
|
|
if (this.breakable.breakable.armor == 0)
|
|
{
|
|
character8.StartGetPathToTarget(this.currentInteractionNode, null, null, this.breakable, null, null, null, null, character8, null, this.CanScatterPartyToMakePath("Breakable"), true, false, "Breakable", false);
|
|
}
|
|
}
|
|
else if (this.chest)
|
|
{
|
|
character8.StartGetPathToTarget(this.currentInteractionNode, null, null, null, this.chest, null, null, null, character8, null, this.CanScatterPartyToMakePath("Chest"), true, false, "Chest", false);
|
|
}
|
|
else if (this.door)
|
|
{
|
|
character8.StartGetPathToTarget(this.currentInteractionNode, null, null, null, null, this.door, null, null, character8, null, this.CanScatterPartyToMakePath("Door"), true, false, "Door", false);
|
|
}
|
|
else if (this.puzzle)
|
|
{
|
|
if (this.puzzle.id == "Break Circle")
|
|
{
|
|
this.PuzzleFinished(this.puzzle, Links.x.main);
|
|
}
|
|
else
|
|
{
|
|
character8.StartGetPathToTarget(this.currentInteractionNode, null, null, null, null, null, this.puzzle, null, character8, null, this.CanScatterPartyToMakePath("Puzzle"), true, false, "Puzzle", false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (this.breakable)
|
|
{
|
|
if (this.breakable.breakable.armor == 0)
|
|
{
|
|
this.BreakableFinished(this.breakable, Links.x.main);
|
|
if (Links.x.joy)
|
|
{
|
|
this.waitingForActionUp = true;
|
|
}
|
|
}
|
|
}
|
|
else if (this.chest)
|
|
{
|
|
this.ChestFinished(this.chest, Links.x.main);
|
|
}
|
|
else if (this.door)
|
|
{
|
|
this.DoorFinished(this.door, Links.x.main);
|
|
}
|
|
else if (this.puzzle)
|
|
{
|
|
this.PuzzleFinished(this.puzzle, Links.x.main);
|
|
}
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.clickStartOnUIHover = true;
|
|
}
|
|
}
|
|
}
|
|
if (flag27 && ((this.mk && Input.GetMouseButtonDown(0)) || (this.joy && !this.inPartyDock && this.actionStart && !this.waitingForActionUp && flag27 && Links.x.pocketWheel.targetSelection)) && this.CanClick() && Links.x.hasMain && !Records.x.typing)
|
|
{
|
|
Debug.Log(flag27.ToString() + " " + Links.x.main.CanAttack().ToString());
|
|
bool flag33 = false;
|
|
if (this.breakable && ((flag31 && Links.x.combat.BreakableIsNear(this.breakable, this.attackingCharacter)) || (flag27 && Links.x.combat.BreakableIsNear(this.breakable, this.attackingCharacter)) || (flag27 && Links.x.pocketWheel.rallyWheelOpen && Links.x.pocketWheel.canTarget && Links.x.pocketWheel.rally1 && this.breakable.sheen == 1f)))
|
|
{
|
|
flag33 = true;
|
|
}
|
|
if (flag33 || this.chest || this.door)
|
|
{
|
|
this.AttackInteractive();
|
|
if (Links.x.joy)
|
|
{
|
|
this.waitingForActionUp = true;
|
|
}
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.clickStartOnUIHover = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!this.hitInteractable)
|
|
{
|
|
if (this.prevBreakable)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightBreakable(false, this.prevBreakable);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightBreakable(false, this.prevBreakable);
|
|
}
|
|
if (this.prevBreakable.resourceLocation < 0)
|
|
{
|
|
Links.x.itemCard.EndHover(null, null, null, this.prevBreakable, null, true);
|
|
}
|
|
this.prevBreakable.HoverOut();
|
|
this.prevBreakable = null;
|
|
this.breakable = null;
|
|
if (!Links.x.pocketWheel.targetSelection || (this.joystickTarget.activeSelf && !this.domeParty && !this.domeEnemy))
|
|
{
|
|
this.joystickTarget.SetActive(false);
|
|
}
|
|
}
|
|
if (this.prevChest)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightChest(false, this.prevChest);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightChest(false, this.prevChest);
|
|
}
|
|
Links.x.itemCard.EndHover(null, this.prevChest, null, null, null, true);
|
|
this.prevChest.HoverOut();
|
|
this.prevChest = null;
|
|
this.chest = null;
|
|
if (!Links.x.pocketWheel.targetSelection || (this.joystickTarget.activeSelf && !this.domeParty && !this.domeEnemy))
|
|
{
|
|
this.joystickTarget.SetActive(false);
|
|
}
|
|
}
|
|
if (this.prevDoor)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightDoor(false, this.prevDoor);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightDoor(false, this.prevDoor);
|
|
}
|
|
Links.x.itemCard.EndHover(null, null, this.prevDoor, null, null, true);
|
|
this.prevDoor.HoverOut();
|
|
this.prevDoor = null;
|
|
this.door = null;
|
|
if (!Links.x.pocketWheel.targetSelection || (this.joystickTarget.activeSelf && !this.domeParty && !this.domeEnemy))
|
|
{
|
|
this.joystickTarget.SetActive(false);
|
|
}
|
|
}
|
|
if (this.prevPuzzle)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightPuzzle(false, this.prevPuzzle);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightPuzzle(false, this.prevPuzzle);
|
|
}
|
|
Links.x.itemCard.EndHover(null, null, null, null, this.prevPuzzle, true);
|
|
this.prevPuzzle.HoverOut();
|
|
this.prevPuzzle = null;
|
|
this.puzzle = null;
|
|
if (!Links.x.pocketWheel.targetSelection || (this.joystickTarget.activeSelf && !this.domeParty && !this.domeEnemy))
|
|
{
|
|
this.joystickTarget.SetActive(false);
|
|
}
|
|
}
|
|
}
|
|
bool flag34 = false;
|
|
bool flag35 = false;
|
|
bool flag36 = false;
|
|
if (this.joy && Links.x.partyColliderAdventure.nearBeach)
|
|
{
|
|
if (Records.x.partySailing)
|
|
{
|
|
flag5 = true;
|
|
this.hitBeach = true;
|
|
}
|
|
else
|
|
{
|
|
flag3 = true;
|
|
this.hitWater = true;
|
|
}
|
|
}
|
|
if (!this.hitItem && !this.hitCharacter && !this.hitExit && !this.hitBoat && !this.hitInteractable && !this.clickedUpCharacter && this.CanClick() && (this.CanInteractWithWorld("Ground") || this.makeCircleMode) && !this.itemsDown && !Links.x.fellowship.drawingSquare)
|
|
{
|
|
if ((flag3 || flag4 || flag2 || flag5 || this.joy) && !flag15 && !this.spellTargetingParty && !this.spellTargetingEnemy)
|
|
{
|
|
if (Records.x.InCombat(false) && Links.x.fellowship.mouseNode != null)
|
|
{
|
|
flag34 = true;
|
|
}
|
|
if (this.spellTargetingGround)
|
|
{
|
|
if (this.repositionTargeting || this.defenseCircleTargeting)
|
|
{
|
|
this.ClearEffectTiles(true, null, true);
|
|
}
|
|
if (this.joy)
|
|
{
|
|
float num3 = Mathf.Abs(Links.x.fellowship.move.magnitude);
|
|
if (num3 > 0.1f)
|
|
{
|
|
this.targetGroundTime = Time.timeSinceLevelLoad;
|
|
Vector3 vector3 = this.joyPosition;
|
|
float num4 = Mathf.Atan2(Links.x.fellowship.move.x, Links.x.fellowship.move.y) / 3.1415927f * 180f;
|
|
if (num4 < 0f)
|
|
{
|
|
num4 += 360f;
|
|
}
|
|
float num5 = Links.x.worldCamera.transform.rotation.eulerAngles.y + Records.x.gridOffset;
|
|
Quaternion quaternion = Quaternion.Euler(new Vector3(0f, num4 + num5, 0f));
|
|
this.joyPosition = vector3 + quaternion * Vector3.forward * num3 * Time.deltaTime * 30f;
|
|
Vector3 vector4 = this.joyPosition - Links.x.main.tr.position;
|
|
Vector3 vector5 = Links.x.main.tr.position + Vector3.ClampMagnitude(vector4, Links.x.main.stats.SpellRadius(this.spellPaganRow));
|
|
this.SetControllerTargetingPosition(vector5);
|
|
this.joyPosition = vector5;
|
|
}
|
|
}
|
|
if ((this.mk && Input.GetMouseButtonUp(0)) || (this.joy && !this.inPartyDock && this.actionStart && !this.waitingForActionUp))
|
|
{
|
|
flag13 = true;
|
|
if (this.actionCharacter.hasActions)
|
|
{
|
|
if (this.actionCharacter.actions.channeling)
|
|
{
|
|
this.actionCharacter.actions.EndChanneling(false);
|
|
}
|
|
this.actionCharacter.actions.EndVine();
|
|
}
|
|
this.clickedCharacter = null;
|
|
this.WorldClick();
|
|
if (this.joy)
|
|
{
|
|
this.mousePoint = this.groundTargetingWaypoint.transform.position;
|
|
}
|
|
this.StartGroundTargetTiles(this.actionCharacter, this.mousePoint, false, this.tileEffectRadius, this.actionCharacter.stats.SpellRadius(this.spellPaganRow));
|
|
}
|
|
else
|
|
{
|
|
if (this.joy)
|
|
{
|
|
this.mousePoint = this.groundTargetingWaypoint.transform.position;
|
|
}
|
|
this.StartGroundTargetTiles(this.actionCharacter, this.mousePoint, true, this.tileEffectRadius, this.actionCharacter.stats.SpellRadius(this.spellPaganRow));
|
|
}
|
|
}
|
|
else if (Records.x.pocketPause || this.quickReposition || this.quickGroup || Input.GetKey(Links.x.gameplay.keyControl.GetHotkey("Commands")) || this.makeCircleMode)
|
|
{
|
|
if (this.mk && (Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Left")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Up")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Right")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Down"))))
|
|
{
|
|
this.PocketPause(false);
|
|
}
|
|
if ((this.quickReposition || this.quickGroup || this.makeCircleMode || Input.GetKey(Links.x.gameplay.keyControl.GetHotkey("Commands"))) && !Records.x.partySailing)
|
|
{
|
|
Vector3 vector6 = this.joyPosition;
|
|
if (this.mk)
|
|
{
|
|
Vector3 vector7 = this.mousePoint - Links.x.main.tr.position;
|
|
vector6 = Links.x.main.tr.position + Vector3.ClampMagnitude(vector7, Links.x.main.stats.SightRadius(false, false, false));
|
|
}
|
|
if (this.joy)
|
|
{
|
|
float num6 = Mathf.Abs(Links.x.fellowship.move.magnitude);
|
|
if (num6 > 0.1f)
|
|
{
|
|
this.targetGroundTime = Time.timeSinceLevelLoad;
|
|
Vector3 vector8 = this.joyPosition;
|
|
float num7 = Mathf.Atan2(Links.x.fellowship.move.x, Links.x.fellowship.move.y) / 3.1415927f * 180f;
|
|
if (num7 < 0f)
|
|
{
|
|
num7 += 360f;
|
|
}
|
|
float num8 = Links.x.worldCamera.transform.rotation.eulerAngles.y + Records.x.gridOffset;
|
|
Quaternion quaternion2 = Quaternion.Euler(new Vector3(0f, num7 + num8, 0f));
|
|
this.joyPosition = vector8 + quaternion2 * Vector3.forward * num6 * Time.deltaTime * 30f;
|
|
Vector3 vector9 = this.joyPosition - Links.x.main.tr.position;
|
|
vector6 = Links.x.main.tr.position + Vector3.ClampMagnitude(vector9, Links.x.main.stats.SightRadius(false, false, false));
|
|
RaycastHit raycastHit6;
|
|
if (Physics.Raycast(vector6 + new Vector3(0f, 100f, 0f), Vector3.up * -1f, out raycastHit6, 200f, Links.x.floor))
|
|
{
|
|
vector6 = raycastHit6.point;
|
|
}
|
|
}
|
|
}
|
|
bool flag37 = false;
|
|
GraphNode graphNode4 = Links.x.main.NearNode(vector6, false, 0, -1, 0);
|
|
if (graphNode4 != null && Links.x.main.node != null)
|
|
{
|
|
if (graphNode4.GraphIndex == 1U)
|
|
{
|
|
flag37 = !(Links.x.diorama.GetIndoorView().GetInteriorBoundsName((Vector3)graphNode4.position) != Links.x.main.indoorID) && Links.x.main.node.GraphIndex != 0U;
|
|
}
|
|
else
|
|
{
|
|
flag37 = graphNode4.GraphIndex != 0U || Links.x.main.node.GraphIndex != 1U;
|
|
}
|
|
}
|
|
if (Time.timeSinceLevelLoad > this.foundGroupTime + 0.15f)
|
|
{
|
|
this.foundGroupTime = 0f;
|
|
}
|
|
if (flag37 && (this.quickGroup || this.makeCircleMode || Input.GetKey(Links.x.gameplay.keyControl.GetHotkey("Commands"))))
|
|
{
|
|
if (!this.defenseCircleTargeting)
|
|
{
|
|
this.defenseCircleRotation = Quaternion.identity;
|
|
}
|
|
this.defenseCircleTargeting = true;
|
|
if (this.mk)
|
|
{
|
|
if (!this.messageDefenseHoldMK.activeSelf && Input.GetMouseButton(0))
|
|
{
|
|
this.messageDefenseHoldMK.SetActive(true);
|
|
this.messageDefenseHoldAnimMK.Play("ControlsSlideMK");
|
|
}
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
this.defenseHoldTime = 0f;
|
|
}
|
|
if (Input.GetMouseButton(0) && this.defenseHoldTime == 0f)
|
|
{
|
|
this.defenseHoldTime = Time.timeSinceLevelLoad;
|
|
this.defenseCircleHoldPosition = vector6;
|
|
}
|
|
if (Input.GetMouseButtonDown(0) || (Input.GetMouseButton(0) && Time.timeSinceLevelLoad < this.defenseHoldTime + 0.3f))
|
|
{
|
|
vector6 = this.defenseCircleHoldPosition;
|
|
}
|
|
else if (Input.GetMouseButton(0) || Input.GetMouseButtonUp(0))
|
|
{
|
|
vector6 = this.defenseCircleHoldPosition;
|
|
}
|
|
else
|
|
{
|
|
this.defenseCircleHoldPosition = Vector3.zero;
|
|
this.defenseCircleRotation = Quaternion.identity;
|
|
this.defenseHoldTime = 0f;
|
|
}
|
|
}
|
|
else if (!this.messageDefenseHoldJoy.activeSelf)
|
|
{
|
|
this.messageDefenseHoldJoy.SetActive(true);
|
|
this.messageDefenseHoldAnimJoy.Play("ControlsSlideMK");
|
|
}
|
|
bool flag38 = true;
|
|
bool flag39 = false;
|
|
if (this.quickGroup && Input.GetMouseButtonUp(0))
|
|
{
|
|
flag39 = true;
|
|
flag38 = false;
|
|
}
|
|
this.StartGroundTargetTiles(Links.x.main, vector6, flag38, 4, Links.x.main.stats.SightRadius(false, false, false));
|
|
if ((Input.GetMouseButtonUp(0) && this.mk) || (this.actionStart && this.joy))
|
|
{
|
|
flag13 = true;
|
|
if (!flag39)
|
|
{
|
|
this.EndGroupCircle(vector6);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (!this.quickGroup && !this.quickReposition)
|
|
{
|
|
if (this.repositionTargeting || this.defenseCircleTargeting)
|
|
{
|
|
this.ClearEffectTiles(true, null, true);
|
|
}
|
|
if (Links.x.mk && Links.x.pathfind && !this.hitWater)
|
|
{
|
|
bool flag40 = false;
|
|
if (Input.GetMouseButtonDown(0))
|
|
{
|
|
bool flag41 = false;
|
|
GraphNode graphNode5 = Links.x.main.NearNode(this.mousePoint, false, 0, -1, 0);
|
|
if (graphNode5 != null && Links.x.main.node != null)
|
|
{
|
|
if (graphNode5.GraphIndex == 1U)
|
|
{
|
|
flag41 = !(Links.x.diorama.GetIndoorView().GetInteriorBoundsName((Vector3)graphNode5.position) != Links.x.main.indoorID) && Links.x.main.node.GraphIndex != 0U;
|
|
}
|
|
else
|
|
{
|
|
flag41 = graphNode5.GraphIndex != 0U || Links.x.main.node.GraphIndex != 1U;
|
|
}
|
|
}
|
|
if (flag41)
|
|
{
|
|
this.ClearSelectedActionTargets(Links.x.main);
|
|
this.clickedCharacter = null;
|
|
Links.x.gameplay.StoneSoundQuieter();
|
|
if (Links.x.main.actions && !Records.x.partySailing)
|
|
{
|
|
Links.x.main.actions.RemoveAbility();
|
|
}
|
|
if (this.spellTargetingGround || this.spellTargetingParty || this.spellTargetingEnemy)
|
|
{
|
|
this.ClearEffectTiles(true, null, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.throwingElixir = false;
|
|
if (this.actionCharacter)
|
|
{
|
|
this.actionCharacter.portrait.skillBag.RemoveSelectedButton();
|
|
}
|
|
if (Records.x.InCombat(false))
|
|
{
|
|
Links.x.combat.ClickAwayFromCombat();
|
|
}
|
|
Links.x.fellowship.MakeWaypoints(this.mousePoint, null, flag40, flag3);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (this.repositionTargeting || this.defenseCircleTargeting)
|
|
{
|
|
this.ClearEffectTiles(true, null, true);
|
|
}
|
|
if ((!flag34 && !this.targetingCharacter) || this.spellTargetingGround)
|
|
{
|
|
this.TurnOffHoverTiles();
|
|
}
|
|
if (!Records.x.pocketPause && Links.x.main.IsSentient() && (this.joy || !flag14) && !Records.x.removeControls && !Records.x.inMenus && !this.spellTargetingGround && !this.spellTargetingParty && !this.spellTargetingEnemy && !this.clickedUpCharacter && !flag36 && !flag35 && !flag13 && !Records.x.typing && !this.makeCircleMode)
|
|
{
|
|
if ((!this.attackingCharacter.inAction && !this.attackingCharacter.inRecovery && !this.attackingCharacter.inQueuedAbility && this.mk && ((!Input.GetKey(Links.x.gameplay.keyControl.GetHotkey("Commands")) && Input.GetMouseButtonDown(1)) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Pocket")))) || (this.joy && !this.inPartyDock && this.actionStart && !this.waitingForActionUp && !this.itemsDown && !this.descWindowOpen && (Records.x.MenusCount() == 0 || (Records.x.MenusCount() == 1 && Records.x.FirstMenu() == Links.x.hudControl.gameFeedPopout))))
|
|
{
|
|
if (Links.x.main.attackTime < 1f)
|
|
{
|
|
MasterAudio.PlaySoundAndForget("Not ready", Random.Range(0.5f, 0.7f), new float?(Random.Range(0.9f, 1f)), 0f, "", null);
|
|
}
|
|
this.startPocketPause = true;
|
|
}
|
|
}
|
|
else if (!this.startPocketPause && Records.x.pocketPause && ((this.joy && this.cancelStart && !Links.x.pocketWheel.targetSelection) || (!this.hitItem && !this.hitExit && !this.hitInteractable && !flag14 && !this.hitCharacter && Input.GetMouseButtonDown(0)) || (Input.GetMouseButtonDown(1) && !this.spellcasting) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Right")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Left")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Up")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Down")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Pocket"))) && !Records.x.removeControls && !Records.x.inMenus && !this.spellTargetingGround && !this.spellTargetingParty && !this.spellTargetingEnemy && !Records.x.typing && !Links.x.pocketWheel.rallyWheelOpen && ((this.mk && ((Input.GetMouseButtonDown(0) && !this.quickCommandAttack && !this.quickReposition && !this.quickGroup) || (!this.spellcasting && Input.GetMouseButtonDown(1)) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Right")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Left")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Up")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Down")) || Input.GetKeyDown(Links.x.gameplay.keyControl.GetHotkey("Pocket")))) || (this.joy && this.cancelStart && !this.spellcasting && !Links.x.pocketWheel.spellbookWindow.gameObject.activeSelf)))
|
|
{
|
|
this.PocketPause(false);
|
|
}
|
|
if (Records.x.pocketPause && this.joy && !Links.x.pocketWheel.rallyWheelOpen && this.cancelStart)
|
|
{
|
|
if (!Links.x.pocketWheel.targetSelection && Links.x.pocketWheel.spellbookWindow.gameObject.activeSelf)
|
|
{
|
|
this.RemoveSpellTargets();
|
|
}
|
|
else if (Links.x.pocketWheel.targetSelection)
|
|
{
|
|
Links.x.rtsCamera.Zoom(false, "TargetSelect");
|
|
Links.x.rtsCamera.targetSelecting = false;
|
|
if (Links.x.main.attackTime >= 1f)
|
|
{
|
|
Links.x.pocketWheel.Open(Links.x.main);
|
|
}
|
|
if (this.spellcasting || this.spellTargetingGround)
|
|
{
|
|
this.RemoveSpellTargets();
|
|
}
|
|
}
|
|
else if (!this.startPocketPause)
|
|
{
|
|
this.PocketPause(false);
|
|
}
|
|
}
|
|
if (Records.x.pocketPause)
|
|
{
|
|
if (((this.mk && Input.GetMouseButtonDown(1)) || (this.joy && this.cancelStart)) && !this.character)
|
|
{
|
|
if (Links.x.combat.pickingRally && !this.spellcasting)
|
|
{
|
|
Links.x.combat.pickingRally = false;
|
|
if (Links.x.main.attackTime >= 1f)
|
|
{
|
|
Links.x.pocketWheel.Open(Links.x.main);
|
|
}
|
|
Shader.SetGlobalFloat("_Combat", 1f);
|
|
Links.x.main.portrait.AnimatorSynergyDone();
|
|
Links.x.combat.rallyCharacter.portrait.AnimatorSynergyDone();
|
|
Links.x.combat.rallyCharacter = null;
|
|
this.SetDomeSize();
|
|
if (this.joy)
|
|
{
|
|
this.GetControllerTarget(false);
|
|
}
|
|
}
|
|
if (this.spellcasting)
|
|
{
|
|
if (this.actionCharacter && this.actionCharacter.actions && this.actionCharacter.actions.spellCasterFX)
|
|
{
|
|
Links.x.cellar.ReturnPooledGameObject(69, this.actionCharacter.actions.spellCasterFX);
|
|
}
|
|
this.RemoveAbilityInfo();
|
|
}
|
|
if (this.actionCharacter)
|
|
{
|
|
Links.x.gameplay.ClearWaypointEffect(this.actionCharacter);
|
|
}
|
|
this.clickStartOnUIHover = false;
|
|
}
|
|
}
|
|
else if (this.mk && Input.GetMouseButtonDown(1) && this.spellcasting && !this.startPocketPause && this.spellcasting)
|
|
{
|
|
if (this.actionCharacter && this.actionCharacter.actions && this.actionCharacter.actions.spellCasterFX)
|
|
{
|
|
Links.x.cellar.ReturnPooledGameObject(69, this.actionCharacter.actions.spellCasterFX);
|
|
}
|
|
this.RemoveAbilityInfo();
|
|
}
|
|
}
|
|
if (!Records.x.pocketPause && (this.defenseCircleTargeting || this.repositionTargeting) && !this.quickGroup && !this.quickReposition && !this.makeCircleMode && !Input.GetKey(Links.x.gameplay.keyControl.GetHotkey("Commands")))
|
|
{
|
|
this.ClearEffectTiles(true, null, true);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (this.mk)
|
|
{
|
|
if (Input.GetMouseButtonDown(0) && this.uiHover)
|
|
{
|
|
this.clickStartOnUIHover = true;
|
|
}
|
|
if (this.prevExit)
|
|
{
|
|
this.prevExit.Hover(false);
|
|
Links.x.hudControl.HighlightExit(false, this.prevExit);
|
|
this.prevExit = null;
|
|
this.exit = null;
|
|
this.mapDoor = null;
|
|
this.prevMapDoor = null;
|
|
}
|
|
this.targetingCharacter = null;
|
|
if (this.prevCharacter)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightCharacter(false, this.prevCharacter);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightCharacter(false, this.prevCharacter);
|
|
}
|
|
this.prevCharacter.HoverOut(false);
|
|
this.prevCharacter = null;
|
|
this.character = null;
|
|
this.ClearInteractionNodes();
|
|
}
|
|
if (this.prevBreakable)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightBreakable(false, this.prevBreakable);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightBreakable(false, this.prevBreakable);
|
|
}
|
|
Links.x.itemCard.EndHover(null, null, null, this.prevBreakable, null, true);
|
|
this.prevBreakable.HoverOut();
|
|
this.prevBreakable = null;
|
|
this.breakable = null;
|
|
}
|
|
if (this.prevChest)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightChest(false, this.prevChest);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightChest(false, this.prevChest);
|
|
}
|
|
Links.x.itemCard.EndHover(null, this.prevChest, null, null, null, true);
|
|
this.prevChest.HoverOut();
|
|
this.prevChest = null;
|
|
this.chest = null;
|
|
}
|
|
if (this.prevDoor)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightDoor(false, this.prevDoor);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightDoor(false, this.prevDoor);
|
|
}
|
|
Links.x.itemCard.EndHover(null, null, this.prevDoor, null, null, true);
|
|
this.prevDoor.HoverOut();
|
|
this.prevDoor = null;
|
|
this.door = null;
|
|
}
|
|
if (this.prevPuzzle)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
Links.x.hudControl.HighlightPuzzle(false, this.prevPuzzle);
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.HighlightPuzzle(false, this.prevPuzzle);
|
|
}
|
|
Links.x.itemCard.EndHover(null, null, null, null, this.prevPuzzle, true);
|
|
this.prevPuzzle.HoverOut();
|
|
this.prevPuzzle = null;
|
|
this.puzzle = null;
|
|
}
|
|
if (this.prevItem)
|
|
{
|
|
this.prevItem.HoverOut();
|
|
Links.x.itemCard.EndHover(this.prevItem, null, null, null, null, false);
|
|
this.prevItem = null;
|
|
}
|
|
}
|
|
if (this.prevGameCardCharacter)
|
|
{
|
|
Links.x.gameCard.EndHover(this.prevGameCardCharacter, false);
|
|
this.prevGameCardCharacter.body.Hover(false, true);
|
|
this.prevGameCardCharacter = null;
|
|
}
|
|
this.TurnOffHoverTiles();
|
|
}
|
|
if (this.joy)
|
|
{
|
|
if (!Records.x.typing && !Records.x.inMenus && Links.x.main && !Records.x.removeControls && Links.x.gaia.sceneLoaded && !Links.x.creation && !Links.x.pocketWheel.rallyWheelOpen && !Links.x.combat.inPocketAttack && !this.makeCircleMode)
|
|
{
|
|
if (Links.x.main.IsSentient() && (this.partyItems3Down || this.partyItems4Down) && !this.inPartyDock && !Links.x.pocketWheel.spellbook.activeSelf && !Links.x.pocketWheel.open && !this.gameFeedScrolling && !this.badgeScrolling)
|
|
{
|
|
this.inPartyDock = true;
|
|
Links.x.hudControl.ToggleBothCanvasGroup(true);
|
|
Links.x.hudControl.ToggleCanvasGroup(false);
|
|
EventSystem.current.SetSelectedGameObject(Links.x.main.portrait.skillBag.weaponTransform.GetChild(1).gameObject);
|
|
}
|
|
if (this.itemsDown && this.dockDown && Links.x.gameFeed.isOn)
|
|
{
|
|
if (this.currentEventObject != Links.x.gameFeed.scrollbar.gameObject)
|
|
{
|
|
EventSystem.current.SetSelectedGameObject(Links.x.gameFeed.scrollbar.gameObject);
|
|
this.gameFeedScrolling = true;
|
|
Links.x.hudControl.ToggleControllerItemsIcon(false);
|
|
if (this.badgeScrolling)
|
|
{
|
|
Links.x.hudControl.RemoveBadgeNavigation();
|
|
this.badgeScrolling = false;
|
|
}
|
|
}
|
|
Links.x.gameFeed.scrollRect.verticalNormalizedPosition += Links.x.fellowship.move.y * 7f * Time.deltaTime;
|
|
}
|
|
if (this.gameFeedScrolling && (!this.itemsDown || !this.dockDown))
|
|
{
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
Links.x.hudControl.JoyBox(false);
|
|
this.gameFeedScrolling = false;
|
|
Links.x.hudControl.ToggleControllerItemsIcon(true);
|
|
}
|
|
if (this.aimHold && this.targetDodgeHold && Links.x.hudControl.GetFirstBadge())
|
|
{
|
|
if (this.currentEventObject == null || !this.badgeScrolling)
|
|
{
|
|
GameObject firstBadge = Links.x.hudControl.GetFirstBadge();
|
|
if (firstBadge)
|
|
{
|
|
EventSystem.current.SetSelectedGameObject(firstBadge);
|
|
}
|
|
}
|
|
this.badgeScrolling = true;
|
|
Links.x.hudControl.ToggleControllerItemsIcon(false);
|
|
this.gameFeedScrolling = false;
|
|
}
|
|
if (this.badgeScrolling && (!this.aimHold || !this.targetDodgeHold || this.gameFeedScrolling))
|
|
{
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
Links.x.hudControl.JoyBox(false);
|
|
this.badgeScrolling = false;
|
|
Links.x.hudControl.RemoveBadgeNavigation();
|
|
Links.x.hudControl.ToggleControllerItemsIcon(true);
|
|
}
|
|
if (this.menusDown && Links.x.gameFeed.isOn)
|
|
{
|
|
Links.x.hudControl.MoveFeedAndNote();
|
|
}
|
|
}
|
|
if (Records.x.typing || Records.x.removeControls || Records.x.dialogue || Records.x.inMenus || !Links.x.gaia.sceneLoaded)
|
|
{
|
|
if (this.gameFeedScrolling)
|
|
{
|
|
this.gameFeedScrolling = false;
|
|
Links.x.hudControl.ToggleControllerItemsIcon(true);
|
|
}
|
|
if (this.badgeScrolling)
|
|
{
|
|
this.badgeScrolling = false;
|
|
Links.x.hudControl.RemoveBadgeNavigation();
|
|
Links.x.hudControl.ToggleControllerItemsIcon(true);
|
|
}
|
|
}
|
|
if (Records.x.inMenus || Records.x.removeControls || !Links.x.gaia.sceneLoaded || (!Records.x.inMenus && !this.makeCircleMode && (this.cancelStart || this.dockDown || this.gameFeedScrolling || (!Records.x.typing && (Links.x.fellowship.move.x != 0f || Links.x.fellowship.move.y != 0f || Links.x.fellowship.move.magnitude > 0.1f || Links.x.fellowship.direction.magnitude > 0.1f || this.party1Down || this.party2Down)))))
|
|
{
|
|
if (this.makeCircleMode)
|
|
{
|
|
Links.x.hudControl.ToggleStayBack();
|
|
}
|
|
if (this.tp1.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp2.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp3.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp4.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (!Records.x.miniGame && this.inPartyDock && !Records.x.inMenus && !this.descWindowOpen)
|
|
{
|
|
Links.x.main.portrait.skillBag.TooltipOff();
|
|
if (this.currentEventObject != Links.x.gameFeed.scrollbar)
|
|
{
|
|
EventSystem.current.SetSelectedGameObject(null);
|
|
Links.x.hudControl.JoyBox(false);
|
|
}
|
|
}
|
|
this.inPartyDock = false;
|
|
if (this.descWindowOpen)
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
}
|
|
if (!Records.x.typing && !Records.x.inMenus && this.hudLeftStart && !Links.x.pocketWheel.rallyWheelOpen && !Links.x.combat.inPocketAttack)
|
|
{
|
|
Links.x.hudControl.ToggleLethalityJoystick();
|
|
if (Records.x.kill)
|
|
{
|
|
Links.x.main.StartQuip("Killing blows only");
|
|
}
|
|
else
|
|
{
|
|
Links.x.main.StartQuip("Just knock them out");
|
|
}
|
|
if (this.tp1.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp2.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp3.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp4.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.descWindowOpen)
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
}
|
|
if (!Records.x.typing && !Records.x.inMenus && this.hudRightStart && !Links.x.pocketWheel.rallyWheelOpen && !Links.x.combat.inPocketAttack && !this.spellTargetingGround && !this.spellcasting && (!Links.x.pocketWheel.open || (Links.x.pocketWheel.open && !Links.x.pocketWheel.targetSelection)))
|
|
{
|
|
Links.x.hudControl.ToggleStayBack();
|
|
if (this.tp1.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp2.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp3.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp4.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.descWindowOpen)
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
}
|
|
if (this.allMenusStart && !Links.x.spellcrafting.open && !Records.x.miniGame && !this.tp1.open && !this.tp2.open && !this.tp3.open && !this.tp4.open && !Links.x.pocketWheel.rallyWheelOpen && !Links.x.combat.inPocketAttack && !Links.x.questEnd.on && !Records.x.dialogue && !Records.x.inMenus)
|
|
{
|
|
if (this.gameFeedScrolling)
|
|
{
|
|
this.gameFeedScrolling = false;
|
|
Links.x.hudControl.ToggleControllerItemsIcon(true);
|
|
}
|
|
if (this.badgeScrolling)
|
|
{
|
|
this.badgeScrolling = false;
|
|
Links.x.hudControl.RemoveBadgeNavigation();
|
|
Links.x.hudControl.ToggleControllerItemsIcon(true);
|
|
}
|
|
if (this.tp1.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp2.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp3.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.tp4.open)
|
|
{
|
|
this.tp1.EndMenuStart();
|
|
}
|
|
if (this.descWindowOpen)
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
string text = this.lastMenuOpened;
|
|
if (text == "" || text == null)
|
|
{
|
|
text = "Character Sheet";
|
|
}
|
|
if (Links.x.creation)
|
|
{
|
|
text = "Options";
|
|
}
|
|
if (text == "Rest")
|
|
{
|
|
if (Records.x.InCombat(false))
|
|
{
|
|
text = "Character Sheet";
|
|
this.lastMenuOpened = text;
|
|
}
|
|
else
|
|
{
|
|
Links.x.rest.StartMenu(true);
|
|
}
|
|
}
|
|
if (text == "Character Sheet")
|
|
{
|
|
Links.x.characterSheet.StartMenu(false);
|
|
}
|
|
if (text == "Journal")
|
|
{
|
|
Links.x.journal.StartMenu();
|
|
}
|
|
if (text == "Scene Map")
|
|
{
|
|
Links.x.sceneMap.OpenMenu();
|
|
}
|
|
if (text == "Options")
|
|
{
|
|
Links.x.saveLoad.OpenMenu();
|
|
}
|
|
if (text == "Formation")
|
|
{
|
|
Links.x.formation.StartMenu();
|
|
}
|
|
Links.x.hudControl.OpenMenuSwitcher(text);
|
|
}
|
|
if (Records.x.inMenus && !Records.x.typing && !Links.x.spellcrafting.open)
|
|
{
|
|
if (this.hudLeftOpen || this.hudRightOpen)
|
|
{
|
|
this.hudRightOpen = false;
|
|
this.hudLeftOpen = false;
|
|
this.ToggleControllerGlows();
|
|
Links.x.hudControl.ToggleCanvasGroup(false);
|
|
}
|
|
if (!this.cancelStart && (this.dockStart || this.itemsStart) && !Links.x.creation && !Links.x.characterSheet.levelUpMenu)
|
|
{
|
|
if (this.gameFeedScrolling)
|
|
{
|
|
this.gameFeedScrolling = false;
|
|
Links.x.hudControl.ToggleControllerItemsIcon(true);
|
|
}
|
|
if (this.badgeScrolling)
|
|
{
|
|
this.badgeScrolling = false;
|
|
Links.x.hudControl.RemoveBadgeNavigation();
|
|
Links.x.hudControl.ToggleControllerItemsIcon(true);
|
|
}
|
|
string text2 = this.lastMenuOpened;
|
|
if (text2 == "" || text2 == null)
|
|
{
|
|
text2 = "Character Sheet";
|
|
}
|
|
if (this.dockStart)
|
|
{
|
|
if (text2 == "Character Sheet")
|
|
{
|
|
Links.x.sceneMap.OpenMenu();
|
|
}
|
|
if (text2 == "Scene Map")
|
|
{
|
|
Links.x.journal.StartMenu();
|
|
}
|
|
if (text2 == "Journal")
|
|
{
|
|
Links.x.formation.StartMenu();
|
|
}
|
|
if (text2 == "Formation")
|
|
{
|
|
if (Records.x.InCombat(false))
|
|
{
|
|
text2 = "Rest";
|
|
this.lastMenuOpened = text2;
|
|
}
|
|
else
|
|
{
|
|
Links.x.rest.StartMenu(true);
|
|
}
|
|
}
|
|
if (text2 == "Rest")
|
|
{
|
|
Links.x.saveLoad.OpenMenu();
|
|
}
|
|
if (text2 == "Options")
|
|
{
|
|
Links.x.characterSheet.StartMenu(false);
|
|
}
|
|
}
|
|
if (this.itemsStart)
|
|
{
|
|
if (text2 == "Scene Map")
|
|
{
|
|
Links.x.characterSheet.StartMenu(false);
|
|
}
|
|
if (text2 == "Journal")
|
|
{
|
|
Links.x.sceneMap.OpenMenu();
|
|
}
|
|
if (text2 == "Formation")
|
|
{
|
|
Links.x.journal.StartMenu();
|
|
}
|
|
if (text2 == "Rest")
|
|
{
|
|
Links.x.formation.StartMenu();
|
|
}
|
|
if (text2 == "Options")
|
|
{
|
|
if (Records.x.InCombat(false))
|
|
{
|
|
text2 = "Formation";
|
|
Links.x.formation.StartMenu();
|
|
this.lastMenuOpened = text2;
|
|
}
|
|
else
|
|
{
|
|
Links.x.rest.StartMenu(true);
|
|
}
|
|
}
|
|
if (text2 == "Character Sheet")
|
|
{
|
|
Links.x.saveLoad.OpenMenu();
|
|
}
|
|
}
|
|
Links.x.hudControl.MenuText();
|
|
}
|
|
}
|
|
}
|
|
if (this.joy && this.cancelStart && this.makeCircleMode)
|
|
{
|
|
Links.x.hudControl.ToggleStayBack();
|
|
}
|
|
bool inMenus = Records.x.inMenus;
|
|
float timeScale = Time.timeScale;
|
|
if (this.clickedUpCharacter && (Input.GetMouseButtonUp(0) || Input.GetMouseButtonUp(1) || !Input.GetMouseButton(0) || !Input.GetMouseButton(1)))
|
|
{
|
|
this.clickedUpCharacter = false;
|
|
}
|
|
if (this.doLookAt)
|
|
{
|
|
Vector3 vector10 = this.mousePoint;
|
|
vector10.y = Links.x.main.body.headBone.position.y + 0.1f;
|
|
this.lookAt.position = Vector3.Lerp(this.lookAt.position, vector10, Time.deltaTime * 30f);
|
|
Links.x.main.body.lookAtController.SetNewTarget(this.lookAt, 0f, 0f, false);
|
|
}
|
|
if (Input.GetMouseButtonUp(0) && this.mk)
|
|
{
|
|
this.clickStartOnUIHover = false;
|
|
}
|
|
else if (this.joy)
|
|
{
|
|
this.clickStartOnUIHover = false;
|
|
}
|
|
if (this.needsPathParty.Count > 0)
|
|
{
|
|
this.needsPathParty[0].DoPath(true);
|
|
this.needsPathParty.RemoveAt(0);
|
|
}
|
|
if (this.needsPath.Count > 0)
|
|
{
|
|
this.needsPath[0].DoPath(true);
|
|
this.needsPath.RemoveAt(0);
|
|
}
|
|
if (this.needsPath.Count > 0)
|
|
{
|
|
this.needsPath[0].DoPath(true);
|
|
this.needsPath.RemoveAt(0);
|
|
}
|
|
if (this.needsPath.Count > 0)
|
|
{
|
|
this.needsPath[0].DoPath(true);
|
|
this.needsPath.RemoveAt(0);
|
|
}
|
|
if (this.needsPath.Count > 0)
|
|
{
|
|
this.needsPath[0].DoPath(true);
|
|
this.needsPath.RemoveAt(0);
|
|
}
|
|
if (!Records.x.removeControls && Links.x.main)
|
|
{
|
|
Links.x.inventory.groundBag.CheckGroundAndClicks(false);
|
|
}
|
|
if (((this.mk && Input.GetKeyDown(this.keyCodes[10])) || (this.joy && this.itemsDown && !this.gameFeedScrolling && !Links.x.inventory.groundBag.toggle)) && this.CanInteractWithWorld("Item") && Links.x.hasMain && !Links.x.creation && !Records.x.typing)
|
|
{
|
|
Links.x.inventory.groundBag.RemoveLabels();
|
|
Links.x.inventory.groundBag.firstOpen = true;
|
|
Links.x.inventory.groundBag.toggle = true;
|
|
Links.x.inventory.groundBag.hudButton.SetImageFromSave();
|
|
if (Links.x.hasMain)
|
|
{
|
|
Links.x.inventory.groundBag.startPosY = Links.x.main.tr.position.y;
|
|
}
|
|
Links.x.inventory.groundBag.collectorUpdate = true;
|
|
Shader.SetGlobalFloat("_HoveringOnItem", 1f);
|
|
if (this.prevItem)
|
|
{
|
|
this.prevItem.HoverOut();
|
|
Links.x.itemCard.EndHover(this.prevItem, null, null, null, null, false);
|
|
this.prevItem = null;
|
|
}
|
|
Links.x.inventory.groundBag.CheckGroundAndClicks(true);
|
|
}
|
|
if ((this.mk && Input.GetKeyUp(this.keyCodes[10])) || (this.joy && (this.itemsUp || this.gameFeedScrolling)))
|
|
{
|
|
Links.x.inventory.groundBag.toggle = false;
|
|
Shader.SetGlobalFloat("_HoveringOnItem", 0f);
|
|
Links.x.inventory.groundBag.hudButton.SetImageFromSave();
|
|
if (Links.x.joy)
|
|
{
|
|
Links.x.inventory.groundBag.JoyRemoveToggle();
|
|
}
|
|
}
|
|
if ((this.mk && Input.GetKeyUp(this.keyCodes[33])) || (this.joy && this.itemsUp))
|
|
{
|
|
Links.x.inventory.groundBag.RemoveHoverTooltip();
|
|
}
|
|
if (!Records.x.removeControls && !Records.x.typing && !Records.x.mainMenuOpen && !Records.x.inOverworldMap && Links.x.gaia.sceneLoaded && !Links.x.hudControl.descriptionWindowOpen && !this.hudLeftOpen && !this.hudRightOpen && !Records.x.miniGame && !Links.x.pocketWheel.rallyWheelOpen && !Links.x.combat.inPocketAttack)
|
|
{
|
|
if (!this.uiHover || !this.mk)
|
|
{
|
|
this.settingFavorite = "";
|
|
}
|
|
if (this.mk && !Links.x.combat.inPocketAttack && !Records.x.typing)
|
|
{
|
|
for (int m = 0; m < this.keyCodes.Count; m++)
|
|
{
|
|
if (this.keyCodes[m] != KeyCode.None && this.keyConverted[m] != "null")
|
|
{
|
|
if (m == 44 && Input.GetKeyUp(this.keyCodes[m]))
|
|
{
|
|
Links.x.hudControl.HideShowHud(false);
|
|
}
|
|
if (Input.GetKeyDown(this.keyCodes[m]))
|
|
{
|
|
if (m >= 34 && m <= 43)
|
|
{
|
|
Links.x.pocketWheel.HitKey(m);
|
|
}
|
|
if (m == 44)
|
|
{
|
|
Links.x.hudControl.HideShowHud(true);
|
|
}
|
|
if (m == 0 && Links.x.characterSheet)
|
|
{
|
|
if (Links.x.characterSheet.contents1.activeSelf)
|
|
{
|
|
Links.x.characterSheet.StartEndMenu(false, true);
|
|
this.CloseDock();
|
|
}
|
|
else
|
|
{
|
|
this.openingAnotherMenu = true;
|
|
this.CloseAllMenus();
|
|
Links.x.characterSheet.StartMenu(false);
|
|
this.OpenDock();
|
|
}
|
|
}
|
|
if (m == 1)
|
|
{
|
|
this.QuickSave();
|
|
}
|
|
if (m == 6)
|
|
{
|
|
if (!Links.x.journal.contents1.activeSelf)
|
|
{
|
|
this.openingAnotherMenu = true;
|
|
this.CloseAllMenus();
|
|
Links.x.journal.StartMenu();
|
|
this.OpenDock();
|
|
}
|
|
else
|
|
{
|
|
Links.x.journal.StartEndMenu(true);
|
|
this.CloseDock();
|
|
}
|
|
}
|
|
if (m == 7)
|
|
{
|
|
if (Links.x.sceneMap.contents1.activeSelf)
|
|
{
|
|
Links.x.sceneMap.StartEndMenu(true);
|
|
this.CloseDock();
|
|
}
|
|
else
|
|
{
|
|
this.openingAnotherMenu = true;
|
|
this.CloseAllMenus();
|
|
Links.x.sceneMap.OpenMenu();
|
|
this.OpenDock();
|
|
}
|
|
}
|
|
if (m >= 13 && m <= 20 && !this.uiHover)
|
|
{
|
|
Links.x.hudControl.currentHotkeyButton;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if (this.quickSaveStart)
|
|
{
|
|
this.QuickSave();
|
|
}
|
|
}
|
|
if (!Records.x.inOverworldMap)
|
|
{
|
|
if (this.coneCharacter)
|
|
{
|
|
bool flag42 = false;
|
|
for (int n = 0; n < this.party.Count; n++)
|
|
{
|
|
if (this.party[n].body.sneaking)
|
|
{
|
|
flag42 = true;
|
|
}
|
|
}
|
|
bool flag43 = flag42;
|
|
if (this.coneCharacter.dead || this.coneCharacter.stunned || !flag43 || Records.x.dialogue)
|
|
{
|
|
Links.x.lineOfSightCone.position = this.farPosition;
|
|
this.coneCharacter = null;
|
|
Links.x.coneEffects.enabled = false;
|
|
}
|
|
else if (this.coneCharacter)
|
|
{
|
|
if (this.coneCharacter.moveFollow)
|
|
{
|
|
Vector3 position = this.coneCharacter.tr.position;
|
|
position.y = this.coneCharacter.torsoPosition.y;
|
|
Links.x.lineOfSightCone.position = position;
|
|
Quaternion quaternion3 = this.coneCharacter.body.tr.rotation;
|
|
if (this.coneCharacter.moving)
|
|
{
|
|
quaternion3 = this.coneCharacter.tr.rotation;
|
|
}
|
|
Links.x.lineOfSightCone.rotation = Quaternion.Slerp(Links.x.lineOfSightCone.rotation, quaternion3, Time.deltaTime * 25f);
|
|
Links.x.coneEffects.enabled = true;
|
|
}
|
|
else
|
|
{
|
|
Links.x.lineOfSightCone.position = this.farPosition;
|
|
this.coneCharacter = null;
|
|
Links.x.coneEffects.enabled = false;
|
|
}
|
|
}
|
|
}
|
|
if ((!Records.x.pocketPause || !this.attackingCharacter.CanAttack() || Links.x.combat.inPocketAttack || !this.playerInAction) && Links.x.attackConeEffects.enabled)
|
|
{
|
|
Links.x.attackConeEffects.enabled = false;
|
|
Links.x.attackCone1.position = this.farPosition;
|
|
Links.x.attackCone2.position = this.farPosition;
|
|
}
|
|
}
|
|
bool flag44 = false;
|
|
if ((this.spellcasting || this.throwingElixir) && (!Records.x.InCombat(false) || (Records.x.InCombat(false) && Records.x.playerTurn) || !Records.x.turnBased) && !Records.x.removeControls)
|
|
{
|
|
flag44 = true;
|
|
if (!this.showingAbilityUI)
|
|
{
|
|
this.showingAbilityUI = true;
|
|
}
|
|
}
|
|
bool flag45 = !flag44 && flag44;
|
|
if (!Records.x.paused && !Records.x.dialogue && !Records.x.pocketPause)
|
|
{
|
|
float normalizedTime = this.sunlightAnimator.animator.GetCurrentAnimatorStateInfo(0).normalizedTime;
|
|
int num9 = (int)Mathf.Floor(this.gameHours);
|
|
this.gameMinutes = normalizedTime * 1440f;
|
|
this.gameSeconds = this.gameMinutes * 60f;
|
|
this.gameHours = this.gameMinutes / 60f;
|
|
if (num9 != (int)Mathf.Floor(this.gameHours) && Links.x.gaia.sceneLoaded)
|
|
{
|
|
if (this.gameHours == 0f)
|
|
{
|
|
this.SetNewDay();
|
|
}
|
|
this.NewHourMessages(false);
|
|
}
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.O) && !Records.x.typing && (Records.x.secrets || Records.x.editor) && !Records.x.removeControls)
|
|
{
|
|
this.TogglePause(true);
|
|
this.AddHours();
|
|
this.TogglePause(false);
|
|
}
|
|
if (this.attacking && !this.uiHover && Input.GetMouseButtonUp(0))
|
|
{
|
|
this.attacking = false;
|
|
}
|
|
}
|
|
if (Links.x.gaia.sceneLoaded)
|
|
{
|
|
if (this.joy)
|
|
{
|
|
this.SetAdventureDomeSize();
|
|
if (Links.x.options.open && Links.x.fellowship.direction.magnitude > 0.25f)
|
|
{
|
|
Links.x.options.SetSlider();
|
|
}
|
|
if (Links.x.inventory.splitter.open && Links.x.fellowship.direction.magnitude > 0.25f)
|
|
{
|
|
Links.x.inventory.splitter.SetSlider();
|
|
}
|
|
if (Links.x.arrowKit.open && Links.x.fellowship.direction.magnitude > 0.25f)
|
|
{
|
|
Links.x.arrowKit.SetSlider();
|
|
}
|
|
if (Links.x.rest.on && Links.x.fellowship.direction.magnitude > 0.25f)
|
|
{
|
|
Links.x.rest.UpdateSlider();
|
|
}
|
|
if (Links.x.formation.open && Links.x.fellowship.direction.magnitude > 0.25f)
|
|
{
|
|
Links.x.formation.UpdateSlider();
|
|
}
|
|
if (Links.x.inventory.enchantMenu.open && Links.x.fellowship.direction.magnitude > 0.25f)
|
|
{
|
|
Links.x.inventory.enchantMenu.UpdateSlider();
|
|
}
|
|
if (Links.x.forfeits.on)
|
|
{
|
|
Links.x.forfeits.DoUpdate();
|
|
}
|
|
if (Links.x.spellcrafting.open && Links.x.fellowship.direction.magnitude > 0.25f)
|
|
{
|
|
Links.x.spellcrafting.UpdateSlider();
|
|
}
|
|
}
|
|
if (this.mk)
|
|
{
|
|
if (!this.uiHover && !Records.x.inOverworldMap && !this.resizing && !Links.x.hudControl.descriptionWindowOpen)
|
|
{
|
|
bool flag46 = true;
|
|
if (!Links.x.hasMain)
|
|
{
|
|
flag46 = false;
|
|
}
|
|
if (this.hitCharacter && this.character && flag46 && !this.charming)
|
|
{
|
|
bool flag47 = false;
|
|
if (!this.character.npc)
|
|
{
|
|
flag47 = true;
|
|
}
|
|
if (this.character.stunned && !Records.x.kill)
|
|
{
|
|
flag47 = true;
|
|
}
|
|
if (this.spellTargetingGround || this.targetingGroundCharacterHover)
|
|
{
|
|
flag47 = true;
|
|
}
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
flag47 = true;
|
|
}
|
|
if (Records.x.pocketPause && !Links.x.combat.CanAttackTarget(this.character))
|
|
{
|
|
flag47 = true;
|
|
}
|
|
if (flag47 || (!Records.x.InCombat(false) && this.character.hostility < 2 && !Records.x.pocketPause && !this.character.attackingUntilBribe))
|
|
{
|
|
if (this.character.isBoro || (this.character.npc && this.character.hostility < 2 && !this.character.attackingUntilBribe && !this.character.sleeping && !this.character.dayNightVanishing && this.character.stats.dialogueFile != ""))
|
|
{
|
|
if (this.character.stats.dialogueFile != "Quip")
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Talk", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("TalkDown", false);
|
|
}
|
|
}
|
|
else if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Interact", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("InteractDown", false);
|
|
}
|
|
}
|
|
else if (this.spellcasting || (this.character.npc && this.spellTargetingEnemy) || (!this.character.npc && this.spellTargetingParty))
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Spell", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("SpellDown", false);
|
|
}
|
|
}
|
|
else if (flag47 || this.character.sleeping)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Point", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("PointDown", false);
|
|
}
|
|
}
|
|
else if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Interact", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("InteractDown", false);
|
|
}
|
|
}
|
|
else if (this.spellcasting || (this.character.npc && this.spellTargetingEnemy) || (!this.character.npc && this.spellTargetingParty))
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Spell", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("SpellDown", false);
|
|
}
|
|
}
|
|
else if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Attack", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("AttackDown", false);
|
|
}
|
|
}
|
|
else if (this.hitItem)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Interact", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("InteractDown", false);
|
|
}
|
|
}
|
|
else if (this.hitExit)
|
|
{
|
|
bool flag48 = true;
|
|
bool flag49 = false;
|
|
if (this.exit && (this.exit.mapExit.exitTo == MapExit.exitToNames.Interiors || this.exit.mapExit.exitTo == MapExit.exitToNames.Exterior))
|
|
{
|
|
flag49 = true;
|
|
flag48 = false;
|
|
}
|
|
if (flag49)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Interact", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("InteractDown", false);
|
|
}
|
|
}
|
|
else if (flag48)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Interact", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("InteractDown", false);
|
|
}
|
|
}
|
|
else if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Interact", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("InteractDown", false);
|
|
}
|
|
}
|
|
else if (this.hitInteractable)
|
|
{
|
|
if (this.spellcasting)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Spell", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("SpellDown", false);
|
|
}
|
|
}
|
|
else if (this.throwingElixir)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Elixir", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("ElixirDown", false);
|
|
}
|
|
}
|
|
else if (this.breakable)
|
|
{
|
|
if (this.breakable.resourceLocation == -1)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Attack", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("AttackDown", false);
|
|
}
|
|
}
|
|
else if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Interact", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("InteractDown", false);
|
|
}
|
|
}
|
|
else if (this.chest || this.door || this.puzzle)
|
|
{
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Interact", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("InteractDown", false);
|
|
}
|
|
}
|
|
else if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Attack", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("AttackDown", false);
|
|
}
|
|
}
|
|
}
|
|
else if (this.charming)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Charm", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("CharmDown", false);
|
|
}
|
|
}
|
|
else if (!this.attacking && !this.spellcasting && !this.charming && !this.mouseWormVisible && !this.mouseVisible)
|
|
{
|
|
Links.x.SetCursor("NoSee", false);
|
|
}
|
|
else if (this.attacking && flag46)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Attack", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("AttackDown", false);
|
|
}
|
|
}
|
|
else if (this.spellcasting && flag46)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Spell", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("SpellDown", false);
|
|
}
|
|
}
|
|
else if (this.throwingElixir && flag46)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Elixir", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("ElixirDown", false);
|
|
}
|
|
}
|
|
else if (this.makeCircleMode)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Circle", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("CircleDown", false);
|
|
}
|
|
}
|
|
else if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Point", false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("PointDown", false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
bool flag50 = false;
|
|
if (!this.resizing)
|
|
{
|
|
if (Links.x.inventory.repairing)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Repair", true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("RepairDown", true);
|
|
}
|
|
}
|
|
else if (Links.x.inventory.mineralizing)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Mineral", true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("MineralDown", true);
|
|
}
|
|
}
|
|
else if (Records.x.portraitDragging || Links.x.inventory.dragging || Links.x.keyControl.dragging || Links.x.journal.dragging || Links.x.inventory.spinning || Links.x.formation.dragging)
|
|
{
|
|
if (!Input.GetMouseButtonUp(0))
|
|
{
|
|
Links.x.SetCursor("Use", true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("UseDown", true);
|
|
}
|
|
}
|
|
else if (this.settingFavorite != "" && Links.x.currentSkillHover)
|
|
{
|
|
if (!Input.GetMouseButtonUp(0))
|
|
{
|
|
Links.x.SetCursor("SetFavorite", true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("SetFavoriteDown", true);
|
|
}
|
|
}
|
|
else if (!Links.x.previousCursor.Contains("Resiz") && !Links.x.previousCursor.Contains("Window Drag"))
|
|
{
|
|
if ((flag50 || Records.x.typing) && !this.uiCanClick)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("Write", true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("WriteDown", true);
|
|
}
|
|
}
|
|
else if (this.uiCanClick)
|
|
{
|
|
if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("UIInteract", true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("UIInteractDown", true);
|
|
}
|
|
}
|
|
else if (!Input.GetMouseButton(0))
|
|
{
|
|
Links.x.SetCursor("UIPoint", true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.SetCursor("UIPointDown", true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Cursor.lockState = CursorLockMode.None;
|
|
Cursor.visible = true;
|
|
}
|
|
else if (this.currentControllerCount > 0)
|
|
{
|
|
Cursor.visible = false;
|
|
if (Records.x.editor)
|
|
{
|
|
Cursor.lockState = CursorLockMode.Locked;
|
|
}
|
|
else
|
|
{
|
|
Cursor.lockState = CursorLockMode.Locked;
|
|
}
|
|
Links.x.SetCursor("EmptyCursor", true);
|
|
}
|
|
}
|
|
this.prevTriggerAction = this.triggerAction;
|
|
this.prevTriggerInteract = this.triggerInteract;
|
|
this.prevTriggerItems = this.triggerItems;
|
|
this.prevTriggerDodge = this.triggerDodge;
|
|
this.prevTriggerAim = this.triggerAim;
|
|
this.prevTriggerDock = this.triggerDock;
|
|
this.prevTriggerCancel = this.triggerCancel;
|
|
this.prevTriggerAllMenus = this.triggerAllMenus;
|
|
this.prevTriggerQuickSave = this.triggerQuickSave;
|
|
this.prevTriggerParty1 = this.triggerParty1;
|
|
this.prevTriggerParty2 = this.triggerParty2;
|
|
this.prevTriggerPartyItems3 = this.triggerPartyItems3;
|
|
this.prevTriggerPartyItems4 = this.triggerPartyItems4;
|
|
this.prevTriggerMenus = this.triggerMenus;
|
|
this.prevTriggerHudRight = this.triggerHudRight;
|
|
this.prevTriggerHudLeft = this.triggerHudLeft;
|
|
}
|
|
|
|
// Token: 0x0600075F RID: 1887 RVA: 0x000A664C File Offset: 0x000A484C
|
|
public void CheckIfAnythingShouldRedoMultiTargetHover()
|
|
{
|
|
if (Records.x.pocketPause && (Links.x.pocketWheel.selected.Contains("Light") || Links.x.pocketWheel.selected.Contains("Special")) && this.character)
|
|
{
|
|
this.character.body.Hover(true, true);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000760 RID: 1888 RVA: 0x000A66BA File Offset: 0x000A48BA
|
|
public void ChangeScene()
|
|
{
|
|
this.needsPath.Clear();
|
|
this.needsPathParty.Clear();
|
|
this.RemoveSpellTargets();
|
|
this.actionCharacter = null;
|
|
}
|
|
|
|
// Token: 0x06000761 RID: 1889 RVA: 0x000A66DF File Offset: 0x000A48DF
|
|
public void ToggleControllerGlows()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000762 RID: 1890 RVA: 0x000A66E1 File Offset: 0x000A48E1
|
|
private void AllOff()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000763 RID: 1891 RVA: 0x000A66E3 File Offset: 0x000A48E3
|
|
public void FindDockGlowParent()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000764 RID: 1892 RVA: 0x000A66E8 File Offset: 0x000A48E8
|
|
public void AttackInteractive()
|
|
{
|
|
if (!Records.x.pocketPause && Records.x.InCombat(false) && Links.x.combat.npcsInCombat)
|
|
{
|
|
this.PocketPause(true);
|
|
}
|
|
this.clickedCharacter = null;
|
|
this.WorldClick();
|
|
this.domeParty = null;
|
|
this.domeEnemy = null;
|
|
this.NewPaths();
|
|
this.ClearInteractionNodes();
|
|
this.targetingCharacter = null;
|
|
GameObject gameObject = null;
|
|
GraphNode graphNode = null;
|
|
Vector3 vector = Vector3.zero;
|
|
if (this.breakable)
|
|
{
|
|
gameObject = this.breakable.gameObject;
|
|
vector = gameObject.transform.position;
|
|
graphNode = this.breakable.node;
|
|
}
|
|
else if (this.chest)
|
|
{
|
|
gameObject = this.chest.gameObject;
|
|
vector = gameObject.transform.position;
|
|
graphNode = this.chest.node;
|
|
}
|
|
else if (this.puzzle)
|
|
{
|
|
gameObject = this.puzzle.gameObject;
|
|
vector = gameObject.transform.position;
|
|
graphNode = this.puzzle.node;
|
|
}
|
|
else if (this.door)
|
|
{
|
|
gameObject = this.door.gameObject;
|
|
vector = gameObject.transform.position;
|
|
if (this.door.node == null)
|
|
{
|
|
this.door.GetNode();
|
|
}
|
|
if (this.door.node != null)
|
|
{
|
|
graphNode = this.door.node;
|
|
vector = (Vector3)graphNode.position;
|
|
}
|
|
}
|
|
else if (this.mapDoor)
|
|
{
|
|
gameObject = this.mapDoor.gameObject;
|
|
vector = gameObject.transform.position;
|
|
if (this.mapDoor.node == null)
|
|
{
|
|
this.mapDoor.GetNode();
|
|
}
|
|
if (this.mapDoor.node != null)
|
|
{
|
|
graphNode = this.mapDoor.node;
|
|
vector = (Vector3)graphNode.position;
|
|
}
|
|
}
|
|
if (gameObject)
|
|
{
|
|
Character character = this.MakeObjectCharacter(graphNode, gameObject, vector);
|
|
Character character2 = Links.x.main;
|
|
if (Links.x.pocketWheel.rallyWheelOpen && Links.x.pocketWheel.selectedRallyCharacter)
|
|
{
|
|
character2 = Links.x.pocketWheel.selectedRallyCharacter;
|
|
}
|
|
character2.UpdateLKP(character, character.node, "Attack", true);
|
|
if (!character2.hasActions)
|
|
{
|
|
Links.x.combat.GivePartyActions(character2, false);
|
|
if (!Records.x.combat)
|
|
{
|
|
Links.x.combat.StartCombat(null, character2, true, true);
|
|
}
|
|
}
|
|
if (Links.x.combat.inPocketAttack)
|
|
{
|
|
this.rallyTargetInteractiveSelected = gameObject;
|
|
}
|
|
else
|
|
{
|
|
if (Links.x.pocketWheel.rallyWheelOpen)
|
|
{
|
|
this.rallyTargetInteractiveSelected = gameObject;
|
|
}
|
|
if (Links.x.pocketWheel.selected == "Heavy Attack")
|
|
{
|
|
character2.actions.SelectCharge(character);
|
|
}
|
|
else
|
|
{
|
|
character2.actions.SelectActionRealTime(null, gameObject);
|
|
}
|
|
}
|
|
if (!character2.HasAmmoOrMelee(character2.invRow1, false))
|
|
{
|
|
Links.x.gameFeed.AddFeed(this.character.stats.displayName + " is out of " + character2.GetAmmoType());
|
|
}
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
if (this.spellTargetingGround || this.spellTargetingParty || this.spellTargetingEnemy)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.EndControllerTargeting();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000765 RID: 1893 RVA: 0x000A6A5C File Offset: 0x000A4C5C
|
|
public Character MakeObjectCharacter(GraphNode nearNode, GameObject obj, Vector3 center)
|
|
{
|
|
Character character = obj.GetComponent<Character>();
|
|
if (!character)
|
|
{
|
|
character = obj.AddComponent<Character>();
|
|
character.enabled = false;
|
|
}
|
|
character.npc = true;
|
|
character.hostility = 2;
|
|
character.interactiveObject = true;
|
|
character.tr = obj.transform;
|
|
if (this.door)
|
|
{
|
|
if (!this.door.point)
|
|
{
|
|
this.door.SetupExits();
|
|
}
|
|
character.tr = this.door.point.transform;
|
|
}
|
|
if (this.mapDoor)
|
|
{
|
|
character.tr = this.mapDoor.point.transform;
|
|
}
|
|
character.attackRadius = 1f;
|
|
if (nearNode == null && character.node != null)
|
|
{
|
|
nearNode = character.node;
|
|
}
|
|
if (nearNode == null)
|
|
{
|
|
this.nodeConstraint.constrainWalkability = true;
|
|
this.nodeConstraint.walkable = true;
|
|
this.nodeConstraint.constrainPenalty = 0;
|
|
this.nodeConstraint.constrainTags = false;
|
|
this.nodeConstraint.checkCircleID = 0;
|
|
this.nodeConstraint.passID = 0;
|
|
this.nodeConstraint.passID2 = 0;
|
|
this.nodeConstraint.checkConnections = 0;
|
|
this.nodeConstraint.constrainToArea = -1;
|
|
nearNode = AstarPath.active.GetNearest(center, this.nodeConstraint).node;
|
|
}
|
|
character.currentPosition = center;
|
|
character.node = nearNode;
|
|
return character;
|
|
}
|
|
|
|
// Token: 0x06000766 RID: 1894 RVA: 0x000A6BC4 File Offset: 0x000A4DC4
|
|
public void RemoveSpellTargets()
|
|
{
|
|
this.spellTargetingGround = false;
|
|
this.spellcasting = false;
|
|
this.spellTargetingEnemy = false;
|
|
this.spellTargetingParty = false;
|
|
Shader.SetGlobalFloat("_TargetingParty", 0f);
|
|
this.ClearEffectTiles(true, null, false);
|
|
this.EndControllerTargeting();
|
|
this.spellPaganRow = null;
|
|
}
|
|
|
|
// Token: 0x06000767 RID: 1895 RVA: 0x000A6C12 File Offset: 0x000A4E12
|
|
private void LateUpdate()
|
|
{
|
|
this.SetJoystickTargetPosition();
|
|
if (this.startPocketPause)
|
|
{
|
|
this.PocketPause(true);
|
|
this.startPocketPause = false;
|
|
}
|
|
if (this.mk && Input.GetMouseButtonUp(0))
|
|
{
|
|
this.resizing = false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000768 RID: 1896 RVA: 0x000A6C48 File Offset: 0x000A4E48
|
|
public bool WormVisible(Vector3 pt)
|
|
{
|
|
if (Links.x.rtsCamera.currentBoundsName == "")
|
|
{
|
|
return Links.x.fogOfWar.IsVisibleWorm(pt);
|
|
}
|
|
return Links.x.fogOfWarInterior.IsVisibleWorm(pt);
|
|
}
|
|
|
|
// Token: 0x06000769 RID: 1897 RVA: 0x000A6C9C File Offset: 0x000A4E9C
|
|
private bool CanInteractWithWorld(string type)
|
|
{
|
|
if (Links.x.rtsCamera.inspecting)
|
|
{
|
|
return false;
|
|
}
|
|
if (Links.x.rtsCamera.panning)
|
|
{
|
|
return false;
|
|
}
|
|
if (Records.x.dialogue)
|
|
{
|
|
return false;
|
|
}
|
|
if (Records.x.inMenus)
|
|
{
|
|
return false;
|
|
}
|
|
if (Links.x.fellowship.drawingSquare)
|
|
{
|
|
return false;
|
|
}
|
|
if (this.makeCircleMode)
|
|
{
|
|
return false;
|
|
}
|
|
if (this.resizing)
|
|
{
|
|
return false;
|
|
}
|
|
if (this.joy)
|
|
{
|
|
return !Records.x.typing;
|
|
}
|
|
return !this.uiHover && (!Records.x.removeControls || (Links.x.combat.inPocketAttack && Links.x.pocketWheel.rallyWheelOpen && (type == "Character" || type == "Interactive Object")));
|
|
}
|
|
|
|
// Token: 0x0600076A RID: 1898 RVA: 0x000A6D84 File Offset: 0x000A4F84
|
|
public void SetNewDay()
|
|
{
|
|
this.gameSeconds = 0f;
|
|
this.gameMinutes = 0f;
|
|
this.gameHours = 0f;
|
|
this.gameDays++;
|
|
this.GetTimeOfDay();
|
|
Debug.Log("New Day " + this.gameDays.ToString());
|
|
}
|
|
|
|
// Token: 0x0600076B RID: 1899 RVA: 0x000A6DE0 File Offset: 0x000A4FE0
|
|
public void GetTimeOfDay()
|
|
{
|
|
if ((this.gameHours >= 0f && this.gameHours < 4f) || this.gameHours >= 22f)
|
|
{
|
|
this.timeOfDay = "Morning";
|
|
}
|
|
if (this.gameHours >= 4f && this.gameHours < 10f)
|
|
{
|
|
this.timeOfDay = "Afternoon";
|
|
}
|
|
if (this.gameHours >= 10f && this.gameHours < 16f)
|
|
{
|
|
this.timeOfDay = "Evening";
|
|
}
|
|
if (this.gameHours >= 16f && this.gameHours < 22f)
|
|
{
|
|
this.timeOfDay = "Night";
|
|
}
|
|
Links.x.hudControl.SetTimeOfDay(Mathf.Floor(this.gameHours));
|
|
}
|
|
|
|
// Token: 0x0600076C RID: 1900 RVA: 0x000A6EA8 File Offset: 0x000A50A8
|
|
public bool IsNight()
|
|
{
|
|
return this.gameHours >= 16f && this.gameHours < 22f;
|
|
}
|
|
|
|
// Token: 0x0600076D RID: 1901 RVA: 0x000A6EC7 File Offset: 0x000A50C7
|
|
public bool IsEvening()
|
|
{
|
|
return this.gameHours >= 10f && this.gameHours < 16f;
|
|
}
|
|
|
|
// Token: 0x0600076E RID: 1902 RVA: 0x000A6EE6 File Offset: 0x000A50E6
|
|
public bool IsAfternoon()
|
|
{
|
|
return this.gameHours >= 4f && this.gameHours < 10f;
|
|
}
|
|
|
|
// Token: 0x0600076F RID: 1903 RVA: 0x000A6F08 File Offset: 0x000A5108
|
|
public bool IsDay()
|
|
{
|
|
return (this.gameHours >= 0f && this.gameHours < 4f) || this.gameHours >= 22f || (this.gameHours >= 4f && this.gameHours < 10f) || (this.gameHours >= 10f && this.gameHours < 16f) || this.gameHours < 16f || this.gameHours >= 22f;
|
|
}
|
|
|
|
// Token: 0x06000770 RID: 1904 RVA: 0x000A6F94 File Offset: 0x000A5194
|
|
public void LoadGameTime()
|
|
{
|
|
float num = this.sunlightAnimator.ChangeTime(this.gameSeconds);
|
|
this.gameMinutes = num * 1440f;
|
|
this.gameSeconds = this.gameMinutes * 60f;
|
|
this.gameHours = this.gameMinutes / 60f;
|
|
this.GetTimeOfDay();
|
|
this.UpdateTimeText();
|
|
}
|
|
|
|
// Token: 0x06000771 RID: 1905 RVA: 0x000A6FF0 File Offset: 0x000A51F0
|
|
public void UpdateTimeText()
|
|
{
|
|
this.str.Clear();
|
|
this.str.Append("Day ");
|
|
this.str.Append(this.gameDays);
|
|
this.str.Append(", ");
|
|
float num = Mathf.Floor(this.gameHours);
|
|
string text = this.ShowHour(num);
|
|
this.str.Append(text);
|
|
this.timeText.text = this.str.ToString();
|
|
}
|
|
|
|
// Token: 0x06000772 RID: 1906 RVA: 0x000A7074 File Offset: 0x000A5274
|
|
public string ShowHour(float h)
|
|
{
|
|
string text = "";
|
|
if (h == 22f)
|
|
{
|
|
text = "6 in the morning";
|
|
}
|
|
if (h == 23f)
|
|
{
|
|
text = "7 in the morning";
|
|
}
|
|
if (h == 0f)
|
|
{
|
|
text = "8 in the morning";
|
|
}
|
|
if (h == 1f)
|
|
{
|
|
text = "9 in the morning";
|
|
}
|
|
if (h == 2f)
|
|
{
|
|
text = "10 in the morning";
|
|
}
|
|
if (h == 3f)
|
|
{
|
|
text = "11 in the morning";
|
|
}
|
|
if (h == 4f)
|
|
{
|
|
text = "12 in the afternoon";
|
|
}
|
|
if (h == 5f)
|
|
{
|
|
text = "1 in the afternoon";
|
|
}
|
|
if (h == 6f)
|
|
{
|
|
text = "2 in the afternoon";
|
|
}
|
|
if (h == 7f)
|
|
{
|
|
text = "3 in the afternoon";
|
|
}
|
|
if (h == 8f)
|
|
{
|
|
text = "4 in the afternoon";
|
|
}
|
|
if (h == 9f)
|
|
{
|
|
text = "5 in the afternoon";
|
|
}
|
|
if (h == 10f)
|
|
{
|
|
text = "6 in the evening";
|
|
}
|
|
if (h == 11f)
|
|
{
|
|
text = "7 in the evening";
|
|
}
|
|
if (h == 12f)
|
|
{
|
|
text = "8 in the evening";
|
|
}
|
|
if (h == 13f)
|
|
{
|
|
text = "9 in the evening";
|
|
}
|
|
if (h == 14f)
|
|
{
|
|
text = "10 in the evening";
|
|
}
|
|
if (h == 15f)
|
|
{
|
|
text = "11 in the evening";
|
|
}
|
|
if (h == 16f)
|
|
{
|
|
text = "12 at night";
|
|
}
|
|
if (h == 17f)
|
|
{
|
|
text = "1 at night";
|
|
}
|
|
if (h == 18f)
|
|
{
|
|
text = "2 at night";
|
|
}
|
|
if (h == 19f)
|
|
{
|
|
text = "3 at night";
|
|
}
|
|
if (h == 20f)
|
|
{
|
|
text = "4 at night";
|
|
}
|
|
if (h == 21f)
|
|
{
|
|
text = "5 at night";
|
|
}
|
|
return text;
|
|
}
|
|
|
|
// Token: 0x06000773 RID: 1907 RVA: 0x000A71D8 File Offset: 0x000A53D8
|
|
public void AddHours()
|
|
{
|
|
int num = 1;
|
|
this.gameSeconds += 3600f * (float)num;
|
|
float num2 = this.sunlightAnimator.ChangeTime(this.gameSeconds);
|
|
this.gameMinutes = num2 * 1440f;
|
|
this.gameSeconds = this.gameMinutes * 60f;
|
|
this.gameHours = this.gameMinutes / 60f;
|
|
if (this.gameHours >= 24f)
|
|
{
|
|
this.gameHours = 0f;
|
|
this.SetNewDay();
|
|
}
|
|
if (Records.x.editor)
|
|
{
|
|
Debug.Log("Hour is " + this.GetCurrentGameTimeHours().ToString());
|
|
}
|
|
this.NewHourMessages(true);
|
|
}
|
|
|
|
// Token: 0x06000774 RID: 1908 RVA: 0x000A7290 File Offset: 0x000A5490
|
|
public void NewHourMessages(bool timeJump)
|
|
{
|
|
this.GetTimeOfDay();
|
|
Records.x.CheckHourForQuestTimers();
|
|
Records.x.CheckHourForStunnedBadges();
|
|
Links.x.diorama.ChangeTimeOfDay(true, timeJump);
|
|
Links.x.ChangeTimeOfDay();
|
|
this.UpdateTimeText();
|
|
Links.x.diorama.CheckQuestActivations();
|
|
Links.x.inventory.NewHour();
|
|
Links.x.hudControl.UpdateStunHours();
|
|
Links.x.hudControl.UpdateBribeHours();
|
|
if (timeJump)
|
|
{
|
|
Links.x.diorama.TimeJump();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000775 RID: 1909 RVA: 0x000A7326 File Offset: 0x000A5526
|
|
public int GetCurrentGameTime()
|
|
{
|
|
return 0 + this.gameDays * 24 * 60 * 60 + (int)Mathf.Floor(this.gameMinutes);
|
|
}
|
|
|
|
// Token: 0x06000776 RID: 1910 RVA: 0x000A7346 File Offset: 0x000A5546
|
|
public float Seconds()
|
|
{
|
|
return 0f + (float)this.gameDays * 24f * 60f * 60f + Mathf.Floor(this.gameSeconds);
|
|
}
|
|
|
|
// Token: 0x06000777 RID: 1911 RVA: 0x000A7373 File Offset: 0x000A5573
|
|
public int GetCurrentGameTimeHours()
|
|
{
|
|
return 0 + this.gameDays * 24 + (int)Mathf.Floor(this.gameHours);
|
|
}
|
|
|
|
// Token: 0x06000778 RID: 1912 RVA: 0x000A7390 File Offset: 0x000A5590
|
|
public void SelectRallyCharacter(Character c)
|
|
{
|
|
Links.x.combat.pickingRally = true;
|
|
Links.x.main.portrait.AnimatorSynergy();
|
|
c.portrait.AnimatorSynergy();
|
|
MasterAudio.PlaySoundAndForget("Synergy", 1f, new float?(1f), 0f, "", null);
|
|
Shader.SetGlobalFloat("_Combat", 2f);
|
|
Links.x.combat.rallyCharacter = c;
|
|
this.SetDomeSize();
|
|
Links.x.combat.UpdateRallyVisuals();
|
|
if (this.joy)
|
|
{
|
|
this.GetControllerTarget(false);
|
|
}
|
|
Links.x.pocketWheel.Select("Light Attack");
|
|
if (Links.x.mk)
|
|
{
|
|
Links.x.pocketWheel.Close(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000779 RID: 1913 RVA: 0x000A746C File Offset: 0x000A566C
|
|
public void GetControllerTarget(bool first)
|
|
{
|
|
bool flag = false;
|
|
if (Links.x.pocketWheel.selected == "Special Attack 1" && Links.x.pocketWheel.canTarget)
|
|
{
|
|
flag = true;
|
|
}
|
|
if (!flag && (Links.x.main.inAction || Links.x.main.inRecovery || Links.x.main.inQueuedAbility || !Links.x.main.CanAttack() || (Links.x.pocketWheel.selected == "Special Attack 1" && !Links.x.pocketWheel.canTarget)))
|
|
{
|
|
this.domeEnemy = null;
|
|
this.domeParty = null;
|
|
this.domeBreakable = null;
|
|
this.domeChest = null;
|
|
this.domePuzzle = null;
|
|
this.domeDoor = null;
|
|
return;
|
|
}
|
|
if ((!flag && !Links.x.main.CanAttack()) || (!(Links.x.pocketWheel.selected == "Light Attack") && !(Links.x.pocketWheel.selected == "Medium Attack") && !(Links.x.pocketWheel.selected == "Heavy Attack") && (!(Links.x.pocketWheel.selected == "Special Attack 1") || !Links.x.pocketWheel.canTarget) && !Links.x.pocketWheel.Charming() && (!(Links.x.pocketWheel.selected == "Spellbag") || (!this.spellTargetingParty && !this.spellTargetingEnemy))))
|
|
{
|
|
this.domeEnemy = null;
|
|
this.domeParty = null;
|
|
this.domeBreakable = null;
|
|
this.domeChest = null;
|
|
this.domePuzzle = null;
|
|
this.domeDoor = null;
|
|
return;
|
|
}
|
|
Links.x.combat.GetJoystickTarget(out this.domeEnemy, out this.domeParty, out this.domeBreakable, out this.domeChest, out this.domeDoor, out this.domePuzzle, new Vector2(0f, 0f), first);
|
|
if ((flag || Links.x.pocketWheel.targetSelection) && (this.domeEnemy || this.domeParty || this.domeBreakable || this.domeChest || this.domeDoor) && !this.joystickTarget.activeSelf)
|
|
{
|
|
this.joystickTarget.SetActive(true);
|
|
}
|
|
this.SetJoystickTargetPosition();
|
|
}
|
|
|
|
// Token: 0x0600077A RID: 1914 RVA: 0x000A7708 File Offset: 0x000A5908
|
|
public void SetJoystickTargetActive()
|
|
{
|
|
bool flag = false;
|
|
if (Links.x.pocketWheel.selected == "Special Attack 1" && Links.x.pocketWheel.canTarget)
|
|
{
|
|
flag = true;
|
|
}
|
|
if ((flag || Links.x.pocketWheel.targetSelection) && (this.domeEnemy || this.domeParty || this.domeBreakable || this.domeChest || this.domeDoor) && !this.joystickTarget.activeSelf)
|
|
{
|
|
this.joystickTarget.SetActive(true);
|
|
}
|
|
this.SetJoystickTargetPosition();
|
|
}
|
|
|
|
// Token: 0x0600077B RID: 1915 RVA: 0x000A77BC File Offset: 0x000A59BC
|
|
private void SetJoystickTargetPosition()
|
|
{
|
|
if (this.joystickTarget.activeSelf && Links.x.pocketWheel.targetSelection)
|
|
{
|
|
Vector3 vector = Vector3.zero;
|
|
GameObject gameObject = null;
|
|
float num = 0f;
|
|
if (!Links.x.worldCamera.orthographic)
|
|
{
|
|
num = -1f;
|
|
}
|
|
if (this.domeEnemy)
|
|
{
|
|
gameObject = this.domeEnemy.body.bracket;
|
|
vector = this.domeEnemy.body.GetNeck().position + new Vector3(0f, 2.1f, 0f);
|
|
Links.x.rtsCamera.joyTarget = this.domeEnemy.gameObject;
|
|
if (Links.x.gameCard.hoverCharacter == this.domeEnemy && Links.x.gameCard.controlsText.text != "")
|
|
{
|
|
num += 0.5f;
|
|
}
|
|
}
|
|
if (this.domeParty)
|
|
{
|
|
gameObject = this.domeParty.body.bracket;
|
|
vector = this.domeParty.body.GetNeck().position + new Vector3(0f, 2.1f, 0f);
|
|
Links.x.rtsCamera.joyTarget = this.domeParty.gameObject;
|
|
if (Links.x.gameCard.hoverCharacter == this.domeEnemy && Links.x.gameCard.controlsText.text != "")
|
|
{
|
|
num += 0.5f;
|
|
}
|
|
}
|
|
if (this.domeDoor)
|
|
{
|
|
gameObject = this.domeDoor.bracket;
|
|
vector = this.domeDoor.lockColliderPosition + new Vector3(0f, 0.5f, 0f);
|
|
Links.x.rtsCamera.joyTarget = this.domeDoor.gameObject;
|
|
if (Links.x.itemCard.hoverDoor == this.domeDoor && Links.x.gameCard.controlsText.text != "")
|
|
{
|
|
num += 0.5f;
|
|
}
|
|
}
|
|
if (this.domeChest)
|
|
{
|
|
gameObject = this.domeChest.bracket;
|
|
vector = this.domeChest.transform.position + new Vector3(0f, 1.5f, 0f);
|
|
Links.x.rtsCamera.joyTarget = this.domeChest.gameObject;
|
|
if (Links.x.itemCard.hoverChest == this.domeChest && Links.x.gameCard.controlsText.text != "")
|
|
{
|
|
num += 0.5f;
|
|
}
|
|
}
|
|
if (this.domeBreakable)
|
|
{
|
|
gameObject = this.domeBreakable.bracket;
|
|
vector = this.domeBreakable.transform.position + new Vector3(0f, 1.5f, 0f);
|
|
Links.x.rtsCamera.joyTarget = this.domeBreakable.gameObject;
|
|
if (Links.x.itemCard.hoverBreakable == this.domeBreakable && Links.x.gameCard.controlsText.text != "")
|
|
{
|
|
num += 0.5f;
|
|
}
|
|
}
|
|
if (this.domePuzzle)
|
|
{
|
|
gameObject = this.domePuzzle.bracket;
|
|
vector = this.domePuzzle.transform.position + new Vector3(0f, 1.5f, 0f);
|
|
Links.x.rtsCamera.joyTarget = this.domePuzzle.gameObject;
|
|
if (Links.x.itemCard.hoverPuzzle == this.domePuzzle && Links.x.gameCard.controlsText.text != "")
|
|
{
|
|
num += 0.5f;
|
|
}
|
|
}
|
|
if (gameObject)
|
|
{
|
|
vector = Vector3.Lerp(gameObject.transform.GetChild(0).transform.position, gameObject.transform.GetChild(1).transform.position, 0.5f);
|
|
}
|
|
this.SetPositionAtWorldPoint(vector + new Vector3(0f, 1.5f + num, 0f), this.joystickTargetRT);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600077C RID: 1916 RVA: 0x000A7C60 File Offset: 0x000A5E60
|
|
public void PocketPause(bool state)
|
|
{
|
|
if (!state && (Links.x.combat.inPocketAttack || Links.x.combat.inRally))
|
|
{
|
|
return;
|
|
}
|
|
if (state && Records.x.miniGame)
|
|
{
|
|
return;
|
|
}
|
|
if (!state)
|
|
{
|
|
this.domeEnemy = null;
|
|
this.domeParty = null;
|
|
if (Records.x.pocketPause)
|
|
{
|
|
MasterAudio.PlaySoundAndForget("Remove Pause", 1f, new float?(1f), 0f, "", null);
|
|
}
|
|
if (Links.x.joy)
|
|
{
|
|
Links.x.rtsCamera.Zoom(false, "TargetSelect");
|
|
Links.x.rtsCamera.targetSelecting = false;
|
|
}
|
|
Records.x.pocketPause = false;
|
|
Links.x.hudControl.RemoveAllHighlights();
|
|
Links.x.cameraEffects.combatTime = 0f;
|
|
this.updateGameTime = Time.timeSinceLevelLoad + this.pausedTime;
|
|
Links.x.rtsCamera.joyTarget = null;
|
|
Links.x.attackDome.SetActive(false);
|
|
if (!Records.x.InCombat(false))
|
|
{
|
|
if (!Links.x.combat.attackingInteractiveOutsideOfCombat)
|
|
{
|
|
Links.x.hudControl.ToggleAttackTimer(false);
|
|
}
|
|
else
|
|
{
|
|
Links.x.hudControl.ToggleAttackTimer(true);
|
|
}
|
|
}
|
|
Links.x.main.body.lookAtController.EndLook();
|
|
this.doLookAt = false;
|
|
Links.x.combat.ClearPossibleTargets();
|
|
Links.x.cameraEffects.EndPocket();
|
|
Links.x.rtsCamera.Zoom(false, "Combat");
|
|
Links.x.partyColliderAdventure.gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
|
|
Links.x.partyColliderAdventure.UpdatePocket();
|
|
this.joystickTarget.SetActive(false);
|
|
foreach (Character character in this.party)
|
|
{
|
|
if (!character.mainSelected)
|
|
{
|
|
character.body.SeeThroughColliders(false);
|
|
}
|
|
if (character.portrait)
|
|
{
|
|
character.portrait.skillBag.UpdateAbilityTriggers();
|
|
character.portrait.SetActionBar(character.attackTime);
|
|
character.portrait.skillBag.SetSelectedState();
|
|
}
|
|
character.body.CombatSheen(0);
|
|
}
|
|
this.SetDomeSize();
|
|
Shader.SetGlobalFloat("_Combat", 0f);
|
|
Links.x.main.body.CombatSheen(0);
|
|
if (Links.x.combat.inRally || Links.x.combat.pickingRally)
|
|
{
|
|
Links.x.main.portrait.AnimatorSynergyDone();
|
|
if (Links.x.combat.rallyCharacter)
|
|
{
|
|
Links.x.combat.rallyCharacter.portrait.AnimatorSynergyDone();
|
|
}
|
|
}
|
|
Links.x.combat.pickingRally = false;
|
|
Links.x.combat.inRally = false;
|
|
Links.x.combat.rallyCharacter = null;
|
|
if (!Records.x.InCombat(false))
|
|
{
|
|
Links.x.combat.pocketTarget = null;
|
|
}
|
|
Links.x.attackDomeMinimum.SetActive(false);
|
|
Links.x.main.animator.SetFloat("Combat Variation", 1f);
|
|
Links.x.pocketWheel.Close(false);
|
|
Links.x.main.portrait.SetActionBar(Links.x.main.attackTime);
|
|
if (!Records.x.InCombat(false))
|
|
{
|
|
Links.x.combat.ClearPossibleTargets();
|
|
Links.x.main.inAction = false;
|
|
Links.x.main.inRecovery = false;
|
|
}
|
|
Links.x.partyColliderAdventure.PocketEnd();
|
|
Shader.SetGlobalFloat("_AttackTime", 1f);
|
|
Links.x.sensory.SetUpPocketPause();
|
|
if (Links.x.main.timelineIcon)
|
|
{
|
|
Links.x.main.timelineIcon.overridePause = false;
|
|
}
|
|
Links.x.main.NeedToUpdateSailingAnimator(false);
|
|
}
|
|
else if (state)
|
|
{
|
|
Links.x.hudControl.ToggleAttackTimer(true);
|
|
Shader.SetGlobalFloat("_NoCharacterFX", 0f);
|
|
float num = Links.x.main.attackTime;
|
|
if (!Links.x.main.CanAttack())
|
|
{
|
|
num = 0f;
|
|
}
|
|
if (Links.x.combat.bubbleEvent)
|
|
{
|
|
num = 1f;
|
|
}
|
|
Shader.SetGlobalFloat("_AttackTime", num);
|
|
if (this.descWindowOpen)
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
Links.x.combat.rallyCharacter = null;
|
|
Links.x.partyColliderAdventure.gameObject.transform.localScale = Vector3.zero;
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
MasterAudio.PlaySoundAndForget("Pause", 1f, new float?(1f), 0f, "", null);
|
|
}
|
|
Records.x.pocketPause = true;
|
|
Links.x.hudControl.RemoveAllHighlights();
|
|
Links.x.cameraEffects.combatTime = 0f;
|
|
this.doLookAt = false;
|
|
this.pausedTime = Time.timeSinceLevelLoad - this.updateGameTime;
|
|
if ((!Links.x.combat.miniEvent || Links.x.combat.bubbleEvent) && !Links.x.combat.inPocketAttack && !Records.x.removeControls)
|
|
{
|
|
Links.x.attackDome.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
Links.x.attackDome.SetActive(false);
|
|
}
|
|
this.SetDomeSize();
|
|
Links.x.main.EndTurning(true);
|
|
Links.x.main.currentTargetIndex = -1;
|
|
if (this.joy)
|
|
{
|
|
this.joystickTargetIcon.text = "<sprite=" + this.GetControllerSprite("Action", Links.x.gameplay.controllerName).ToString() + ">";
|
|
}
|
|
Links.x.combat.GetTargets(true, false, null);
|
|
if (!Links.x.combat.miniEvent && this.joy)
|
|
{
|
|
this.GetControllerTarget(true);
|
|
}
|
|
foreach (Character character2 in this.party)
|
|
{
|
|
if (!this.spellTargetingParty && !Links.x.combat.CharacterHasSynergy(character2))
|
|
{
|
|
character2.body.SeeThroughColliders(false);
|
|
}
|
|
else
|
|
{
|
|
character2.body.SeeThroughColliders(true);
|
|
}
|
|
if (character2.portrait)
|
|
{
|
|
character2.portrait.SetActionBar(character2.attackTime);
|
|
character2.portrait.skillBag.UpdateAbilityTriggers();
|
|
character2.portrait.skillBag.SetSelectedState();
|
|
}
|
|
}
|
|
if (this.character && this.joy && Links.x.pocketWheel.targetSelection && !Links.x.combat.miniEvent && (this.domeEnemy || this.domeParty))
|
|
{
|
|
this.joystickTarget.SetActive(true);
|
|
if (this.domeEnemy)
|
|
{
|
|
this.SetPositionAtWorldPoint(this.domeEnemy.body.GetNeck().position + new Vector3(0f, 2.1f, 0f), this.joystickTargetRT);
|
|
}
|
|
else
|
|
{
|
|
this.SetPositionAtWorldPoint(this.domeParty.body.GetNeck().position + new Vector3(0f, 2.1f, 0f), this.joystickTargetRT);
|
|
}
|
|
}
|
|
if (!Links.x.combat.miniEvent)
|
|
{
|
|
Links.x.partyColliderAdventure.UpdatePocket();
|
|
Links.x.partyColliderAdventure.PocketStart();
|
|
Shader.SetGlobalFloat("_Combat", 1f);
|
|
Links.x.main.body.CombatSheen(1);
|
|
Links.x.main.animator.SetBool("Combat", true);
|
|
Links.x.main.animator.SetFloat("Combat Variation", 0f);
|
|
}
|
|
if (Links.x.main.moving)
|
|
{
|
|
Links.x.main.TargetReached();
|
|
}
|
|
if (Links.x.main.CanAttack() && !Links.x.combat.miniEvent)
|
|
{
|
|
Links.x.pocketWheel.Open(Links.x.main);
|
|
}
|
|
Links.x.main.portrait.SetActionBar(Links.x.main.attackTime);
|
|
if (this.gameFeedScrolling)
|
|
{
|
|
this.gameFeedScrolling = false;
|
|
}
|
|
if (this.badgeScrolling)
|
|
{
|
|
this.badgeScrolling = false;
|
|
Links.x.hudControl.RemoveBadgeNavigation();
|
|
}
|
|
if (!Links.x.domeAnimator.GetCurrentAnimatorStateInfo(0).IsName("DomeLoop"))
|
|
{
|
|
Links.x.domeAnimator.Play("DomeStart");
|
|
Links.x.domeAnimator.Update(0f);
|
|
}
|
|
Links.x.main.NeedToUpdateSailingAnimator(false);
|
|
}
|
|
Links.x.sensory.SetUpPocketPause();
|
|
}
|
|
|
|
// Token: 0x0600077D RID: 1917 RVA: 0x000A865C File Offset: 0x000A685C
|
|
public void SetDomeSize()
|
|
{
|
|
if (!Links.x.hasMain)
|
|
{
|
|
return;
|
|
}
|
|
if (Records.x.removeControls && !Links.x.combat.bubbleEvent)
|
|
{
|
|
return;
|
|
}
|
|
if (this.spellTargetingGround || this.spellTargetingParty || this.spellTargetingEnemy || Links.x.pocketWheel.Charming())
|
|
{
|
|
float num = Links.x.main.stats.SpellRadius(this.spellPaganRow);
|
|
Links.x.attackDome.transform.localScale = new Vector3(num, num, num);
|
|
Links.x.partyColliderCombat.SetRadius(num);
|
|
Shader.SetGlobalFloat("_BubbleSize", num);
|
|
if (Links.x.main)
|
|
{
|
|
Shader.SetGlobalVector("_BubblePosition", Links.x.main.tr.position + new Vector3(0f, 3f, 0f));
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Links.x.attackDome.transform.position = Links.x.main.tr.position;
|
|
}
|
|
}
|
|
Links.x.attackDomeMinimum.SetActive(false);
|
|
Links.x.attackDome.transform.position = Links.x.main.tr.position;
|
|
}
|
|
else if (Links.x.combat.bubbleEvent)
|
|
{
|
|
float num2 = Links.x.combat.bubbleEventTarget.AttackRange();
|
|
Vector3 currentPosition = Links.x.combat.bubbleEventTarget.currentPosition;
|
|
Links.x.attackDome.transform.localScale = new Vector3(num2, num2, num2);
|
|
Shader.SetGlobalFloat("_BubbleSize", num2);
|
|
Shader.SetGlobalVector("_BubblePosition", currentPosition + new Vector3(0f, 3f, 0f));
|
|
Links.x.attackDome.transform.position = currentPosition;
|
|
Links.x.attackDomeMinimum.SetActive(false);
|
|
}
|
|
else if (Links.x.pocketWheel.selected.Contains("Medium Attack"))
|
|
{
|
|
float num3 = 3.5f;
|
|
Links.x.attackDome.transform.localScale = new Vector3(num3, num3, num3);
|
|
Links.x.partyColliderCombat.SetRadius(num3);
|
|
Shader.SetGlobalFloat("_BubbleSize", num3);
|
|
if (Links.x.main)
|
|
{
|
|
Shader.SetGlobalVector("_BubblePosition", Links.x.main.tr.position + new Vector3(0f, 3f, 0f));
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Links.x.attackDome.transform.position = Links.x.main.tr.position;
|
|
}
|
|
}
|
|
Links.x.attackDomeMinimum.SetActive(false);
|
|
Links.x.attackDome.transform.position = Links.x.main.tr.position;
|
|
}
|
|
else if (Links.x.pocketWheel.selected.Contains("Heavy Attack"))
|
|
{
|
|
float num4 = 7f;
|
|
Links.x.attackDome.transform.localScale = new Vector3(num4, num4, num4);
|
|
Links.x.partyColliderCombat.SetRadius(num4);
|
|
Shader.SetGlobalFloat("_BubbleSize", num4);
|
|
if (Links.x.main)
|
|
{
|
|
Shader.SetGlobalVector("_BubblePosition", Links.x.main.tr.position + new Vector3(0f, 3f, 0f));
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Links.x.attackDome.transform.position = Links.x.main.tr.position;
|
|
}
|
|
}
|
|
Links.x.attackDomeMinimum.SetActive(false);
|
|
Links.x.attackDome.transform.position = Links.x.main.tr.position;
|
|
}
|
|
else if (Links.x.combat.pickingRally)
|
|
{
|
|
float num5 = Links.x.combat.rallyCharacter.AttackRange() + Links.x.main.AttackRange();
|
|
if (Links.x.main.stats.race == "Varuchov" && Links.x.combat.rallyCharacter.stats.race == "Varuchov")
|
|
{
|
|
num5 = 50f;
|
|
}
|
|
Links.x.attackDome.transform.localScale = new Vector3(num5, num5, num5);
|
|
Links.x.partyColliderCombat.SetRadius(num5);
|
|
Shader.SetGlobalFloat("_BubbleSize", num5);
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Vector3 vector = Vector3.Lerp(Links.x.combat.rallyCharacter.tr.position, Links.x.main.tr.position, 0.5f);
|
|
if ((Links.x.main.stats.race == "Varuchov" || Links.x.combat.rallyCharacter.stats.race == "Varuchov") && (!(Links.x.main.stats.race == "Varuchov") || !(Links.x.combat.rallyCharacter.stats.race == "Varuchov")))
|
|
{
|
|
if (Links.x.main.stats.race == "Varuchov")
|
|
{
|
|
if (Vector3.Distance(vector, Links.x.main.tr.position) > num5)
|
|
{
|
|
vector = Links.x.combat.rallyCharacter.tr.position;
|
|
}
|
|
}
|
|
else if (Vector3.Distance(Links.x.combat.rallyCharacter.tr.position, vector) > num5)
|
|
{
|
|
vector = Links.x.main.tr.position;
|
|
}
|
|
}
|
|
Links.x.attackDome.transform.position = vector;
|
|
Shader.SetGlobalVector("_BubblePosition", vector + new Vector3(0f, 3f, 0f));
|
|
Links.x.attackDomeMinimum.SetActive(false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Character character = Links.x.main;
|
|
if (Links.x.pocketWheel.rallyWheelOpen && Links.x.pocketWheel.selectedRallyCharacter)
|
|
{
|
|
character = Links.x.pocketWheel.selectedRallyCharacter;
|
|
}
|
|
Links.x.attackDome.transform.localScale = new Vector3(character.AttackRange(), character.AttackRange(), character.AttackRange());
|
|
Links.x.partyColliderCombat.SetRadius(character.AttackRange());
|
|
Shader.SetGlobalFloat("_BubbleSize", character.AttackRange());
|
|
if (character.tr)
|
|
{
|
|
Shader.SetGlobalVector("_BubblePosition", character.tr.position + new Vector3(0f, 3f, 0f));
|
|
}
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Links.x.attackDome.transform.position = character.tr.position;
|
|
}
|
|
float num6 = character.invRow1._MeleeRangeStart * Records.x.nodeSize;
|
|
if (num6 > 0f && !Links.x.combat.miniEvent)
|
|
{
|
|
num6 += character.attackRadius;
|
|
num6 += Records.x.nodeSize / 2f;
|
|
num6 *= 2f;
|
|
if (Records.x.pocketPause)
|
|
{
|
|
Links.x.attackDomeMinimum.SetActive(true);
|
|
}
|
|
Links.x.attackDomeMinimum.transform.localScale = new Vector3(num6, num6, num6);
|
|
Links.x.attackDomeMinimum.transform.position = Links.x.attackDome.transform.position;
|
|
}
|
|
else
|
|
{
|
|
Links.x.attackDomeMinimum.SetActive(false);
|
|
}
|
|
Links.x.attackDome.transform.position = character.tr.position;
|
|
}
|
|
this.SetAdventureDomeSize();
|
|
}
|
|
|
|
// Token: 0x0600077E RID: 1918 RVA: 0x000A8F4C File Offset: 0x000A714C
|
|
public void SetAdventureDomeSize()
|
|
{
|
|
if (Links.x.main)
|
|
{
|
|
if (Links.x.mk)
|
|
{
|
|
if (Links.x.main.sailing)
|
|
{
|
|
Links.x.partyColliderAdventure.SetRadius(8f);
|
|
return;
|
|
}
|
|
Links.x.partyColliderAdventure.SetRadius(4f);
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
if (Links.x.main.sailing)
|
|
{
|
|
Links.x.partyColliderAdventure.SetRadius(8f);
|
|
return;
|
|
}
|
|
Links.x.partyColliderAdventure.SetRadius(4f);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600077F RID: 1919 RVA: 0x000A8FF0 File Offset: 0x000A71F0
|
|
public void SetPartyColliders(bool state)
|
|
{
|
|
foreach (Character character in this.party)
|
|
{
|
|
character.body.SeeThroughColliders(state);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000780 RID: 1920 RVA: 0x000A9048 File Offset: 0x000A7248
|
|
public void CallBoro()
|
|
{
|
|
if (Links.x.gaia.boro)
|
|
{
|
|
if (!Records.x.InCombat(false))
|
|
{
|
|
bool flag = true;
|
|
Character character = Links.x.main;
|
|
if (!Links.x.gaia.boroControls.boroInvisible)
|
|
{
|
|
for (int i = 0; i < this.party.Count; i++)
|
|
{
|
|
if (this.party[i] && flag && this.party[i].mainSelected && !this.party[i].summoned && !this.party[i].isBoro && (this.party[i].tr.position - Links.x.gaia.boro.tr.position).sqrMagnitude < 100f)
|
|
{
|
|
flag = false;
|
|
}
|
|
}
|
|
}
|
|
bool flag2 = true;
|
|
if (Links.x.main.node.GraphIndex == 1U && flag)
|
|
{
|
|
flag2 = false;
|
|
for (int j = 0; j < this.party.Count; j++)
|
|
{
|
|
if (this.party[j] && flag && !flag2 && this.party[j].mainSelected && !this.party[j].summoned && !this.party[j].isBoro && this.party[j].node.GraphIndex == 0U)
|
|
{
|
|
flag2 = true;
|
|
character = this.party[j];
|
|
}
|
|
}
|
|
}
|
|
if (flag && flag2)
|
|
{
|
|
Links.x.gaia.boroControls.Call(character);
|
|
return;
|
|
}
|
|
if (flag2)
|
|
{
|
|
string text = Records.x.boroName + " is already nearby";
|
|
Links.x.gameFeed.AddFeed(text);
|
|
return;
|
|
}
|
|
string text2 = "Cannot call " + Records.x.boroName + " from here";
|
|
Links.x.gameFeed.AddFeed(text2);
|
|
if (!Links.x.gameFeed.isOn)
|
|
{
|
|
Links.x.gameFeed.ShowNotice(text2);
|
|
return;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
string text3 = "Cannot call " + Records.x.boroName + " right now";
|
|
Links.x.gameFeed.AddFeed(text3);
|
|
if (!Links.x.gameFeed.isOn)
|
|
{
|
|
Links.x.gameFeed.ShowNotice(text3);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
string text4 = Records.x.boroName + " is is too far away";
|
|
Links.x.gameFeed.AddFeed(text4);
|
|
if (!Links.x.gameFeed.isOn)
|
|
{
|
|
Links.x.gameFeed.ShowNotice(text4);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000781 RID: 1921 RVA: 0x000A9344 File Offset: 0x000A7544
|
|
public void ToggleSlowTimeMode(bool state)
|
|
{
|
|
if (Records.x.inMenus || Records.x.removeControls || Records.x.paused || !Links.x.gaia.sceneLoaded || Records.x.typing || Records.x.dialogue || Records.x.mainCharacterDead)
|
|
{
|
|
state = false;
|
|
}
|
|
if (state && !Records.x.slowTimeMode)
|
|
{
|
|
Links.x.cameraEffects.PlayAnimation("CameraSlowStart");
|
|
}
|
|
if (!state && Records.x.slowTimeMode)
|
|
{
|
|
Links.x.cameraEffects.PlayAnimation("CameraSlowEnd");
|
|
}
|
|
Records.x.slowTimeMode = state;
|
|
}
|
|
|
|
// Token: 0x06000782 RID: 1922 RVA: 0x000A9400 File Offset: 0x000A7600
|
|
public void OpenDock()
|
|
{
|
|
if (!Records.x.inMenus)
|
|
{
|
|
if (Links.x.hudControl.descriptionWindowOpen)
|
|
{
|
|
Links.x.hudControl.CloseDescWindow();
|
|
}
|
|
Links.x.hudControl.ChangeHudVisibility(false, true);
|
|
Records.x.inMenus = true;
|
|
this.ToggleSlowTimeMode(false);
|
|
Links.x.hudControl.ToggleBothCanvasGroup(false);
|
|
Links.x.hudControl.SetModalWindowState(false, true);
|
|
if (this.prevGameCardCharacter)
|
|
{
|
|
Links.x.gameCard.EndHover(this.prevGameCardCharacter, false);
|
|
this.prevGameCardCharacter.body.Hover(false, true);
|
|
this.prevGameCardCharacter = null;
|
|
this.character = null;
|
|
this.gameCardCharacter = null;
|
|
}
|
|
if (Links.x.gameCard.hoverCharacter)
|
|
{
|
|
Links.x.gameCard.EndHover(Links.x.gameCard.hoverCharacter, false);
|
|
}
|
|
if (this.prevItem)
|
|
{
|
|
Links.x.inventory.groundBag.RemoveLabels();
|
|
this.prevItem.HoverOut();
|
|
Links.x.inventory.groundBag.SetCollectorUpdate();
|
|
Links.x.itemCard.EndHover(this.prevItem, null, null, null, null, false);
|
|
this.prevItem = null;
|
|
this.item = null;
|
|
}
|
|
if (this.prevBreakable)
|
|
{
|
|
this.prevBreakable.HoverOut();
|
|
this.prevBreakable = null;
|
|
this.breakable = null;
|
|
}
|
|
Links.x.hudControl.ToggleMenus();
|
|
this.ToggleControllerGlows();
|
|
Links.x.dialogue.ToggleTimeScale();
|
|
Links.x.cameraEffects.ToggleObscurance();
|
|
Links.x.hudControl.cinematicQuips.alpha = 0f;
|
|
}
|
|
this.openingAnotherMenu = false;
|
|
}
|
|
|
|
// Token: 0x06000783 RID: 1923 RVA: 0x000A95E0 File Offset: 0x000A77E0
|
|
public void CloseDock()
|
|
{
|
|
if (!this.openingAnotherMenu && Records.x.inMenus)
|
|
{
|
|
Links.x.hudControl.ChangeHudVisibility(true, true);
|
|
if (this.prevDockButton)
|
|
{
|
|
this.prevDockButton.canInteract = true;
|
|
this.prevDockButton.OnPointerExit(null);
|
|
}
|
|
this.prevDockButton = null;
|
|
this.dockOpen = false;
|
|
this.uiHover = false;
|
|
if (!Links.x.creation)
|
|
{
|
|
Links.x.hudControl.SetModalWindowState(true, true);
|
|
Links.x.hudControl.ToggleBothCanvasGroup(true);
|
|
Records.x.SetTypingState(false);
|
|
}
|
|
Records.x.inMenus = false;
|
|
Links.x.hudControl.CloseMenuSwitcher();
|
|
Links.x.hudControl.ToggleMenus();
|
|
Links.x.dialogue.ToggleTimeScale();
|
|
Links.x.cameraEffects.ToggleObscurance();
|
|
Links.x.hudControl.cinematicQuips.alpha = 1f;
|
|
}
|
|
this.openingAnotherMenu = false;
|
|
}
|
|
|
|
// Token: 0x06000784 RID: 1924 RVA: 0x000A96F8 File Offset: 0x000A78F8
|
|
public void StartHoverTimer(Item item)
|
|
{
|
|
if (Records.x.inMenus)
|
|
{
|
|
return;
|
|
}
|
|
if (Links.x.joy)
|
|
{
|
|
return;
|
|
}
|
|
if (Records.x.filming)
|
|
{
|
|
return;
|
|
}
|
|
Links.x.inventory.groundBag.AddPopItem(item);
|
|
if (this.routine != null)
|
|
{
|
|
base.StopCoroutine(this.routine);
|
|
this.routine = null;
|
|
}
|
|
this.routine = this.TimedShow();
|
|
base.StartCoroutine(this.routine);
|
|
}
|
|
|
|
// Token: 0x06000785 RID: 1925 RVA: 0x000A9775 File Offset: 0x000A7975
|
|
private IEnumerator TimedShow()
|
|
{
|
|
bool waitedForCombat = false;
|
|
while (Records.x.InCombat(false))
|
|
{
|
|
waitedForCombat = true;
|
|
yield return null;
|
|
}
|
|
if (waitedForCombat)
|
|
{
|
|
yield return new WaitForSeconds(4f);
|
|
}
|
|
Links.x.inventory.groundBag.timerItems = true;
|
|
this.timerHoverItem = this.item;
|
|
Links.x.inventory.groundBag.CheckGroundAndClicks(true);
|
|
float num = 4f;
|
|
yield return new WaitForSeconds(num);
|
|
Links.x.inventory.groundBag.timerItems = false;
|
|
yield return new WaitForSeconds(1f);
|
|
Links.x.inventory.groundBag.RemovePopItems();
|
|
this.routine = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x06000786 RID: 1926 RVA: 0x000A9784 File Offset: 0x000A7984
|
|
public void ToggleAIFromButton()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000787 RID: 1927 RVA: 0x000A9786 File Offset: 0x000A7986
|
|
public void TogglePartyWait()
|
|
{
|
|
if (Records.x.partyWait)
|
|
{
|
|
Records.x.partyWait = false;
|
|
return;
|
|
}
|
|
Records.x.partyWait = true;
|
|
Links.x.fellowship.SetWaitPositions();
|
|
}
|
|
|
|
// Token: 0x06000788 RID: 1928 RVA: 0x000A97BA File Offset: 0x000A79BA
|
|
public void TogglePauseFromButton()
|
|
{
|
|
if (Records.x.paused)
|
|
{
|
|
this.TogglePause(false);
|
|
return;
|
|
}
|
|
this.TogglePause(true);
|
|
}
|
|
|
|
// Token: 0x06000789 RID: 1929 RVA: 0x000A97D8 File Offset: 0x000A79D8
|
|
public void TogglePause(bool state)
|
|
{
|
|
if (!Links.x.sensory)
|
|
{
|
|
return;
|
|
}
|
|
if (Records.x.inMenus)
|
|
{
|
|
state = true;
|
|
}
|
|
if (Records.x.dialogue)
|
|
{
|
|
state = false;
|
|
}
|
|
if (Links.x.creation)
|
|
{
|
|
state = false;
|
|
}
|
|
if (Records.x.filming)
|
|
{
|
|
state = false;
|
|
}
|
|
if (Records.x.paused != state)
|
|
{
|
|
Records.x.paused = state;
|
|
Links.x.dialogue.ToggleTimeScale();
|
|
Links.x.sensory.SetUpPause();
|
|
if (Records.x.paused)
|
|
{
|
|
MasterAudio.PauseSoundGroup("Instruments");
|
|
this.pausedTime = Time.timeSinceLevelLoad - this.updateGameTime;
|
|
Time.timeScale = 0f;
|
|
if (Records.x.InCombat(false))
|
|
{
|
|
Links.x.combat.GetTargets(false, false, null);
|
|
return;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Links.x.combat.ClearPossibleTargets();
|
|
MasterAudio.UnpauseSoundGroup("Instruments");
|
|
this.updateGameTime = Time.timeSinceLevelLoad + this.pausedTime;
|
|
Time.timeScale = 1f;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600078A RID: 1930 RVA: 0x000A98FC File Offset: 0x000A7AFC
|
|
public void ToggleAI()
|
|
{
|
|
if (Records.x.ai == 1)
|
|
{
|
|
Records.x.ai = 0;
|
|
Links.x.gameFeed.AddFeed("The party will wait for actions");
|
|
return;
|
|
}
|
|
Records.x.ai = 1;
|
|
Links.x.gameFeed.AddFeed("The party will automatically attack");
|
|
}
|
|
|
|
// Token: 0x0600078B RID: 1931 RVA: 0x000A9958 File Offset: 0x000A7B58
|
|
public void RemoveAbilityInfo()
|
|
{
|
|
if (this.charming)
|
|
{
|
|
this.charming = false;
|
|
}
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
if (this.spellTargetingGround)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.EndControllerTargeting();
|
|
Links.x.gameplay.SetDomeSize();
|
|
if (this.actionCharacter)
|
|
{
|
|
if (this.actionCharacter.actions)
|
|
{
|
|
this.actionCharacter.actions.RemoveAbility();
|
|
}
|
|
this.actionCharacter.portrait.skillBag.RemoveSelectedButton();
|
|
this.actionCharacter.portrait.skillBag.selectedSkillButton = null;
|
|
if (Links.x.combat.preDome && this.combatStartedWithSkill)
|
|
{
|
|
this.combatStartedWithSkill = false;
|
|
Links.x.combat.EndCombat(false);
|
|
}
|
|
}
|
|
this.EndControllerTargeting();
|
|
}
|
|
|
|
// Token: 0x0600078C RID: 1932 RVA: 0x000A9A44 File Offset: 0x000A7C44
|
|
public void ClearEffectTiles(bool includeFarTile, Character characterToRemoveWaypoint, bool allCharacterWaypoints)
|
|
{
|
|
for (int i = 0; i < this.effectTiles.Count; i++)
|
|
{
|
|
Links.x.cellar.ReturnPooledGameObject(11, this.effectTiles[i]);
|
|
}
|
|
this.effectTiles.Clear();
|
|
if (allCharacterWaypoints)
|
|
{
|
|
for (int j = 0; j < this.effectTileWaypoints.Count; j++)
|
|
{
|
|
if (this.effectTileWaypoints[j].activeSelf)
|
|
{
|
|
this.effectTileWaypoints[j].SetActive(false);
|
|
}
|
|
}
|
|
}
|
|
if (!allCharacterWaypoints && characterToRemoveWaypoint)
|
|
{
|
|
this.ClearWaypointEffect(characterToRemoveWaypoint);
|
|
}
|
|
if (includeFarTile && this.effectTileTooFar.activeSelf)
|
|
{
|
|
this.effectTileTooFar.SetActive(false);
|
|
}
|
|
this.foundGroupTime = 0f;
|
|
if (this.messageDefenseHoldMK.activeSelf)
|
|
{
|
|
this.messageDefenseHoldMK.SetActive(false);
|
|
}
|
|
if (this.messageDefenseHoldJoy.activeSelf)
|
|
{
|
|
this.messageDefenseHoldJoy.SetActive(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600078D RID: 1933 RVA: 0x000A9B38 File Offset: 0x000A7D38
|
|
public void ClearWaypointEffect(Character character)
|
|
{
|
|
int portraitOrder = Links.x.GetPortraitOrder(character);
|
|
if (this.effectTileWaypoints[portraitOrder].activeSelf)
|
|
{
|
|
this.effectTileWaypoints[portraitOrder].SetActive(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600078E RID: 1934 RVA: 0x000A9B76 File Offset: 0x000A7D76
|
|
public void EndCombatTurn()
|
|
{
|
|
Links.x.combat.EndTurn(true, Links.x.protagonist, true);
|
|
}
|
|
|
|
// Token: 0x0600078F RID: 1935 RVA: 0x000A9B94 File Offset: 0x000A7D94
|
|
public void CheckTileEffects(Character source, GraphNode n, bool reRollAgainst)
|
|
{
|
|
if (n != null)
|
|
{
|
|
int count = this.currentTileEffects.Count;
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
if ((this.currentTileEffects[i].mainPosition - source.tr.position).sqrMagnitude < 2500f)
|
|
{
|
|
this.currentTileEffects[i].CheckTile(n, source, reRollAgainst);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000790 RID: 1936 RVA: 0x000A9C04 File Offset: 0x000A7E04
|
|
public void ClearSelectedActionTargets(Character character)
|
|
{
|
|
if (this.actionCharacter && this.actionCharacter.hasActions)
|
|
{
|
|
this.actionCharacter.actions.ClearSelectedActionRealTime();
|
|
}
|
|
if (character.hasActions && !character.actions.cannotInterrupt)
|
|
{
|
|
character.actions.ClearSelectedActionRealTime();
|
|
if (!Records.x.combat)
|
|
{
|
|
character.actions.EndActions();
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000791 RID: 1937 RVA: 0x000A9C74 File Offset: 0x000A7E74
|
|
public void NewPaths()
|
|
{
|
|
for (int i = 0; i < this.party.Count; i++)
|
|
{
|
|
if (this.party[i])
|
|
{
|
|
this.party[i].pathTries = 0;
|
|
this.party[i].attackRadiusTries = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000792 RID: 1938 RVA: 0x000A9CD0 File Offset: 0x000A7ED0
|
|
public bool ClickingOnInteractable()
|
|
{
|
|
return ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonUp(0)) && (this.character || this.item || this.exit || this.breakable || this.chest || this.door || this.puzzle || this.boat)) || this.waitingForClickUpOnCharacter;
|
|
}
|
|
|
|
// Token: 0x06000793 RID: 1939 RVA: 0x000A9D64 File Offset: 0x000A7F64
|
|
public bool CanClick()
|
|
{
|
|
return Links.x.hasMain && (!this.mk || !Records.x.movingWindows) && (Records.x.removeControls || !Links.x.mk || true);
|
|
}
|
|
|
|
// Token: 0x06000794 RID: 1940 RVA: 0x000A9DB6 File Offset: 0x000A7FB6
|
|
public void TurnOffHoverTiles()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000795 RID: 1941 RVA: 0x000A9DB8 File Offset: 0x000A7FB8
|
|
public void FollowCharacterPathFinished(Character followTarget, Character party)
|
|
{
|
|
bool flag = true;
|
|
if (followTarget.hostility == 2 || followTarget.attackingUntilBribe)
|
|
{
|
|
flag = false;
|
|
}
|
|
if (flag)
|
|
{
|
|
this.StartDialogue(followTarget, party, null, null, followTarget.stats.dialogueFile);
|
|
return;
|
|
}
|
|
if (party.hasActions)
|
|
{
|
|
party.actions.AddTarget(followTarget);
|
|
party.actions.QueueIcon(true);
|
|
party.actions.readyToAttack = true;
|
|
party.actions.AddTarget(followTarget);
|
|
party.actions.StartAction("Attack");
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000796 RID: 1942 RVA: 0x000A9E3B File Offset: 0x000A803B
|
|
public void StartDialogue(Character mainSpeaker, Character responder, Character mainSpeaker2, Character mainSpeaker3, string dialogueFile)
|
|
{
|
|
Links.x.dialogue.npc1 = mainSpeaker;
|
|
Links.x.dialogue.party = responder;
|
|
Links.x.dialogue.SetupConversation(dialogueFile, mainSpeaker, mainSpeaker2, mainSpeaker3, responder);
|
|
}
|
|
|
|
// Token: 0x06000797 RID: 1943 RVA: 0x000A9E74 File Offset: 0x000A8074
|
|
public void BreakableFinished(BreakableActions currentBreakable, Character breaker)
|
|
{
|
|
currentBreakable.ClickToBreak(breaker, false, true);
|
|
if (this.spellcasting || this.throwingElixir)
|
|
{
|
|
Links.x.main.actions.RemoveAbility();
|
|
}
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
if (this.spellTargetingGround)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.EndControllerTargeting();
|
|
}
|
|
|
|
// Token: 0x06000798 RID: 1944 RVA: 0x000A9EE0 File Offset: 0x000A80E0
|
|
public void DoorFinished(DoorActions currentDoor, Character party)
|
|
{
|
|
currentDoor.ClickToOpen(party, false);
|
|
if (this.spellcasting || this.throwingElixir)
|
|
{
|
|
Links.x.main.actions.RemoveAbility();
|
|
}
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
if (this.spellTargetingGround)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.EndControllerTargeting();
|
|
}
|
|
|
|
// Token: 0x06000799 RID: 1945 RVA: 0x000A9F4C File Offset: 0x000A814C
|
|
public void ChestFinished(ChestActions currentChest, Character party)
|
|
{
|
|
currentChest.ClickToOpen(party, false);
|
|
if (this.spellcasting || this.throwingElixir)
|
|
{
|
|
Links.x.main.actions.RemoveAbility();
|
|
}
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
if (this.spellTargetingGround)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.EndControllerTargeting();
|
|
}
|
|
|
|
// Token: 0x0600079A RID: 1946 RVA: 0x000A9FB8 File Offset: 0x000A81B8
|
|
public void PuzzleFinished(PuzzleActions currentPuzzle, Character party)
|
|
{
|
|
currentPuzzle.Clicked(party);
|
|
if (this.spellcasting || this.throwingElixir)
|
|
{
|
|
Links.x.main.actions.RemoveAbility();
|
|
}
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
if (this.spellTargetingGround)
|
|
{
|
|
this.ClearEffectTiles(true, this.actionCharacter, false);
|
|
}
|
|
this.RemoveSpellTargets();
|
|
this.EndControllerTargeting();
|
|
}
|
|
|
|
// Token: 0x0600079B RID: 1947 RVA: 0x000AA020 File Offset: 0x000A8220
|
|
public void BoatFollowFinished(Boat currentBoat)
|
|
{
|
|
currentBoat.OpenBag();
|
|
}
|
|
|
|
// Token: 0x0600079C RID: 1948 RVA: 0x000AA028 File Offset: 0x000A8228
|
|
public void MapExitFinished(MapExitActions moveToExit, Character c, bool fromTestMenu)
|
|
{
|
|
if (!Links.x.gaia.sceneLoaded)
|
|
{
|
|
return;
|
|
}
|
|
if (!Links.x.gaia.pathfindingReady)
|
|
{
|
|
return;
|
|
}
|
|
bool flag = true;
|
|
if (moveToExit)
|
|
{
|
|
if (moveToExit.sceneTo != "Interiors" && moveToExit.sceneTo != "Exterior" && Records.x.partyWait)
|
|
{
|
|
for (int i = 0; i < this.party.Count; i++)
|
|
{
|
|
if (this.party[i] && !this.party[i].isBoro)
|
|
{
|
|
Vector3 doorPoint = moveToExit.mapExit.doorPoint;
|
|
doorPoint.y = this.party[i].tr.position.y;
|
|
if ((this.party[i].tr.position - doorPoint).sqrMagnitude > 2500f)
|
|
{
|
|
flag = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!flag)
|
|
{
|
|
Links.x.gameFeed.ShowNotice("Cannot leave area while separated");
|
|
}
|
|
if (flag || fromTestMenu)
|
|
{
|
|
string sceneTo = moveToExit.sceneTo;
|
|
if (sceneTo == "OverworldMap")
|
|
{
|
|
Links.x.mapConfirm.currentExit = moveToExit;
|
|
Links.x.mapConfirm.StartMenu();
|
|
return;
|
|
}
|
|
if (sceneTo == "Interiors")
|
|
{
|
|
Links.x.gaia.Teleport(c, sceneTo, moveToExit.mapExit.interiorConnection, moveToExit.mapExit.exteriorConnection, true, moveToExit.mapExit);
|
|
return;
|
|
}
|
|
if (sceneTo == "Exterior")
|
|
{
|
|
Links.x.gaia.Teleport(c, sceneTo, moveToExit.mapExit.interiorConnection, moveToExit.mapExit.exteriorConnection, false, moveToExit.mapExit);
|
|
return;
|
|
}
|
|
for (int j = 0; j < this.party.Count; j++)
|
|
{
|
|
this.party[j].ClearMoveTargets();
|
|
}
|
|
if (!fromTestMenu)
|
|
{
|
|
Links.x.combat.SaveCombatants(Links.x.main.tr.position, true);
|
|
}
|
|
Links.x.gaia.exitPoint = moveToExit.mapExit.doorPoint;
|
|
moveToExit.mapExit.gameObject.GetComponent<MapExitActions>().Leave();
|
|
Links.x.gaia.ChangeScene(sceneTo, moveToExit.sceneFrom, moveToExit.subExit);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600079D RID: 1949 RVA: 0x000AA2AF File Offset: 0x000A84AF
|
|
public void ItemPathFinished(Item item, Character character)
|
|
{
|
|
if (character.mainSelected && Records.x.pocketPause)
|
|
{
|
|
this.PocketPause(false);
|
|
}
|
|
item.Clicked(character);
|
|
}
|
|
|
|
// Token: 0x0600079E RID: 1950 RVA: 0x000AA2D4 File Offset: 0x000A84D4
|
|
public bool CanScatterPartyToMakePath(string type)
|
|
{
|
|
return !Records.x.InCombat(false) || (Records.x.InCombat(false) && (type == "Breakable" || type == "Door" || type == "Chest" || type == "Dialogue" || type == "Item"));
|
|
}
|
|
|
|
// Token: 0x0600079F RID: 1951 RVA: 0x000AA33F File Offset: 0x000A853F
|
|
public void UpdateSelectedParty()
|
|
{
|
|
if (this.gatherNodesCoroutine == null)
|
|
{
|
|
this.ClearInteractionNodes();
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007A0 RID: 1952 RVA: 0x000AA350 File Offset: 0x000A8550
|
|
public void SetHoverTile(int num)
|
|
{
|
|
for (int i = 0; i < this.hoverTilesNumbers.Count; i++)
|
|
{
|
|
this.hoverTilesNumbers[i].enabled = false;
|
|
if (i == num)
|
|
{
|
|
this.hoverTilesNumbers[i].enabled = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007A1 RID: 1953 RVA: 0x000AA39C File Offset: 0x000A859C
|
|
public void TurnOffHoverTile()
|
|
{
|
|
for (int i = 0; i < this.hoverTilesNumbers.Count; i++)
|
|
{
|
|
this.hoverTilesNumbers[i].enabled = false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007A2 RID: 1954 RVA: 0x000AA3D1 File Offset: 0x000A85D1
|
|
public void TurnOffSelectionCircle()
|
|
{
|
|
this.selectionCircle.SetActive(false);
|
|
}
|
|
|
|
// Token: 0x060007A3 RID: 1955 RVA: 0x000AA3E0 File Offset: 0x000A85E0
|
|
public void SetSelectionCircle(Character character)
|
|
{
|
|
if (Links.x.gameplay.selectionCircle.activeSelf)
|
|
{
|
|
Links.x.gameplay.selectionCircle.SetActive(true);
|
|
Links.x.gameplay.selectionCircleAnimator.Play("selected", -1, 0f);
|
|
}
|
|
else
|
|
{
|
|
Links.x.gameplay.selectionCircle.SetActive(true);
|
|
}
|
|
this.selectionCircle.transform.position = character.tr.position;
|
|
}
|
|
|
|
// Token: 0x060007A4 RID: 1956 RVA: 0x000AA469 File Offset: 0x000A8669
|
|
public void SceneSwitch()
|
|
{
|
|
this.allCharacters = Links.x.diorama.characters;
|
|
this.foundGroupTime = 0f;
|
|
}
|
|
|
|
// Token: 0x060007A5 RID: 1957 RVA: 0x000AA48C File Offset: 0x000A868C
|
|
public void ClearInteractionNodes()
|
|
{
|
|
for (int i = 0; i < this.pickedInteractionNodes.Count; i++)
|
|
{
|
|
if (this.pickedInteractionNodes[i] != null)
|
|
{
|
|
this.pickedInteractionNodes[i].SetFlowerConnectionsPlanning(1, 0, 0);
|
|
}
|
|
}
|
|
this.pickedInteractionNodes.Clear();
|
|
}
|
|
|
|
// Token: 0x060007A6 RID: 1958 RVA: 0x000AA4DC File Offset: 0x000A86DC
|
|
public void QuickSave()
|
|
{
|
|
if (!Records.x.saving)
|
|
{
|
|
if (Records.x.CanSave())
|
|
{
|
|
Records.x.TriggerGlobalSave("QuickSave", true);
|
|
return;
|
|
}
|
|
if (Links.x.options.gameFeedState > 0)
|
|
{
|
|
Links.x.gameFeed.AddFeed("Cannot save at this time");
|
|
return;
|
|
}
|
|
Links.x.gameFeed.ShowNotice("Cannot save at this time");
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007A7 RID: 1959 RVA: 0x000AA550 File Offset: 0x000A8750
|
|
public Vector3 GetHoverPosition()
|
|
{
|
|
if (this.character)
|
|
{
|
|
return this.character.currentPosition;
|
|
}
|
|
if (this.breakable)
|
|
{
|
|
return this.breakable.transform.position;
|
|
}
|
|
if (this.door)
|
|
{
|
|
return this.door.lockColliderPosition;
|
|
}
|
|
if (this.chest)
|
|
{
|
|
return this.chest.gameObject.transform.position;
|
|
}
|
|
return Vector3.zero;
|
|
}
|
|
|
|
// Token: 0x060007A8 RID: 1960 RVA: 0x000AA5D5 File Offset: 0x000A87D5
|
|
private IEnumerator ArcToTarget(Vector3 targetPosition)
|
|
{
|
|
if (this.quickCommandAttack)
|
|
{
|
|
this.GroupCommandAnim("Attack", targetPosition + new Vector3(0f, 2f, 0f));
|
|
}
|
|
else
|
|
{
|
|
targetPosition.y += 0.5f;
|
|
this.GroupCommandAnim("Move", targetPosition + new Vector3(0f, 2f, 0f));
|
|
}
|
|
this.arcTarget = targetPosition;
|
|
Shader.SetGlobalFloat("_LineFade", 1f);
|
|
int num2;
|
|
for (int i = 0; i < this.party.Count; i = num2 + 1)
|
|
{
|
|
Character character = this.party[i];
|
|
if (!character.mainSelected && character.IsSentient())
|
|
{
|
|
Vector3 startPosition = character.body.HeadPosition(-0.25f);
|
|
this.trajectoryModifier = 1;
|
|
this.initialVelocity = 0f;
|
|
Quaternion quaternion = this.GetBearing(startPosition, this.arcTarget);
|
|
if (!this.arcObject)
|
|
{
|
|
this.arcObject = new GameObject("Arc Object");
|
|
}
|
|
this.arcObject.transform.SetParent(base.gameObject.transform);
|
|
this.arcObject.transform.rotation = quaternion;
|
|
LineRenderer line = null;
|
|
if (this.openLineRenderers.Count > 0)
|
|
{
|
|
line = this.openLineRenderers[0];
|
|
this.usedLineRenderers.Add(line);
|
|
this.openLineRenderers.RemoveAt(0);
|
|
line.positionCount = 0;
|
|
}
|
|
else
|
|
{
|
|
GameObject gameObject = Object.Instantiate<GameObject>(this.lineRendererToDrawTrajectory);
|
|
gameObject.transform.SetParent(base.transform);
|
|
line = gameObject.GetComponent<LineRenderer>();
|
|
this.usedLineRenderers.Add(line);
|
|
line.positionCount = 0;
|
|
}
|
|
line.gameObject.SetActive(true);
|
|
float currentTime = -(1f / this.trajectoryPrecision);
|
|
bool hasImpacted = false;
|
|
int num = 0;
|
|
int lineCount = 0;
|
|
int min = 6;
|
|
for (int j = 0; j < this.maximumIterations; j = num2 + 1)
|
|
{
|
|
if (!hasImpacted)
|
|
{
|
|
currentTime += 1f / this.trajectoryPrecision;
|
|
Vector3 vector = startPosition + this.arcObject.transform.forward * this.initialVelocity * currentTime + 0.5f * this.gravity2 * Mathf.Pow(currentTime, 2f);
|
|
if (j > min)
|
|
{
|
|
line.positionCount = lineCount + 1;
|
|
line.SetPosition(lineCount, vector);
|
|
num2 = lineCount;
|
|
lineCount = num2 + 1;
|
|
}
|
|
if ((vector - this.arcTarget).sqrMagnitude < 0.25f)
|
|
{
|
|
hasImpacted = true;
|
|
line.positionCount = lineCount;
|
|
this.prevPos = vector;
|
|
}
|
|
if (num == 30)
|
|
{
|
|
yield return new WaitForSeconds(0.01f);
|
|
num = 0;
|
|
}
|
|
else
|
|
{
|
|
num++;
|
|
}
|
|
}
|
|
num2 = j;
|
|
}
|
|
this.arcObject.transform.rotation = Quaternion.identity;
|
|
startPosition = default(Vector3);
|
|
line = null;
|
|
}
|
|
num2 = i;
|
|
}
|
|
float startValue = 1f;
|
|
float endValue = 0f;
|
|
float timeToLerp = 1.5f;
|
|
float percentage = 0f;
|
|
float startTime = Time.time;
|
|
if (!Records.x.pocketPause)
|
|
{
|
|
timeToLerp = 0.25f;
|
|
}
|
|
while (percentage < 1f)
|
|
{
|
|
percentage = (Time.time - startTime) / timeToLerp;
|
|
float num3 = Mathf.Lerp(startValue, endValue, percentage);
|
|
Shader.SetGlobalFloat("_LineFade", num3);
|
|
yield return null;
|
|
}
|
|
this.ReturnLineRenderers();
|
|
this.arcCorout = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060007A9 RID: 1961 RVA: 0x000AA5EC File Offset: 0x000A87EC
|
|
private Quaternion GetBearing(Vector3 start, Vector3 targetPt)
|
|
{
|
|
this.bearing = Quaternion.Euler(Vector3.zero);
|
|
Vector3 vector = targetPt - start;
|
|
float num = Mathf.Sqrt(Mathf.Pow(vector.x, 2f) + Mathf.Pow(vector.z, 2f));
|
|
float num2 = -vector.y;
|
|
float num3 = this.gravity * (this.gravity * Mathf.Pow(num, 2f) + 2f * num2 * Mathf.Pow(this.initialVelocity, 2f));
|
|
float num4 = Mathf.Sqrt(Mathf.Pow(this.initialVelocity, 4f) - num3);
|
|
bool flag = float.IsNaN(num4);
|
|
if (!flag)
|
|
{
|
|
float num5 = (Mathf.Pow(this.initialVelocity, 2f) + (float)this.trajectoryModifier * num4) / (this.gravity * num);
|
|
float num6 = 57.29578f * Mathf.Atan(num5);
|
|
this.bearing = Quaternion.LookRotation(vector);
|
|
Vector3 eulerAngles = this.bearing.eulerAngles;
|
|
eulerAngles.x = num6;
|
|
this.bearing.eulerAngles = eulerAngles;
|
|
}
|
|
if (flag)
|
|
{
|
|
this.initialVelocity += 1f;
|
|
this.GetBearing(start, targetPt);
|
|
}
|
|
return this.bearing;
|
|
}
|
|
|
|
// Token: 0x060007AA RID: 1962 RVA: 0x000AA720 File Offset: 0x000A8920
|
|
private void ReturnLineRenderers()
|
|
{
|
|
for (int i = 0; i < this.usedLineRenderers.Count; i++)
|
|
{
|
|
this.usedLineRenderers[i].positionCount = 0;
|
|
this.openLineRenderers.Add(this.usedLineRenderers[i]);
|
|
this.usedLineRenderers[i].gameObject.SetActive(false);
|
|
}
|
|
this.usedLineRenderers.Clear();
|
|
}
|
|
|
|
// Token: 0x060007AB RID: 1963 RVA: 0x000AA78E File Offset: 0x000A898E
|
|
public void ClearGroundNodes()
|
|
{
|
|
this.pickedGroundNodes.Clear();
|
|
}
|
|
|
|
// Token: 0x060007AC RID: 1964 RVA: 0x000AA79B File Offset: 0x000A899B
|
|
public void AddGroundNode(GraphNode n)
|
|
{
|
|
this.pickedGroundNodes.Add(n);
|
|
}
|
|
|
|
// Token: 0x060007AD RID: 1965 RVA: 0x000AA7AC File Offset: 0x000A89AC
|
|
public void StartGroundTargetTiles(Character mainCharacter, Vector3 targetNode, bool previewPoints, int radius, float maxRadius)
|
|
{
|
|
if (this.gatherGroundNodesCoroutine == null)
|
|
{
|
|
if (this.clickGroundWait)
|
|
{
|
|
previewPoints = false;
|
|
}
|
|
this.gatherGroundNodesCoroutine = this.GetGroundTargetTiles(mainCharacter, targetNode, previewPoints, radius, maxRadius);
|
|
base.StartCoroutine(this.gatherGroundNodesCoroutine);
|
|
this.clickGroundWait = false;
|
|
return;
|
|
}
|
|
if (!previewPoints)
|
|
{
|
|
if (this.pickedGroundNodes.Count > 0 && mainCharacter.portrait.skillBag.selectedSkillButton && !this.quickGroup)
|
|
{
|
|
if (!this.character)
|
|
{
|
|
int portraitOrder = Links.x.GetPortraitOrder(mainCharacter);
|
|
this.effectTileWaypointAnimators[portraitOrder].Play("Clicked");
|
|
}
|
|
mainCharacter.portrait.skillBag.selectedSkillButton.SetActionAbility();
|
|
Vector3 zero = Vector3.zero;
|
|
mainCharacter.actions.CastSpell(this.character, false, this.pickedGroundNodes[this.pickedGroundNodes.Count - 1], zero, false, false);
|
|
this.ClearEffectTiles(true, null, false);
|
|
this.EndControllerTargeting();
|
|
this.RemoveSpellTargets();
|
|
return;
|
|
}
|
|
this.clickGroundWait = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007AE RID: 1966 RVA: 0x000AA8C4 File Offset: 0x000A8AC4
|
|
private IEnumerator GetGroundTargetTiles(Character mainCharacter, Vector3 targetNodePosition, bool previewPoints, int radius, float sightRadius)
|
|
{
|
|
bool flag = false;
|
|
GraphNode start = null;
|
|
bool inQuickGroup = this.quickGroup;
|
|
if (!mainCharacter)
|
|
{
|
|
flag = true;
|
|
}
|
|
if (!flag)
|
|
{
|
|
bool isCommand = false;
|
|
if (inQuickGroup || Input.GetKey(Links.x.gameplay.keyControl.GetHotkey("Commands")) || this.makeCircleMode)
|
|
{
|
|
isCommand = true;
|
|
}
|
|
if (this.spellTargetingGround)
|
|
{
|
|
isCommand = false;
|
|
}
|
|
if (!previewPoints && !isCommand)
|
|
{
|
|
this.nodeConstraint.constrainWalkability = true;
|
|
this.nodeConstraint.walkable = true;
|
|
this.nodeConstraint.passID = 0;
|
|
this.nodeConstraint.passID2 = 0;
|
|
this.nodeConstraint.constrainTags = false;
|
|
this.nodeConstraint.checkCircleID = 0;
|
|
if (this.currentAbility.Contains("Moss"))
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 3;
|
|
}
|
|
else
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 1;
|
|
if (mainCharacter.sailing)
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 2;
|
|
}
|
|
}
|
|
this.nodeConstraint.constrainPenalty = 0;
|
|
this.nodeConstraint.checkConnections = -1;
|
|
GraphNode node = AstarPath.active.GetNearest(targetNodePosition, this.nodeConstraint).node;
|
|
if (node != null)
|
|
{
|
|
if (Vector3.Distance((Vector3)node.position, mainCharacter.tr.position) > sightRadius)
|
|
{
|
|
this.NoCircle();
|
|
}
|
|
else
|
|
{
|
|
if (!this.character)
|
|
{
|
|
int portraitOrder = Links.x.GetPortraitOrder(mainCharacter);
|
|
if (!this.effectTileWaypointAnimators[portraitOrder].gameObject.activeSelf)
|
|
{
|
|
this.effectTileWaypointAnimators[portraitOrder].gameObject.SetActive(true);
|
|
}
|
|
this.effectTileWaypointAnimators[portraitOrder].Play("Clicked");
|
|
}
|
|
if (!this.pickedGroundNodes.Contains(node))
|
|
{
|
|
this.pickedGroundNodes.Add(node);
|
|
}
|
|
if (!mainCharacter.inAction && !mainCharacter.inRecovery && !mainCharacter.inQueuedAbility && mainCharacter.attackTime >= 1f)
|
|
{
|
|
if (mainCharacter.portrait.skillBag.selectedSkillButton)
|
|
{
|
|
mainCharacter.portrait.skillBag.selectedSkillButton.SetActionAbility();
|
|
}
|
|
Vector3 zero = Vector3.zero;
|
|
mainCharacter.actions.CastSpell(this.character, false, this.pickedGroundNodes[this.pickedGroundNodes.Count - 1], zero, false, false);
|
|
}
|
|
this.ClearGroundNodes();
|
|
this.ClearEffectTiles(true, null, false);
|
|
this.EndControllerTargeting();
|
|
this.RemoveSpellTargets();
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (this.currentAbility.Contains("Moss"))
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 3;
|
|
}
|
|
else
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 1;
|
|
if (mainCharacter.sailing)
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 2;
|
|
}
|
|
}
|
|
this.nodeConstraint.constrainTags = false;
|
|
this.nodeConstraint.checkCircleID = 0;
|
|
this.nodeConstraint.passID = 0;
|
|
this.nodeConstraint.passID2 = 0;
|
|
this.nodeConstraint.constrainPenalty = 0;
|
|
this.nodeConstraint.checkConnections = 0;
|
|
this.nodeConstraint.constrainToArea = -1;
|
|
GraphNode node2 = AstarPath.active.GetNearest(targetNodePosition, this.nodeConstraint).node;
|
|
if (node2 != null)
|
|
{
|
|
start = node2;
|
|
}
|
|
else
|
|
{
|
|
flag = true;
|
|
}
|
|
if (start != null)
|
|
{
|
|
Vector3 vector = (Vector3)start.position;
|
|
if (Vector3.Distance(vector, mainCharacter.tr.position) > sightRadius)
|
|
{
|
|
if (!previewPoints)
|
|
{
|
|
this.NoCircle();
|
|
}
|
|
this.ClearEffectTiles(false, null, false);
|
|
this.ClearWaypointEffect(mainCharacter);
|
|
if (!this.effectTileTooFar.activeSelf)
|
|
{
|
|
this.effectTileTooFar.SetActive(true);
|
|
}
|
|
this.effectTileTooFar.transform.position = vector;
|
|
RaycastHit raycastHit;
|
|
if (Physics.SphereCast(this.effectTileTooFar.transform.position + new Vector3(0f, 3f, 0f), 0.15f, Vector3.up * -1f, out raycastHit, 10f, 4194449))
|
|
{
|
|
Quaternion quaternion = Quaternion.Euler(Quaternion.FromToRotation(Vector3.up, raycastHit.normal).eulerAngles);
|
|
this.effectTileTooFar.transform.rotation = quaternion;
|
|
this.effectTileTooFar.transform.GetChild(0).localRotation = Quaternion.Euler(new Vector3(0f, 0f, 0f));
|
|
}
|
|
}
|
|
else
|
|
{
|
|
float num = (float)radius;
|
|
this.ClearGroundNodes();
|
|
float max = (num * Records.x.nodeSize + 0.05f) * (num * Records.x.nodeSize + 0.05f);
|
|
if (!flag && Links.x.gaia.pathfindingReady)
|
|
{
|
|
ConstantPath constPath = null;
|
|
this.nodeConstraint.constrainWalkability = false;
|
|
constPath = ConstantPath.ConstructFast(start, Records.x.GetConstantPathRadius(radius), null);
|
|
constPath.nnConstraint = this.nodeConstraint;
|
|
AstarPath.StartPath(constPath, false);
|
|
yield return base.StartCoroutine(constPath.WaitForPath());
|
|
this.nodeConstraint.constrainWalkability = true;
|
|
constPath.Claim(this);
|
|
this.allNodes = constPath.allNodes;
|
|
int count = this.allNodes.Count;
|
|
Vector3 position = mainCharacter.tr.position;
|
|
vector = (Vector3)start.position;
|
|
Vector3 vector2 = vector;
|
|
Vector3 vector3 = vector;
|
|
if (position != vector)
|
|
{
|
|
vector2 += Quaternion.LookRotation(position - vector) * Vector3.forward * -3.5f;
|
|
vector3 += Quaternion.LookRotation(position - vector) * Vector3.forward * 3.5f;
|
|
}
|
|
float sqrMagnitude = (position - vector2).sqrMagnitude;
|
|
float sqrMagnitude2 = (position - vector3).sqrMagnitude;
|
|
int num2 = 0;
|
|
bool flag2 = false;
|
|
if (this.currentAbility.Contains("VineWall"))
|
|
{
|
|
flag2 = true;
|
|
}
|
|
if (isCommand)
|
|
{
|
|
this.allNodesTaken.Clear();
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
this.allNodesTaken.Add(0);
|
|
}
|
|
for (int j = 0; j < 10; j++)
|
|
{
|
|
float num3 = 3f;
|
|
if (j == 1)
|
|
{
|
|
num3 = 3.6f;
|
|
}
|
|
if (j == 2)
|
|
{
|
|
num3 = 5.1f;
|
|
}
|
|
if (j == 3)
|
|
{
|
|
num3 = 7.1f;
|
|
}
|
|
if (j == 4)
|
|
{
|
|
num3 = 7.6f;
|
|
}
|
|
if (j == 5)
|
|
{
|
|
num3 = 10.6f;
|
|
}
|
|
if (j == 6)
|
|
{
|
|
num3 = 10.1f;
|
|
}
|
|
if (j == 7)
|
|
{
|
|
num3 = 14.1f;
|
|
}
|
|
if (j == 8)
|
|
{
|
|
num3 = 12.6f;
|
|
}
|
|
if (j == 9)
|
|
{
|
|
num3 = 17.6f;
|
|
}
|
|
float num4 = num3 * num3;
|
|
for (int k = 0; k < count; k++)
|
|
{
|
|
if (this.allNodesTaken[k] == 0 && (j <= 0 || num2 < 9) && ((Vector3)this.allNodes[k].position - vector).sqrMagnitude < num4 && this.allNodes[k].circle <= 1)
|
|
{
|
|
num2++;
|
|
this.pickedGroundNodes.Add(this.allNodes[k]);
|
|
this.allNodesTaken[k] = 1;
|
|
}
|
|
}
|
|
}
|
|
this.allNodesTaken.Clear();
|
|
int count2 = this.pickedGroundNodes.Count;
|
|
for (int l = 0; l < count2; l++)
|
|
{
|
|
this.allNodesTaken.Add(0);
|
|
}
|
|
for (int m = 0; m < count2; m++)
|
|
{
|
|
Vector3 vector4 = (Vector3)this.pickedGroundNodes[m].position;
|
|
bool flag3 = false;
|
|
for (int n = 0; n < count2; n++)
|
|
{
|
|
if (!flag3)
|
|
{
|
|
Vector3 vector5 = (Vector3)this.pickedGroundNodes[n].position;
|
|
vector5.y = vector4.y;
|
|
if ((vector5 - vector4).sqrMagnitude < 16f)
|
|
{
|
|
flag3 = true;
|
|
}
|
|
}
|
|
}
|
|
if (!flag3)
|
|
{
|
|
this.allNodesTaken[m] = 1;
|
|
}
|
|
}
|
|
bool flag4 = false;
|
|
for (int num5 = 0; num5 < count2; num5++)
|
|
{
|
|
if (this.allNodesTaken[num5] == 1)
|
|
{
|
|
this.pickedGroundNodes[num5] = null;
|
|
flag4 = true;
|
|
}
|
|
}
|
|
if (flag4)
|
|
{
|
|
this.pickedGroundNodes.RemoveAll((GraphNode item) => item == null);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
for (int num6 = 0; num6 < count; num6++)
|
|
{
|
|
if (((Vector3)this.allNodes[num6].position - vector).sqrMagnitude < max)
|
|
{
|
|
if (flag2)
|
|
{
|
|
float sqrMagnitude3 = ((Vector3)this.allNodes[num6].position - position).sqrMagnitude;
|
|
if (sqrMagnitude3 >= sqrMagnitude2 && sqrMagnitude3 <= sqrMagnitude)
|
|
{
|
|
this.pickedGroundNodes.Add(this.allNodes[num6]);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
num2++;
|
|
this.pickedGroundNodes.Add(this.allNodes[num6]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
int num7 = this.pickedGroundNodes.IndexOf(start);
|
|
if (num7 > -1)
|
|
{
|
|
this.pickedGroundNodes.RemoveAt(num7);
|
|
}
|
|
constPath.Release(this, false);
|
|
constPath = null;
|
|
}
|
|
if (this.spellTargetingGround)
|
|
{
|
|
int portraitOrder2 = Links.x.GetPortraitOrder(mainCharacter);
|
|
if (!this.effectTileWaypoints[portraitOrder2].activeSelf)
|
|
{
|
|
this.effectTileWaypoints[portraitOrder2].SetActive(true);
|
|
}
|
|
this.effectTileWaypoints[portraitOrder2].transform.position = vector;
|
|
if (this.character)
|
|
{
|
|
this.effectTileWaypoints[portraitOrder2].transform.position = this.farPosition;
|
|
}
|
|
else
|
|
{
|
|
this.effectTileWaypoints[portraitOrder2].transform.position = vector;
|
|
}
|
|
if (this.effectTileTooFar.activeSelf)
|
|
{
|
|
this.effectTileTooFar.SetActive(false);
|
|
}
|
|
RaycastHit raycastHit2;
|
|
if (Physics.SphereCast(this.effectTileWaypoints[portraitOrder2].transform.position + new Vector3(0f, 3f, 0f), 0.15f, Vector3.up * -1f, out raycastHit2, 10f, 4194449))
|
|
{
|
|
Quaternion quaternion2 = Quaternion.Euler(Quaternion.FromToRotation(Vector3.up, raycastHit2.normal).eulerAngles);
|
|
this.effectTileWaypoints[portraitOrder2].transform.rotation = quaternion2;
|
|
this.effectTileWaypoints[portraitOrder2].transform.GetChild(0).localRotation = Quaternion.Euler(new Vector3(0f, 0f, 0f));
|
|
}
|
|
}
|
|
else if (this.effectTileTooFar.activeSelf)
|
|
{
|
|
this.effectTileTooFar.SetActive(false);
|
|
}
|
|
if (!previewPoints && !isCommand)
|
|
{
|
|
if (!this.character)
|
|
{
|
|
int portraitOrder3 = Links.x.GetPortraitOrder(mainCharacter);
|
|
this.effectTileWaypointAnimators[portraitOrder3].Play("Clicked");
|
|
}
|
|
if (!this.pickedGroundNodes.Contains(start))
|
|
{
|
|
this.pickedGroundNodes.Add(start);
|
|
}
|
|
if (!mainCharacter.inAction && !mainCharacter.inRecovery && !mainCharacter.inQueuedAbility && mainCharacter.attackTime >= 1f)
|
|
{
|
|
mainCharacter.portrait.skillBag.selectedSkillButton.SetActionAbility();
|
|
Vector3 zero2 = Vector3.zero;
|
|
mainCharacter.actions.CastSpell(this.character, false, this.pickedGroundNodes[this.pickedGroundNodes.Count - 1], zero2, false, false);
|
|
}
|
|
this.ClearGroundNodes();
|
|
this.ClearEffectTiles(true, null, false);
|
|
this.EndControllerTargeting();
|
|
this.spellTargetingGround = false;
|
|
this.spellcasting = false;
|
|
this.throwingElixir = false;
|
|
}
|
|
else if (previewPoints)
|
|
{
|
|
if (isCommand)
|
|
{
|
|
this.pickedGroundNodes.Add(start);
|
|
}
|
|
Vector3 vector6 = new Vector3(0f, 0.3f, 0f);
|
|
for (int num8 = 0; num8 < this.pickedGroundNodes.Count; num8++)
|
|
{
|
|
if (this.spellTargetingGround || isCommand)
|
|
{
|
|
int count3 = this.effectTiles.Count;
|
|
GameObject gameObject;
|
|
if (num8 < count3)
|
|
{
|
|
gameObject = this.effectTiles[num8];
|
|
}
|
|
else
|
|
{
|
|
gameObject = Links.x.cellar.GetPooledGameObject(11);
|
|
this.effectTiles.Add(gameObject);
|
|
}
|
|
if (!gameObject.activeSelf)
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
gameObject.transform.position = (Vector3)this.pickedGroundNodes[num8].position + vector6;
|
|
}
|
|
}
|
|
}
|
|
if (this.effectTiles.Count > this.pickedGroundNodes.Count)
|
|
{
|
|
for (int num9 = 0; num9 < this.effectTiles.Count; num9++)
|
|
{
|
|
if (num9 >= this.pickedGroundNodes.Count && this.effectTiles[num9].activeSelf)
|
|
{
|
|
this.effectTiles[num9].SetActive(false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (Links.x.pocketWheel.selected == "Command Group" || inQuickGroup || this.makeCircleMode)
|
|
{
|
|
if (Time.timeSinceLevelLoad > this.foundGroupTime + 0.2f || this.foundGroupTime == 0f)
|
|
{
|
|
this.circleTiles.Clear();
|
|
for (int num10 = 0; num10 < this.pickedGroundNodes.Count; num10++)
|
|
{
|
|
this.circleTiles.Add(this.pickedGroundNodes[num10]);
|
|
}
|
|
if (!this.circleTiles.Contains(start))
|
|
{
|
|
this.circleTiles.Add(start);
|
|
}
|
|
}
|
|
if (this.pickedGroundNodes.Count > 0)
|
|
{
|
|
if (!this.attackDirection.activeSelf && !this.uiHover && (Links.x.gameplay.seconds > Links.x.fellowship.timeToNextCircle + Links.x.fellowship.circleRecoverTime || Links.x.fellowship.timeToNextCircle == 0f))
|
|
{
|
|
this.attackDirection.SetActive(true);
|
|
}
|
|
if (this.joy)
|
|
{
|
|
this.attackDirection.transform.position = (Vector3)start.position + new Vector3(0f, 0.2f, 0f);
|
|
}
|
|
else
|
|
{
|
|
this.attackDirection.transform.position = targetNodePosition + new Vector3(0f, 0.2f, 0f);
|
|
}
|
|
Quaternion quaternion3 = this.attackDirection.transform.rotation;
|
|
if (this.defenseCircleRotation != Quaternion.identity && Time.timeSinceLevelLoad >= this.defenseHoldTime + 0.3f)
|
|
{
|
|
quaternion3 = this.defenseCircleRotation;
|
|
}
|
|
else
|
|
{
|
|
Vector3 vector7 = this.NearestEnemyClump(true, Links.x.main);
|
|
if (vector7 == Vector3.zero)
|
|
{
|
|
vector7 = Links.x.main.currentPosition;
|
|
}
|
|
if (vector7 != (Vector3)start.position)
|
|
{
|
|
quaternion3 = Quaternion.LookRotation(vector7 - (Vector3)start.position);
|
|
}
|
|
if (this.joy)
|
|
{
|
|
this.defenseCircleRotation = quaternion3;
|
|
}
|
|
}
|
|
this.attackDirection.transform.rotation = quaternion3;
|
|
if (this.mk)
|
|
{
|
|
if ((Input.GetMouseButton(0) || Input.GetMouseButtonUp(0)) && Time.timeSinceLevelLoad > this.defenseHoldTime + 0.3f)
|
|
{
|
|
if ((this.mousePoint - targetNodePosition).sqrMagnitude > 0.25f)
|
|
{
|
|
quaternion3 = Quaternion.LookRotation(this.mousePoint - targetNodePosition);
|
|
}
|
|
this.defenseCircleRotation = quaternion3;
|
|
}
|
|
}
|
|
else if (Mathf.Abs(Links.x.fellowship.direction.magnitude) > 0.1f)
|
|
{
|
|
float y = Links.x.worldCamera.transform.rotation.eulerAngles.y;
|
|
float num11 = Mathf.Atan2(Links.x.fellowship.direction.x, Links.x.fellowship.direction.y) / 3.1415927f * 180f;
|
|
if (num11 < 0f)
|
|
{
|
|
num11 += 360f;
|
|
}
|
|
quaternion3 = Quaternion.Euler(new Vector3(0f, num11 + y, 0f));
|
|
this.defenseCircleRotation = quaternion3;
|
|
}
|
|
RaycastHit raycastHit3;
|
|
if (Physics.Raycast(targetNodePosition + new Vector3(0f, 3f, 0f), Vector3.up * -1f, out raycastHit3, 10f, 4194449))
|
|
{
|
|
Quaternion quaternion4 = Quaternion.FromToRotation(mainCharacter.tr.up, raycastHit3.normal);
|
|
this.attackDirection.transform.rotation = quaternion4 * quaternion3;
|
|
}
|
|
if (!previewPoints || this.clickGroundWait)
|
|
{
|
|
this.EndGroupCircle(targetNodePosition);
|
|
this.clickGroundWait = false;
|
|
}
|
|
}
|
|
}
|
|
this.gatherGroundNodesCoroutine = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060007AF RID: 1967 RVA: 0x000AA8F8 File Offset: 0x000A8AF8
|
|
private void NoCircle()
|
|
{
|
|
}
|
|
|
|
// Token: 0x060007B0 RID: 1968 RVA: 0x000AA8FC File Offset: 0x000A8AFC
|
|
public void EndCircleMode()
|
|
{
|
|
if (this.makeCircleMode)
|
|
{
|
|
this.makeCircleMode = false;
|
|
if (!Records.x.circle)
|
|
{
|
|
Links.x.hudControl.SetFalseStayBack();
|
|
}
|
|
if (this.messageDefenseHoldQuickMK.activeSelf)
|
|
{
|
|
this.messageDefenseHoldQuickAnimMK.Play("ControlsSlideOutMK");
|
|
}
|
|
this.attackDirection.SetActive(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007B1 RID: 1969 RVA: 0x000AA95C File Offset: 0x000A8B5C
|
|
private void EndGroupCircle(Vector3 clampedPoint)
|
|
{
|
|
if (this.messageDefenseHoldQuickMK.activeSelf)
|
|
{
|
|
this.messageDefenseHoldQuickAnimMK.Play("ControlsSlideOutMK");
|
|
}
|
|
this.attackDirection.SetActive(false);
|
|
if (Links.x.gameplay.seconds < Links.x.fellowship.timeToNextCircle + Links.x.fellowship.circleRecoverTime)
|
|
{
|
|
this.NoCircle();
|
|
this.EndCircleMode();
|
|
return;
|
|
}
|
|
Records.x.circle = true;
|
|
this.EndCircleMode();
|
|
Links.x.hudControl.SetTrueStayBack();
|
|
Vector3 vector = clampedPoint + this.attackDirection.transform.rotation * Vector3.forward * 10f;
|
|
this.middleCircle = clampedPoint;
|
|
Vector3 vector2 = clampedPoint + this.attackDirection.transform.rotation * Vector3.forward * -10f;
|
|
float num = float.PositiveInfinity;
|
|
float num2 = float.PositiveInfinity;
|
|
for (int i = 0; i < this.circleTiles.Count; i++)
|
|
{
|
|
if (this.circleTiles[i] != null)
|
|
{
|
|
float num3 = ((Vector3)this.circleTiles[i].position - vector).sqrMagnitude;
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
this.frontOfCircle = (Vector3)this.circleTiles[i].position;
|
|
}
|
|
num3 = ((Vector3)this.circleTiles[i].position - vector2).sqrMagnitude;
|
|
if (num3 < num2)
|
|
{
|
|
num2 = num3;
|
|
this.backOfCircle = (Vector3)this.circleTiles[i].position;
|
|
}
|
|
}
|
|
}
|
|
Shader.SetGlobalVector("_FrontOfCircle", this.frontOfCircle);
|
|
this.circleRotation = this.attackDirection.transform.rotation;
|
|
this.foundGroupTime = Time.timeSinceLevelLoad;
|
|
Links.x.cameraEffects.ClearPartyGroupTiles();
|
|
Links.x.fellowship.StartCircle(clampedPoint);
|
|
this.clickedCharacter = null;
|
|
Links.x.gameplay.StoneSoundQuieter();
|
|
Links.x.fellowship.MakeWaypoints(clampedPoint, null, false, false);
|
|
this.ClearGroundNodes();
|
|
for (int j = 0; j < this.party.Count; j++)
|
|
{
|
|
Character character = this.party[j];
|
|
if (character.commandMove != null)
|
|
{
|
|
character.commandMove = null;
|
|
character.ClearNodePath();
|
|
if (character.waypoint)
|
|
{
|
|
character.waypoint.transform.position = this.farPosition;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007B2 RID: 1970 RVA: 0x000AAC10 File Offset: 0x000A8E10
|
|
public void CircleFromLoad(Vector3 clampedPoint, Vector3 point1, Vector3 point2, Vector3 point3, Vector3 point4, Vector3 point5, Vector3 point6, Vector3 point7, Vector3 point8, Vector3 point9, Vector3 rot)
|
|
{
|
|
this.circleTiles.Clear();
|
|
GraphNode graphNode = Links.x.fellowship.NearNode(point1, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
if (point2 != Vector3.zero)
|
|
{
|
|
graphNode = Links.x.fellowship.NearNode(point2, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
}
|
|
if (point3 != Vector3.zero)
|
|
{
|
|
graphNode = Links.x.fellowship.NearNode(point3, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
}
|
|
if (point4 != Vector3.zero)
|
|
{
|
|
graphNode = Links.x.fellowship.NearNode(point4, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
}
|
|
if (point5 != Vector3.zero)
|
|
{
|
|
graphNode = Links.x.fellowship.NearNode(point5, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
}
|
|
if (point6 != Vector3.zero)
|
|
{
|
|
graphNode = Links.x.fellowship.NearNode(point6, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
}
|
|
if (point7 != Vector3.zero)
|
|
{
|
|
graphNode = Links.x.fellowship.NearNode(point7, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
}
|
|
if (point8 != Vector3.zero)
|
|
{
|
|
graphNode = Links.x.fellowship.NearNode(point8, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
}
|
|
if (point9 != Vector3.zero)
|
|
{
|
|
graphNode = Links.x.fellowship.NearNode(point9, false, false, false, 0, -1);
|
|
if (graphNode != null)
|
|
{
|
|
this.circleTiles.Add(graphNode);
|
|
}
|
|
}
|
|
Links.x.hudControl.SetTrueStayBack();
|
|
Vector3 vector = clampedPoint + this.attackDirection.transform.rotation * Vector3.forward * 10f;
|
|
this.middleCircle = clampedPoint;
|
|
Vector3 vector2 = clampedPoint + this.attackDirection.transform.rotation * Vector3.forward * -10f;
|
|
float num = float.PositiveInfinity;
|
|
float num2 = float.PositiveInfinity;
|
|
for (int i = 0; i < this.circleTiles.Count; i++)
|
|
{
|
|
if (this.circleTiles[i] != null)
|
|
{
|
|
float num3 = ((Vector3)this.circleTiles[i].position - vector).sqrMagnitude;
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
this.frontOfCircle = (Vector3)this.circleTiles[i].position;
|
|
}
|
|
num3 = ((Vector3)this.circleTiles[i].position - vector2).sqrMagnitude;
|
|
if (num3 < num2)
|
|
{
|
|
num2 = num3;
|
|
this.backOfCircle = (Vector3)this.circleTiles[i].position;
|
|
}
|
|
}
|
|
}
|
|
this.foundGroupTime = Time.timeSinceLevelLoad;
|
|
this.circleRotation = Quaternion.Euler(rot);
|
|
Links.x.cameraEffects.ClearPartyGroupTiles();
|
|
Links.x.fellowship.StartCircle(clampedPoint);
|
|
}
|
|
|
|
// Token: 0x060007B3 RID: 1971 RVA: 0x000AAF69 File Offset: 0x000A9169
|
|
public void BreakCircle()
|
|
{
|
|
this.circleBreakObject.SetActive(false);
|
|
Links.x.cameraEffects.ClearPartyGroupTiles();
|
|
}
|
|
|
|
// Token: 0x060007B4 RID: 1972 RVA: 0x000AAF86 File Offset: 0x000A9186
|
|
public void GroupCommandAnim(string type, Vector3 pt)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060007B5 RID: 1973 RVA: 0x000AAF88 File Offset: 0x000A9188
|
|
public Vector3 NearestEnemyClump(bool lookForNPCs, Character main)
|
|
{
|
|
Vector3 vector = Vector3.zero;
|
|
if (this.combatCharacters == null)
|
|
{
|
|
this.combatCharacters = Links.x.diorama.characters;
|
|
}
|
|
int num = this.combatCharacters.Count;
|
|
this.clumps.Clear();
|
|
this.characters.Clear();
|
|
float num2 = 49f;
|
|
Vector3 currentPosition = main.currentPosition;
|
|
Vector3 vector2 = Vector3.zero;
|
|
float num3 = 30f;
|
|
for (int i = 0; i < num; i++)
|
|
{
|
|
Character character = this.combatCharacters[i];
|
|
if (character)
|
|
{
|
|
bool flag = false;
|
|
if (lookForNPCs && !character.dead && !character.stunned && (character.hostility >= 2 || character.attackingUntilBribe) && !character.inactive && character.npc)
|
|
{
|
|
flag = true;
|
|
}
|
|
if (!lookForNPCs && !character.dead && !character.stunned && !character.inactive && (!character.npc || main.stats.IsTargetAnEnemy(character.stats.allegiance)))
|
|
{
|
|
flag = true;
|
|
}
|
|
if (flag)
|
|
{
|
|
vector2 = character.currentPosition;
|
|
if (this.SubtractVectors(vector2, currentPosition).sqrMagnitude < num3 * num3)
|
|
{
|
|
this.characters.Add(character);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
num = this.characters.Count;
|
|
for (int j = 0; j < num; j++)
|
|
{
|
|
Character character = this.characters[j];
|
|
vector2 = character.currentPosition;
|
|
int num4 = 1;
|
|
for (int k = 0; k < num; k++)
|
|
{
|
|
if (k != j && this.SubtractVectors(vector2, this.characters[k].currentPosition).sqrMagnitude <= num2)
|
|
{
|
|
num4++;
|
|
}
|
|
}
|
|
this.clumps.Add(num4);
|
|
}
|
|
int num5 = 0;
|
|
for (int l = 0; l < num; l++)
|
|
{
|
|
if (this.clumps[l] > num5)
|
|
{
|
|
num5 = this.clumps[l];
|
|
vector2 = this.characters[l].currentPosition;
|
|
}
|
|
}
|
|
int num6 = 0;
|
|
float num7 = 49f;
|
|
for (int m = 0; m < num; m++)
|
|
{
|
|
if (this.SubtractVectors(vector2, this.characters[m].currentPosition).sqrMagnitude <= num7)
|
|
{
|
|
vector += this.characters[m].currentPosition;
|
|
num6++;
|
|
}
|
|
}
|
|
if (vector != Vector3.zero)
|
|
{
|
|
vector /= (float)num6;
|
|
}
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x060007B6 RID: 1974 RVA: 0x000AB214 File Offset: 0x000A9414
|
|
private void SetControllerTargetingPosition(Vector3 position)
|
|
{
|
|
if (this.currentAbility.Contains("Moss"))
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 3;
|
|
}
|
|
else
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 1;
|
|
if (Links.x.main.sailing)
|
|
{
|
|
this.nodeConstraint.constrainToEnvironment = 2;
|
|
}
|
|
}
|
|
this.nodeConstraint.constrainTags = false;
|
|
this.nodeConstraint.checkCircleID = 0;
|
|
this.nodeConstraint.passID = 0;
|
|
this.nodeConstraint.passID2 = 0;
|
|
this.nodeConstraint.constrainPenalty = 0;
|
|
this.nodeConstraint.checkConnections = 0;
|
|
this.nodeConstraint.constrainToArea = -1;
|
|
GraphNode node = AstarPath.active.GetNearest(position, this.nodeConstraint).node;
|
|
if (node != null)
|
|
{
|
|
this.groundTargetingWaypoint.transform.position = (Vector3)node.position;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007B7 RID: 1975 RVA: 0x000AB2F4 File Offset: 0x000A94F4
|
|
public void StartControllerTargeting()
|
|
{
|
|
if (!this.makeCircleMode)
|
|
{
|
|
this.groundTargetingWaypoint.SetActive(true);
|
|
}
|
|
this.SetControllerTargetingPosition(Links.x.main.tr.position + Links.x.main.tr.forward * 4f);
|
|
this.joyPosition = Links.x.main.tr.position;
|
|
}
|
|
|
|
// Token: 0x060007B8 RID: 1976 RVA: 0x000AB36C File Offset: 0x000A956C
|
|
public void EndControllerTargeting()
|
|
{
|
|
this.groundTargetingWaypoint.SetActive(false);
|
|
}
|
|
|
|
// Token: 0x060007B9 RID: 1977 RVA: 0x000AB37C File Offset: 0x000A957C
|
|
public void GetDistances(Character pathfinder, Character target, out float bestDistance, out float maxDistance, out float minDistance)
|
|
{
|
|
bestDistance = (pathfinder.invRow1._MeleeRangeEnd * Records.x.nodeSize + pathfinder.attackRadius + target.attackRadius - 0.65f) * (pathfinder.invRow1._MeleeRangeEnd * Records.x.nodeSize + pathfinder.attackRadius + target.attackRadius - 0.65f);
|
|
maxDistance = (pathfinder.invRow1._MeleeRangeEnd * Records.x.nodeSize + pathfinder.attackRadius + target.attackRadius) * (pathfinder.invRow1._MeleeRangeEnd * Records.x.nodeSize + pathfinder.attackRadius + target.attackRadius);
|
|
minDistance = (pathfinder.invRow1._MeleeRangeStart * Records.x.nodeSize + pathfinder.attackRadius + target.attackRadius) * (pathfinder.invRow1._MeleeRangeStart * Records.x.nodeSize + pathfinder.attackRadius + target.attackRadius);
|
|
if (minDistance == maxDistance || pathfinder.invRow1._MeleeRangeStart == 0f)
|
|
{
|
|
minDistance = 0f;
|
|
}
|
|
if (bestDistance < minDistance)
|
|
{
|
|
bestDistance = minDistance;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007BA RID: 1978 RVA: 0x000AB4A6 File Offset: 0x000A96A6
|
|
public void AddLevelUp(Character character, int skillIndex)
|
|
{
|
|
this.levelUpCharacters.Add(character);
|
|
this.levelUpSkills.Add(skillIndex);
|
|
}
|
|
|
|
// Token: 0x060007BB RID: 1979 RVA: 0x000AB4C0 File Offset: 0x000A96C0
|
|
public void AddNeedsPath(Character addCharacter, bool topOfList)
|
|
{
|
|
if (addCharacter.npc)
|
|
{
|
|
if (this.needsPath.IndexOf(addCharacter) == -1)
|
|
{
|
|
if (topOfList)
|
|
{
|
|
this.needsPath.Insert(0, addCharacter);
|
|
return;
|
|
}
|
|
this.needsPath.Add(addCharacter);
|
|
return;
|
|
}
|
|
}
|
|
else if (this.needsPathParty.IndexOf(addCharacter) == -1)
|
|
{
|
|
if (topOfList)
|
|
{
|
|
this.needsPathParty.Insert(0, addCharacter);
|
|
return;
|
|
}
|
|
this.needsPathParty.Add(addCharacter);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007BC RID: 1980 RVA: 0x000AB530 File Offset: 0x000A9730
|
|
public void RemoveNeedsPath(Character c)
|
|
{
|
|
for (int i = 0; i < this.needsPath.Count; i++)
|
|
{
|
|
if (this.needsPath[i] == c)
|
|
{
|
|
this.needsPath[i] = null;
|
|
}
|
|
}
|
|
this.needsPath.RemoveAll((Character item) => item == null);
|
|
}
|
|
|
|
// Token: 0x060007BD RID: 1981 RVA: 0x000AB5A0 File Offset: 0x000A97A0
|
|
public bool InPathQueue(Character c)
|
|
{
|
|
for (int i = 0; i < this.needsPath.Count; i++)
|
|
{
|
|
if (this.needsPath[i] == c)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// Token: 0x060007BE RID: 1982 RVA: 0x000AB5DC File Offset: 0x000A97DC
|
|
public void CloseAllMenus()
|
|
{
|
|
Links.x.tooltip.EndHoverText(null, true);
|
|
if (Links.x.options.contents1.activeSelf)
|
|
{
|
|
Links.x.options.StartEndMenu(true);
|
|
return;
|
|
}
|
|
for (int i = this.openMenus.Count - 1; i >= 0; i--)
|
|
{
|
|
if (this.openMenus[i] == Links.x.formation.gameObject)
|
|
{
|
|
Links.x.formation.StartEndMenu(false);
|
|
return;
|
|
}
|
|
if (Links.x.characterSheet.levelUpMenu && this.openMenus[i] == Links.x.characterSheet.levelUpMenu.gameObject)
|
|
{
|
|
Links.x.characterSheet.levelUpMenu.CloseMenu();
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.characterSheet.gameObject)
|
|
{
|
|
Links.x.characterSheet.StartEndMenu(false, false);
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.forfeits.gameObject)
|
|
{
|
|
Links.x.forfeits.CloseMenu(false);
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.inventory.enchantMenu)
|
|
{
|
|
Links.x.inventory.enchantMenu.CloseMenu();
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.saveLoad.gameObject && !Links.x.saveLoad.characterDead)
|
|
{
|
|
Links.x.saveLoad.StartEndMenu(false);
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.sceneMap.gameObject)
|
|
{
|
|
Links.x.sceneMap.StartEndMenu(false);
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.journal.gameObject)
|
|
{
|
|
Links.x.journal.StartEndMenu(false);
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.hudControl.tipsMenu)
|
|
{
|
|
Links.x.hudControl.CloseTips();
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.forfeits.gameObject)
|
|
{
|
|
Links.x.forfeits.CloseMenu(false);
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.spellcrafting.gameObject)
|
|
{
|
|
Links.x.spellcrafting.StartEndMenu(false);
|
|
return;
|
|
}
|
|
if (this.openMenus[i] == Links.x.rest.gameObject)
|
|
{
|
|
Links.x.rest.CloseMenu(false);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007BF RID: 1983 RVA: 0x000AB8D8 File Offset: 0x000A9AD8
|
|
public void SetControlsText(bool pocketTextOnly)
|
|
{
|
|
if (!Links.x.main)
|
|
{
|
|
return;
|
|
}
|
|
this.controllerName = "Xbox_Icons";
|
|
this.controllers = Input.GetJoystickNames();
|
|
if (this.controllers != null && this.controllers.Length != 0 && this.playerInput.devices.Count > 0)
|
|
{
|
|
string text = "Controllers: ";
|
|
InputDevice inputDevice = this.playerInput.devices[0];
|
|
Debug.Log(text + ((inputDevice != null) ? inputDevice.ToString() : null));
|
|
}
|
|
bool flag = false;
|
|
this.currentSpriteSheetAsset = 0;
|
|
foreach (string text2 in this.controllers)
|
|
{
|
|
if (!flag && this.joy)
|
|
{
|
|
Debug.Log("Controller name " + text2);
|
|
if (!Records.x.steamDeck && (text2.ToLower().Contains("box") || text2.ToLower().Contains("xinput")))
|
|
{
|
|
this.controllerName = "Xbox_Icons";
|
|
this.currentSpriteSheetAsset = 1;
|
|
flag = true;
|
|
}
|
|
else if (!Records.x.steamDeck && (text2.ToLower().Contains("tation") || text2.ToLower().Contains("dual")))
|
|
{
|
|
this.controllerName = "Playstation_Icons";
|
|
this.currentSpriteSheetAsset = 2;
|
|
flag = true;
|
|
}
|
|
else if (!Records.x.steamDeck && (text2.ToLower().Contains("witch") || text2.ToLower().Contains("pro")))
|
|
{
|
|
this.controllerName = "Switch_Icons";
|
|
this.currentSpriteSheetAsset = 3;
|
|
flag = true;
|
|
}
|
|
else if (text2.ToLower().Contains("team") || Records.x.steamDeck)
|
|
{
|
|
this.controllerName = "SteamDeck_Icons";
|
|
this.currentSpriteSheetAsset = 4;
|
|
flag = true;
|
|
}
|
|
else
|
|
{
|
|
this.controllerName = "Xbox_Icons";
|
|
this.currentSpriteSheetAsset = 1;
|
|
flag = true;
|
|
}
|
|
}
|
|
}
|
|
if (!Links.x.gaia.sceneLoaded && this.joy && this.controllers.Length != 0)
|
|
{
|
|
Links.x.hudControl.SwitchController(true);
|
|
}
|
|
this.joystickTargetIcon.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
Links.x.partyColliderAdventure.UpdateControlsText();
|
|
Links.x.hudControl.Controller();
|
|
this.skipTxt.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.str.Clear();
|
|
this.str.Append("Cancel ");
|
|
this.str.Append(" <voffset=.4em><size=50><sprite=");
|
|
if (Links.x.mk)
|
|
{
|
|
int keyIconIndex = Links.x.keyControl.GetKeyIconIndex("RMB");
|
|
this.str.Append(keyIconIndex);
|
|
this.str.Append("></size></voffset>");
|
|
}
|
|
else
|
|
{
|
|
int controllerSprite = Links.x.gameplay.GetControllerSprite("Cancel", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite);
|
|
this.str.Append("></size></voffset>");
|
|
}
|
|
this.skipTxt.text = this.str.ToString();
|
|
this.SetConfirmText("Confirm");
|
|
bool flag2 = this.mk;
|
|
if (!pocketTextOnly)
|
|
{
|
|
if (this.joy)
|
|
{
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
int num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Exit");
|
|
this.exitMenuText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Continue");
|
|
this.continueText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Return");
|
|
this.exitText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Cancel");
|
|
this.cancelText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Joystick", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Navigate ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Select Letter ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Done");
|
|
this.keyboardText2 = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Joystick", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Navigate ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Select Letter ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Continue");
|
|
this.keyboardText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Joystick", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Navigate ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Select Letter ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Cancel ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("BtnNorth", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Confirm");
|
|
this.keyboardText3 = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=30><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>to label");
|
|
this.pinOpenText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Joystick", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset><cspace=.5em></cspace>Move Item ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset><cspace=.5em></cspace>Place Item");
|
|
this.dragJoystickText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Start Dragging");
|
|
this.formationText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.itemHoverText = this.str.ToString();
|
|
this.itemHoverUseText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.itemHoverSplitUseText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.itemHoverSplitText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Grab equipped item");
|
|
this.equipText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Move / ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Joystick", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Change Item / ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Return");
|
|
this.equipBagText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Swap / ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Joystick", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Switch Item / ");
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Cancel", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset>Return");
|
|
this.equipBagDragText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Joystick", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset> Rotate");
|
|
this.equipSpinningText = this.str.ToString();
|
|
this.str.Clear();
|
|
this.str.Append("<voffset=.4em><size=40><sprite=");
|
|
num = this.GetControllerSprite("Action", this.controllerName);
|
|
this.str.Append(num);
|
|
this.str.Append("></size></voffset> Drag Portraits");
|
|
this.formationText = this.str.ToString();
|
|
}
|
|
else
|
|
{
|
|
this.dragJoystickText = "";
|
|
}
|
|
}
|
|
this.str.Clear();
|
|
if (Links.x.joy)
|
|
{
|
|
this.interactButton.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.itemButton.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.mapButton.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.actionButton.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.gatherItemsButton.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.quickSaveBtn.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.interactButton.text = "<sprite=" + this.GetControllerSprite("Interact", this.controllerName).ToString() + ">";
|
|
this.itemButton.text = "<sprite=" + this.GetControllerSprite("BtnNorth", this.controllerName).ToString() + ">";
|
|
this.mapButton.text = "<sprite=" + this.GetControllerSprite("Cancel", this.controllerName).ToString() + ">";
|
|
this.actionButton.text = "<sprite=" + this.GetControllerSprite("Attack", this.controllerName).ToString() + ">";
|
|
this.gatherItemsButton.text = "<sprite=" + this.GetControllerSprite("Show Items", this.controllerName).ToString() + ">";
|
|
this.quickSaveBtn.text = "<sprite=" + this.GetControllerSprite("Save", this.controllerName).ToString() + ">";
|
|
}
|
|
}
|
|
|
|
// Token: 0x060007C0 RID: 1984 RVA: 0x000AC790 File Offset: 0x000AA990
|
|
public int GetControllerSprite(string type, string controllerName)
|
|
{
|
|
if (type == "Cancel")
|
|
{
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 0;
|
|
}
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 1;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 0;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 1;
|
|
}
|
|
}
|
|
if (type == "Attack" || type == "Action")
|
|
{
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 1;
|
|
}
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 0;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 1;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
if (type == "Dodge")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 15;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 15;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 18;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 21;
|
|
}
|
|
}
|
|
if (type == "Synergy")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 10;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 8;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 12;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 10;
|
|
}
|
|
}
|
|
if (type == "Party1")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 3;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 3;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 4;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 4;
|
|
}
|
|
}
|
|
if (type == "Party2")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 4;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 4;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 5;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 5;
|
|
}
|
|
}
|
|
if (type == "Party3")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 5;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 5;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 6;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 6;
|
|
}
|
|
}
|
|
if (type == "Party4")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 2;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 2;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 3;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 3;
|
|
}
|
|
}
|
|
if (type == "Dock")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 12;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 14;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 15;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 20;
|
|
}
|
|
}
|
|
if (type == "Show Items")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 7;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 7;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 9;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 9;
|
|
}
|
|
}
|
|
if (type == "Right Joystick")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 14;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 17;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 16;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 25;
|
|
}
|
|
}
|
|
if (type == "Joystick")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 9;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 10;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 10;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 14;
|
|
}
|
|
}
|
|
if (type == "Interact")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 18;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 20;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 22;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 29;
|
|
}
|
|
}
|
|
if (type == "BtnNorth")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 19;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 22;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 21;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 30;
|
|
}
|
|
}
|
|
if (type == "InteractItems")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 19;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 22;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 21;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 30;
|
|
}
|
|
}
|
|
if (type == "InteractExits")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 0;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 1;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 1;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
if (type == "Open Menus")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 11;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 12;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 14;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 2;
|
|
}
|
|
}
|
|
if (type == "Save")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 17;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 18;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 13;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 27;
|
|
}
|
|
}
|
|
if (type == "Press Joystick Left")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 8;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 20;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 10;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 13;
|
|
}
|
|
}
|
|
if (type == "Press Joystick Right")
|
|
{
|
|
if (controllerName == "Xbox_Icons")
|
|
{
|
|
return 13;
|
|
}
|
|
if (controllerName == "Playstation_Icons")
|
|
{
|
|
return 16;
|
|
}
|
|
if (controllerName == "Switch_Icons")
|
|
{
|
|
return 17;
|
|
}
|
|
if (controllerName == "SteamDeck_Icons")
|
|
{
|
|
return 24;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x060007C1 RID: 1985 RVA: 0x000ACD90 File Offset: 0x000AAF90
|
|
public void SetConfirmText(string n)
|
|
{
|
|
this.confirmTxt.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
this.str.Clear();
|
|
this.str.Append(n);
|
|
this.str.Append(" <voffset=.4em><size=50><sprite=");
|
|
if (Links.x.mk)
|
|
{
|
|
int keyIconIndex = Links.x.keyControl.GetKeyIconIndex("LMB");
|
|
this.str.Append(keyIconIndex);
|
|
this.str.Append("></size></voffset>");
|
|
}
|
|
else
|
|
{
|
|
int controllerSprite = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite);
|
|
this.str.Append("></size></voffset>");
|
|
}
|
|
this.confirmTxt.text = this.str.ToString();
|
|
}
|
|
|
|
// Token: 0x060007C2 RID: 1986 RVA: 0x000ACE84 File Offset: 0x000AB084
|
|
public void StoneSound()
|
|
{
|
|
string text = "Clicks Stone A";
|
|
int num = Random.Range(0, 5);
|
|
if (num == 1)
|
|
{
|
|
text = "Clicks Stone B";
|
|
}
|
|
else if (num == 2)
|
|
{
|
|
text = "Clicks Stone C";
|
|
}
|
|
else if (num == 3)
|
|
{
|
|
text = "Clicks Stone D";
|
|
}
|
|
else if (num == 4)
|
|
{
|
|
text = "Clicks Stone E";
|
|
}
|
|
MasterAudio.PlaySoundAndForget(text, Random.Range(0.6f, 0.8f), new float?(1f), 0f, "", null);
|
|
}
|
|
|
|
// Token: 0x060007C3 RID: 1987 RVA: 0x000ACF00 File Offset: 0x000AB100
|
|
public void StoneSoundQuieter()
|
|
{
|
|
string text = "Clicks Stone A";
|
|
int num = Random.Range(0, 5);
|
|
if (num == 1)
|
|
{
|
|
text = "Clicks Stone B";
|
|
}
|
|
else if (num == 2)
|
|
{
|
|
text = "Clicks Stone C";
|
|
}
|
|
else if (num == 3)
|
|
{
|
|
text = "Clicks Stone D";
|
|
}
|
|
else if (num == 4)
|
|
{
|
|
text = "Clicks Stone E";
|
|
}
|
|
MasterAudio.PlaySoundAndForget(text, Random.Range(0.25f, 0.4f), new float?(1f), 0f, "", null);
|
|
}
|
|
|
|
// Token: 0x060007C4 RID: 1988 RVA: 0x000ACF7C File Offset: 0x000AB17C
|
|
public void WorldClick()
|
|
{
|
|
if (Records.x.pocketPause)
|
|
{
|
|
MasterAudio.PlaySoundAndForget("Target Click", Random.Range(0.9f, 1f) * 1.5f, new float?(1f), 0f, "", null);
|
|
return;
|
|
}
|
|
MasterAudio.PlaySoundAndForget("World Click", Random.Range(0.9f, 1f), new float?(1f), 0f, "", null);
|
|
}
|
|
|
|
// Token: 0x060007C5 RID: 1989 RVA: 0x000AD00C File Offset: 0x000AB20C
|
|
public Vector3 SubtractVectors(Vector3 a, Vector3 b)
|
|
{
|
|
Vector3 vector;
|
|
vector.x = a.x - b.x;
|
|
vector.y = a.y - b.y;
|
|
vector.z = a.z - b.z;
|
|
return vector;
|
|
}
|
|
|
|
// Token: 0x060007C6 RID: 1990 RVA: 0x000AD058 File Offset: 0x000AB258
|
|
public float AngleDir(Vector3 fwd, Vector3 targetDir, Vector3 up)
|
|
{
|
|
float num = Vector3.Dot(Vector3.Cross(fwd, targetDir), up);
|
|
if (num > 0f)
|
|
{
|
|
return 1f;
|
|
}
|
|
if (num <= 0f)
|
|
{
|
|
return -1f;
|
|
}
|
|
return 1f;
|
|
}
|
|
|
|
// Token: 0x060007C7 RID: 1991 RVA: 0x000AD094 File Offset: 0x000AB294
|
|
public void SetPositionAtWorldPoint(Vector3 worldPoint, RectTransform rt)
|
|
{
|
|
Vector3 vector = Links.x.worldCamera.WorldToScreenPoint(worldPoint);
|
|
vector.z = 0f;
|
|
vector.x = vector.x * (1920f / (float)Screen.width) - 960f;
|
|
vector.y = vector.y * (Links.x.canvasRT.sizeDelta.y / (float)Screen.height) - Links.x.canvasRT.sizeDelta.y / 2f;
|
|
rt.localPosition = vector;
|
|
}
|
|
|
|
// Token: 0x04000A89 RID: 2697
|
|
[Header("GAMEPLAY SETTINGS")]
|
|
public float gameHours;
|
|
|
|
// Token: 0x04000A8A RID: 2698
|
|
public int gameDays;
|
|
|
|
// Token: 0x04000A8B RID: 2699
|
|
public float gameMinutes;
|
|
|
|
// Token: 0x04000A8C RID: 2700
|
|
public float gameSeconds;
|
|
|
|
// Token: 0x04000A8D RID: 2701
|
|
public float seconds;
|
|
|
|
// Token: 0x04000A8E RID: 2702
|
|
public string timeOfDay = "Morning";
|
|
|
|
// Token: 0x04000A8F RID: 2703
|
|
public string currentTimeBlock;
|
|
|
|
// Token: 0x04000A90 RID: 2704
|
|
public float testRadius = 100f;
|
|
|
|
// Token: 0x04000A91 RID: 2705
|
|
private float updateGameTime;
|
|
|
|
// Token: 0x04000A92 RID: 2706
|
|
private float pausedTime;
|
|
|
|
// Token: 0x04000A93 RID: 2707
|
|
public bool attacking;
|
|
|
|
// Token: 0x04000A94 RID: 2708
|
|
public bool spellcasting;
|
|
|
|
// Token: 0x04000A95 RID: 2709
|
|
public bool throwingElixir;
|
|
|
|
// Token: 0x04000A96 RID: 2710
|
|
public bool spellTargetingGround;
|
|
|
|
// Token: 0x04000A97 RID: 2711
|
|
public bool spellTargetingParty;
|
|
|
|
// Token: 0x04000A98 RID: 2712
|
|
public bool spellTargetingEnemy;
|
|
|
|
// Token: 0x04000A99 RID: 2713
|
|
public bool charming;
|
|
|
|
// Token: 0x04000A9A RID: 2714
|
|
private bool startCombatFromPause;
|
|
|
|
// Token: 0x04000A9B RID: 2715
|
|
public Sunlight sunlightAnimator;
|
|
|
|
// Token: 0x04000A9C RID: 2716
|
|
public TextMeshProUGUI timeText;
|
|
|
|
// Token: 0x04000A9D RID: 2717
|
|
private PointerEventData pointer;
|
|
|
|
// Token: 0x04000A9E RID: 2718
|
|
private List<RaycastResult> raycastResults = new List<RaycastResult>();
|
|
|
|
// Token: 0x04000A9F RID: 2719
|
|
public List<GameObject> effectTileWaypoints = new List<GameObject>();
|
|
|
|
// Token: 0x04000AA0 RID: 2720
|
|
public List<Animator> effectTileWaypointAnimators = new List<Animator>();
|
|
|
|
// Token: 0x04000AA1 RID: 2721
|
|
private int screenW;
|
|
|
|
// Token: 0x04000AA2 RID: 2722
|
|
private int screenH;
|
|
|
|
// Token: 0x04000AA3 RID: 2723
|
|
public bool closeTheGap;
|
|
|
|
// Token: 0x04000AA4 RID: 2724
|
|
public bool playerInAction;
|
|
|
|
// Token: 0x04000AA5 RID: 2725
|
|
public bool startPocketPause;
|
|
|
|
// Token: 0x04000AA6 RID: 2726
|
|
[Header("INPUTS")]
|
|
public KeyControl keyControl;
|
|
|
|
// Token: 0x04000AA7 RID: 2727
|
|
private List<string> keyConverted;
|
|
|
|
// Token: 0x04000AA8 RID: 2728
|
|
private List<KeyCode> keyCodes;
|
|
|
|
// Token: 0x04000AA9 RID: 2729
|
|
public string settingFavorite;
|
|
|
|
// Token: 0x04000AAA RID: 2730
|
|
public GameObject currentEventObject;
|
|
|
|
// Token: 0x04000AAB RID: 2731
|
|
public GameObject firstEventObject;
|
|
|
|
// Token: 0x04000AAC RID: 2732
|
|
private GameObject prevEventObject;
|
|
|
|
// Token: 0x04000AAD RID: 2733
|
|
private int clickCount;
|
|
|
|
// Token: 0x04000AAE RID: 2734
|
|
private float clickTime;
|
|
|
|
// Token: 0x04000AAF RID: 2735
|
|
private float clickUpTime;
|
|
|
|
// Token: 0x04000AB0 RID: 2736
|
|
private float startMouseDownTime;
|
|
|
|
// Token: 0x04000AB1 RID: 2737
|
|
private float groupMouseTime;
|
|
|
|
// Token: 0x04000AB2 RID: 2738
|
|
public bool doubleClick;
|
|
|
|
// Token: 0x04000AB3 RID: 2739
|
|
public bool holdingMouseButton;
|
|
|
|
// Token: 0x04000AB4 RID: 2740
|
|
[Header("MOUSE + CONTROLLER")]
|
|
private float mouseDown;
|
|
|
|
// Token: 0x04000AB5 RID: 2741
|
|
public bool mouseVisible;
|
|
|
|
// Token: 0x04000AB6 RID: 2742
|
|
public bool mouseWormVisible;
|
|
|
|
// Token: 0x04000AB7 RID: 2743
|
|
public bool hitWater;
|
|
|
|
// Token: 0x04000AB8 RID: 2744
|
|
public bool hitBeach;
|
|
|
|
// Token: 0x04000AB9 RID: 2745
|
|
public bool hitItem;
|
|
|
|
// Token: 0x04000ABA RID: 2746
|
|
public bool hitFloor;
|
|
|
|
// Token: 0x04000ABB RID: 2747
|
|
public bool hitCharacter;
|
|
|
|
// Token: 0x04000ABC RID: 2748
|
|
public bool hitGameCardHover;
|
|
|
|
// Token: 0x04000ABD RID: 2749
|
|
public bool hitExit;
|
|
|
|
// Token: 0x04000ABE RID: 2750
|
|
public bool hitInteractable;
|
|
|
|
// Token: 0x04000ABF RID: 2751
|
|
public bool hitBoat;
|
|
|
|
// Token: 0x04000AC0 RID: 2752
|
|
public bool uiCanClick;
|
|
|
|
// Token: 0x04000AC1 RID: 2753
|
|
public bool uiHover;
|
|
|
|
// Token: 0x04000AC2 RID: 2754
|
|
public bool clickStartOnUIHover;
|
|
|
|
// Token: 0x04000AC3 RID: 2755
|
|
public bool waitingForClickUpOnCharacter;
|
|
|
|
// Token: 0x04000AC4 RID: 2756
|
|
public Item prevItem;
|
|
|
|
// Token: 0x04000AC5 RID: 2757
|
|
public Item item;
|
|
|
|
// Token: 0x04000AC6 RID: 2758
|
|
public Boat prevBoat;
|
|
|
|
// Token: 0x04000AC7 RID: 2759
|
|
public Boat boat;
|
|
|
|
// Token: 0x04000AC8 RID: 2760
|
|
public BreakableActions breakable;
|
|
|
|
// Token: 0x04000AC9 RID: 2761
|
|
public BreakableActions prevBreakable;
|
|
|
|
// Token: 0x04000ACA RID: 2762
|
|
public BreakableActions domeBreakable;
|
|
|
|
// Token: 0x04000ACB RID: 2763
|
|
public ChestActions chest;
|
|
|
|
// Token: 0x04000ACC RID: 2764
|
|
public ChestActions prevChest;
|
|
|
|
// Token: 0x04000ACD RID: 2765
|
|
public ChestActions domeChest;
|
|
|
|
// Token: 0x04000ACE RID: 2766
|
|
public DoorActions door;
|
|
|
|
// Token: 0x04000ACF RID: 2767
|
|
public DoorActions prevDoor;
|
|
|
|
// Token: 0x04000AD0 RID: 2768
|
|
public DoorActions domeDoor;
|
|
|
|
// Token: 0x04000AD1 RID: 2769
|
|
public DoorActions mapDoor;
|
|
|
|
// Token: 0x04000AD2 RID: 2770
|
|
public DoorActions prevMapDoor;
|
|
|
|
// Token: 0x04000AD3 RID: 2771
|
|
public PuzzleActions puzzle;
|
|
|
|
// Token: 0x04000AD4 RID: 2772
|
|
public PuzzleActions prevPuzzle;
|
|
|
|
// Token: 0x04000AD5 RID: 2773
|
|
public PuzzleActions domePuzzle;
|
|
|
|
// Token: 0x04000AD6 RID: 2774
|
|
public Character prevCharacter;
|
|
|
|
// Token: 0x04000AD7 RID: 2775
|
|
public Character character;
|
|
|
|
// Token: 0x04000AD8 RID: 2776
|
|
public Character prevGameCardCharacter;
|
|
|
|
// Token: 0x04000AD9 RID: 2777
|
|
public Character gameCardCharacter;
|
|
|
|
// Token: 0x04000ADA RID: 2778
|
|
public Character clickedCharacter;
|
|
|
|
// Token: 0x04000ADB RID: 2779
|
|
public Character targetingCharacter;
|
|
|
|
// Token: 0x04000ADC RID: 2780
|
|
public Character coneCharacter;
|
|
|
|
// Token: 0x04000ADD RID: 2781
|
|
public Character talkCharacter;
|
|
|
|
// Token: 0x04000ADE RID: 2782
|
|
public Character domeParty;
|
|
|
|
// Token: 0x04000ADF RID: 2783
|
|
public Character domeEnemy;
|
|
|
|
// Token: 0x04000AE0 RID: 2784
|
|
public Character attackingCharacter;
|
|
|
|
// Token: 0x04000AE1 RID: 2785
|
|
public MapExitActions exit;
|
|
|
|
// Token: 0x04000AE2 RID: 2786
|
|
public MapExitActions prevExit;
|
|
|
|
// Token: 0x04000AE3 RID: 2787
|
|
public MapExitActions intersectingExit;
|
|
|
|
// Token: 0x04000AE4 RID: 2788
|
|
private Vector3 mouseDownPosition;
|
|
|
|
// Token: 0x04000AE5 RID: 2789
|
|
private bool alreadyClicked;
|
|
|
|
// Token: 0x04000AE6 RID: 2790
|
|
public GraphNode currentExitNode;
|
|
|
|
// Token: 0x04000AE7 RID: 2791
|
|
public GraphNode currentInteractionNode;
|
|
|
|
// Token: 0x04000AE8 RID: 2792
|
|
public float mouseColor;
|
|
|
|
// Token: 0x04000AE9 RID: 2793
|
|
public Vector3 farPosition = new Vector3(10000f, 0f, 0f);
|
|
|
|
// Token: 0x04000AEA RID: 2794
|
|
public bool gettingPartyNodes;
|
|
|
|
// Token: 0x04000AEB RID: 2795
|
|
public bool combatStartedWithSkill;
|
|
|
|
// Token: 0x04000AEC RID: 2796
|
|
public bool showingAbilityUI;
|
|
|
|
// Token: 0x04000AED RID: 2797
|
|
public GameObject effectsTilePrefab;
|
|
|
|
// Token: 0x04000AEE RID: 2798
|
|
public GameObject effectsTilePrefabTooFar;
|
|
|
|
// Token: 0x04000AEF RID: 2799
|
|
public GameObject effectTileTooFar;
|
|
|
|
// Token: 0x04000AF0 RID: 2800
|
|
public Ray ray;
|
|
|
|
// Token: 0x04000AF1 RID: 2801
|
|
public int tileEffectRadius;
|
|
|
|
// Token: 0x04000AF2 RID: 2802
|
|
public string currentAbility;
|
|
|
|
// Token: 0x04000AF3 RID: 2803
|
|
public Library.Pagan spellPaganRow;
|
|
|
|
// Token: 0x04000AF4 RID: 2804
|
|
public GameObject clickedUI;
|
|
|
|
// Token: 0x04000AF5 RID: 2805
|
|
public GameObject selectedUI;
|
|
|
|
// Token: 0x04000AF6 RID: 2806
|
|
public Vector3 mousePoint;
|
|
|
|
// Token: 0x04000AF7 RID: 2807
|
|
public Transform lookAt;
|
|
|
|
// Token: 0x04000AF8 RID: 2808
|
|
public bool doLookAt;
|
|
|
|
// Token: 0x04000AF9 RID: 2809
|
|
public TextMeshProUGUI interactButton;
|
|
|
|
// Token: 0x04000AFA RID: 2810
|
|
public TextMeshProUGUI itemButton;
|
|
|
|
// Token: 0x04000AFB RID: 2811
|
|
public TextMeshProUGUI mapButton;
|
|
|
|
// Token: 0x04000AFC RID: 2812
|
|
public TextMeshProUGUI actionButton;
|
|
|
|
// Token: 0x04000AFD RID: 2813
|
|
public TextMeshProUGUI gatherItemsButton;
|
|
|
|
// Token: 0x04000AFE RID: 2814
|
|
public TextMeshProUGUI quickSaveBtn;
|
|
|
|
// Token: 0x04000AFF RID: 2815
|
|
public string exitMenuText;
|
|
|
|
// Token: 0x04000B00 RID: 2816
|
|
public string continueText;
|
|
|
|
// Token: 0x04000B01 RID: 2817
|
|
public string cancelText;
|
|
|
|
// Token: 0x04000B02 RID: 2818
|
|
public string exitText;
|
|
|
|
// Token: 0x04000B03 RID: 2819
|
|
public string keyboardText;
|
|
|
|
// Token: 0x04000B04 RID: 2820
|
|
public string keyboardText2;
|
|
|
|
// Token: 0x04000B05 RID: 2821
|
|
public string keyboardText3;
|
|
|
|
// Token: 0x04000B06 RID: 2822
|
|
public string gameFeedText;
|
|
|
|
// Token: 0x04000B07 RID: 2823
|
|
public string dragText;
|
|
|
|
// Token: 0x04000B08 RID: 2824
|
|
public string dragJoystickText;
|
|
|
|
// Token: 0x04000B09 RID: 2825
|
|
public string pinOpenText;
|
|
|
|
// Token: 0x04000B0A RID: 2826
|
|
public string partySwitchText;
|
|
|
|
// Token: 0x04000B0B RID: 2827
|
|
public string targetSwitchText;
|
|
|
|
// Token: 0x04000B0C RID: 2828
|
|
public string npcHoverText;
|
|
|
|
// Token: 0x04000B0D RID: 2829
|
|
public string pocketText;
|
|
|
|
// Token: 0x04000B0E RID: 2830
|
|
public string dockText;
|
|
|
|
// Token: 0x04000B0F RID: 2831
|
|
public string pocketTextSpell;
|
|
|
|
// Token: 0x04000B10 RID: 2832
|
|
public string formationText;
|
|
|
|
// Token: 0x04000B11 RID: 2833
|
|
public string itemHoverText;
|
|
|
|
// Token: 0x04000B12 RID: 2834
|
|
public string itemHoverUseText;
|
|
|
|
// Token: 0x04000B13 RID: 2835
|
|
public string equipText;
|
|
|
|
// Token: 0x04000B14 RID: 2836
|
|
public string equipBagDragText;
|
|
|
|
// Token: 0x04000B15 RID: 2837
|
|
public string equipBagText;
|
|
|
|
// Token: 0x04000B16 RID: 2838
|
|
public string equipSpinningText;
|
|
|
|
// Token: 0x04000B17 RID: 2839
|
|
public string itemHoverSplitUseText;
|
|
|
|
// Token: 0x04000B18 RID: 2840
|
|
public string itemHoverSplitText;
|
|
|
|
// Token: 0x04000B19 RID: 2841
|
|
public GameObject selectionCircle;
|
|
|
|
// Token: 0x04000B1A RID: 2842
|
|
public Animator selectionCircleAnimator;
|
|
|
|
// Token: 0x04000B1B RID: 2843
|
|
public bool dockOpen;
|
|
|
|
// Token: 0x04000B1C RID: 2844
|
|
public string dockSelected;
|
|
|
|
// Token: 0x04000B1D RID: 2845
|
|
private float timeHeld;
|
|
|
|
// Token: 0x04000B1E RID: 2846
|
|
private float targetTime;
|
|
|
|
// Token: 0x04000B1F RID: 2847
|
|
public string lastMenu;
|
|
|
|
// Token: 0x04000B20 RID: 2848
|
|
public bool resizing;
|
|
|
|
// Token: 0x04000B21 RID: 2849
|
|
public bool sailing;
|
|
|
|
// Token: 0x04000B22 RID: 2850
|
|
private bool targetingGroundCharacterHover;
|
|
|
|
// Token: 0x04000B23 RID: 2851
|
|
public bool openingAnotherMenu;
|
|
|
|
// Token: 0x04000B24 RID: 2852
|
|
public Item timerHoverItem;
|
|
|
|
// Token: 0x04000B25 RID: 2853
|
|
private IEnumerator routine;
|
|
|
|
// Token: 0x04000B26 RID: 2854
|
|
private IEnumerator arcCorout;
|
|
|
|
// Token: 0x04000B27 RID: 2855
|
|
public GraphNode mouseNode;
|
|
|
|
// Token: 0x04000B28 RID: 2856
|
|
public bool clickedUpCharacter;
|
|
|
|
// Token: 0x04000B29 RID: 2857
|
|
public bool clickedDownWindows;
|
|
|
|
// Token: 0x04000B2A RID: 2858
|
|
private Vector2 prevClickPosition;
|
|
|
|
// Token: 0x04000B2B RID: 2859
|
|
public GameObject joystickTarget;
|
|
|
|
// Token: 0x04000B2C RID: 2860
|
|
public TextMeshProUGUI joystickTargetIcon;
|
|
|
|
// Token: 0x04000B2D RID: 2861
|
|
public RectTransform joystickTargetRT;
|
|
|
|
// Token: 0x04000B2E RID: 2862
|
|
public GameObject attackDirection;
|
|
|
|
// Token: 0x04000B2F RID: 2863
|
|
public Material attackDirectionMaterial;
|
|
|
|
// Token: 0x04000B30 RID: 2864
|
|
[Header("LISTS")]
|
|
private List<Character> needsPath = new List<Character>();
|
|
|
|
// Token: 0x04000B31 RID: 2865
|
|
private List<Character> needsPathParty = new List<Character>();
|
|
|
|
// Token: 0x04000B32 RID: 2866
|
|
private List<Character> closestCharacters = new List<Character>();
|
|
|
|
// Token: 0x04000B33 RID: 2867
|
|
private List<GameObject> openMenus;
|
|
|
|
// Token: 0x04000B34 RID: 2868
|
|
private List<Character> party;
|
|
|
|
// Token: 0x04000B35 RID: 2869
|
|
private List<Character> dioramaCharacters;
|
|
|
|
// Token: 0x04000B36 RID: 2870
|
|
private List<Character> characters = new List<Character>();
|
|
|
|
// Token: 0x04000B37 RID: 2871
|
|
private List<Character> combatCharacters;
|
|
|
|
// Token: 0x04000B38 RID: 2872
|
|
private List<int> clumps = new List<int>();
|
|
|
|
// Token: 0x04000B39 RID: 2873
|
|
public List<MeshRenderer> hoverTilesNumbers = new List<MeshRenderer>();
|
|
|
|
// Token: 0x04000B3A RID: 2874
|
|
public List<GameObject> effectTiles = new List<GameObject>();
|
|
|
|
// Token: 0x04000B3B RID: 2875
|
|
private List<TileEffects> currentTileEffects;
|
|
|
|
// Token: 0x04000B3C RID: 2876
|
|
private List<Character> allCharacters;
|
|
|
|
// Token: 0x04000B3D RID: 2877
|
|
private List<Character> talkCharacters = new List<Character>();
|
|
|
|
// Token: 0x04000B3E RID: 2878
|
|
private List<ChestActions> chests = new List<ChestActions>();
|
|
|
|
// Token: 0x04000B3F RID: 2879
|
|
private List<DoorActions> doors = new List<DoorActions>();
|
|
|
|
// Token: 0x04000B40 RID: 2880
|
|
private List<Character> levelUpCharacters = new List<Character>();
|
|
|
|
// Token: 0x04000B41 RID: 2881
|
|
private List<int> levelUpSkills = new List<int>();
|
|
|
|
// Token: 0x04000B42 RID: 2882
|
|
public List<GraphNode> circleTiles = new List<GraphNode>();
|
|
|
|
// Token: 0x04000B43 RID: 2883
|
|
[Header("AI")]
|
|
public IEnumerator gatherNodesCoroutine;
|
|
|
|
// Token: 0x04000B44 RID: 2884
|
|
[Header("AI")]
|
|
public IEnumerator gatherGroundNodesCoroutine;
|
|
|
|
// Token: 0x04000B45 RID: 2885
|
|
private bool clickWait;
|
|
|
|
// Token: 0x04000B46 RID: 2886
|
|
private bool clickGroundWait;
|
|
|
|
// Token: 0x04000B47 RID: 2887
|
|
private List<GraphNode> allNodes;
|
|
|
|
// Token: 0x04000B48 RID: 2888
|
|
private List<int> allNodesTaken = new List<int>();
|
|
|
|
// Token: 0x04000B49 RID: 2889
|
|
private List<GraphNode> targetingNodes = new List<GraphNode>();
|
|
|
|
// Token: 0x04000B4A RID: 2890
|
|
private List<int> nodeInRadius = new List<int>();
|
|
|
|
// Token: 0x04000B4B RID: 2891
|
|
public List<GraphNode> pickedInteractionNodes = new List<GraphNode>();
|
|
|
|
// Token: 0x04000B4C RID: 2892
|
|
public List<GraphNode> pickedGroundNodes = new List<GraphNode>();
|
|
|
|
// Token: 0x04000B4D RID: 2893
|
|
private NNConstraint nodeConstraint = new NNConstraint();
|
|
|
|
// Token: 0x04000B4E RID: 2894
|
|
private List<GraphNode> tempPath;
|
|
|
|
// Token: 0x04000B4F RID: 2895
|
|
private List<GraphNode> tempNodes = new List<GraphNode>();
|
|
|
|
// Token: 0x04000B50 RID: 2896
|
|
private List<GraphNode> savedNodes = new List<GraphNode>();
|
|
|
|
// Token: 0x04000B51 RID: 2897
|
|
private List<bool> targetingBool = new List<bool>();
|
|
|
|
// Token: 0x04000B52 RID: 2898
|
|
private List<float> targetingDist = new List<float>();
|
|
|
|
// Token: 0x04000B53 RID: 2899
|
|
private WaitForSeconds delayShort = new WaitForSeconds(0.001f);
|
|
|
|
// Token: 0x04000B54 RID: 2900
|
|
private WaitForSeconds delayHalfSecond = new WaitForSeconds(0.5f);
|
|
|
|
// Token: 0x04000B55 RID: 2901
|
|
private WaitForSeconds delaySecond = new WaitForSeconds(1f);
|
|
|
|
// Token: 0x04000B56 RID: 2902
|
|
public Character actionCharacter;
|
|
|
|
// Token: 0x04000B57 RID: 2903
|
|
private Item mouseDownItem;
|
|
|
|
// Token: 0x04000B58 RID: 2904
|
|
[Header("HOTKEYS")]
|
|
public bool mk;
|
|
|
|
// Token: 0x04000B59 RID: 2905
|
|
public bool joy;
|
|
|
|
// Token: 0x04000B5A RID: 2906
|
|
public string hotkey1;
|
|
|
|
// Token: 0x04000B5B RID: 2907
|
|
public string hotkey2;
|
|
|
|
// Token: 0x04000B5C RID: 2908
|
|
public string hotkey3;
|
|
|
|
// Token: 0x04000B5D RID: 2909
|
|
public string hotkey4;
|
|
|
|
// Token: 0x04000B5E RID: 2910
|
|
public string hotkey5;
|
|
|
|
// Token: 0x04000B5F RID: 2911
|
|
public string hotkey6;
|
|
|
|
// Token: 0x04000B60 RID: 2912
|
|
public string hotkey7;
|
|
|
|
// Token: 0x04000B61 RID: 2913
|
|
public string hotkey8;
|
|
|
|
// Token: 0x04000B62 RID: 2914
|
|
public string hotkey9;
|
|
|
|
// Token: 0x04000B63 RID: 2915
|
|
public string hotkey10;
|
|
|
|
// Token: 0x04000B64 RID: 2916
|
|
public string hotkey11;
|
|
|
|
// Token: 0x04000B65 RID: 2917
|
|
public string hotkey12;
|
|
|
|
// Token: 0x04000B66 RID: 2918
|
|
public string hotkeyCharacter1;
|
|
|
|
// Token: 0x04000B67 RID: 2919
|
|
public string hotkeyCharacter2;
|
|
|
|
// Token: 0x04000B68 RID: 2920
|
|
public string hotkeyCharacter3;
|
|
|
|
// Token: 0x04000B69 RID: 2921
|
|
public string hotkeyCharacter4;
|
|
|
|
// Token: 0x04000B6A RID: 2922
|
|
public string hotkeyCharacter5;
|
|
|
|
// Token: 0x04000B6B RID: 2923
|
|
public string hotkeyCharacter6;
|
|
|
|
// Token: 0x04000B6C RID: 2924
|
|
public string hotkeyCharacter7;
|
|
|
|
// Token: 0x04000B6D RID: 2925
|
|
public string hotkeyCharacter8;
|
|
|
|
// Token: 0x04000B6E RID: 2926
|
|
public string hotkeyCharacter9;
|
|
|
|
// Token: 0x04000B6F RID: 2927
|
|
public string hotkeyCharacter10;
|
|
|
|
// Token: 0x04000B70 RID: 2928
|
|
public string hotkeyCharacter11;
|
|
|
|
// Token: 0x04000B71 RID: 2929
|
|
public string hotkeyCharacter12;
|
|
|
|
// Token: 0x04000B72 RID: 2930
|
|
private StringFast str = new StringFast(64);
|
|
|
|
// Token: 0x04000B73 RID: 2931
|
|
[Header("CONTROLLER")]
|
|
private string[] controllers;
|
|
|
|
// Token: 0x04000B74 RID: 2932
|
|
private int prevControllerCount;
|
|
|
|
// Token: 0x04000B75 RID: 2933
|
|
public int currentControllerCount;
|
|
|
|
// Token: 0x04000B76 RID: 2934
|
|
public PlayerInput playerInput;
|
|
|
|
// Token: 0x04000B77 RID: 2935
|
|
public InputAction action;
|
|
|
|
// Token: 0x04000B78 RID: 2936
|
|
public InputAction move;
|
|
|
|
// Token: 0x04000B79 RID: 2937
|
|
public InputAction zoom;
|
|
|
|
// Token: 0x04000B7A RID: 2938
|
|
public InputAction interact;
|
|
|
|
// Token: 0x04000B7B RID: 2939
|
|
public InputAction showAllItems;
|
|
|
|
// Token: 0x04000B7C RID: 2940
|
|
public InputAction switchTarget;
|
|
|
|
// Token: 0x04000B7D RID: 2941
|
|
public InputAction aim;
|
|
|
|
// Token: 0x04000B7E RID: 2942
|
|
public InputAction dock;
|
|
|
|
// Token: 0x04000B7F RID: 2943
|
|
public InputAction cancel;
|
|
|
|
// Token: 0x04000B80 RID: 2944
|
|
public InputAction quickSave;
|
|
|
|
// Token: 0x04000B81 RID: 2945
|
|
public InputAction rightJoyStick;
|
|
|
|
// Token: 0x04000B82 RID: 2946
|
|
public InputAction allMenus;
|
|
|
|
// Token: 0x04000B83 RID: 2947
|
|
public InputAction switchPartyUp;
|
|
|
|
// Token: 0x04000B84 RID: 2948
|
|
public InputAction switchPartyDown;
|
|
|
|
// Token: 0x04000B85 RID: 2949
|
|
public InputAction partyItemsLeft;
|
|
|
|
// Token: 0x04000B86 RID: 2950
|
|
public InputAction partyItemsRight;
|
|
|
|
// Token: 0x04000B87 RID: 2951
|
|
public InputAction hudLeft;
|
|
|
|
// Token: 0x04000B88 RID: 2952
|
|
public InputAction hudRight;
|
|
|
|
// Token: 0x04000B89 RID: 2953
|
|
public InputAction spell3;
|
|
|
|
// Token: 0x04000B8A RID: 2954
|
|
public InputAction spell4;
|
|
|
|
// Token: 0x04000B8B RID: 2955
|
|
public InputAction menus;
|
|
|
|
// Token: 0x04000B8C RID: 2956
|
|
public Vector2 rightJoystick;
|
|
|
|
// Token: 0x04000B8D RID: 2957
|
|
public float triggerAction;
|
|
|
|
// Token: 0x04000B8E RID: 2958
|
|
public float triggerInteract;
|
|
|
|
// Token: 0x04000B8F RID: 2959
|
|
public float triggerItems;
|
|
|
|
// Token: 0x04000B90 RID: 2960
|
|
public float triggerDodge;
|
|
|
|
// Token: 0x04000B91 RID: 2961
|
|
public float triggerAim;
|
|
|
|
// Token: 0x04000B92 RID: 2962
|
|
public float triggerDock;
|
|
|
|
// Token: 0x04000B93 RID: 2963
|
|
public float triggerCancel;
|
|
|
|
// Token: 0x04000B94 RID: 2964
|
|
public float triggerQuickSave;
|
|
|
|
// Token: 0x04000B95 RID: 2965
|
|
public float triggerAllMenus;
|
|
|
|
// Token: 0x04000B96 RID: 2966
|
|
public float triggerParty1;
|
|
|
|
// Token: 0x04000B97 RID: 2967
|
|
public float triggerParty2;
|
|
|
|
// Token: 0x04000B98 RID: 2968
|
|
public float triggerPartyItems3;
|
|
|
|
// Token: 0x04000B99 RID: 2969
|
|
public float triggerPartyItems4;
|
|
|
|
// Token: 0x04000B9A RID: 2970
|
|
public float triggerMenus;
|
|
|
|
// Token: 0x04000B9B RID: 2971
|
|
public float triggerHudLeft;
|
|
|
|
// Token: 0x04000B9C RID: 2972
|
|
public float triggerHudRight;
|
|
|
|
// Token: 0x04000B9D RID: 2973
|
|
public float prevTriggerAction;
|
|
|
|
// Token: 0x04000B9E RID: 2974
|
|
public float prevTriggerInteract;
|
|
|
|
// Token: 0x04000B9F RID: 2975
|
|
public float prevTriggerItems;
|
|
|
|
// Token: 0x04000BA0 RID: 2976
|
|
public float prevTriggerDodge;
|
|
|
|
// Token: 0x04000BA1 RID: 2977
|
|
public float prevTriggerAim;
|
|
|
|
// Token: 0x04000BA2 RID: 2978
|
|
public float prevTriggerDock;
|
|
|
|
// Token: 0x04000BA3 RID: 2979
|
|
public float prevTriggerCancel;
|
|
|
|
// Token: 0x04000BA4 RID: 2980
|
|
public float prevTriggerQuickSave;
|
|
|
|
// Token: 0x04000BA5 RID: 2981
|
|
public float prevTriggerAllMenus;
|
|
|
|
// Token: 0x04000BA6 RID: 2982
|
|
public float prevTriggerParty1;
|
|
|
|
// Token: 0x04000BA7 RID: 2983
|
|
public float prevTriggerParty2;
|
|
|
|
// Token: 0x04000BA8 RID: 2984
|
|
public float prevTriggerPartyItems3;
|
|
|
|
// Token: 0x04000BA9 RID: 2985
|
|
public float prevTriggerPartyItems4;
|
|
|
|
// Token: 0x04000BAA RID: 2986
|
|
public float prevTriggerMenus;
|
|
|
|
// Token: 0x04000BAB RID: 2987
|
|
public float prevTriggerHudLeft;
|
|
|
|
// Token: 0x04000BAC RID: 2988
|
|
public float prevTriggerHudRight;
|
|
|
|
// Token: 0x04000BAD RID: 2989
|
|
public bool actionStart;
|
|
|
|
// Token: 0x04000BAE RID: 2990
|
|
public bool actionDown;
|
|
|
|
// Token: 0x04000BAF RID: 2991
|
|
public bool actionUp;
|
|
|
|
// Token: 0x04000BB0 RID: 2992
|
|
public bool interactStart;
|
|
|
|
// Token: 0x04000BB1 RID: 2993
|
|
public bool itemsDown;
|
|
|
|
// Token: 0x04000BB2 RID: 2994
|
|
public bool itemsStart;
|
|
|
|
// Token: 0x04000BB3 RID: 2995
|
|
public bool itemsUp;
|
|
|
|
// Token: 0x04000BB4 RID: 2996
|
|
public bool targetDodgeStart;
|
|
|
|
// Token: 0x04000BB5 RID: 2997
|
|
public bool targetDodgeDown;
|
|
|
|
// Token: 0x04000BB6 RID: 2998
|
|
public bool targetDodgeUp;
|
|
|
|
// Token: 0x04000BB7 RID: 2999
|
|
public bool aimStart;
|
|
|
|
// Token: 0x04000BB8 RID: 3000
|
|
public bool aimUp;
|
|
|
|
// Token: 0x04000BB9 RID: 3001
|
|
public bool aimHold;
|
|
|
|
// Token: 0x04000BBA RID: 3002
|
|
public bool targetDodgeHold;
|
|
|
|
// Token: 0x04000BBB RID: 3003
|
|
public bool dockStart;
|
|
|
|
// Token: 0x04000BBC RID: 3004
|
|
public bool dockUp;
|
|
|
|
// Token: 0x04000BBD RID: 3005
|
|
public bool dockDown;
|
|
|
|
// Token: 0x04000BBE RID: 3006
|
|
public bool cancelStart;
|
|
|
|
// Token: 0x04000BBF RID: 3007
|
|
public bool quickSaveStart;
|
|
|
|
// Token: 0x04000BC0 RID: 3008
|
|
public bool party1Down;
|
|
|
|
// Token: 0x04000BC1 RID: 3009
|
|
public bool party2Down;
|
|
|
|
// Token: 0x04000BC2 RID: 3010
|
|
public bool partyItems3Down;
|
|
|
|
// Token: 0x04000BC3 RID: 3011
|
|
public bool partyItems4Down;
|
|
|
|
// Token: 0x04000BC4 RID: 3012
|
|
public bool spell1Down;
|
|
|
|
// Token: 0x04000BC5 RID: 3013
|
|
public bool spell2Down;
|
|
|
|
// Token: 0x04000BC6 RID: 3014
|
|
public bool spell3Down;
|
|
|
|
// Token: 0x04000BC7 RID: 3015
|
|
public bool spell4Down;
|
|
|
|
// Token: 0x04000BC8 RID: 3016
|
|
public bool menusDown;
|
|
|
|
// Token: 0x04000BC9 RID: 3017
|
|
public bool zooming;
|
|
|
|
// Token: 0x04000BCA RID: 3018
|
|
public bool hudLeftStart;
|
|
|
|
// Token: 0x04000BCB RID: 3019
|
|
public bool hudRightStart;
|
|
|
|
// Token: 0x04000BCC RID: 3020
|
|
public bool allMenusStart;
|
|
|
|
// Token: 0x04000BCD RID: 3021
|
|
public bool allMenusDown;
|
|
|
|
// Token: 0x04000BCE RID: 3022
|
|
public bool allMenusUp;
|
|
|
|
// Token: 0x04000BCF RID: 3023
|
|
private int currentHudButton;
|
|
|
|
// Token: 0x04000BD0 RID: 3024
|
|
private float lastDockTime;
|
|
|
|
// Token: 0x04000BD1 RID: 3025
|
|
private float targetGroundTime;
|
|
|
|
// Token: 0x04000BD2 RID: 3026
|
|
private float portraitChangeTime;
|
|
|
|
// Token: 0x04000BD3 RID: 3027
|
|
private AnimateButton prevDockButton;
|
|
|
|
// Token: 0x04000BD4 RID: 3028
|
|
public GameObject groundTargetingWaypoint;
|
|
|
|
// Token: 0x04000BD5 RID: 3029
|
|
public string controllerName;
|
|
|
|
// Token: 0x04000BD6 RID: 3030
|
|
public int currentSpriteSheetAsset;
|
|
|
|
// Token: 0x04000BD7 RID: 3031
|
|
public bool hudRightOpen;
|
|
|
|
// Token: 0x04000BD8 RID: 3032
|
|
public bool hudLeftOpen;
|
|
|
|
// Token: 0x04000BD9 RID: 3033
|
|
public bool descWindowOpen;
|
|
|
|
// Token: 0x04000BDA RID: 3034
|
|
public bool endDockNavigation;
|
|
|
|
// Token: 0x04000BDB RID: 3035
|
|
public bool inPartyDock;
|
|
|
|
// Token: 0x04000BDC RID: 3036
|
|
public GameObject hudLeftButton;
|
|
|
|
// Token: 0x04000BDD RID: 3037
|
|
public GameObject hudRightButton;
|
|
|
|
// Token: 0x04000BDE RID: 3038
|
|
public GameObject lastDockButton;
|
|
|
|
// Token: 0x04000BDF RID: 3039
|
|
public TextParser tp1;
|
|
|
|
// Token: 0x04000BE0 RID: 3040
|
|
public TextParser tp2;
|
|
|
|
// Token: 0x04000BE1 RID: 3041
|
|
public TextParser tp3;
|
|
|
|
// Token: 0x04000BE2 RID: 3042
|
|
public TextParser tp4;
|
|
|
|
// Token: 0x04000BE3 RID: 3043
|
|
public string lastMenuOpened;
|
|
|
|
// Token: 0x04000BE4 RID: 3044
|
|
public bool waitingForActionUp;
|
|
|
|
// Token: 0x04000BE5 RID: 3045
|
|
private Vector3 joyPosition;
|
|
|
|
// Token: 0x04000BE6 RID: 3046
|
|
public bool gameFeedScrolling;
|
|
|
|
// Token: 0x04000BE7 RID: 3047
|
|
public bool badgeScrolling;
|
|
|
|
// Token: 0x04000BE8 RID: 3048
|
|
public TextMeshProUGUI skipTxt;
|
|
|
|
// Token: 0x04000BE9 RID: 3049
|
|
public TextMeshProUGUI confirmTxt;
|
|
|
|
// Token: 0x04000BEA RID: 3050
|
|
public GameObject skipText;
|
|
|
|
// Token: 0x04000BEB RID: 3051
|
|
public GameObject confirmText;
|
|
|
|
// Token: 0x04000BEC RID: 3052
|
|
[Header("COMMANDS")]
|
|
private float gravity = -9.81f;
|
|
|
|
// Token: 0x04000BED RID: 3053
|
|
private float initialVelocity = 3f;
|
|
|
|
// Token: 0x04000BEE RID: 3054
|
|
private Quaternion bearing;
|
|
|
|
// Token: 0x04000BEF RID: 3055
|
|
private int trajectoryModifier = 1;
|
|
|
|
// Token: 0x04000BF0 RID: 3056
|
|
private Vector3 projectileVelocity;
|
|
|
|
// Token: 0x04000BF1 RID: 3057
|
|
private Vector3 arcTarget;
|
|
|
|
// Token: 0x04000BF2 RID: 3058
|
|
public float trajectoryPrecision = 20f;
|
|
|
|
// Token: 0x04000BF3 RID: 3059
|
|
public int maximumIterations = 100;
|
|
|
|
// Token: 0x04000BF4 RID: 3060
|
|
private Vector3 gravity2 = new Vector3(0f, -9.81f, 0f);
|
|
|
|
// Token: 0x04000BF5 RID: 3061
|
|
public GameObject lineRendererToDrawTrajectory;
|
|
|
|
// Token: 0x04000BF6 RID: 3062
|
|
private List<LineRenderer> openLineRenderers = new List<LineRenderer>();
|
|
|
|
// Token: 0x04000BF7 RID: 3063
|
|
private List<LineRenderer> usedLineRenderers = new List<LineRenderer>();
|
|
|
|
// Token: 0x04000BF8 RID: 3064
|
|
private Vector3 prevPos;
|
|
|
|
// Token: 0x04000BF9 RID: 3065
|
|
private List<Vector3> arcPoints = new List<Vector3>();
|
|
|
|
// Token: 0x04000BFA RID: 3066
|
|
private int currentArcIndex;
|
|
|
|
// Token: 0x04000BFB RID: 3067
|
|
private Vector3 previousPosition;
|
|
|
|
// Token: 0x04000BFC RID: 3068
|
|
private GameObject arcObject;
|
|
|
|
// Token: 0x04000BFD RID: 3069
|
|
public bool repositionTargeting;
|
|
|
|
// Token: 0x04000BFE RID: 3070
|
|
public bool defenseCircleTargeting;
|
|
|
|
// Token: 0x04000BFF RID: 3071
|
|
public Quaternion defenseCircleRotation;
|
|
|
|
// Token: 0x04000C00 RID: 3072
|
|
private Vector3 defenseCircleHoldPosition;
|
|
|
|
// Token: 0x04000C01 RID: 3073
|
|
private float defenseHoldTime;
|
|
|
|
// Token: 0x04000C02 RID: 3074
|
|
private float foundGroupTime;
|
|
|
|
// Token: 0x04000C03 RID: 3075
|
|
public GameObject messageDefenseHoldMK;
|
|
|
|
// Token: 0x04000C04 RID: 3076
|
|
public GameObject messageDefenseHoldQuickMK;
|
|
|
|
// Token: 0x04000C05 RID: 3077
|
|
public GameObject messageDefenseHoldJoy;
|
|
|
|
// Token: 0x04000C06 RID: 3078
|
|
public Animator messageDefenseHoldAnimMK;
|
|
|
|
// Token: 0x04000C07 RID: 3079
|
|
public Animator messageDefenseHoldQuickAnimMK;
|
|
|
|
// Token: 0x04000C08 RID: 3080
|
|
public Animator messageDefenseHoldAnimJoy;
|
|
|
|
// Token: 0x04000C09 RID: 3081
|
|
public Vector3 frontOfCircle;
|
|
|
|
// Token: 0x04000C0A RID: 3082
|
|
public Vector3 middleCircle;
|
|
|
|
// Token: 0x04000C0B RID: 3083
|
|
public Vector3 backOfCircle;
|
|
|
|
// Token: 0x04000C0C RID: 3084
|
|
public bool quickGroup;
|
|
|
|
// Token: 0x04000C0D RID: 3085
|
|
public bool quickReposition;
|
|
|
|
// Token: 0x04000C0E RID: 3086
|
|
public bool quickCommandAttack;
|
|
|
|
// Token: 0x04000C0F RID: 3087
|
|
public Quaternion circleRotation;
|
|
|
|
// Token: 0x04000C10 RID: 3088
|
|
private Vector3 savedGroupCommandPoint;
|
|
|
|
// Token: 0x04000C11 RID: 3089
|
|
public GameObject circleBreakObject;
|
|
|
|
// Token: 0x04000C12 RID: 3090
|
|
public bool makeCircleMode;
|
|
|
|
// Token: 0x04000C13 RID: 3091
|
|
public Character rallyTargetSelected;
|
|
|
|
// Token: 0x04000C14 RID: 3092
|
|
public GameObject rallyTargetInteractiveSelected;
|
|
}
|