Decompiled source of ItemInfoDisplayForkedCN v1.0.3
com.github.chuxiaaaa.ItemInfoDisplayForkedCN.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Peak; using Peak.Afflictions; using TMPro; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("com.github.chuxiaaaa.ItemInfoDisplayForkedCN")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.2.0")] [assembly: AssemblyInformationalVersion("1.0.2")] [assembly: AssemblyProduct("com.github.chuxiaaaa.ItemInfoDisplayForkedCN")] [assembly: AssemblyTitle("ItemInfoDisplayForkedCN")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.2.0")] [module: UnverifiableCode] namespace ItemInfoDisplay { internal static class Drone_Compat { private const string DroneGuid = "com.SebastianYang.DronePlugin"; internal static bool Loaded => Chainloader.PluginInfos.ContainsKey("com.SebastianYang.DronePlugin"); public static bool IsDroneActive { get { if (!Chainloader.PluginInfos.TryGetValue("com.SebastianYang.DronePlugin", out var value) || (Object)(object)value.Instance == (Object)null) { return false; } object instance = value.Instance; Type type = instance.GetType(); BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; string[] array = new string[2] { "isDroneActive", "IsDroneActive" }; foreach (string name in array) { PropertyInfo property = type.GetProperty(name, bindingAttr); if (property != null && property.PropertyType == typeof(bool)) { try { MethodInfo? getMethod = property.GetGetMethod(nonPublic: true); return (bool)property.GetValue(((object)getMethod != null && getMethod.IsStatic) ? null : instance); } catch { } } FieldInfo field = type.GetField(name, bindingAttr); if (field != null && field.FieldType == typeof(bool)) { try { return (bool)field.GetValue(field.IsStatic ? null : instance); } catch { } } } return false; } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.github.chuxiaaaa.ItemInfoDisplayForkedCN", "ItemInfoDisplayForkedCN", "1.0.3")] public class Plugin : BaseUnityPlugin { private static class ItemInfoDisplayUpdatePatch { [HarmonyPatch(typeof(CharacterItems), "Update")] [HarmonyPostfix] private static void ItemInfoDisplayUpdate(CharacterItems __instance) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown try { if ((Object)guiManager == (Object)null) { AddDisplayObject(); } else if (Drone_Compat.Loaded && Drone_Compat.IsDroneActive) { if ((Object)itemInfoDisplayTextMesh != (Object)null && ((Component)itemInfoDisplayTextMesh).gameObject.activeSelf) { ((Component)itemInfoDisplayTextMesh).gameObject.SetActive(false); } } else if ((Object)Character.observedCharacter.data.currentItem != (Object)null) { if (hasChanged) { hasChanged = false; ProcessItemGameObject(); } else if (Mathf.Abs(Character.observedCharacter.data.sinceItemAttach - lastKnownSinceItemAttach) >= configForceUpdateTime.Value) { hasChanged = true; lastKnownSinceItemAttach = Character.observedCharacter.data.sinceItemAttach; } if (!((Component)itemInfoDisplayTextMesh).gameObject.activeSelf) { ((Component)itemInfoDisplayTextMesh).gameObject.SetActive(true); } } else if (((Component)itemInfoDisplayTextMesh).gameObject.activeSelf) { ((Component)itemInfoDisplayTextMesh).gameObject.SetActive(false); } } catch (Exception ex) { Log.LogError((object)(ex.Message + ex.StackTrace)); } } } private static class ItemInfoDisplayEquipPatch { [HarmonyPatch(typeof(CharacterItems), "Equip")] [HarmonyPostfix] private static void ItemInfoDisplayEquip(CharacterItems __instance) { try { if ((Object)(object)Character.observedCharacter == (Object)(object)__instance.character) { hasChanged = true; } } catch (Exception ex) { Log.LogError((object)(ex.Message + ex.StackTrace)); } } } private static class ItemInfoDisplayFinishCookingPatch { [HarmonyPatch(typeof(ItemCooking), "FinishCooking")] [HarmonyPostfix] private static void ItemInfoDisplayFinishCooking(ItemCooking __instance) { try { if ((Object)(object)Character.observedCharacter == (Object)(object)((ItemComponent)__instance).item.holderCharacter) { hasChanged = true; } } catch (Exception ex) { Log.LogError((object)(ex.Message + ex.StackTrace)); } } } private static class ItemInfoDisplayReduceUsesRPCPatch { [HarmonyPatch(typeof(Action_ReduceUses), "ReduceUsesRPC")] [HarmonyPostfix] private static void ItemInfoDisplayReduceUsesRPC(Action_ReduceUses __instance) { try { if ((Object)(object)Character.observedCharacter == (Object)(object)((ItemActionBase)__instance).character) { hasChanged = true; } } catch (Exception ex) { Log.LogError((object)(ex.Message + ex.StackTrace)); } } } private class ComponentEffectInfo { public Component Component { get; set; } public float Value { get; set; } public string EffectKey { get; set; } } private static GUIManager guiManager; private static TextMeshProUGUI itemInfoDisplayTextMesh; private static Dictionary<string, string> effectColors = new Dictionary<string, string>(); private static float lastKnownSinceItemAttach; private static bool hasChanged; private static ConfigEntry<float> configFontSize; private static ConfigEntry<float> configOutlineWidth; private static ConfigEntry<float> configLineSpacing; private static ConfigEntry<float> configSizeDeltaX; private static ConfigEntry<float> configForceUpdateTime; public const string Id = "com.github.chuxiaaaa.ItemInfoDisplayForkedCN"; internal static ManualLogSource Log { get; private set; } = null; public static bool EasyBackpack { get; set; } public static string Name => "ItemInfoDisplayForkedCN"; public static string Version => "1.0.2"; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; InitEffectColors(effectColors); lastKnownSinceItemAttach = 0f; hasChanged = true; configFontSize = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Font Size", 20f, "Customize the Font Size for description text."); configOutlineWidth = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Outline Width", 0.08f, "Customize the Outline Width for item description text."); configLineSpacing = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Line Spacing", -35f, "Customize the Line Spacing for item description text."); configSizeDeltaX = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Size Delta X", 550f, "Customize the horizontal length of the container for the mod. Increasing moves text left, decreasing moves text right."); configForceUpdateTime = ((BaseUnityPlugin)this).Config.Bind<float>("ItemInfoDisplay", "Force Update Time", 1f, "Customize the time in seconds until the mod forces an update for the item."); Harmony.CreateAndPatchAll(typeof(ItemInfoDisplayUpdatePatch), (string)null); Harmony.CreateAndPatchAll(typeof(ItemInfoDisplayEquipPatch), (string)null); Harmony.CreateAndPatchAll(typeof(ItemInfoDisplayFinishCookingPatch), (string)null); Harmony.CreateAndPatchAll(typeof(ItemInfoDisplayReduceUsesRPCPatch), (string)null); Log.LogInfo((object)("Plugin " + Name + " is loaded!")); } private static string GetEffectChineseName(string effect) { if (1 == 0) { } string result = effect switch { "Hunger" => "饥饿值", "Extra Stamina" => "额外体力", "Spores" => "真菌感染", "Injury" => "伤害", "Poison" => "中毒", "Cold" => "寒冷", "Heat" => "烧伤", "Hot" => "烧伤", "Sleepy" => "困倦", "Drowsy" => "困倦", "Curse" => "诅咒", "Thorns" => "刺伤", "Shield" => "护盾", "Weight" => "重量", "Web" => "蛛网", "Arrow" => "箭伤", "Petrify" => "石化", "FlyTrap" => "捕蝇草", _ => effect.ToUpper(), }; if (1 == 0) { } return result; } private static bool TryGetDeepComponent<T>(GameObject gameObject, out T component) where T : Component { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown component = default(T); if ((Object)gameObject == (Object)null) { return false; } if (gameObject.TryGetComponent<T>(ref component)) { return true; } component = gameObject.GetComponentInChildren<T>(true); return (Object)(object)component != (Object)null; } private static string NormalizeItemIdentifier(string value) { if (string.IsNullOrEmpty(value)) { return ""; } StringBuilder stringBuilder = new StringBuilder(value.Length); foreach (char c in value) { if (char.IsLetterOrDigit(c)) { stringBuilder.Append(char.ToUpperInvariant(c)); } } return stringBuilder.ToString(); } private static bool MatchesAnyItemIdentifier(Item currentItem, GameObject gameObject, params string[] expectedNames) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown List<string> list = new List<string>(); if ((Object)currentItem != (Object)null) { if (currentItem.UIData != null) { list.Add(currentItem.UIData.itemName); try { list.Add(currentItem.GetName()); } catch { } } list.Add(((Object)currentItem).name); if ((Object)((Component)currentItem).gameObject != (Object)null) { list.Add(((Object)((Component)currentItem).gameObject).name); } } if ((Object)gameObject != (Object)null) { list.Add(((Object)gameObject).name); } for (int i = 0; i < expectedNames.Length; i++) { string text = NormalizeItemIdentifier(expectedNames[i]); if (text.Length == 0) { continue; } for (int j = 0; j < list.Count; j++) { if (NormalizeItemIdentifier(list[j]) == text) { return true; } } } return false; } private static Character GetTipCharacter(Item currentItem) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown if ((Object)currentItem != (Object)null) { if ((Object)currentItem.trueHolderCharacter != (Object)null) { return currentItem.trueHolderCharacter; } if ((Object)currentItem.holderCharacter != (Object)null) { return currentItem.holderCharacter; } } return Character.observedCharacter; } private static float GetCurrentStatusSafe(Character character, STATUSTYPE statusType) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) if ((Object)character == (Object)null || character.refs == null || (Object)character.refs.afflictions == (Object)null) { return 0f; } return Mathf.Max(0f, character.refs.afflictions.GetCurrentStatus(statusType)); } private static string FormatPercentAmount(float value) { return FormatNumber(value * 100f); } private unsafe static float CalculateHealAllPotential(Character targetCharacter, float maxHealing, out string breakdown) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) breakdown = ""; if ((Object)targetCharacter == (Object)null || maxHealing <= 0f) { return 0f; } STATUSTYPE[] array = new STATUSTYPE[6]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); STATUSTYPE[] array2 = (STATUSTYPE[])(object)array; float num = 0f; List<string> list = new List<string>(); for (int i = 0; i < array2.Length; i++) { STATUSTYPE statusType = array2[i]; float currentStatusSafe = GetCurrentStatusSafe(targetCharacter, statusType); if (!(currentStatusSafe <= 0f)) { float num2 = Mathf.Min(currentStatusSafe, maxHealing - num); if (num2 > 0f) { string text = ((object)(*(STATUSTYPE*)(&statusType))/*cast due to .constrained prefix*/).ToString(); list.Add(effectColors[text] + FormatPercentAmount(num2) + " " + GetEffectChineseName(text) + "</color>"); num = Mathf.Min(maxHealing, num + num2); } if (num >= maxHealing) { break; } } } if (list.Count > 0) { breakdown = string.Join("、", list); } return num; } private static float CalculateCurableStatusSum(Character targetCharacter, bool curseIsCurable = false, bool petrifyIsCurable = false) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Invalid comparison between Unknown and I4 //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Invalid comparison between Unknown and I4 //IL_0062: Unknown result type (might be due to invalid IL or missing references) if ((Object)targetCharacter == (Object)null) { return 0f; } STATUSTYPE[] array = new STATUSTYPE[11]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); STATUSTYPE[] array2 = (STATUSTYPE[])(object)array; float num = 0f; foreach (STATUSTYPE val in array2) { if (((int)val != 5 || curseIsCurable) && ((int)val != 13 || petrifyIsCurable)) { num += GetCurrentStatusSafe(targetCharacter, val); } } return num; } private static float GetOneTimePetrifyFromActions(GameObject gameObject) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Invalid comparison between Unknown and I4 if ((Object)gameObject == (Object)null) { return 0f; } float num = 0f; Action_ModifyStatus[] componentsInChildren = gameObject.GetComponentsInChildren<Action_ModifyStatus>(true); foreach (Action_ModifyStatus val in componentsInChildren) { if ((Object)val != (Object)null && (int)val.statusType == 13 && val.changeAmount > 0f) { num += val.changeAmount; } } return num; } private static int GetBackpackFilledSlotCountSafe(Backpack backpack) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown if ((Object)backpack == (Object)null) { return -1; } try { return backpack.FilledSlotCount(); } catch { return -1; } } private static ComponentEffectInfo GetComponentEffectInfo(Component component) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) Type type = ((object)component).GetType(); ComponentEffectInfo componentEffectInfo = new ComponentEffectInfo { Component = component }; if (type == typeof(Action_RestoreHunger)) { Action_RestoreHunger val = (Action_RestoreHunger)component; componentEffectInfo.Value = Mathf.Abs(val.restorationAmount); componentEffectInfo.EffectKey = "Action_RestoreHunger_Hunger"; } else if (type == typeof(Action_GiveExtraStamina)) { Action_GiveExtraStamina val2 = (Action_GiveExtraStamina)component; componentEffectInfo.Value = Mathf.Abs(val2.amount); componentEffectInfo.EffectKey = "Action_GiveExtraStamina_ExtraStamina"; } else if (type == typeof(Action_InflictPoison)) { Action_InflictPoison val3 = (Action_InflictPoison)component; componentEffectInfo.Value = Mathf.Abs(val3.poisonPerSecond * val3.inflictionTime); componentEffectInfo.EffectKey = "Action_InflictPoison_Poison"; } else if (type == typeof(Action_AddOrRemoveThorns)) { Action_AddOrRemoveThorns val4 = (Action_AddOrRemoveThorns)component; componentEffectInfo.Value = val4.thornCount; componentEffectInfo.EffectKey = "Action_AddOrRemoveThorns_Thorns"; } else if (type == typeof(Action_ModifyStatus)) { Action_ModifyStatus val5 = (Action_ModifyStatus)component; componentEffectInfo.Value = Mathf.Abs(val5.changeAmount); componentEffectInfo.EffectKey = $"Action_ModifyStatus_{val5.statusType}"; } else { componentEffectInfo.Value = 0f; componentEffectInfo.EffectKey = type.Name; } return componentEffectInfo; } private static string FormatNumber(float value) { if (float.IsPositiveInfinity(value)) { return "永久"; } if (float.IsNegativeInfinity(value)) { return "-永久"; } return value.ToString("F1").Replace(".0", ""); } private static string FormatSeconds(float value) { if (float.IsPositiveInfinity(value)) { return "永久"; } return FormatNumber(value) + " 秒"; } private static string FormatPetrifyAmount(float value) { float value2 = ((Mathf.Abs(value) <= 1f) ? (value * 100f) : value); return FormatNumber(value2); } private static string GetNewVersionItemTips(GameObject gameObject, Item currentItem) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Expected O, but got Unknown //IL_095d: Unknown result type (might be due to invalid IL or missing references) //IL_0968: Expected O, but got Unknown //IL_0da1: Unknown result type (might be due to invalid IL or missing references) //IL_0dac: Expected O, but got Unknown StringBuilder stringBuilder = new StringBuilder(); if ((Object)gameObject == (Object)null || (Object)currentItem == (Object)null) { return ""; } Flare val = default(Flare); if (gameObject.TryGetComponent<Flare>(ref val)) { stringBuilder.Append(effectColors["Hunger"]).Append("点燃后</color>会发出带有持有者颜色的信号光\n\n"); stringBuilder.Append("<#CCCCCC>在顶峰点燃会召唤直升机</color>\n\n"); } Candle val2 = default(Candle); if (gameObject.TryGetComponent<Candle>(ref val2)) { float value = (((ItemComponent)val2).HasData((DataEntryKey)10) ? ((ItemComponent)val2).GetData<FloatItemData>((DataEntryKey)10).Value : val2.startingFuel); stringBuilder.Append(effectColors["Hunger"]).Append("点燃/熄灭</color>蜡烛,点燃时驱散雾气\n\n"); stringBuilder.Append("<#CCCCCC>剩余燃烧时间: ").Append(FormatSeconds(value)).Append("</color>\n\n"); } JetpackItem val3 = default(JetpackItem); if (gameObject.TryGetComponent<JetpackItem>(ref val3)) { float value2 = (((ItemComponent)val3).HasData((DataEntryKey)10) ? ((ItemComponent)val3).GetData<FloatItemData>((DataEntryKey)10).Value : val3.startingFuel); stringBuilder.Append(effectColors["Extra Stamina"]).Append("按住跳跃</color>时喷气飞行\n\n"); stringBuilder.Append("<#CCCCCC>剩余燃料: ").Append(FormatNumber(value2)).Append(" / ") .Append(FormatNumber(val3.startingFuel)) .Append("</color>\n\n"); stringBuilder.Append("<#CCCCCC>满油大约可飞行 ").Append(FormatSeconds(val3.startingFuel / 20f)).Append("</color>\n\n"); } Rocketpack val4 = default(Rocketpack); if (gameObject.TryGetComponent<Rocketpack>(ref val4)) { stringBuilder.Append(effectColors["Injury"]).Append("点燃</color>后会先引燃,再持续喷射并最终爆炸\n\n"); stringBuilder.Append("<#CCCCCC>引线约 3 秒,飞行约 3 秒</color>\n\n"); } ParachuteItem val5 = default(ParachuteItem); if (gameObject.TryGetComponent<ParachuteItem>(ref val5)) { stringBuilder.Append(effectColors["Extra Stamina"]).Append("高空坠落时会自动打开降落伞</color>\n\n"); stringBuilder.Append("<#CCCCCC>打开后会消耗一次,并减缓下落</color>\n\n"); } Glider val6 = default(Glider); if (gameObject.TryGetComponent<Glider>(ref val6)) { stringBuilder.Append(effectColors["Extra Stamina"]).Append("离地后会自动展开并滑翔</color>\n\n"); stringBuilder.Append("<#CCCCCC>滑翔时持续消耗体力,首次展开额外消耗 ").Append(FormatNumber(val6.extraOpeningCost * 100f)).Append("% 体力\n"); } WarpOnThrow val7 = default(WarpOnThrow); if (gameObject.TryGetComponent<WarpOnThrow>(ref val7)) { stringBuilder.Append(effectColors["ItemInfoDisplayPositive"]).Append("蓄力投掷</color>后会把你传送到碰撞点附近\n\n"); stringBuilder.Append("<#CCCCCC>需要速度大于 ").Append(FormatNumber(val7.minVelocity)).Append(",时间介于 ") .Append(FormatSeconds(val7.minTime)) .Append(" 到 ") .Append(FormatSeconds(val7.maxTime)) .Append("</color>\n\n"); } Action_Antizooka component; bool flag = TryGetDeepComponent<Action_Antizooka>(gameObject, out component); Action_RaycastSpawnSomething component2; bool flag2 = TryGetDeepComponent<Action_RaycastSpawnSomething>(gameObject, out component2); if (flag || flag2 || MatchesAnyItemIdentifier(currentItem, gameObject, "反重炮", "反向火箭砲", "ANTI-ZOOKA", "VOIDLAUNCHER")) { stringBuilder.Append(effectColors["Extra Stamina"]).Append("发射反重力弹,落点生成反重力场</color>\n\n"); if (flag2) { stringBuilder.Append("<#CCCCCC>最大射程 ").Append(FormatNumber(component2.maxDistance * CharacterStats.unitsToMeters)).Append(" 米</color>\n\n"); if ((Object)(object)component2.prefabToSpawn != (Object)null && TryGetDeepComponent<AntiSphere>(component2.prefabToSpawn, out AntiSphere component3)) { if (TryGetDeepComponent<RemoveAfterSeconds>(component2.prefabToSpawn, out RemoveAfterSeconds component4)) { stringBuilder.Append("<#CCCCCC>反重力场持续 ").Append(FormatSeconds(component4.seconds)).Append("</color>\n\n"); } stringBuilder.Append("<#CCCCCC>场内会将玩家和地面物品托向空中;进入时吸入中心,离开时弹回</color>\n\n"); if (component3.staminaGainRate > 0f) { stringBuilder.Append(effectColors["Extra Stamina"]).Append("在场内每秒恢复 ").Append(FormatPercentAmount(component3.staminaGainRate)) .Append("% 体力</color>\n\n"); } } } else { stringBuilder.Append("<#CCCCCC>蓄力后发射;命中地形或到达射程后触发</color>\n\n"); } } Balloon val8 = default(Balloon); if (gameObject.TryGetComponent<Balloon>(ref val8)) { stringBuilder.Append(effectColors["Extra Stamina"]).Append("绑在身上后会增加浮力和跳跃力</color>\n\n"); stringBuilder.Append("<#CCCCCC>").Append(val8.isBunch ? "一束气球会一次绑 3 个气球" : "单个气球只会绑定 1 个气球").Append("</color>\n\n"); } Beehive val9 = default(Beehive); if (gameObject.TryGetComponent<Beehive>(ref val9)) { stringBuilder.Append(effectColors["Poison"]).Append("会生成蜂群</color>,蜂群会保护蜂巢\n\n"); stringBuilder.Append("<#CCCCCC>蜂巢被偷走或摧毁后,蜂群会变得愤怒并散开</color>\n\n"); } RopeTier val10 = default(RopeTier); if (gameObject.TryGetComponent<RopeTier>(ref val10)) { } Snowball val11 = default(Snowball); ItemScaleSyncer val12 = default(ItemScaleSyncer); if (gameObject.TryGetComponent<Snowball>(ref val11)) { ItemScaleSyncer component5 = gameObject.GetComponent<ItemScaleSyncer>(); float value3 = (((Object)component5 != (Object)null) ? component5.currentScale : 1f); stringBuilder.Append(effectColors["Hunger"]).Append("在雪地或冰面滚动会越滚越大</color>\n\n"); stringBuilder.Append("<#CCCCCC>当前大小: ").Append(FormatNumber(value3)).Append("x,超过 ") .Append(FormatNumber(val11.maxScaleToPickUp)) .Append("x 后无法拾取</color>\n\n"); stringBuilder.Append("<#CCCCCC>拿在手上时最大约 ").Append(FormatNumber(val11.maxCarriedScale)).Append("x</color>\n\n"); } else if (gameObject.TryGetComponent<ItemScaleSyncer>(ref val12)) { stringBuilder.Append("<#CCCCCC>当前尺寸: ").Append(FormatNumber(val12.currentScale)).Append("x</color>\n\n"); } KnockOutPlayerOnImpact val13 = default(KnockOutPlayerOnImpact); if (gameObject.TryGetComponent<KnockOutPlayerOnImpact>(ref val13)) { stringBuilder.Append(effectColors["Injury"]).Append("蓄力投掷</color>时会击倒目标并造成伤害\n\n"); stringBuilder.Append("<#CCCCCC>阈值速度 ").Append(FormatNumber(val13.knockoutVelocity)).Append(",伤害 ") .Append(FormatNumber(val13.damage)) .Append("</color>\n\n"); } EventOnItemCollision val14 = default(EventOnItemCollision); if (gameObject.TryGetComponent<EventOnItemCollision>(ref val14)) { } Action_CloneSelectedItem val15 = default(Action_CloneSelectedItem); if (gameObject.TryGetComponent<Action_CloneSelectedItem>(ref val15)) { stringBuilder.Append(effectColors["ItemInfoDisplayPositive"]).Append("瞄准物品即可复制</color>\n\n"); stringBuilder.Append("<#CCCCCC>范围 ").Append(FormatNumber(val15.range)).Append(" 米;不能复制童军护符和不可复制物品</color>\n\n"); stringBuilder.Append(effectColors["Petrify"]).Append("复制普通物品会获得 ").Append(val15.petrify) .Append(" 石化,神秘物品会获得 ") .Append(val15.petrifyMystical) .Append(" 石化</color>\n"); } Action_SuperJumpAmulet val16 = default(Action_SuperJumpAmulet); if (gameObject.TryGetComponent<Action_SuperJumpAmulet>(ref val16)) { if (((Action_ApplyAffliction)val16).affliction != null) { stringBuilder.Append(ProcessAffliction(((Action_ApplyAffliction)val16).affliction)); } if (((Action_ApplyAffliction)val16).extraAfflictions != null) { for (int i = 0; i < ((Action_ApplyAffliction)val16).extraAfflictions.Length; i++) { stringBuilder.Append(ProcessAffliction(((Action_ApplyAffliction)val16).extraAfflictions[i])); } } if (val16.petrifyPerUse > 0f) { stringBuilder.Append(effectColors["Petrify"]).Append("使用后额外获得 ").Append(FormatPetrifyAmount(val16.petrifyPerUse)) .Append(" 石化</color>\n\n"); } } DoubleJumpAmulet val17 = default(DoubleJumpAmulet); if (gameObject.TryGetComponent<DoubleJumpAmulet>(ref val17)) { stringBuilder.Append(effectColors["Extra Stamina"]).Append("获得额外跳跃</color>\n\n"); stringBuilder.Append(effectColors["Petrify"]).Append("每次双跳获得 ").Append(val17.petrifyPerJump) .Append(" 石化</color>\n\n"); } Action_HealingGem component6; bool flag3 = TryGetDeepComponent<Action_HealingGem>(gameObject, out component6); HealingAmulet component7; if (flag3 || MatchesAnyItemIdentifier(currentItem, gameObject, "童军的毅力", "童軍的堅持", "SCOUT’S TENACITY", "SCOUT'S TENACITY", "AMULET_HEALING")) { float num = ((flag3 && component6.healingAffliction != null) ? component6.healingAffliction.maxHealing : 0f); stringBuilder.Append(effectColors["ItemInfoDisplayPositive"]).Append("一次性治疗伤害、真菌、中毒、寒冷、烧伤、困倦</color>\n\n"); if (num > 0f) { stringBuilder.Append("<#CCCCCC>最多治疗总量 ").Append(FormatPercentAmount(num)).Append("%</color>\n\n"); } Character tipCharacter = GetTipCharacter(currentItem); if (flag3 && (Object)tipCharacter != (Object)null) { string breakdown; float num2 = CalculateHealAllPotential(tipCharacter, num, out breakdown); stringBuilder.Append("<#CCCCCC>当前使用会治疗 ").Append(FormatPercentAmount(num2)).Append("%</color>\n\n"); if (!string.IsNullOrEmpty(breakdown)) { stringBuilder.Append("<#CCCCCC>当前消除:</color>").Append(breakdown).Append("\n\n"); } float value4 = Mathf.Clamp(num2 * component6.healingToPetrifyRatio, component6.minPetrify, component6.maxPetrify); stringBuilder.Append(effectColors["Petrify"]).Append("负面效果:当前自用会获得 ").Append(FormatPetrifyAmount(value4)) .Append(" 石化</color>\n\n"); } else if (flag3) { stringBuilder.Append(effectColors["Petrify"]).Append("负面效果:按实际治疗量获得石化,范围 ").Append(FormatPetrifyAmount(component6.minPetrify)) .Append(" - ") .Append(FormatPetrifyAmount(component6.maxPetrify)) .Append("</color>\n\n"); } if (flag3 && component6.invincibilityAffliction != null) { stringBuilder.Append(ProcessAffliction(component6.invincibilityAffliction)); } } else if (TryGetDeepComponent<HealingAmulet>(gameObject, out component7)) { stringBuilder.Append(effectColors["ItemInfoDisplayPositive"]).Append("携带时持续治疗负面状态</color>\n\n"); stringBuilder.Append("<#CCCCCC>每 0.5 秒治疗 2.5% 的一种状态:伤害、中毒、真菌、寒冷、困倦、烧伤</color>\n\n"); stringBuilder.Append(effectColors["Petrify"]).Append("负面效果:每次治疗获得 1 石化</color>\n\n"); } InfiniteStamAmulet component8; bool flag4 = TryGetDeepComponent<InfiniteStamAmulet>(gameObject, out component8); Action_ApplyInfiniteStamina component9; bool flag5 = TryGetDeepComponent<Action_ApplyInfiniteStamina>(gameObject, out component9); if (flag4 || MatchesAnyItemIdentifier(currentItem, gameObject, "童军的野心", "童軍的抱負", "SCOUT'S AMBITION", "SCOUT’S AMBITION", "AMULET_INFINITESTAM")) { if (flag5 && component9.buffTime > 0f) { stringBuilder.Append(effectColors["Extra Stamina"]).Append("使用后获得 ").Append(FormatSeconds(component9.buffTime)) .Append(" 的无限体力</color>\n\n"); } else { stringBuilder.Append(effectColors["Extra Stamina"]).Append("范围内玩家获得无限体力</color>\n\n"); } if (flag4) { stringBuilder.Append("<#CCCCCC>影响范围 ").Append(FormatNumber(component8.radius)).Append(" 米</color>\n\n"); } float oneTimePetrifyFromActions = GetOneTimePetrifyFromActions(gameObject); if (oneTimePetrifyFromActions > 0f) { stringBuilder.Append(effectColors["Petrify"]).Append("负面效果:使用/激活时一次性获得 ").Append(FormatPetrifyAmount(oneTimePetrifyFromActions)) .Append(" 石化</color>\n\n"); } } RitualDaggerFeedBehavior component10; bool flag6 = TryGetDeepComponent<RitualDaggerFeedBehavior>(gameObject, out component10); if (flag6 || TryGetDeepComponent<Action_SacrificeFriend>(gameObject, out Action_SacrificeFriend _) || MatchesAnyItemIdentifier(currentItem, gameObject, "仪式匕首", "儀式匕首", "RITUAL DAGGER", "RITUALDAGGER")) { stringBuilder.Append(effectColors["Injury"]).Append("献祭目标玩家:目标会立即石化并死亡</color>\n\n"); if (flag6) { stringBuilder.Append(effectColors["ItemInfoDisplayPositive"]).Append("除被献祭者外,其他存活玩家会清除可治疗状态</color>\n\n"); stringBuilder.Append(effectColors["Extra Stamina"]).Append("获得 ").Append(FormatPercentAmount(component10.bonusStamina)) .Append("% 额外体力</color>\n\n"); if (component10.infiniteStaminaTime > 0f) { stringBuilder.Append(effectColors["Extra Stamina"]).Append("获得 ").Append(FormatSeconds(component10.infiniteStaminaTime)) .Append(" 的无限体力</color>\n\n"); } Character tipCharacter2 = GetTipCharacter(currentItem); if ((Object)tipCharacter2 != (Object)null) { stringBuilder.Append("<#CCCCCC>若你不是被献祭者,当前会清除 ").Append(FormatPercentAmount(CalculateCurableStatusSum(tipCharacter2))).Append("% 可治疗状态</color>\n\n"); } stringBuilder.Append("<#CCCCCC>不清除诅咒、石化、重量、刺伤、箭伤等不可治疗状态</color>\n\n"); } } if (!TryGetDeepComponent<Backpack>(gameObject, out Backpack _) && MatchesAnyItemIdentifier(currentItem, gameObject, "滑稽背包", "腰包", "FANNY PACK", "FANNYPACK")) { stringBuilder.Append(effectColors["ItemInfoDisplayPositive"]).Append("提供额外物品栏位</color>\n\n"); stringBuilder.Append("<#CCCCCC>可像背包一样存放物品</color>\n\n"); } if (TryGetDeepComponent<ScoutsHonor>(gameObject, out ScoutsHonor _) || MatchesAnyItemIdentifier(currentItem, gameObject, "童军的荣耀", "童軍的榮譽", "SCOUT’S HONOR", "SCOUT'S HONOR", "SCOUTSHONOR")) { stringBuilder.Append(effectColors["ItemInfoDisplayPositive"]).Append("完成童军雕像后的奖励物品</color>\n\n"); } return stringBuilder.ToString(); } private static void ProcessItemGameObject() { //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Expected O, but got Unknown //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Expected O, but got Unknown //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Expected O, but got Unknown //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Expected O, but got Unknown //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Expected O, but got Unknown //IL_0707: Unknown result type (might be due to invalid IL or missing references) //IL_070e: Expected O, but got Unknown //IL_0746: Unknown result type (might be due to invalid IL or missing references) //IL_074d: Expected O, but got Unknown //IL_0833: Unknown result type (might be due to invalid IL or missing references) //IL_083a: Expected O, but got Unknown //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0b3c: Expected O, but got Unknown //IL_0cb1: Unknown result type (might be due to invalid IL or missing references) //IL_0cb8: Expected O, but got Unknown //IL_0dc9: Unknown result type (might be due to invalid IL or missing references) //IL_0dd0: Expected O, but got Unknown //IL_0d40: Unknown result type (might be due to invalid IL or missing references) //IL_0d47: Expected O, but got Unknown //IL_0fdd: Unknown result type (might be due to invalid IL or missing references) //IL_0fe4: Expected O, but got Unknown //IL_1050: Unknown result type (might be due to invalid IL or missing references) //IL_1057: Expected O, but got Unknown //IL_0bda: Unknown result type (might be due to invalid IL or missing references) //IL_0bdf: Unknown result type (might be due to invalid IL or missing references) //IL_11b4: Unknown result type (might be due to invalid IL or missing references) //IL_11bb: Expected O, but got Unknown //IL_0f81: Unknown result type (might be due to invalid IL or missing references) //IL_0f8c: Expected O, but got Unknown //IL_1384: Unknown result type (might be due to invalid IL or missing references) //IL_138b: Expected O, but got Unknown //IL_1457: Unknown result type (might be due to invalid IL or missing references) //IL_145e: Expected O, but got Unknown //IL_15c2: Unknown result type (might be due to invalid IL or missing references) //IL_15c9: Expected O, but got Unknown //IL_173e: Unknown result type (might be due to invalid IL or missing references) //IL_1745: Expected O, but got Unknown //IL_17c7: Unknown result type (might be due to invalid IL or missing references) //IL_17ce: Expected O, but got Unknown //IL_187b: Unknown result type (might be due to invalid IL or missing references) //IL_1882: Expected O, but got Unknown //IL_18c5: Unknown result type (might be due to invalid IL or missing references) //IL_18d0: Expected O, but got Unknown //IL_1911: Unknown result type (might be due to invalid IL or missing references) //IL_191c: Expected O, but got Unknown //IL_1b5d: Unknown result type (might be due to invalid IL or missing references) //IL_1b64: Expected O, but got Unknown //IL_1cd0: Unknown result type (might be due to invalid IL or missing references) //IL_1cd7: Expected O, but got Unknown //IL_1e34: Unknown result type (might be due to invalid IL or missing references) //IL_1e3b: Expected O, but got Unknown //IL_2007: Unknown result type (might be due to invalid IL or missing references) //IL_200e: Expected O, but got Unknown //IL_20bf: Unknown result type (might be due to invalid IL or missing references) //IL_20c6: Expected O, but got Unknown //IL_22a9: Unknown result type (might be due to invalid IL or missing references) //IL_22b0: Expected O, but got Unknown //IL_27ed: Unknown result type (might be due to invalid IL or missing references) //IL_27f4: Expected O, but got Unknown //IL_22d2: Unknown result type (might be due to invalid IL or missing references) //IL_22dd: Expected O, but got Unknown //IL_28a6: Unknown result type (might be due to invalid IL or missing references) //IL_28ad: Expected O, but got Unknown //IL_28af: Unknown result type (might be due to invalid IL or missing references) //IL_28b5: Invalid comparison between Unknown and I4 //IL_2b7e: Unknown result type (might be due to invalid IL or missing references) //IL_2b85: Expected O, but got Unknown //IL_2b8c: Unknown result type (might be due to invalid IL or missing references) //IL_2b97: Expected O, but got Unknown //IL_231b: Unknown result type (might be due to invalid IL or missing references) //IL_2326: Expected O, but got Unknown //IL_2fe7: Unknown result type (might be due to invalid IL or missing references) //IL_2ff0: Expected O, but got Unknown //IL_3187: Unknown result type (might be due to invalid IL or missing references) //IL_3190: Expected O, but got Unknown //IL_3378: Unknown result type (might be due to invalid IL or missing references) //IL_3381: Expected O, but got Unknown //IL_33c6: Unknown result type (might be due to invalid IL or missing references) //IL_33cf: Expected O, but got Unknown Item currentItem = Character.observedCharacter.data.currentItem; GameObject gameObject = ((Component)currentItem).gameObject; Component[] components = gameObject.GetComponents(typeof(Component)); Dictionary<Type, List<ComponentEffectInfo>> dictionary = new Dictionary<Type, List<ComponentEffectInfo>>(); bool flag = false; string text = ""; string text2 = ""; string text3 = ""; string text4 = ""; string text5 = ""; ((TMP_Text)itemInfoDisplayTextMesh).text = ""; text2 = ((((Object)currentItem).name == "Backpack(Clone)") ? (text2 + effectColors["Weight"] + "0 重量</color>") : ((Ascents.itemWeightModifier <= 0) ? (text2 + effectColors["Weight"] + ((float)currentItem.carryWeight * 2.5f).ToString("F1").Replace(".0", "") + " 重量</color>") : (text2 + effectColors["Weight"] + ((float)(currentItem.carryWeight + Ascents.itemWeightModifier) * 2.5f).ToString("F1").Replace(".0", "") + " 重量</color>"))); if (((Object)gameObject).name.Equals("Bugle(Clone)")) { TextMeshProUGUI val = itemInfoDisplayTextMesh; ((TMP_Text)val).text = ((TMP_Text)val).text + "使用 " + effectColors["Hunger"] + "喇叭</color> 发出一些美妙的声音\n\n"; } else if (((Object)gameObject).name.Equals("Pirate Compass(Clone)")) { TextMeshProUGUI val2 = itemInfoDisplayTextMesh; ((TMP_Text)val2).text = ((TMP_Text)val2).text + effectColors["Injury"] + "指向</color>最近的行李\n\n"; } else if (((Object)gameObject).name.Equals("Compass(Clone)")) { TextMeshProUGUI val3 = itemInfoDisplayTextMesh; ((TMP_Text)val3).text = ((TMP_Text)val3).text + effectColors["Injury"] + "指向</color>北方的山峰\n\n"; } else if (((Object)gameObject).name.Equals("Shell Big(Clone)")) { TextMeshProUGUI val4 = itemInfoDisplayTextMesh; ((TMP_Text)val4).text = ((TMP_Text)val4).text + effectColors["Hunger"] + "开</color>椰子的好工具\n\n"; } Character val5 = Character.localCharacter; if (val5.data.fullyPassedOut) { val5 = MainCameraMovement.specCharacter; } bool flag2 = false; TextMeshProUGUI val17; for (int i = 0; i < components.Length; i++) { Type type = ((object)components[i]).GetType(); Component val6 = components[i]; Behaviour val7 = (Behaviour)((val6 is Behaviour) ? val6 : null); if ((Object)(object)val7 != (Object)null && !val7.enabled) { continue; } if (type == typeof(ItemUseFeedback)) { ItemUseFeedback val8 = (ItemUseFeedback)val6; if (val8.useAnimation.Equals("Eat") || ((Component)val8).tag == "BookOfBones" || val8.useAnimation.Equals("Drink") || val8.useAnimation.Equals("Heal")) { flag = true; } } else if (type == typeof(Action_Consume)) { flag = true; } else if (type == typeof(Action_RestoreHunger)) { Action_RestoreHunger val9 = (Action_RestoreHunger)val6; text += ProcessEffect(val9.restorationAmount * -1f, "Hunger"); } else if (type == typeof(Action_GiveExtraStamina)) { Action_GiveExtraStamina val10 = (Action_GiveExtraStamina)val6; text += ProcessEffect(val10.amount, "Extra Stamina"); } else if (type == typeof(Action_InflictPoison)) { Action_InflictPoison val11 = (Action_InflictPoison)val6; text = ((!(val11.delay > 0f)) ? (text + "立即开始,") : (text + val11.delay.ToString("F1").Replace(".0", "") + " 秒后开始,")); text = text + "在 " + val11.inflictionTime.ToString("F1").Replace(".0", "") + " 秒内总共获得 "; text = text + effectColors["Poison"] + (val11.poisonPerSecond * val11.inflictionTime * 100f).ToString("F1").Replace(".0", "") + " " + GetEffectChineseName("Poison") + "</color>\n\n"; } else if (type == typeof(Action_AddOrRemoveThorns)) { Action_AddOrRemoveThorns val12 = (Action_AddOrRemoveThorns)val6; text += ProcessEffect((float)val12.thornCount * 0.05f, "Thorns"); } else if (type == typeof(Action_ModifyStatus)) { Action_ModifyStatus val13 = (Action_ModifyStatus)val6; if ((val13.ifSkeleton && val5.data.isSkeleton) || flag2) { text += ProcessEffect(val13.changeAmount, ((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref val13.statusType)/*cast due to .constrained prefix*/).ToString()); } else if (!val13.ifSkeleton) { text += ProcessEffect(val13.changeAmount, ((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref val13.statusType)/*cast due to .constrained prefix*/).ToString()); } } else if (type == typeof(Action_ApplyMassAffliction)) { Action_ApplyMassAffliction val14 = (Action_ApplyMassAffliction)val6; text5 += $"<#CCCCCC>附近 {val14.radius}m 内玩家将获得:</color>\n\n"; text5 += ProcessAffliction(((Action_ApplyAffliction)val14).affliction); if (((Action_ApplyAffliction)val14).extraAfflictions.Length == 0) { continue; } for (int j = 0; j < ((Action_ApplyAffliction)val14).extraAfflictions.Length; j++) { if (text5.EndsWith('\n')) { text5 = text5.Remove(text5.Length - 1); } text5 = text5 + "\n" + ProcessAffliction(((Action_ApplyAffliction)val14).extraAfflictions[j]); } } else if (type == typeof(Action_ApplyAffliction)) { Action_ApplyAffliction val15 = (Action_ApplyAffliction)val6; text5 += ProcessAffliction(val15.affliction); } else if (type == typeof(Mandrake)) { Mandrake val16 = (Mandrake)val6; AOE component = ((Component)val16).GetComponent<AOE>(); val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "当你唤醒 " + effectColors["ItemInfoDisplayNegative"] + " 曼德拉草</color> 后,它会给你唱晚安曲\n\n对附近 " + (component.range * CharacterStats.unitsToMeters).ToString("F1").Replace(".0", "") + " 米内的玩家施加 " + effectColors[((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref component.statusType)/*cast due to .constrained prefix*/).ToString()] + GetEffectChineseName(((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref component.statusType)/*cast due to .constrained prefix*/).ToString()) + "</color> 效果\n\n"; } else if (type == typeof(Action_Numb)) { Action_Numb val18 = (Action_Numb)val6; text = text + "获得 " + effectColors["ItemInfoDisplayNegative"] + "麻木</color> 效果,持续 " + val18.numbAmount.ToString("F1").Replace(".0", "") + " 秒</color>\n\n"; } else if (type == typeof(Action_BecomeSkeleton)) { if (!val5.data.isSkeleton) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(effectColors["ItemInfoDisplayPositive"] + "使用后你将会变成</color> 骷髅人 " + effectColors["ItemInfoDisplayPositive"] + "并获得以下效果</color>\n\n"); stringBuilder.Append(effectColors["Shield"] + "免疫</color> 除了 " + effectColors["Injury"] + "伤害</color> 和 " + effectColors["Curse"] + "诅咒</color> 以外的所有效果,但你会受到 " + effectColors["Injury"] + "8x 伤害</color>\n\n"); stringBuilder.Append("在你 " + effectColors["Injury"] + "昏迷</color> 时将直接 " + effectColors["Curse"] + "死亡</color>\n\n"); stringBuilder.Append(effectColors["Thorns"] + "仙人掌(球)</color> 对你没有效果\n\n"); stringBuilder.Append(effectColors["Cold"] + "寒雾</color> 将对你造成 " + effectColors["Injury"] + "0.125x 伤害</color> 而不是 " + effectColors["Cold"] + "寒冷</color>\n\n"); stringBuilder.Append(effectColors["Injury"] + "僵尸</color> 只会对你造成 " + effectColors["Injury"] + "0.25x 伤害</color>\n\n"); TextMeshProUGUI val19 = itemInfoDisplayTextMesh; ((TMP_Text)val19).text = ((TMP_Text)val19).text + stringBuilder.ToString(); flag2 = true; } else { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["ItemInfoDisplayPositive"] + "使用后你将会变回</color> 童军" + effectColors["ItemInfoDisplayPositive"] + "</color>\n\n"; } } else if (type == typeof(Action_ClearAllStatus)) { Action_ClearAllStatus val20 = (Action_ClearAllStatus)val6; TextMeshProUGUI val21 = itemInfoDisplayTextMesh; ((TMP_Text)val21).text = ((TMP_Text)val21).text + effectColors["ItemInfoDisplayPositive"] + "清除所有状态</color>"; if (val20.excludeCurse) { TextMeshProUGUI val22 = itemInfoDisplayTextMesh; ((TMP_Text)val22).text = ((TMP_Text)val22).text + " 除了 " + effectColors["Curse"] + "诅咒</color>"; } if (val20.otherExclusions.Count > 0) { foreach (STATUSTYPE otherExclusion in val20.otherExclusions) { STATUSTYPE current = otherExclusion; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "、" + effectColors[((object)current).ToString()] + ((object)current).ToString().ToUpper() + "</color>"; } } ((TMP_Text)itemInfoDisplayTextMesh).text = ((TMP_Text)itemInfoDisplayTextMesh).text.Replace("、<#E13542>CRAB</color>", "") + "\n\n"; } else if (type == typeof(Action_ConsumeAndSpawn)) { Action_ConsumeAndSpawn val23 = (Action_ConsumeAndSpawn)val6; if (((object)val23.itemToSpawn).ToString().Contains("Peel")) { TextMeshProUGUI val24 = itemInfoDisplayTextMesh; ((TMP_Text)val24).text = ((TMP_Text)val24).text + "<#CCCCCC>食用后获得果皮</color>\n\n"; } } else if (type == typeof(Action_ReduceUses)) { if (currentItem.data.data.ContainsKey((DataEntryKey)2)) { OptionableIntItemData val25 = (OptionableIntItemData)currentItem.data.data[(DataEntryKey)2]; if (val25.HasData) { text3 = ((val25.Value > 1) ? (text3 + " 还可以使用" + val25.Value + " 次") : ((val25.Value != 1) ? (text3 + " 次数消耗完毕,无法使用") : (text3 + " 只能使用 1 次"))); } } } else if (type == typeof(Lantern)) { Lantern val26 = (Lantern)val6; if (((Object)gameObject).name.Equals("Torch(Clone)")) { TextMeshProUGUI val27 = itemInfoDisplayTextMesh; ((TMP_Text)val27).text = ((TMP_Text)val27).text + "可以点燃\n\n"; } else { text5 += "<#CCCCCC>点燃时,附近玩家获得:</color>\n\n"; } if (((Object)gameObject).name.Equals("Lantern_Faerie(Clone)")) { StatusField component2 = ((Component)gameObject.transform.Find("FaerieLantern/Light/Heat")).GetComponent<StatusField>(); text5 = text5 + "<#CCCCCC>还可以使用 " + val26.fuel.ToString("F1").Replace(".0", "") + "秒</color>\n\n"; text5 += ProcessEffectPerSecond(((StatusFieldBase)component2).statusAmountPerSecond, ((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref ((StatusFieldBase)component2).statusType)/*cast due to .constrained prefix*/).ToString()); foreach (StatusFieldStatus additionalStatus in ((StatusFieldBase)component2).additionalStatuses) { text5 += ProcessEffectPerSecond(additionalStatus.statusAmountPerSecond, ((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref additionalStatus.statusType)/*cast due to .constrained prefix*/).ToString()); } } else if (((Object)gameObject).name.Equals("Lantern(Clone)")) { Transform val28 = gameObject.transform.Find("GasLantern/Light/Heat"); StatusField val29 = (((Object)(object)val28 != (Object)null) ? ((Component)val28).GetComponent<StatusField>() : null); text5 = text5 + "<#CCCCCC>还可以使用 " + val26.fuel.ToString("F1").Replace(".0", "") + "秒</color>\n\n"; if ((Object)val29 != (Object)null) { text5 += ProcessEffectPerSecond(((StatusFieldBase)val29).statusAmountPerSecond, ((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref ((StatusFieldBase)val29).statusType)/*cast due to .constrained prefix*/).ToString()); } } } else if (type == typeof(Action_RaycastDart)) { Action_RaycastDart val30 = (Action_RaycastDart)val6; flag = true; text5 += "<#CCCCCC>发射飞镖,将对被命中的玩家施加以下效果:</color>\n\n"; for (int k = 0; k < val30.afflictionsOnHit.Length; k++) { text5 += ProcessAffliction(val30.afflictionsOnHit[k]); } } else if (type == typeof(MagicBugle)) { MagicBugle val31 = (MagicBugle)val6; TextMeshProUGUI val32 = itemInfoDisplayTextMesh; ((TMP_Text)val32).text = ((TMP_Text)val32).text + "<#CCCCCC>还可以使用 " + val31.fuel.ToString("F1").Replace(".0", "") + " 秒</color>\n\n"; TextMeshProUGUI val33 = itemInfoDisplayTextMesh; ((TMP_Text)val33).text = ((TMP_Text)val33).text + "启动消耗 " + val31.initialTootCost.ToString("F1") + " 秒\n\n"; TextMeshProUGUI val34 = itemInfoDisplayTextMesh; ((TMP_Text)val34).text = ((TMP_Text)val34).text + effectColors["ItemInfoDisplayPositive"] + "当你吹奏喇叭时</color>\n\n"; } else if (type == typeof(ClimbingSpikeComponent)) { TextMeshProUGUI val35 = itemInfoDisplayTextMesh; ((TMP_Text)val35).text = ((TMP_Text)val35).text + "放置一个可抓住的岩钉,可以在岩钉上" + effectColors["Extra Stamina"] + "恢复体力</color>\n\n"; } else if (type == typeof(Action_Flare)) { TextMeshProUGUI val36 = itemInfoDisplayTextMesh; ((TMP_Text)val36).text = ((TMP_Text)val36).text + "可以点燃\n\n"; } else if (type == typeof(Backpack)) { Backpack val37 = (Backpack)val6; if (MatchesAnyItemIdentifier(currentItem, gameObject, "滑稽背包", "腰包", "FANNY PACK", "FANNYPACK")) { TextMeshProUGUI val38 = itemInfoDisplayTextMesh; ((TMP_Text)val38).text = ((TMP_Text)val38).text + effectColors["ItemInfoDisplayPositive"] + "提供额外物品栏位</color>\n\n"; TextMeshProUGUI val39 = itemInfoDisplayTextMesh; ((TMP_Text)val39).text = ((TMP_Text)val39).text + "<#CCCCCC>容量 " + val37.slotCount + " 格</color>\n\n"; int backpackFilledSlotCountSafe = GetBackpackFilledSlotCountSafe(val37); if (backpackFilledSlotCountSafe >= 0) { TextMeshProUGUI val40 = itemInfoDisplayTextMesh; ((TMP_Text)val40).text = ((TMP_Text)val40).text + "<#CCCCCC>当前已装 " + backpackFilledSlotCountSafe + " / " + val37.slotCount + "</color>\n\n"; } } else if (EasyBackpack) { TextMeshProUGUI val41 = itemInfoDisplayTextMesh; ((TMP_Text)val41).text = ((TMP_Text)val41).text + "按下 B 键可以打开背包,并存入物品\n\n"; } else { TextMeshProUGUI val42 = itemInfoDisplayTextMesh; ((TMP_Text)val42).text = ((TMP_Text)val42).text + "放下背包才可以存入物品\n\n"; } } else if (type == typeof(BananaPeel)) { TextMeshProUGUI val43 = itemInfoDisplayTextMesh; ((TMP_Text)val43).text = ((TMP_Text)val43).text + effectColors["Hunger"] + "踩上去会滑倒</color>\n\n"; } else if (type == typeof(Constructable)) { Constructable val44 = (Constructable)val6; if (((Object)val44.constructedPrefab).name.Equals("PortableStovetop_Placed")) { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "放置一个 便携火炉 可以提供 " + effectColors["Injury"] + "烹饪</color> 功能 ,持续 " + val44.constructedPrefab.GetComponent<Campfire>().burnsFor + "秒\n\n"; } else { TextMeshProUGUI val45 = itemInfoDisplayTextMesh; ((TMP_Text)val45).text = ((TMP_Text)val45).text + "可以放置\n\n"; } } else if (type == typeof(RopeSpool)) { RopeSpool val46 = (RopeSpool)val6; if (val46.isAntiRope) { TextMeshProUGUI val47 = itemInfoDisplayTextMesh; ((TMP_Text)val47).text = ((TMP_Text)val47).text + "放置一条向上的反重力绳子\n\n"; } else { TextMeshProUGUI val48 = itemInfoDisplayTextMesh; ((TMP_Text)val48).text = ((TMP_Text)val48).text + "放一条绳子\n\n"; } val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "长度从 " + (val46.minSegments / 4f).ToString("F2").Replace(".0", "") + " 米到 " + ((float)Rope.MaxSegments / 4f).ToString("F1").Replace(".0", "") + " 米\n\n"; if (configForceUpdateTime.Value <= 1f) { text3 = text3 + " 剩余 " + (val46.RopeFuel / 4f).ToString("F2").Replace(".00", "") + " 米"; } } else if (type == typeof(RopeShooter)) { RopeShooter val49 = (RopeShooter)val6; bool flag3 = (Object)(object)val49.ropeAnchorWithRopePref != (Object)null && ((Object)val49.ropeAnchorWithRopePref).name.IndexOf("Anti", StringComparison.OrdinalIgnoreCase) >= 0; if (MatchesAnyItemIdentifier(currentItem, gameObject, "反重绳索炮", "反向總索槍", "ANTI-ROPE CANNON", "ANTI-ROPE")) { flag3 = true; } TextMeshProUGUI val50 = itemInfoDisplayTextMesh; ((TMP_Text)val50).text = ((TMP_Text)val50).text + effectColors["ItemInfoDisplayPositive"] + "发射绳索锚点</color>\n\n"; if (flag3) { TextMeshProUGUI val51 = itemInfoDisplayTextMesh; ((TMP_Text)val51).text = ((TMP_Text)val51).text + effectColors["Extra Stamina"] + "向上漂浮的反重力绳索</color>\n\n"; } else { TextMeshProUGUI val52 = itemInfoDisplayTextMesh; ((TMP_Text)val52).text = ((TMP_Text)val52).text + "向下垂落的绳索</color>\n\n"; } TextMeshProUGUI val53 = itemInfoDisplayTextMesh; ((TMP_Text)val53).text = ((TMP_Text)val53).text + "<#CCCCCC>最远射程 " + FormatNumber(val49.maxLength) + " 米;绳索长度约 " + FormatNumber(val49.length / 4f) + " 米</color>\n\n"; } else if (type == typeof(Antigrav)) { Antigrav val54 = (Antigrav)val6; if (val54.intensity != 0f) { text5 = text5 + effectColors["Injury"] + "警告:</color> <#CCCCCC>丢弃时会飞走</color>\n\n"; } } else if (type == typeof(Action_Balloon)) { text5 += "可以绑在玩家身上\n\n"; } else if (type == typeof(VineShooter)) { VineShooter val55 = (VineShooter)val6; TextMeshProUGUI val56 = itemInfoDisplayTextMesh; ((TMP_Text)val56).text = ((TMP_Text)val56).text + "从你的位置发射一条锁链\n\n连接到射击点,最远可达\n\n" + (val55.maxLength / 1.6666666f).ToString("F1").Replace(".0", "") + " 米距离\n\n"; } else if (type == typeof(CloudFungus)) { text5 = text5 + effectColors["Hunger"] + "丢下</color>以部署一个云朵(可在空中生成)\n\n"; } else if (type == typeof(ShelfShroom)) { ShelfShroom val57 = (ShelfShroom)val6; if (((Object)val57.instantiateOnBreak).name.Equals("HealingPuffShroomSpawn")) { GameObject instantiateOnBreak = val57.instantiateOnBreak; GameObject gameObject2 = ((Component)instantiateOnBreak.transform.Find("VFX_SporeHealingExplo")).gameObject; if ((Object)gameObject2 != (Object)null) { TextMeshProUGUI val58 = itemInfoDisplayTextMesh; ((TMP_Text)val58).text = ((TMP_Text)val58).text + effectColors["Hunger"] + "丢下</color>以释放范围效果\n\n"; RemoveAfterSeconds component3 = gameObject2.GetComponent<RemoveAfterSeconds>(); float globalDuration = (((Object)component3 != (Object)null) ? component3.seconds : 0f); TextMeshProUGUI val59 = itemInfoDisplayTextMesh; ((TMP_Text)val59).text = ((TMP_Text)val59).text + ProcessGameObjectAndChildrenAOE(gameObject2, globalDuration, addTips: false); } } else if (((Object)val57.instantiateOnBreak).name.Equals("ShelfShroomSpawn")) { text5 = text5 + effectColors["Hunger"] + "丢下</color>以部署一个蘑菇平台\n\n"; } else if (((Object)val57.instantiateOnBreak).name.Equals("BounceShroomSpawn")) { text5 = text5 + effectColors["Hunger"] + "丢下</color>以部署可弹跳的蘑菇平台\n\n"; } } else if (type == typeof(ScoutEffigy)) { TextMeshProUGUI val60 = itemInfoDisplayTextMesh; ((TMP_Text)val60).text = ((TMP_Text)val60).text + effectColors["Extra Stamina"] + "复活</color>死去的玩家\n\n"; } else if (type == typeof(Action_Die)) { TextMeshProUGUI val61 = itemInfoDisplayTextMesh; ((TMP_Text)val61).text = ((TMP_Text)val61).text + "使用时你会" + effectColors["Curse"] + "死亡</color>\n\n"; } else if (type == typeof(Action_SpawnGuidebookPage)) { flag = true; TextMeshProUGUI val62 = itemInfoDisplayTextMesh; ((TMP_Text)val62).text = ((TMP_Text)val62).text + "可以打开\n\n"; } else if (type == typeof(Action_Guidebook)) { TextMeshProUGUI val63 = itemInfoDisplayTextMesh; ((TMP_Text)val63).text = ((TMP_Text)val63).text + "可以阅读\n\n"; } else if (type == typeof(Action_CallScoutmaster)) { TextMeshProUGUI val64 = itemInfoDisplayTextMesh; ((TMP_Text)val64).text = ((TMP_Text)val64).text + effectColors["Injury"] + "使用时违反规则0</color>\n\n"; } else if (type == typeof(Action_MoraleBoost)) { Action_MoraleBoost val65 = (Action_MoraleBoost)val6; if (val65.boostRadius < 0f) { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["ItemInfoDisplayPositive"] + "获得</color> " + effectColors["Extra Stamina"] + (val65.baselineStaminaBoost * 100f).ToString("F1").Replace(".0", "") + " 额外体力</color>\n\n"; } else if (val65.boostRadius > 0f) { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "<#CCCCCC>附近玩家</color>" + effectColors["ItemInfoDisplayPositive"] + " 获得</color> " + effectColors["Extra Stamina"] + (val65.baselineStaminaBoost * 100f).ToString("F1").Replace(".0", "") + " 额外体力</color>\n\n"; } } else if (type == typeof(Breakable)) { Breakable val66 = (Breakable)val6; if (val66.breakOnCollision) { if (val66.minBreakVelocity > 0f) { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "投掷速度大于 " + effectColors["Hunger"] + val66.minBreakVelocity.ToString("F1").Replace(".0", "") + "</color> 时将它砸开\n\n"; } else { TextMeshProUGUI val67 = itemInfoDisplayTextMesh; ((TMP_Text)val67).text = ((TMP_Text)val67).text + effectColors["Hunger"] + "投掷</color>碰撞后可砸开\n\n"; } } } else if (type == typeof(Bonkable)) { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Hunger"] + "瞄准队友的脑瓜</color> " + effectColors["Injury"] + "将他砸晕\n\n"; } else if (type == typeof(MagicBean)) { MagicBean val68 = (MagicBean)val6; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Hunger"] + "丢下</color>会种下藤蔓,\n\n藤蔓会垂直于地形生长,最长可达 " + (val68.plantPrefab.maxLength / 2f).ToString("F1").Replace(".0", "") + " 米,或直到碰到障碍物\n\n"; } else if (type == typeof(BingBong)) { TextMeshProUGUI val69 = itemInfoDisplayTextMesh; ((TMP_Text)val69).text = ((TMP_Text)val69).text + "航空公司的吉祥物:" + effectColors["Extra Stamina"] + "BingBong</color>\n\n"; } else if (type == typeof(Action_Passport)) { TextMeshProUGUI val70 = itemInfoDisplayTextMesh; ((TMP_Text)val70).text = ((TMP_Text)val70).text + "使用 " + effectColors["Hunger"] + "护照</color> 可以自定义外观\n\n"; } else if (type == typeof(Actions_Binoculars)) { TextMeshProUGUI val71 = itemInfoDisplayTextMesh; ((TMP_Text)val71).text = ((TMP_Text)val71).text + "使用 " + effectColors["Hunger"] + "望远镜</color> 观察远处的物体\n\n"; } else if (type == typeof(Action_WarpToRandomPlayer)) { TextMeshProUGUI val72 = itemInfoDisplayTextMesh; ((TMP_Text)val72).text = ((TMP_Text)val72).text + "传送到随机玩家\n\n"; } else if (type == typeof(Action_WarpToBiome)) { Action_WarpToBiome val73 = (Action_WarpToBiome)val6; TextMeshProUGUI val74 = itemInfoDisplayTextMesh; ((TMP_Text)val74).text = ((TMP_Text)val74).text + "传送到" + ((object)Unsafe.As<Segment, Segment>(ref val73.segmentToWarpTo)/*cast due to .constrained prefix*/).ToString().ToUpper() + "\n\n"; } else if (type == typeof(Parasol)) { TextMeshProUGUI val75 = itemInfoDisplayTextMesh; ((TMP_Text)val75).text = ((TMP_Text)val75).text + "使用 " + effectColors["Hunger"] + "太阳伞</color> 可开合,并在空中减缓下落\n\n"; } else if (type == typeof(RescueHook)) { RescueHook val76 = (RescueHook)val6; TextMeshProUGUI val77 = itemInfoDisplayTextMesh; ((TMP_Text)val77).text = ((TMP_Text)val77).text + "<#CCCCCC>发射一条钩爪来:</color>\n\n"; TextMeshProUGUI val78 = itemInfoDisplayTextMesh; ((TMP_Text)val78).text = ((TMP_Text)val78).text + effectColors["ItemInfoDisplayPositive"] + "救援其他玩家</color>\n\n"; TextMeshProUGUI val79 = itemInfoDisplayTextMesh; ((TMP_Text)val79).text = ((TMP_Text)val79).text + effectColors["ItemInfoDisplayPositive"] + "拉动自己到墙壁</color>\n\n"; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Extra Stamina"] + "距离 " + (val76.range * CharacterStats.unitsToMeters).ToString("F1").Replace(".0", "") + " 米</color>\n\n"; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Extra Stamina"] + "垂直距离 " + (val76.rangeDownward * CharacterStats.unitsToMeters).ToString("F1").Replace(".0", "") + " 米</color>\n\n"; } else { if (type == typeof(Frisbee)) { continue; } if (type == typeof(Action_ConstructableScoutCannonScroll)) { TextMeshProUGUI val80 = itemInfoDisplayTextMesh; ((TMP_Text)val80).text = ((TMP_Text)val80).text + "\n<#CCCCCC>放置后点燃引线:</color>\n\n将桶内童兵发射出去\n\n"; } else if (type == typeof(Action_RandomMushroomEffect)) { Action_RandomMushroomEffect val81 = (Action_RandomMushroomEffect)val6; int num = -1; if (val81.useDebugEffect) { num = val81.debugEffect; } else if ((Object)MushroomManager.instance != (Object)null) { int num2 = val81.mushroomTypeIndex % MushroomManager.instance.mushroomEffects.Length; num = MushroomManager.instance.mushroomEffects[num2]; } int num3 = 0; if (!val81.useDebugEffect && (Object)MushroomManager.instance != (Object)null) { int num4 = val81.mushroomTypeIndex % MushroomManager.instance.mushroomStamAmt.Length; num3 = MushroomManager.instance.mushroomStamAmt[num4]; } TextMeshProUGUI val82 = itemInfoDisplayTextMesh; ((TMP_Text)val82).text = ((TMP_Text)val82).text + effectColors["ItemInfoDisplayPositive"] + "食用后获得随机效果:</color>\n\n"; if (num3 > 0) { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Extra Stamina"] + "+" + ((float)num3 * 0.05f * 100f).ToString("F1").Replace(".0", "") + " 额外体力</color>\n\n"; } if (num >= 0) { TextMeshProUGUI val83 = itemInfoDisplayTextMesh; ((TMP_Text)val83).text = ((TMP_Text)val83).text + "\n<#CCCCCC>本次效果: "; switch (num) { case 0: { TextMeshProUGUI val93 = itemInfoDisplayTextMesh; ((TMP_Text)val93).text = ((TMP_Text)val93).text + effectColors["Extra Stamina"] + "无限体力 4 秒</color>"; break; } case 1: { TextMeshProUGUI val92 = itemInfoDisplayTextMesh; ((TMP_Text)val92).text = ((TMP_Text)val92).text + effectColors["Extra Stamina"] + "加速效果: +50% 奔跑速度, +150% 攀爬速度, 持续 5 秒</color>"; break; } case 2: { TextMeshProUGUI val91 = itemInfoDisplayTextMesh; ((TMP_Text)val91).text = ((TMP_Text)val91).text + effectColors["ItemInfoDisplayPositive"] + "低重力效果, 持续 15 秒</color>"; break; } case 3: { TextMeshProUGUI val90 = itemInfoDisplayTextMesh; ((TMP_Text)val90).text = ((TMP_Text)val90).text + effectColors["Shield"] + "无敌效果, 持续 10 秒</color>"; break; } case 4: val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Hunger"] + "-15 饥饿值</color>, " + effectColors["Injury"] + "-15 伤害</color>, " + effectColors["Poison"] + "-15 中毒, 清除中毒效果</color>"; break; case 5: { TextMeshProUGUI val89 = itemInfoDisplayTextMesh; ((TMP_Text)val89).text = ((TMP_Text)val89).text + effectColors["Injury"] + "产生爆炸并击飞附近队友</color>"; break; } case 6: { TextMeshProUGUI val88 = itemInfoDisplayTextMesh; ((TMP_Text)val88).text = ((TMP_Text)val88).text + effectColors["ItemInfoDisplayNegative"] + "失明效果, 持续 60 秒</color>"; break; } case 7: { TextMeshProUGUI val87 = itemInfoDisplayTextMesh; ((TMP_Text)val87).text = ((TMP_Text)val87).text + effectColors["Injury"] + "强制晕倒 8 秒</color>"; break; } case 8: { TextMeshProUGUI val86 = itemInfoDisplayTextMesh; ((TMP_Text)val86).text = ((TMP_Text)val86).text + effectColors["Poison"] + "+25 真菌感染</color>"; break; } case 9: { TextMeshProUGUI val85 = itemInfoDisplayTextMesh; ((TMP_Text)val85).text = ((TMP_Text)val85).text + effectColors["ItemInfoDisplayNegative"] + "麻木效果, 持续 60 秒</color>"; break; } default: { TextMeshProUGUI val84 = itemInfoDisplayTextMesh; ((TMP_Text)val84).text = ((TMP_Text)val84).text + effectColors["ItemInfoDisplayNegative"] + "未知效果</color>"; break; } } TextMeshProUGUI val94 = itemInfoDisplayTextMesh; ((TMP_Text)val94).text = ((TMP_Text)val94).text + "</color>\n\n"; } else { TextMeshProUGUI val95 = itemInfoDisplayTextMesh; ((TMP_Text)val95).text = ((TMP_Text)val95).text + "<#CCCCCC>可能效果:</color>\n\n"; TextMeshProUGUI val96 = itemInfoDisplayTextMesh; ((TMP_Text)val96).text = ((TMP_Text)val96).text + effectColors["ItemInfoDisplayPositive"] + "正面: 无限体力, 加速, 低重力, 无敌, 治疗</color>\n\n"; TextMeshProUGUI val97 = itemInfoDisplayTextMesh; ((TMP_Text)val97).text = ((TMP_Text)val97).text + effectColors["ItemInfoDisplayNegative"] + "负面: 爆炸, 失明, 坠落, 真菌感染, 麻木</color>\n\n"; } TextMeshProUGUI val98 = itemInfoDisplayTextMesh; ((TMP_Text)val98).text = ((TMP_Text)val98).text + effectColors["Hunger"] + " 3 秒后生效</color>\n\n"; } else if (type == typeof(Dynamite)) { Dynamite val99 = (Dynamite)val6; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Injury"] + "爆炸</color>造成最多" + effectColors["Injury"] + (val99.explosionPrefab.GetComponent<AOE>().statusAmount * 100f).ToString("F1").Replace(".0", "") + " 伤害</color>\n\n<#CCCCCC>持有时受到额外伤害</color>\n\n"; } else if (type == typeof(Scorpion)) { Scorpion val100 = (Scorpion)val6; if ((int)((Mob)val100).mobState != 3) { TextMeshProUGUI val101 = itemInfoDisplayTextMesh; ((TMP_Text)val101).text = ((TMP_Text)val101).text + "持有时会对你造成" + effectColors["Poison"] + "伤害</color>:\n\n"; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Heat"] + "烹饪</color>会让其" + effectColors["Curse"] + "死亡</color>\n\n"; if (configForceUpdateTime.Value <= 1f) { float num5 = Mathf.Max(0.5f, 1f - currentItem.holderCharacter.refs.afflictions.statusSum + 0.05f) * 100f; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "<#CCCCCC>下一次蜇伤将造成:</color> " + effectColors["Poison"] + num5.ToString("F1").Replace(".0", "") + " </color>中毒</color>持续 " + val100.totalPoisonTime.ToString("F1").Replace(".0", "") + " 秒\n\n"; TextMeshProUGUI val102 = itemInfoDisplayTextMesh; ((TMP_Text)val102).text = ((TMP_Text)val102).text + "<#CCCCCC>(健康时伤害更高)</color>\n\n"; } else { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "<#CCCCCC>下一次蜇伤将造成:</color>至少 " + effectColors["Poison"] + "50 </color>中毒</color>持续 " + val100.totalPoisonTime.ToString("F1").Replace(".0", "") + " 秒\n\n"; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "最多 " + effectColors["Poison"] + "105 中毒</color>持续 " + val100.totalPoisonTime.ToString("F1").Replace(".0", "") + " 秒\n\n"; TextMeshProUGUI val103 = itemInfoDisplayTextMesh; ((TMP_Text)val103).text = ((TMP_Text)val103).text + "<#CCCCCC>(健康时伤害更高)</color>\n\n"; } } } else if (type == typeof(Action_Spawn)) { Action_Spawn val104 = (Action_Spawn)val6; if ((Object)val104.objectToSpawn == (Object)null) { continue; } AntiSphere component7; if (((Object)val104.objectToSpawn).name.Equals("VFX_Sunscreen")) { AOE component4 = ((Component)val104.objectToSpawn.transform.Find("AOE")).GetComponent<AOE>(); RemoveAfterSeconds component5 = ((Component)val104.objectToSpawn.transform.Find("AOE")).GetComponent<RemoveAfterSeconds>(); val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "<#CCCCCC>喷洒会生成一个持续 " + component5.seconds.ToString("F1").Replace(".0", "") + " 秒的雾气,施加:</color>\n\n" + ProcessAffliction(component4.affliction); } else if (((Object)val104.objectToSpawn).name.Equals("VFX_BalloonPopWithKnockback")) { AOE component6 = ((Component)val104.objectToSpawn.transform).GetComponent<AOE>(); if (component6.fallTime > 0f) { float factor = component6.GetFactor(1f); val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Injury"] + "晕值</color> " + (factor * component6.fallTime).ToString("F1").Replace(".0", "") + " 秒\n\n"; } TextMeshProUGUI val105 = itemInfoDisplayTextMesh; ((TMP_Text)val105).text = ((TMP_Text)val105).text + effectColors["Hunger"] + "使用</color>后会释放范围效果\n\n"; TextMeshProUGUI val106 = itemInfoDisplayTextMesh; ((TMP_Text)val106).text = ((TMP_Text)val106).text + "<#CCCCCC>范围: " + (component6.range * CharacterStats.unitsToMeters).ToString("F1").Replace(".0", "") + " 米</color>\n\n"; TextMeshProUGUI val107 = itemInfoDisplayTextMesh; ((TMP_Text)val107).text = ((TMP_Text)val107).text + effectColors["Injury"] + "击退</color>附近玩家\n\n"; } else if (TryGetDeepComponent<AntiSphere>(val104.objectToSpawn, out component7)) { TryGetDeepComponent<RemoveAfterSeconds>(val104.objectToSpawn, out RemoveAfterSeconds component8); val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Extra Stamina"] + "生成反重力场</color>\n\n"; if ((Object)(object)component8 != (Object)null) { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "<#CCCCCC>持续 " + FormatSeconds(component8.seconds) + "</color>\n\n"; } val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "<#CCCCCC>场内会将玩家和地面物品托向空中,并提供无限体力</color>\n\n"; if (component7.staminaGainRate > 0f) { val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Extra Stamina"] + "在场内每秒恢复 " + FormatNumber(component7.staminaGainRate * 100f) + "% 体力</color>\n\n"; } val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "<#CCCCCC>离开后会被弹回;进入时会被吸入中心</color>\n\n"; } } else if (type == typeof(Action_ApplyAntigrav)) { TextMeshProUGUI val108 = itemInfoDisplayTextMesh; ((TMP_Text)val108).text = ((TMP_Text)val108).text + effectColors["Extra Stamina"] + "生成反重力场</color>\n\n"; TextMeshProUGUI val109 = itemInfoDisplayTextMesh; ((TMP_Text)val109).text = ((TMP_Text)val109).text + "<#CCCCCC>场内玩家和地面物品会被托起,并持续获得无限体力</color>\n\n"; } else if (type == typeof(CactusBall)) { CactusBall val110 = (CactusBall)val6; val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + effectColors["Thorns"] + "尖刺</color> 会附在身体上\n\n可以通过 " + effectColors["Hunger"] + "投掷</color> 扔出\n\n至少需要蓄力 " + (((StickyItemComponent)val110).throwChargeRequirement * 100f).ToString("F1").Replace(".0", "") + "%\n\n"; } else if (type == typeof(BingBongShieldWhileHolding)) { TextMeshProUGUI val111 = itemInfoDisplayTextMesh; ((TMP_Text)val111).text = ((TMP_Text)val111).text + "<#CCCCCC>持有时获得:</color>\n\n" + effectColors["Shield"] + "无敌状态</color>\n\n"; } else if (type == typeof(CheckpointConstructable)) { TextMeshProUGUI val112 = itemInfoDisplayTextMesh; ((TMP_Text)val112).text = ((TMP_Text)val112).text + "选择一处地方进行放置,为你提供一次" + effectColors["Extra Stamina"] + "复活</color>效果\n\n"; } else { if (!(type == typeof(ItemCooking))) { continue; } text4 = ""; ItemCooking val113 = (ItemCooking)val6; if (val113.wreckWhenCooked && val113.timesCookedLocal >= 1) { text4 = text4 + "\n\n" + effectColors["Curse"] + "因烹饪而损坏</color>"; } else if (val113.wreckWhenCooked) { text4 = text4 + "\n\n" + effectColors["Curse"] + "烹饪时会损坏</color>"; } else if (val113.timesCookedLocal >= 12) { text4 = text4 + " " + effectColors["Curse"] + val113.timesCookedLocal + "次烹饪\n\n无法再烹饪</color>"; } else if (val113.timesCookedLocal == 0 && val113.canBeCooked) { text4 = text4 + "\n\n可以" + effectColors["Extra Stamina"] + "烹饪</color>"; if (val113.additionalCookingBehaviors.Length != 0) { int num6 = 0; int num7 = 0; AdditionalCookingBehavior[] additionalCookingBehaviors = val113.additionalCookingBehaviors; AdditionalCookingBehavior[] array = additionalCookingBehaviors; foreach (AdditionalCookingBehavior val114 in array) { CookingBehavior_EnableScripts val115 = (CookingBehavior_EnableScripts)((val114 is CookingBehavior_EnableScripts) ? val114 : null); if (val115 != null) { num6 = val115.scriptsToEnable.Length; continue; } CookingBehavior_DisableScripts val116 = (CookingBehavior_DisableScripts)((val114 is CookingBehavior_DisableScripts) ? val114 : null); if (val116 != null) { num7 = val116.scriptsToDisable.Length; } } if (num6 > 0 || num7 > 0) { text4 += ",烹饪</color></color>后会:\n\n"; } if (num6 > 0) { text4 += string.Format("{0}新增 {1} 个</color>效果,", effectColors["Extra Stamina"], num6); } if (num7 > 0) { text4 += string.Format("{0}移除 {1} 个</color>效果", effectColors["ItemInfoDisplayPositive"], num7); } text4 = text4.TrimEnd(','); } } else if (val113.timesCookedLocal == 1) { text4 = text4 + " " + effectColors["Extra Stamina"] + val113.timesCookedLocal + "次烹饪</color>\n\n" + effectColors["Hunger"] + "可以烹饪</color>"; } else if (val113.timesCookedLocal == 2) { text4 = text4 + " " + effectColors["Hunger"] + val113.timesCookedLocal + "次烹饪</color>\n\n" + effectColors["Injury"] + "可以烹饪</color>"; } else if (val113.timesCookedLocal == 3) { text4 = text4 + " " + effectColors["Injury"] + val113.timesCookedLocal + "次烹饪</color>\n\n" + effectColors["Poison"] + "可以烹饪</color>"; } else if (val113.timesCookedLocal >= 4) { text4 = text4 + " " + effectColors["Poison"] + val113.timesCookedLocal + "次烹饪\n\n可以烹饪</color>"; } if (val113.hasExplosion) { text4 = text4 + "\n\n烹饪后会" + effectColors["Injury"] + " 爆炸</color>"; } } } } text5 += GetNewVersionItemTips(gameObject, currentItem); if (text.Length > 0 && flag) { ((TMP_Text)itemInfoDisplayTextMesh).text = text + "\n\n" + ((TMP_Text)itemInfoDisplayTextMesh).text; } if (text5.Length > 0) { TextMeshProUGUI val117 = itemInfoDisplayTextMesh; ((TMP_Text)val117).text = ((TMP_Text)val117).text + "\n" + text5; } val17 = itemInfoDisplayTextMesh; ((TMP_Text)val17).text = ((TMP_Text)val17).text + "\n" + text2 + text3 + text4; ((TMP_Text)itemInfoDisplayTextMesh).text = ((TMP_Text)itemInfoDisplayTextMesh).text.Replace("\n\n", "\n\n"); } private static string ProcessSingleGameObjectAOE(GameObject targetObject, float globalDuration = 0f, bool addTips = true) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) string text = ""; float x = 0.025f; if ((Object)targetObject == (Object)null) { return text; } AOE component = targetObject.GetComponent<AOE>(); if ((Object)component == (Object)null || Mathf.Abs(component.statusAmount) == 0f) { return text; } if (!addTips) { addTips = true; text = text + "<#CCCCCC>范围: " + (component.range * CharacterStats.unitsToMeters).ToString("F1").Replace(".0", "") + "米</color>,持续 " + globalDuration + " 秒\n\n"; text = text + "<#CCCCCC>效果随距离衰减 (最小 " + (component.minFactor * 100f).ToString("F0") + "%)</color>\n\n"; } TimeEvent component2 = targetObject.GetComponent<TimeEvent>(); if ((Object)component2 != (Object)null && globalDuration > 0f) { x = ((!(component.statusAmount < 0f)) ? MathF.Abs(x) : (MathF.Abs(x) * -1f)); float amountPerSecond = Mathf.Floor(component.statusAmount * (1f / component2.rate) / x) * x; text += ProcessEffectPerSecond(amountPerSecond, ((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref component.statusType)/*cast due to .constrained prefix*/).ToString()); if (component.addtlStatus != null && component.addtlStatus.Length != 0) { STATUSTYPE[] addtlStatus = component.addtlStatus; for (int i = 0; i < addtlStatus.Length; i++) { text += ProcessEffectPerSecond(amountPerSecond, ((object)addtlStatus[i]).ToString()); } } } else { text = text + "立刻" + ProcessEffect(component.statusAmount, ((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref component.statusType)/*cast due to .constrained prefix*/).ToString()); if (component.addtlStatus != null && component.addtlStatus.Length != 0) { STATUSTYPE[] addtlStatus2 = component.addtlStatus; for (int j = 0; j < addtlStatus2.Length; j++) { STATUSTYPE val = addtlStatus2[j]; text += ProcessEffect(component.statusAmount, ((object)val).ToString()); } } } if (component.hasAffliction && component.affliction != null) { text += ProcessAffliction(component.affliction); } if (!text.EndsWith("\n\n")) { text += "\n\n"; } return text; } private static string ProcessGameObjectAndChildrenAOE(GameObject targetObject, float globalDuration = 0f, bool addTips = true) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown string text = ""; if ((Object)targetObject == (Object)null) { return text; } string text2 = ProcessSingleGameObjectAOE(targetObject, globalDuration, addTips); if (!string.IsNullOrEmpty(text2)) { text += text2; } for (int i = 0; i < targetObject.transform.childCount; i++) { Transform child = targetObject.transform.GetChild(i); string text3 = ProcessGameObjectAndChildrenAOE(((Component)child).gameObject, globalDuration); if (!string.IsNullOrEmpty(text3)) { text += text3; } } return text; } private static string ProcessEffect(float amount, string effect, bool newLine = true) { string text = ""; if (amount < 0f && effect == "Poison") { text += ProcessEffect(amount, "Spores"); } if (amount == 0f) { return text; } if (amount > 0f) { text = ((!effect.Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayNegative"]) : (text + effectColors["ItemInfoDisplayPositive"])); text += "获得</color> "; } else if (amount < 0f) { text = ((!effect.Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayPositive"]) : (text + effectColors["ItemInfoDisplayNegative"])); text += "移除</color> "; } return text + effectColors[effect] + (Mathf.Abs(amount) * 100f).ToString("F1").Replace(".0", "") + " " + GetEffectChineseName(effect) + "</color>" + (newLine ? "\n\n" : ""); } private static string ProcessEffectPerSecond(float amountPerSecond, string effect, bool newLine = true) { string text = ""; if (amountPerSecond < 0f && effect == "Poison") { text += ProcessEffectPerSecond(amountPerSecond, "Spores"); } if (amountPerSecond == 0f) { return text; } if (amountPerSecond > 0f) { text = ((!effect.Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayNegative"]) : (text + effectColors["ItemInfoDisplayPositive"])); text += "每秒获得</color> "; } else if (amountPerSecond < 0f) { text = ((!effect.Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayPositive"]) : (text + effectColors["ItemInfoDisplayNegative"])); text += "每秒移除</color> "; } return text + effectColors[effect] + (Mathf.Abs(amountPerSecond) * 100f).ToString("F1").Replace(".0", "") + " " + GetEffectChineseName(effect) + "</color>" + (newLine ? "\n\n" : ((object)newLine)); } private static string ProcessEffectOverTime(float amountPerSecond, float rate, float time, string effect, bool newLine = true) { string text = ""; float num = Mathf.Abs(amountPerSecond) * time; if (amountPerSecond > 0f) { text = text + effectColors["ItemInfoDisplayNegative"] + "获得</color> "; } else { if (!(amountPerSecond < 0f)) { return text; } text = text + effectColors["ItemInfoDisplayPositive"] + "移除</color> "; } text = text + effectColors[effect] + num.ToString("F1").Replace(".0", "") + " " + GetEffectChineseName(effect) + "</color> "; return text + "持续 " + time.ToString("F1").Replace(".0", "") + "秒" + (newLine ? "\n" : ""); } private static string ProcessAffliction(Affliction affliction) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Invalid comparison between Unknown and I4 //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Invalid comparison between Unknown and I4 //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Expected O, but got Unknown //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Invalid comparison between Unknown and I4 //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Expected O, but got Unknown //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Invalid comparison between Unknown and I4 //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Expected O, but got Unknown //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Invalid comparison between Unknown and I4 //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Expected O, but got Unknown //IL_0750: Unknown result type (might be due to invalid IL or missing references) //IL_0756: Invalid comparison between Unknown and I4 //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Expected O, but got Unknown //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_084b: Invalid comparison between Unknown and I4 //IL_0763: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Expected O, but got Unknown //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08bf: Invalid comparison between Unknown and I4 //IL_0934: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Invalid comparison between Unknown and I4 //IL_08c9: Unknown result type (might be due to invalid IL or missing references) //IL_08d0: Expected O, but got Unknown //IL_09ae: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Invalid comparison between Unknown and I4 //IL_0945: Unknown result type (might be due to invalid IL or missing references) //IL_094c: Expected O, but got Unknown //IL_0a84: Unknown result type (might be due to invalid IL or missing references) //IL_0a8b: Invalid comparison between Unknown and I4 //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09c9: Expected O, but got Unknown //IL_0b27: Unknown result type (might be due to invalid IL or missing references) //IL_0b2e: Invalid comparison between Unknown and I4 //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_0a9f: Expected O, but got Unknown //IL_0ba8: Unknown result type (might be due to invalid IL or missing references) //IL_0baf: Invalid comparison between Unknown and I4 //IL_0b38: Unknown result type (might be due to invalid IL or missing references) //IL_0b3f: Expected O, but got Unknown //IL_0c08: Unknown result type (might be due to invalid IL or missing references) //IL_0c0f: Invalid comparison between Unknown and I4 //IL_0bb9: Unknown result type (might be due to invalid IL or missing references) //IL_0bc0: Expected O, but got Unknown //IL_0c68: Unknown result type (might be due to invalid IL or missing references) //IL_0c6f: Invalid comparison between Unknown and I4 //IL_0c19: Unknown result type (might be due to invalid IL or missing references) //IL_0c20: Expected O, but got Unknown //IL_0d2a: Unknown result type (might be due to invalid IL or missing references) //IL_0d31: Invalid comparison between Unknown and I4 //IL_0c7c: Unknown result type (might be due to invalid IL or missing references) //IL_0c83: Expected O, but got Unknown //IL_0da4: Unknown result type (might be due to invalid IL or missing references) //IL_0dab: Invalid comparison between Unknown and I4 //IL_0d3b: Unknown result type (might be due to invalid IL or missing references) //IL_0d42: Expected O, but got Unknown //IL_0e19: Unknown result type (might be due to invalid IL or missing references) //IL_0e20: Invalid comparison between Unknown and I4 //IL_0db5: Unknown result type (might be due to invalid IL or missing references) //IL_0dbc: Expected O, but got Unknown //IL_0eb5: Unknown result type (might be due to invalid IL or missing references) //IL_0ebc: Invalid comparison between Unknown and I4 //IL_0e2d: Unknown result type (might be due to invalid IL or missing references) //IL_0e34: Expected O, but got Unknown //IL_0f35: Unknown result type (might be due to invalid IL or missing references) //IL_0f3c: Invalid comparison between Unknown and I4 //IL_0ec6: Unknown result type (might be due to invalid IL or missing references) //IL_0ecd: Expected O, but got Unknown //IL_0f49: Unknown result type (might be due to invalid IL or missing references) //IL_0f50: Expected O, but got Unknown string text = ""; if ((int)affliction.GetAfflictionType() == 2) { Affliction_FasterBoi val = (Affliction_FasterBoi)affliction; string text2 = (((Affliction)val).totalTime + val.climbDelay).ToString("F1").Replace(".0", ""); string text3 = Mathf.Round((val.moveSpeedMod - 1f) * 100f).ToString("+0;-#").Replace(".0", ""); string text4 = Mathf.Round((val.climbSpeedMod - 1f) * 100f).ToString("+0;-#").Replace(".0", ""); string text5 = (val.drowsyOnEnd * 100f).ToString("F1").Replace(".0", ""); List<string> list = new List<string>(); if (val.moveSpeedMod != 1f) { list.Add(effectColors[(val.moveSpeedMod > 1f) ? "Extra Stamina" : "ItemInfoDisplayNegative"] + "移动速度 " + text3 + "%</color>"); } if (val.climbSpeedMod != 1f) { list.Add(effectColors[(val.climbSpeedMod > 1f) ? "Extra Stamina" : "ItemInfoDisplayNegative"] + "攀爬速度 " + text4 + "%</color>"); } string text6 = string.Join("\n\n", list); text = text + effectColors["ItemInfoDisplayPositive"] + "获得 " + text2 + " 秒效果:</color>\n\n" + text6 + "\n\n"; if (val.drowsyOnEnd > 0f) { text = text + effectColors["ItemInfoDisplayNegative"] + "结束后获得 " + effectColors["Drowsy"] + text5 + " 困倦</color></color>\n\n"; } } else if ((int)affliction.GetAfflictionType() == 8) { Affliction_ClearAllStatus val2 = (Affliction_ClearAllStatus)affliction; text = text + effectColors["ItemInfoDisplayPositive"] + "清除所有状态</color>"; if (val2.excludeCurse) { text = text + " 除了 " + effectColors["Curse"] + "诅咒</color>"; } text += "\n\n"; } else if ((int)affliction.GetAfflictionType() == 10) { Affliction_AddBonusStamina val3 = (Affliction_AddBonusStamina)affliction; text = text + effectColors["ItemInfoDisplayPositive"] + "获得</color> " + effectColors["Extra Stamina"] + (val3.staminaAmount * 100f).ToString("F1").Replace(".0", "") + " 额外体力</color>\n\n"; } else if ((int)affliction.GetAfflictionType() == 1) { Affliction_InfiniteStamina val4 = (Affliction_InfiniteStamina)affliction; float num = ((Affliction)val4).totalTime + val4.climbDelay; text = text + effectColors["ItemInfoDisplayPositive"] + "获得</color> " + num.ToString("F1").Replace(".0", "") + " 秒的" + effectColors["Extra Stamina"] + "无限体力</color>"; if (val4.climbDelay > 0f) { text = text + "\n\n" + effectColors["ItemInfoDisplayNegative"] + "攀爬缩短:</color> 开始攀爬时,如果剩余时间大于" + ((Affliction)val4).totalTime.ToString("F1").Replace(".0", "") + "秒,将缩短至" + ((Affliction)val4).totalTime.ToString("F1").Replace(".0", "") + "秒"; } text += "\n\n"; if (val4.drowsyAffliction != null && val4.drowsyAffliction.totalTime > 0f) { text = text + "之后," + ProcessAffliction(val4.drowsyAffliction); } } else if ((int)affliction.GetAfflictionType() == 7) { Affliction_AdjustStatus val5 = (Affliction_AdjustStatus)affliction; if (val5.statusAmount > 0f) { text = ((!((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref val5.statusType)/*cast due to .constrained prefix*/).ToString().Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayNegative"]) : (text + effectColors["ItemInfoDisplayPositive"])); text += "获得</color> "; } else { text = ((!((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref val5.statusType)/*cast due to .constrained prefix*/).ToString().Equals("Extra Stamina")) ? (text + effectColors["ItemInfoDisplayPositive"]) : (text + effectColors["ItemInfoDisplayNegative"])); text += "移除</color> "; } text = text + effectColors[((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref val5.statusType)/*cast due to .constrained prefix*/).ToString()] + (Mathf.Abs(val5.statusAmount) * 100f).ToString("F1").Replace(".0", "") + " " + GetEffectChineseName(((object)Unsafe.As<STATUSTYPE, STATUSTYPE>(ref val5.statusType)/*cast due to .constrained prefix*/).ToString()) + "</color>\n\n"; } else if ((int)affliction.GetAfflictionType() == 11) { Affliction_AdjustDrowsyOverTime val6 = (Affliction_AdjustDrowsyOverTime)affliction; text = ((!(val6.statusPerSecond > 0f)) ? (text + effectColors["ItemInfoDisplayPositive"] + "移除</color> ") : (text + effectColors["ItemInfoDisplayNegative"] + "获得</color> ")); text = text + effectColors["Drowsy"] + (Mathf.Round(Mathf.Abs(val6.statusPerSecond) * ((Affliction)val6).totalTime * 100f * 0.4f) / 0.4f).ToString("F1").Replace(".0", "") + " 困倦</color> 持续 " + ((Affliction)val6).totalTime.ToString("F1").Replace(".0", "") + "秒\n\n"; } else if ((int)affliction.GetAfflictionType() == 5) { Affliction_AdjustColdOverTime val7 = (Affliction_AdjustColdOverTime)affliction; text = ((!(val7.statusPerSecond > 0f)) ? (text + effectColors["ItemInfoDisplayPositive"] + "移除</color> ") : (text + effectColors["ItemInfoDisplayNegative"] + "获得</color> ")); text = text + effectColors["Cold"] + (Mathf.Abs(val7.statusPerSecond) * ((Affliction)val7).totalTime * 100f).ToString("F1").Replace(".0", "") + " 寒冷</color> 持续 " + ((Affliction)val7).totalTime.ToString("F1").Replace(".0", "") + "秒\n\n"; } else if ((int)affliction.GetAfflictionType() == 6) { text = text + effectColors["ItemInfoDisplayPositive"] + "清除所有状态</color>\n\n"; text = text + effectColors["ItemInfoDisplayNegative"] + "随机获得负面状态组合</color>\n\n"; text = text + effectColors["ItemInfoDisplayPositive"] + "随机获得额外耐力</color>\n\n"; text += "<#CCCCCC>效果完全随机</color>\n\n"; } else if ((int)affliction.GetAfflictionType() == 13) { Affliction_Sunscreen val8 = (Affliction_Sunscreen)affliction; text = text + "在 方山 的阳光下防止" + effectColors["Heat"] + "烧伤</color> " + ((Affliction)val8).totalTime.ToString("F1").Replace(".0", "") + "秒\n\n"; } else if ((int)affliction.GetAfflictionType() == 14) { Affliction_BingBongShield val9 = (Affliction_BingBongShield)affliction; text = text + effectColors["ItemInfoDisplayPositive"] + "获得</color> " + effectColors["Shield"] + "无敌</color>,持续 " + FormatSeconds(((Affliction)val9).totalTime) + "\n\n"; } else if ((int)affliction.GetAfflictionType() == 15) { Affliction