1630 lines
44 KiB
C#
1630 lines
44 KiB
C#
using System;
|
|
using System.Collections;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
// Token: 0x020000B6 RID: 182
|
|
public class ItemBook : MonoBehaviour
|
|
{
|
|
// Token: 0x0600117F RID: 4479 RVA: 0x00155095 File Offset: 0x00153295
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001180 RID: 4480 RVA: 0x00155097 File Offset: 0x00153297
|
|
public void Use()
|
|
{
|
|
this.item.Use();
|
|
}
|
|
|
|
// Token: 0x06001181 RID: 4481 RVA: 0x001550A4 File Offset: 0x001532A4
|
|
public void StartMenu(Item curr, ItemEquipped currEquipped)
|
|
{
|
|
this.item = curr;
|
|
this.itemEquipped = currEquipped;
|
|
this.equipped = false;
|
|
if (!this.item && this.itemEquipped)
|
|
{
|
|
this.equipped = true;
|
|
}
|
|
if (this.groundItemDescription)
|
|
{
|
|
base.gameObject.SetActive(true);
|
|
}
|
|
this.SetNumbers(false);
|
|
}
|
|
|
|
// Token: 0x06001182 RID: 4482 RVA: 0x00155102 File Offset: 0x00153302
|
|
private void CompareStart(int better)
|
|
{
|
|
if (better == 0)
|
|
{
|
|
this.str.Append("<color=#F8553C>");
|
|
return;
|
|
}
|
|
if (better == 1)
|
|
{
|
|
this.str.Append("<color=#8EC14F>");
|
|
return;
|
|
}
|
|
this.str.Append("<color=#988D7D>");
|
|
}
|
|
|
|
// Token: 0x06001183 RID: 4483 RVA: 0x00155140 File Offset: 0x00153340
|
|
private void CompareEnd()
|
|
{
|
|
this.str.Append("</color>");
|
|
}
|
|
|
|
// Token: 0x06001184 RID: 4484 RVA: 0x00155153 File Offset: 0x00153353
|
|
private void EquippedStart(string type)
|
|
{
|
|
if (type == "?")
|
|
{
|
|
this.str.Append(" <color=#5A5146>[vs: ");
|
|
return;
|
|
}
|
|
this.str.Append(" <color=#5A5146>[vs: ");
|
|
}
|
|
|
|
// Token: 0x06001185 RID: 4485 RVA: 0x00155185 File Offset: 0x00153385
|
|
private void EquippedEnd()
|
|
{
|
|
this.str.Append("]</color>");
|
|
}
|
|
|
|
// Token: 0x06001186 RID: 4486 RVA: 0x00155198 File Offset: 0x00153398
|
|
public void SetNumbers(bool ignoreSame)
|
|
{
|
|
ignoreSame = true;
|
|
if (this.prevItem == this.item && !this.equipped && this.open && !ignoreSame)
|
|
{
|
|
return;
|
|
}
|
|
if (this.prevItemEquipped == this.itemEquipped && this.equipped && this.open && !ignoreSame)
|
|
{
|
|
return;
|
|
}
|
|
if (!this.open && this.groundItemDescription)
|
|
{
|
|
this.img.enabled = false;
|
|
this.mainInfoText.enabled = false;
|
|
}
|
|
this.open = true;
|
|
this.prevItem = this.item;
|
|
this.prevItemEquipped = this.itemEquipped;
|
|
this.contentFitter.enabled = false;
|
|
this.str.Clear();
|
|
if (this.csText)
|
|
{
|
|
this.csText.text = "";
|
|
Links.x.characterSheet.descriptionTextRuleset.text = "";
|
|
Links.x.characterSheet.effectsDescription.SetActive(false);
|
|
}
|
|
Vector3 vector = new Vector3(0f, 0f, 0f);
|
|
Vector3 vector2 = new Vector3(0f, 0f, 0f);
|
|
Library.Inventory inventory = null;
|
|
Vector4 vector3 = Vector4.zero;
|
|
bool flag = false;
|
|
int num;
|
|
int num2;
|
|
Library.Inventory inventory2;
|
|
if (this.item)
|
|
{
|
|
num = this.item.ID;
|
|
vector = this.item.socketA;
|
|
vector2 = this.item.socketB;
|
|
num2 = this.item.stackSize;
|
|
inventory2 = this.item.invRow;
|
|
vector3 = this.item.durability;
|
|
flag = this.item.forSale;
|
|
}
|
|
else
|
|
{
|
|
num = this.itemEquipped.ID;
|
|
vector = this.itemEquipped.socketA;
|
|
vector2 = this.itemEquipped.socketB;
|
|
num2 = this.itemEquipped.stackSize;
|
|
inventory2 = this.itemEquipped.invRow;
|
|
vector3 = this.itemEquipped.durability;
|
|
}
|
|
if (this.compareItem && this.comboCompare && !this.itemEquipped)
|
|
{
|
|
inventory = this.compareItem.invRow;
|
|
}
|
|
else
|
|
{
|
|
this.comboCompare = false;
|
|
}
|
|
this.comboCompare = false;
|
|
this.str.Append("<font=Bold><color=#988D7D><size=1.5em>");
|
|
bool flag2 = false;
|
|
if (inventory2._Tag == "Ammunition")
|
|
{
|
|
if (inventory2._Name.Contains("Dart") && num > Links.x.library.dartsMin)
|
|
{
|
|
flag2 = true;
|
|
}
|
|
if (inventory2._Name.Contains("Vial") && num > Links.x.library.vialsMin + 1)
|
|
{
|
|
flag2 = true;
|
|
}
|
|
}
|
|
if (vector3.w == 3f)
|
|
{
|
|
this.str.Append("Quality ");
|
|
}
|
|
if (vector3.w == 1f && !inventory2._Name.Contains("Lacho") && !inventory2._Name.Contains("Gold") && !inventory2._Name.Contains("Licech"))
|
|
{
|
|
this.str.Append("Stolen ");
|
|
}
|
|
this.str.Append(inventory2._DisplayName);
|
|
if (inventory2._Tag == "Ammunition" && vector.x > 0f)
|
|
{
|
|
this.str.Append(" +");
|
|
this.str.Append(vector.x);
|
|
}
|
|
if (num2 > 1 || inventory2._Stackable)
|
|
{
|
|
this.str.Append(" (");
|
|
this.str.Append(num2);
|
|
this.str.Append(") ");
|
|
}
|
|
this.str.Append("</size></color></font>");
|
|
if (this.linkedText)
|
|
{
|
|
this.header = this.str.ToString();
|
|
this.str.Clear();
|
|
}
|
|
bool flag3 = false;
|
|
if (Links.x.characterSheet.open)
|
|
{
|
|
flag3 = true;
|
|
}
|
|
if (this.groundItemDescription)
|
|
{
|
|
this.item.GetLinkedCharacter();
|
|
}
|
|
bool flag4 = flag;
|
|
bool flag5 = false;
|
|
if (Links.x.characterSheet.merchant && Links.x.merchant.isBoro())
|
|
{
|
|
flag4 = false;
|
|
}
|
|
this.needsPortrait = false;
|
|
Character character = null;
|
|
if (flag)
|
|
{
|
|
if (!this.item.linkedCharacter)
|
|
{
|
|
flag4 = false;
|
|
}
|
|
if (this.item.linkedCharacter)
|
|
{
|
|
if (this.item.linkedCharacter.dead)
|
|
{
|
|
flag4 = false;
|
|
this.item.forSale = false;
|
|
}
|
|
if (this.item.linkedCharacter.stunned)
|
|
{
|
|
flag4 = false;
|
|
}
|
|
if (flag4 && Links.x.main.body.sneaking)
|
|
{
|
|
flag5 = this.item.CheckToSteal(false);
|
|
flag4 = false;
|
|
this.str.Append("\n<color #629AA4>Will try to steal item</color>");
|
|
}
|
|
}
|
|
if ((flag4 || flag5) && this.groundItemDescription)
|
|
{
|
|
this.needsPortrait = true;
|
|
character = this.item.linkedCharacter;
|
|
}
|
|
}
|
|
else if (this.item && this.item.linkedCharacter && !flag3 && Links.x.main.body.sneaking)
|
|
{
|
|
flag5 = this.item.CheckToSteal(false);
|
|
this.str.Append("\n<color #629AA4>Will try to steal item</color>");
|
|
if (flag4 && this.groundItemDescription)
|
|
{
|
|
this.needsPortrait = true;
|
|
character = this.item.linkedCharacter;
|
|
}
|
|
}
|
|
if (this.needsPortrait)
|
|
{
|
|
this.portraitCharacter = character;
|
|
}
|
|
else if (this.portraitObject)
|
|
{
|
|
this.portraitObject.SetActive(false);
|
|
}
|
|
if (flag2)
|
|
{
|
|
string text = "Globes";
|
|
if (!inventory2._Name.Contains("Vial"))
|
|
{
|
|
text = "Wraps";
|
|
}
|
|
this.str.Append("\n<color #FFD043>");
|
|
this.str.Append(text);
|
|
this.str.Append(" are used for rally attacks and do not need to be equipped.</color>");
|
|
}
|
|
if (inventory2._RightClickAction == "Spellbook")
|
|
{
|
|
Character creationID = Links.x.GetCreationID((int)vector.x);
|
|
if (creationID)
|
|
{
|
|
this.str.Append("\nBelongs to ");
|
|
this.str.Append(creationID.stats.GetName());
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\nOwner no longer in the party. Spells cannot be used by others.");
|
|
}
|
|
}
|
|
else if (inventory2._Name.Contains("Songbook"))
|
|
{
|
|
if (inventory2._RightClickAction == "Songbook")
|
|
{
|
|
Character creationID2 = Links.x.GetCreationID((int)vector.x);
|
|
if (creationID2)
|
|
{
|
|
this.str.Append("\nBelongs to ");
|
|
this.str.Append(creationID2.stats.GetName());
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\nOwner no longer in the party. Songs cannot be played by others.");
|
|
}
|
|
}
|
|
else if (inventory2._Name == "SorinaSongbook")
|
|
{
|
|
this.str.Append("\nBelongs to Sorina");
|
|
}
|
|
}
|
|
if ((vector3.w == 1f || vector3.w == 2f || vector3.w == 3f) && Links.x.characterSheet.merchant && !Links.x.merchant.isBoro() && vector3.w == 1f)
|
|
{
|
|
if (!Links.x.merchant.CanSellContraband())
|
|
{
|
|
this.str.Append("\n<color #629AA4>Cannot sell contraband</color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n<color #B28D50>Will buy contraband</color>");
|
|
}
|
|
}
|
|
if (flag4 || (Links.x.characterSheet.merchant && vector3.w == 0f && flag))
|
|
{
|
|
float num3;
|
|
if (this.groundItemDescription)
|
|
{
|
|
num3 = this.item.GetCost(false, Links.x.main, this.item.linkedCharacter);
|
|
}
|
|
else
|
|
{
|
|
num3 = this.item.GetCost(false, Links.x.main, this.item.linkedCharacter);
|
|
}
|
|
if (Links.x.merchant && !this.groundItemDescription)
|
|
{
|
|
num3 = Mathf.Ceil((float)this.item.invRow._SellPrice * Links.x.characterSheet.character.stats.PartyDispositionSell(Links.x.diorama.sceneName, Links.x.merchant.merchantCharacter));
|
|
if (!this.item.invRow._NeedFullStack)
|
|
{
|
|
num3 *= (float)this.item.stackSize;
|
|
}
|
|
if (this.item.socketA.x > 0f)
|
|
{
|
|
num3 += this.item.socketB.y;
|
|
}
|
|
}
|
|
this.str.Append("\n<color #B28D50>Cost: ");
|
|
this.str.Append(num3);
|
|
this.str.Append(" em</color>");
|
|
if (Records.x.BribeBadgeCount() > 0)
|
|
{
|
|
this.str.Append("<color ");
|
|
this.str.Append(Links.x.characterSheet.redColor);
|
|
this.str.Append("> (reputation penalty)</color>");
|
|
}
|
|
}
|
|
else if (Links.x.characterSheet.merchant && vector3.w != 1f && vector3.w != 2f && !Links.x.merchant.isBoro())
|
|
{
|
|
if (this.item.stackSize == 0)
|
|
{
|
|
this.item.stackSize = 1;
|
|
}
|
|
float num4;
|
|
if (this.groundItemDescription)
|
|
{
|
|
num4 = Mathf.Ceil((float)(this.item.invRow._SellPrice * this.item.stackSize) * Links.x.main.stats.DispositionSell(Links.x.diorama.sceneName, this.item.linkedCharacter));
|
|
}
|
|
else
|
|
{
|
|
num4 = Mathf.Ceil((float)this.item.invRow._SellPrice * Links.x.characterSheet.character.stats.PartyDispositionSell(Links.x.diorama.sceneName, Links.x.merchant.merchantCharacter));
|
|
num4 = Links.x.merchant.GetItemHistoryCount(inventory2, num4);
|
|
if (!this.item.invRow._NeedFullStack)
|
|
{
|
|
num4 *= (float)this.item.stackSize;
|
|
}
|
|
}
|
|
if (vector3.w < 0f)
|
|
{
|
|
num4 = vector3.w * -1f;
|
|
}
|
|
if (this.item.socketA.x > 0f)
|
|
{
|
|
num4 += this.item.socketB.y;
|
|
}
|
|
this.str.Append("\n<color #B28D50>Sell for: ");
|
|
this.str.Append(num4);
|
|
this.str.Append(" em</color>");
|
|
if (Records.x.BribeBadgeCount() > 0)
|
|
{
|
|
this.str.Append("<color ");
|
|
this.str.Append(Links.x.characterSheet.redColor);
|
|
this.str.Append("> (reputation penalty)</color>");
|
|
}
|
|
}
|
|
if (inventory2._MainSkill != "")
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Uses Skill: </color>");
|
|
if (this.linkedText)
|
|
{
|
|
string text2 = inventory2._MainSkill;
|
|
if (this.itemEquipped && Links.x.characterSheet.body && !this.itemEquipped.invRow._Tag.Contains("Shield") && (this.itemEquipped.name.Contains("Off Hand") || this.itemEquipped.name.Contains("Alt Hand 2")))
|
|
{
|
|
text2 = "Multi-Hand";
|
|
}
|
|
int combatSkillID = Links.x.characterSheet.character.stats.GetCombatSkillID(text2);
|
|
if (Links.x.characterSheet.character.stats.GetSkill(combatSkillID) < 50f)
|
|
{
|
|
this.str.Append("<color=#F8553C>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("<color=#8EC14F>");
|
|
}
|
|
this.str.Append(Links.x.manual.DisplayName(text2));
|
|
this.str.Append("</color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(Links.x.manual.DisplayName(inventory2._MainSkill));
|
|
}
|
|
}
|
|
string text3 = "";
|
|
if (inventory2._DurabilityMax > 0 && (inventory2._Tag == "Weapon" || inventory2._Tag == "Armor" || inventory2._Tag == "Shield") && inventory2._ID > 1)
|
|
{
|
|
float num5 = vector3.x / (float)inventory2._DurabilityMax;
|
|
this.str.Append("\n<color=#5B5452>Condition: </color>");
|
|
if (num5 < 0.25f)
|
|
{
|
|
this.str.Append("<color=");
|
|
this.str.Append(Links.x.characterSheet.redColor);
|
|
this.str.Append(">");
|
|
}
|
|
this.str.Append((int)vector3.x);
|
|
this.str.Append("/");
|
|
this.str.Append(inventory2._DurabilityMax);
|
|
if (num5 < 0.25f && inventory2._Tag == "Weapon")
|
|
{
|
|
text3 += "<color=";
|
|
text3 += Links.x.characterSheet.redColor;
|
|
text3 += ">";
|
|
text3 += "Damage reduced, use hammers to repair</color>";
|
|
}
|
|
if (num5 < 0.25f && inventory2._Tag == "Armor")
|
|
{
|
|
text3 += "<color=";
|
|
text3 += Links.x.characterSheet.redColor;
|
|
text3 += ">";
|
|
text3 += "nArmor reduced, patch to repair</color>";
|
|
}
|
|
this.str.Append("</color>");
|
|
}
|
|
int num6 = 1;
|
|
if (inventory2._EquipSlotID == 0 || inventory2._EquipSlotID == 4)
|
|
{
|
|
if (inventory2._MeleeRangeEnd >= 5f)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Damage:</color> ");
|
|
this.str.Append(inventory2._DmgMax);
|
|
this.str.Append(" + from <lowercase>");
|
|
if (inventory2._Ammo1 == "Dart")
|
|
{
|
|
this.str.Append("stone");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(inventory2._Ammo1);
|
|
}
|
|
if (!inventory2._Ammo1.Contains("+"))
|
|
{
|
|
this.str.Append("s</lowercase>");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (this.comboCompare)
|
|
{
|
|
if (inventory._DmgMax > inventory2._DmgMax)
|
|
{
|
|
num6 = 0;
|
|
}
|
|
if (inventory._DmgMax == inventory2._DmgMax)
|
|
{
|
|
if (inventory._DmgMin == inventory2._DmgMin)
|
|
{
|
|
num6 = 2;
|
|
}
|
|
else if (inventory._DmgMin > inventory2._DmgMin)
|
|
{
|
|
num6 = 0;
|
|
}
|
|
else
|
|
{
|
|
num6 = 1;
|
|
}
|
|
}
|
|
}
|
|
if (inventory2._DmgMax > 0)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Damage: </color>");
|
|
if (this.comboCompare)
|
|
{
|
|
this.CompareStart(num6);
|
|
}
|
|
this.str.Append(inventory2._DmgMax);
|
|
if (this.comboCompare)
|
|
{
|
|
this.CompareEnd();
|
|
}
|
|
}
|
|
if (this.comboCompare && inventory._DmgMax > 0)
|
|
{
|
|
this.EquippedStart("hand");
|
|
this.str.Append(inventory._DmgMax);
|
|
this.EquippedEnd();
|
|
}
|
|
}
|
|
num6 = 1;
|
|
if (this.comboCompare)
|
|
{
|
|
if (inventory._WpnSpeed < inventory2._WpnSpeed)
|
|
{
|
|
num6 = 0;
|
|
}
|
|
if (inventory._WpnSpeed == inventory2._WpnSpeed)
|
|
{
|
|
num6 = 2;
|
|
}
|
|
}
|
|
if (inventory2._Tag != "Ammunition")
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Attack Speed: </color>");
|
|
if (this.comboCompare)
|
|
{
|
|
this.CompareStart(num6);
|
|
}
|
|
this.str.Append(inventory2._WpnSpeed);
|
|
if (this.comboCompare)
|
|
{
|
|
this.CompareEnd();
|
|
}
|
|
this.str.Append(" sec.");
|
|
if (this.comboCompare)
|
|
{
|
|
this.EquippedStart("hand");
|
|
this.str.Append(inventory._WpnSpeed);
|
|
this.EquippedEnd();
|
|
}
|
|
}
|
|
}
|
|
else if (inventory2._EquipSlotID == 13 && inventory2._DmgMax > 0)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Song Power: </color>");
|
|
this.str.Append(inventory2._DmgMax);
|
|
}
|
|
if (inventory2._EvasionReduction > 0f)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Evasion Reduction: </color>");
|
|
this.str.Append(inventory2._EvasionReduction);
|
|
}
|
|
if (inventory2._EvasionReduction < 0f)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Evasion Bonus: </color>");
|
|
this.str.Append(inventory2._EvasionReduction * -1f);
|
|
}
|
|
if (inventory2._DurabilityReductionBonus > 0f && (inventory2._Tag == "Weapon" || inventory2._Tag == "Ammunition"))
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Breaks Armor: </color>");
|
|
this.str.Append(inventory2._DurabilityReductionBonus + 1f);
|
|
}
|
|
if (inventory2._StaminaReduction > 0f && inventory2._Tag == "Weapon")
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Saps Target's Stamina: </color>");
|
|
this.str.Append(inventory2._StaminaReduction);
|
|
}
|
|
if (inventory2._HitTimeIncrease > 0f && inventory2._Tag == "Weapon")
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Increases Target's Recovery: </color>");
|
|
this.str.Append(inventory2._HitTimeIncrease);
|
|
}
|
|
if (inventory2._Tag == "Weapon" && inventory2._MultiTargetMod > 0f)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Multi-Hit Increase: </color>");
|
|
this.str.Append(inventory2._MultiTargetMod);
|
|
this.str.Append("%");
|
|
}
|
|
if (inventory2._EquipSlotID == 0)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Range: </color>");
|
|
if (inventory2._MeleeRangeStart > 0f)
|
|
{
|
|
this.str.Append(inventory2._MeleeRangeStart);
|
|
this.str.Append(" to ");
|
|
}
|
|
this.str.Append(inventory2._MeleeRangeEnd);
|
|
this.str.Append("\n");
|
|
if (inventory2._TwoHanded)
|
|
{
|
|
this.str.Append("Two-Handed");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("One-Handed");
|
|
}
|
|
}
|
|
if (inventory2._AC > 0f || inventory2._Tag == "Jewelry")
|
|
{
|
|
if (inventory2._Tag == "Armor" || inventory2._Tag == "Shield")
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Physical Armor: </color>");
|
|
this.str.Append(inventory2._AC * 10f);
|
|
this.str.Append("%");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Glamor: </color>");
|
|
this.str.Append(inventory2._AC);
|
|
}
|
|
}
|
|
if (inventory2._MagicAC > 0f)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Pagan Armor: </color>");
|
|
num6 = 1;
|
|
if (this.comboCompare)
|
|
{
|
|
if (inventory._MagicAC > inventory2._MagicAC)
|
|
{
|
|
num6 = 0;
|
|
}
|
|
if (inventory._MagicAC == inventory2._MagicAC)
|
|
{
|
|
num6 = 2;
|
|
}
|
|
}
|
|
if (this.comboCompare)
|
|
{
|
|
this.CompareStart(num6);
|
|
}
|
|
this.str.Append(inventory2._MagicAC * 10f);
|
|
this.str.Append("%");
|
|
if (this.comboCompare)
|
|
{
|
|
this.CompareEnd();
|
|
}
|
|
if (this.comboCompare)
|
|
{
|
|
this.EquippedStart("");
|
|
this.str.Append(inventory._MagicAC);
|
|
this.EquippedEnd();
|
|
}
|
|
}
|
|
if (inventory2._MagicBonus > 0f)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Pagan Bonus: </color>");
|
|
num6 = 1;
|
|
if (this.comboCompare)
|
|
{
|
|
if (inventory._MagicBonus > inventory2._MagicBonus)
|
|
{
|
|
num6 = 0;
|
|
}
|
|
if (inventory._MagicBonus == inventory2._MagicBonus)
|
|
{
|
|
num6 = 2;
|
|
}
|
|
}
|
|
if (this.comboCompare)
|
|
{
|
|
this.CompareStart(num6);
|
|
}
|
|
this.str.Append((int)inventory2._MagicBonus);
|
|
if (this.comboCompare)
|
|
{
|
|
this.CompareEnd();
|
|
}
|
|
if (this.comboCompare)
|
|
{
|
|
this.EquippedStart("");
|
|
this.str.Append(inventory._MagicBonus);
|
|
this.EquippedEnd();
|
|
}
|
|
}
|
|
if (inventory2._Life > 0 && !inventory2._Effect.Contains("Cure"))
|
|
{
|
|
bool flag6 = false;
|
|
int num7 = 0;
|
|
bool flag7 = false;
|
|
bool flag8 = false;
|
|
if (this.item && this.item.linkedCreatures)
|
|
{
|
|
flag8 = true;
|
|
}
|
|
if (flag8)
|
|
{
|
|
if (flag)
|
|
{
|
|
flag6 = true;
|
|
this.str.Append("\n<color=#B28D50>Shelf Life After Purchase: ");
|
|
num7 = inventory2._Life;
|
|
flag7 = true;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
num7 = (int)vector3.x - (int)Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours());
|
|
if (num7 <= 5)
|
|
{
|
|
this.str.Append("\n<color=");
|
|
flag6 = true;
|
|
this.str.Append(Links.x.characterSheet.redColor);
|
|
this.str.Append("><color=#5B5452>Lasts for: </color>");
|
|
}
|
|
else
|
|
{
|
|
flag6 = true;
|
|
this.str.Append("\n<color=#B28D50>Lasts for: ");
|
|
}
|
|
flag7 = true;
|
|
}
|
|
if (flag7)
|
|
{
|
|
if (num7 >= 48)
|
|
{
|
|
this.str.Append(Mathf.RoundToInt((float)num7 / 24f));
|
|
this.str.Append(" day");
|
|
if (num7 != 1)
|
|
{
|
|
this.str.Append("s");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(num7);
|
|
this.str.Append(" hour");
|
|
if (num7 != 1)
|
|
{
|
|
this.str.Append("s");
|
|
}
|
|
}
|
|
if (flag6)
|
|
{
|
|
this.str.Append("</color>");
|
|
}
|
|
}
|
|
if (inventory2._Effect.Contains("Cure"))
|
|
{
|
|
string text4 = "Cure";
|
|
string text5 = "";
|
|
int num8 = inventory2._Effect.IndexOf(text4);
|
|
if (num8 != -1)
|
|
{
|
|
text5 = inventory2._Effect.Substring(num8 + text4.Length);
|
|
}
|
|
Library.Effects effectRow = Links.x.library.GetEffectRow(text5);
|
|
if (effectRow != null)
|
|
{
|
|
Links.x.manual.GetEffectDescription(effectRow, (float)((int)inventory2._Level), 0);
|
|
this.str.Append("\n<color=#5B5452>Cures: </color>");
|
|
this.str.Append(effectRow._DisplayName);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Library.Effects effectRow2 = Links.x.library.GetEffectRow(inventory2._Effect);
|
|
if (effectRow2 != null)
|
|
{
|
|
string effectDescription = Links.x.manual.GetEffectDescription(effectRow2, (float)((int)inventory2._Level), 0);
|
|
this.str.Append("\n<color=#5B5452>Effect: </color>");
|
|
this.str.Append(effectDescription);
|
|
}
|
|
}
|
|
}
|
|
else if (inventory2._Effect.Contains("Cure"))
|
|
{
|
|
string text6 = "Cure";
|
|
string text7 = "";
|
|
int num9 = inventory2._Effect.IndexOf(text6);
|
|
if (num9 != -1)
|
|
{
|
|
text7 = inventory2._Effect.Substring(num9 + text6.Length);
|
|
}
|
|
Library.Effects effectRow3 = Links.x.library.GetEffectRow(text7);
|
|
if (effectRow3 != null)
|
|
{
|
|
if (this.itemEquipped)
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Curing: </color>");
|
|
this.str.Append(effectRow3._DisplayName);
|
|
this.str.Append("\n<color=#5B5452>Seconds until cure: </color>");
|
|
int num10 = (int)vector3.x - (int)Links.x.gameplay.seconds;
|
|
float num11 = Records.x.ShowSeconds(num10);
|
|
this.str.Append(Mathf.Round(num11));
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Can cure when worn: </color>");
|
|
this.str.Append(effectRow3._DisplayName);
|
|
this.str.Append("\n<color=#5B5452>Requires: </color>");
|
|
this.str.Append(Mathf.Round(Records.x.ShowSeconds(inventory2._Life)));
|
|
this.str.Append(" seconds of wear");
|
|
}
|
|
}
|
|
}
|
|
else if (inventory2._Effect != "")
|
|
{
|
|
Library.Effects effectRow4 = Links.x.library.GetEffectRow(inventory2._Effect);
|
|
if (effectRow4 != null)
|
|
{
|
|
int num12 = 0;
|
|
if (inventory2._Tag == "Jewelry")
|
|
{
|
|
num12 = 1;
|
|
}
|
|
string text8;
|
|
if (!effectRow4._Name.Contains("Dart") && !effectRow4._Name.Contains("Vial"))
|
|
{
|
|
text8 = Links.x.manual.GetEffectDescription(effectRow4, (float)((int)inventory2._Level), num12);
|
|
}
|
|
else if (this.groundItemDescription)
|
|
{
|
|
text8 = Links.x.manual.GetEffectDescription(effectRow4, (float)Links.x.main.stats.level, num12);
|
|
}
|
|
else
|
|
{
|
|
text8 = Links.x.manual.GetEffectDescription(effectRow4, (float)Links.x.characterSheet.character.stats.level, num12);
|
|
}
|
|
if (inventory2._Tag == "Ammunition")
|
|
{
|
|
if (inventory2._Name.Contains("Dart"))
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Poison Effects: </color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Elyxir Effects: </color>");
|
|
}
|
|
this.str.Append(text8);
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n<color=#5B5452>Effects: </color>");
|
|
this.str.Append(text8);
|
|
}
|
|
}
|
|
}
|
|
else if (inventory2._ID == Links.x.library.bombID)
|
|
{
|
|
int num13 = (int)vector3.x + 126 - (int)Mathf.Floor(Links.x.gameplay.seconds);
|
|
this.str.Append("\n<color=");
|
|
this.str.Append(Links.x.characterSheet.redColor);
|
|
this.str.Append("><color=#5B5452>Explodes in: </color>");
|
|
float num14 = Records.x.ShowSeconds(num13);
|
|
if (num14 > 120f)
|
|
{
|
|
this.str.Append(num14);
|
|
this.str.Append("1 minute and ");
|
|
this.str.Append(num14 - 120f);
|
|
this.str.Append(" second");
|
|
if (num14 - 120f != 1f)
|
|
{
|
|
this.str.Append("s");
|
|
}
|
|
this.str.Append("</color>");
|
|
}
|
|
else if (num14 > 60f)
|
|
{
|
|
this.str.Append(num14);
|
|
this.str.Append("1 minute and ");
|
|
this.str.Append(num14 - 60f);
|
|
this.str.Append(" second");
|
|
if (num14 - 60f != 1f)
|
|
{
|
|
this.str.Append("s");
|
|
}
|
|
this.str.Append("</color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(num14);
|
|
this.str.Append(" second");
|
|
if (num14 != 1f)
|
|
{
|
|
this.str.Append("s");
|
|
}
|
|
this.str.Append("</color>");
|
|
}
|
|
}
|
|
if (inventory2._ID == Links.x.library.torchID || inventory2._ID == Links.x.library.incenseTorchID)
|
|
{
|
|
float num15 = vector3.z;
|
|
if (!this.itemEquipped)
|
|
{
|
|
num15 = Links.x.gameplay.seconds;
|
|
}
|
|
float seconds = Links.x.gameplay.seconds;
|
|
float num16 = Mathf.Round((vector3.x - (seconds - num15)) / 60f);
|
|
this.str.Append("\n\n<color=#5B5452>Can be lit for: </color>");
|
|
if (num16 > 60f)
|
|
{
|
|
float num17 = Mathf.Round(num16 / 60f * 10f) / 10f;
|
|
this.str.Append(num17);
|
|
this.str.Append(" hour");
|
|
if (num17 != 1f)
|
|
{
|
|
this.str.Append("s");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.str.Append(num16);
|
|
this.str.Append(" minute");
|
|
if (num16 != 1f)
|
|
{
|
|
this.str.Append("s");
|
|
}
|
|
}
|
|
}
|
|
if (inventory2._Tag.Contains("Armor") && inventory2._EquipSlotID == 9 && !this.compare)
|
|
{
|
|
this.str.Append("\n\n<color=#5B5452>Patches Applied: </color>");
|
|
int num18 = 0;
|
|
for (int i = 0; i < inventory2._SocketMax; i++)
|
|
{
|
|
int num19 = 0;
|
|
if (i == 0)
|
|
{
|
|
num19 = (int)vector.x;
|
|
}
|
|
if (i == 1)
|
|
{
|
|
num19 = (int)vector.y;
|
|
}
|
|
if (i == 2)
|
|
{
|
|
num19 = (int)vector.z;
|
|
}
|
|
if (i == 3)
|
|
{
|
|
num19 = (int)vector2.x;
|
|
}
|
|
if (i == 4)
|
|
{
|
|
num19 = (int)vector2.y;
|
|
}
|
|
if (i == 5)
|
|
{
|
|
num19 = (int)vector2.z;
|
|
}
|
|
num19 = this.SocketIndex(num19);
|
|
if (num19 > 0)
|
|
{
|
|
num18++;
|
|
}
|
|
}
|
|
this.str.Append(num18);
|
|
this.str.Append("/");
|
|
this.str.Append(inventory2._SocketMax);
|
|
}
|
|
if (inventory2._Tag == "Gem")
|
|
{
|
|
this.str.Append("\n\n<color=#5B5452>Mineral Value: </color>");
|
|
this.str.Append(Links.x.inventory.MineralValue(inventory2));
|
|
}
|
|
if (!this.compare)
|
|
{
|
|
bool flag9 = false;
|
|
if (inventory2._Tag.Contains("Socket"))
|
|
{
|
|
if (inventory2._Tag.Contains("Armor"))
|
|
{
|
|
this.str.Append("\n\n");
|
|
this.str.Append("<color #5E584D>");
|
|
this.str.Append("Drag onto damaged armor to temporarily patch tears. Armor must be unequipped to be patched.");
|
|
this.str.Append("</color>");
|
|
}
|
|
else if (inventory2._Tag == "Socket")
|
|
{
|
|
this.str.Append("\n\n");
|
|
this.str.Append("<color #5E584D>");
|
|
this.str.Append("Drag onto weapon to embed. Weapon must be unequipped to set ");
|
|
this.str.Append(inventory2._DisplayName);
|
|
this.str.Append(".");
|
|
this.str.Append("</color>");
|
|
}
|
|
}
|
|
if (inventory2._Tag == "Note" && !this.groundItemDescription && !Links.x.inventory.repairing && !Links.x.inventory.mineralizing)
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite = Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Examine");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex = Links.x.keyControl.GetKeyIconIndex("RMB");
|
|
this.str.Append(keyIconIndex);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Examine");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
if ((inventory2._RightClickAction == "Spellbook" || inventory2._RightClickAction == "Songbook") && !Links.x.inventory.repairing && !Links.x.inventory.mineralizing)
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite2 = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite2);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Open book");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex2 = Links.x.keyControl.GetKeyIconIndex("RMB");
|
|
this.str.Append(keyIconIndex2);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Open book");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
if (inventory2._RightClickAction == "Consume" && !this.groundItemDescription && !Links.x.inventory.repairing && !Links.x.inventory.mineralizing)
|
|
{
|
|
if (Records.x.InCombat(false))
|
|
{
|
|
this.str.Append("\n\n<color=");
|
|
this.str.Append(Links.x.characterSheet.redColor);
|
|
this.str.Append(">Cannot consume from menu during combat!</color>\n");
|
|
}
|
|
else if (Links.x.joy)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite3 = Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite3);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Consume");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex3 = Links.x.keyControl.GetKeyIconIndex("RMB");
|
|
this.str.Append(keyIconIndex3);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Consume");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
if (!this.groundItemDescription)
|
|
{
|
|
if (Links.x.inventory.repairing)
|
|
{
|
|
if (inventory2._Tag == "Weapon" || (inventory2._Tag == "Jewelry" && inventory2._Effect == "") || (inventory2._Tag == "Armor" && (Links.x.characterSheet.blacksmith || Links.x.characterSheet.pagan)))
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
flag9 = true;
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite4 = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite4);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Repair");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex4 = Links.x.keyControl.GetKeyIconIndex("LMB");
|
|
this.str.Append(keyIconIndex4);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Repair");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
}
|
|
else if (Links.x.inventory.mineralizing)
|
|
{
|
|
if (inventory2._Tag == "Gem")
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite5 = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite5);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Mineralize");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex5 = Links.x.keyControl.GetKeyIconIndex("LMB");
|
|
this.str.Append(keyIconIndex5);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Mineralize");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
}
|
|
else if (this.item && this.item.stackSize > 1 && inventory2._Stackable && !this.item.forSale && !this.item.inGroundMenu)
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite6 = Links.x.gameplay.GetControllerSprite("BtnNorth", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite6);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Split stack");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <cspace=-.5em><voffset=.4em><size=45><sprite=");
|
|
int keyIconIndex6 = Links.x.keyControl.GetKeyIconIndex("Left Shift");
|
|
this.str.Append(keyIconIndex6);
|
|
this.str.Append("></size><size=30><sprite=");
|
|
int keyIconIndex7 = Links.x.keyControl.GetKeyIconIndex("LMB");
|
|
this.str.Append(keyIconIndex7);
|
|
this.str.Append("></size></cspace></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Split stack");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
}
|
|
if (inventory2._RightClickAction == "Repair" && !this.groundItemDescription)
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
flag9 = true;
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite7 = Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite7);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Use hammers");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex8 = Links.x.keyControl.GetKeyIconIndex("RMB");
|
|
this.str.Append(keyIconIndex8);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Use hammers");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
if (inventory2._RightClickAction == "GemRepair" && !this.groundItemDescription)
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite8 = Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite8);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Use morter and pestle");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex9 = Links.x.keyControl.GetKeyIconIndex("RMB");
|
|
this.str.Append(keyIconIndex9);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Use morter and pestle");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
if (Links.x.characterSheet.open && Links.x.characterSheet.enchanting && vector.x <= 0f && (inventory2._Tag == "Jewelry" || inventory2._Tag == "Weapon"))
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
flag9 = true;
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite9 = Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite9);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Bless");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex10 = Links.x.keyControl.GetKeyIconIndex("LMB");
|
|
this.str.Append(keyIconIndex10);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Bless");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
if (inventory2._Tag == "ArrowKit" && !this.groundItemDescription && !Links.x.inventory.enchantMenu.open && !Links.x.characterSheet.blacksmith && !Links.x.characterSheet.pagan)
|
|
{
|
|
if (Links.x.joy)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite10 = Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite10);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Open field kit");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
else
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int keyIconIndex11 = Links.x.keyControl.GetKeyIconIndex("RMB");
|
|
this.str.Append(keyIconIndex11);
|
|
this.str.Append("></size></voffset><cspace=.5em><size=1em></cspace>");
|
|
this.str.Append("Open field kit");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
this.descStr.Clear();
|
|
if (text3 != "")
|
|
{
|
|
this.descStr.Append(text3);
|
|
this.descStr.Append("\n\n");
|
|
}
|
|
if (inventory2._Tag == "Weapon" || inventory2._Tag == "Jewelry")
|
|
{
|
|
if (vector.x > 0f)
|
|
{
|
|
float z = vector2.z;
|
|
bool flag10 = false;
|
|
if (!this.groundItemDescription && Links.x.characterSheet.open)
|
|
{
|
|
if (Links.x.characterSheet.character.stats.CanWearEnchantedItem(z))
|
|
{
|
|
this.descStr.Append("<color=#9A7890>Intercession: ");
|
|
flag10 = true;
|
|
}
|
|
else
|
|
{
|
|
this.descStr.Append("Inactive Intercession: ");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.descStr.Append("<color=#9A7890>Intercession: ");
|
|
flag10 = true;
|
|
}
|
|
Library.Pagan paganRowByID = Links.x.library.GetPaganRowByID(vector.x);
|
|
this.descStr.Append(paganRowByID._DisplayName);
|
|
this.descStr.Append("\n");
|
|
this.descStr.Append(paganRowByID._Description);
|
|
for (int j = 0; j < 3; j++)
|
|
{
|
|
float num20 = vector.y;
|
|
if (j == 1)
|
|
{
|
|
num20 = vector.z;
|
|
}
|
|
if (j == 2)
|
|
{
|
|
num20 = vector2.x;
|
|
}
|
|
string text9 = paganRowByID._Slider1;
|
|
if (j == 1)
|
|
{
|
|
text9 = paganRowByID._Slider2;
|
|
}
|
|
if (j == 2)
|
|
{
|
|
text9 = paganRowByID._Slider3;
|
|
}
|
|
num20 = Mathf.Round(num20 * 100f) / 100f;
|
|
if (text9 == "Radius")
|
|
{
|
|
this.descStr.Append("\nRadius: ");
|
|
this.descStr.Append(num20);
|
|
this.descStr.Append(" pole");
|
|
if (num20 > 1f)
|
|
{
|
|
this.descStr.Append("s");
|
|
}
|
|
}
|
|
if (text9 == "Targets")
|
|
{
|
|
this.descStr.Append("\nTargets: ");
|
|
this.descStr.Append(num20);
|
|
}
|
|
if (text9 == "Distance")
|
|
{
|
|
this.descStr.Append("\nDistance: ");
|
|
this.descStr.Append(num20);
|
|
}
|
|
if (text9 == "Tile")
|
|
{
|
|
this.descStr.Append("\nDistance: ");
|
|
this.descStr.Append(num20);
|
|
}
|
|
if (text9.Contains("Potency") || text9.Contains("Reduction"))
|
|
{
|
|
this.descStr.Append("\n");
|
|
this.descStr.Append(text9);
|
|
this.descStr.Append(": ");
|
|
this.descStr.Append(num20);
|
|
}
|
|
if (text9.Contains("Duration"))
|
|
{
|
|
this.descStr.Append("\nEffect Duration: ");
|
|
this.descStr.Append(num20);
|
|
this.descStr.Append(" second");
|
|
if (num20 > 1f)
|
|
{
|
|
this.descStr.Append("s");
|
|
}
|
|
}
|
|
if (text9.Contains("Time"))
|
|
{
|
|
this.descStr.Append("\nEffect Time: ");
|
|
this.descStr.Append(num20);
|
|
this.descStr.Append(" second");
|
|
if (num20 > 1f)
|
|
{
|
|
this.descStr.Append("s");
|
|
}
|
|
}
|
|
if (text9.Contains("First Strike Speed"))
|
|
{
|
|
this.descStr.Append("\nFirst Strike");
|
|
}
|
|
}
|
|
if (!this.groundItemDescription && Links.x.characterSheet.open)
|
|
{
|
|
this.descStr.Append("\nDifficulty: ");
|
|
this.descStr.Append(z);
|
|
this.descStr.Append(" vs. ");
|
|
this.descStr.Append(Links.x.characterSheet.character.stats.GetName());
|
|
this.descStr.Append("'s ");
|
|
this.descStr.Append(Links.x.characterSheet.character.stats.EnchantWearingAbility());
|
|
this.descStr.Append("\n\n");
|
|
}
|
|
if (flag10)
|
|
{
|
|
this.descStr.Append("</color>");
|
|
}
|
|
}
|
|
if (this.groundItemDescription)
|
|
{
|
|
string text10 = this.descStr.ToString();
|
|
this.str.Append("\n\n");
|
|
this.str.Append(text10);
|
|
}
|
|
}
|
|
if (this.groundItemDescription || !this.linkedText)
|
|
{
|
|
if (inventory2._Description != "")
|
|
{
|
|
this.str.Append("\n\n");
|
|
this.str.Append(inventory2._Description);
|
|
}
|
|
}
|
|
else if (inventory2._Description != "")
|
|
{
|
|
this.descStr.Append(inventory2._Description);
|
|
this.descStr.Append("\n\nWeighs ");
|
|
if (inventory2._Weight < 1f)
|
|
{
|
|
this.descStr.Append("less than 1");
|
|
}
|
|
else
|
|
{
|
|
this.descStr.Append(inventory2._Weight);
|
|
}
|
|
if (inventory2._Weight <= 1f)
|
|
{
|
|
this.descStr.Append(" stone");
|
|
if (inventory2._Stackable)
|
|
{
|
|
this.descStr.Append(" each");
|
|
}
|
|
this.descStr.Append(".");
|
|
}
|
|
else
|
|
{
|
|
this.descStr.Append(" stones");
|
|
if (inventory2._Stackable)
|
|
{
|
|
this.descStr.Append(" each");
|
|
}
|
|
this.descStr.Append(".");
|
|
}
|
|
}
|
|
if (this.groundItemDescription)
|
|
{
|
|
if (flag4 && this.showEmeralds)
|
|
{
|
|
this.str.Append("\n\n");
|
|
this.emeraldText.text = Links.x.inventory.emeralds.ToString();
|
|
this.emeralds.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
this.emeralds.SetActive(false);
|
|
}
|
|
}
|
|
else if (Links.x.joy && !flag9 && !Links.x.inventory.repairing && !Links.x.inventory.mineralizing)
|
|
{
|
|
this.str.Append("\n");
|
|
this.str.Append("<color #988D7D>");
|
|
this.str.Append(" <voffset=.4em><size=30><sprite=");
|
|
int controllerSprite11 = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
|
|
this.str.Append(controllerSprite11);
|
|
this.str.Append("></size></voffset><size=1em>");
|
|
this.str.Append("Move");
|
|
this.str.Append("</size></color>");
|
|
}
|
|
}
|
|
this.mainInfoText.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
if (this.linkedText)
|
|
{
|
|
this.linkedText.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
|
|
}
|
|
if (this.groundItemDescription)
|
|
{
|
|
this.savedMain = Links.x.main;
|
|
base.StartCoroutine(this.WaitOpen());
|
|
this.mainInfoText.text = this.str.ToString();
|
|
this.img.enabled = true;
|
|
this.mainInfoText.enabled = true;
|
|
this.rt.sizeDelta = new Vector2(this.rt.sizeDelta.x, this.mainInfoText.preferredHeight + 15f);
|
|
return;
|
|
}
|
|
this.mainInfoText.text = this.str.ToString();
|
|
if (this.linkedText)
|
|
{
|
|
this.linkedText.text = this.descStr.ToString();
|
|
this.headerText.text = this.header;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001187 RID: 4487 RVA: 0x00158A3A File Offset: 0x00156C3A
|
|
private IEnumerator WaitOpen()
|
|
{
|
|
this.contentFitter.enabled = true;
|
|
yield return new WaitForSecondsRealtime(0.0001f);
|
|
if (this.portraitCharacter)
|
|
{
|
|
this.portrait.texture = Links.x.gameCard.GetTexturePortrait();
|
|
}
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x06001188 RID: 4488 RVA: 0x00158A49 File Offset: 0x00156C49
|
|
public void EndMenu()
|
|
{
|
|
if (base.gameObject.activeSelf)
|
|
{
|
|
if (this.groundItemDescription)
|
|
{
|
|
base.StartCoroutine(this.Off());
|
|
}
|
|
else
|
|
{
|
|
this.open = false;
|
|
}
|
|
this.prevItem = null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001189 RID: 4489 RVA: 0x00158A7D File Offset: 0x00156C7D
|
|
private void OnDisable()
|
|
{
|
|
this.open = false;
|
|
}
|
|
|
|
// Token: 0x0600118A RID: 4490 RVA: 0x00158A88 File Offset: 0x00156C88
|
|
private void Update()
|
|
{
|
|
if (this.groundItemDescription)
|
|
{
|
|
if (Links.x.inventory.groundBag.toggle)
|
|
{
|
|
this.canvasGroup.alpha = Links.x.inventory.groundBag.itemLabelGrid.canvasGroup.alpha;
|
|
}
|
|
else if (this.prevItem)
|
|
{
|
|
this.canvasGroup.alpha = 1f;
|
|
}
|
|
else
|
|
{
|
|
this.canvasGroup.alpha = 0f;
|
|
}
|
|
if (Links.x.main != this.savedMain)
|
|
{
|
|
this.SetNumbers(true);
|
|
this.savedMain = Links.x.main;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600118B RID: 4491 RVA: 0x00158B3E File Offset: 0x00156D3E
|
|
private IEnumerator Off()
|
|
{
|
|
yield return new WaitForSecondsRealtime(0.2f);
|
|
if (!this.prevItem)
|
|
{
|
|
base.gameObject.SetActive(false);
|
|
this.open = false;
|
|
}
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x0600118C RID: 4492 RVA: 0x00158B4D File Offset: 0x00156D4D
|
|
public int SocketIndex(int id)
|
|
{
|
|
if (id < 100)
|
|
{
|
|
return id;
|
|
}
|
|
return (int)Mathf.Floor((float)id / 100f);
|
|
}
|
|
|
|
// Token: 0x04001CDC RID: 7388
|
|
public Animator anim;
|
|
|
|
// Token: 0x04001CDD RID: 7389
|
|
public TextMeshProUGUI mainInfoText;
|
|
|
|
// Token: 0x04001CDE RID: 7390
|
|
public TextMeshProUGUI emeraldText;
|
|
|
|
// Token: 0x04001CDF RID: 7391
|
|
public TextMeshProUGUI portraitText;
|
|
|
|
// Token: 0x04001CE0 RID: 7392
|
|
public TextMeshProUGUI linkedText;
|
|
|
|
// Token: 0x04001CE1 RID: 7393
|
|
public TextMeshProUGUI csText;
|
|
|
|
// Token: 0x04001CE2 RID: 7394
|
|
public TextMeshProUGUI headerText;
|
|
|
|
// Token: 0x04001CE3 RID: 7395
|
|
private StringFast str = new StringFast(64);
|
|
|
|
// Token: 0x04001CE4 RID: 7396
|
|
private StringFast descStr = new StringFast(64);
|
|
|
|
// Token: 0x04001CE5 RID: 7397
|
|
public Item item;
|
|
|
|
// Token: 0x04001CE6 RID: 7398
|
|
public Item prevItem;
|
|
|
|
// Token: 0x04001CE7 RID: 7399
|
|
public ItemEquipped itemEquipped;
|
|
|
|
// Token: 0x04001CE8 RID: 7400
|
|
public ItemEquipped prevItemEquipped;
|
|
|
|
// Token: 0x04001CE9 RID: 7401
|
|
public ItemEquipped compareItem;
|
|
|
|
// Token: 0x04001CEA RID: 7402
|
|
public bool equipped;
|
|
|
|
// Token: 0x04001CEB RID: 7403
|
|
public ContentSizeFitter contentFitter;
|
|
|
|
// Token: 0x04001CEC RID: 7404
|
|
public RectTransform textRT;
|
|
|
|
// Token: 0x04001CED RID: 7405
|
|
public RectTransform rt;
|
|
|
|
// Token: 0x04001CEE RID: 7406
|
|
public Image img;
|
|
|
|
// Token: 0x04001CEF RID: 7407
|
|
public bool open;
|
|
|
|
// Token: 0x04001CF0 RID: 7408
|
|
public bool compare;
|
|
|
|
// Token: 0x04001CF1 RID: 7409
|
|
public bool comboCompare;
|
|
|
|
// Token: 0x04001CF2 RID: 7410
|
|
public bool groundItemDescription;
|
|
|
|
// Token: 0x04001CF3 RID: 7411
|
|
public bool showEmeralds;
|
|
|
|
// Token: 0x04001CF4 RID: 7412
|
|
public GameObject emeralds;
|
|
|
|
// Token: 0x04001CF5 RID: 7413
|
|
public CanvasGroup canvasGroup;
|
|
|
|
// Token: 0x04001CF6 RID: 7414
|
|
public RawImage portrait;
|
|
|
|
// Token: 0x04001CF7 RID: 7415
|
|
public GameObject portraitObject;
|
|
|
|
// Token: 0x04001CF8 RID: 7416
|
|
private bool needsPortrait;
|
|
|
|
// Token: 0x04001CF9 RID: 7417
|
|
private Character portraitCharacter;
|
|
|
|
// Token: 0x04001CFA RID: 7418
|
|
private string header;
|
|
|
|
// Token: 0x04001CFB RID: 7419
|
|
private Character savedMain;
|
|
}
|