Decompiled source of Battle Alchemist Trainer v1.2.3
RebisDLL/Chryso.dll
Decompiled 3 weeks agousing System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using SideLoader; using SideLoader.Model; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace chryso; [BepInPlugin("NNNP.chryso", "Chryso", "1.0.0")] public class chryso : BaseUnityPlugin { public class ChrysoEff : Effect { public override void ActivateLocally(Character _affectedCharacter, object[] _infos) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)_affectedCharacter)) { SL_DropTable val = new SL_DropTable { GuaranteedDrops = new List<SL_ItemDrop> { new SL_ItemDrop { DroppedItemID = 6300030, MinQty = 1, MaxQty = 2 } }, UID = "SOMEUID" }; _affectedCharacter.Inventory.MakeLootable(false, false, true, false); val.AddAsDropableToGameObject(((Component)_affectedCharacter.Inventory.Pouch).gameObject, false, "GOLDGOLDGOL", 0f); val.GenerateDrops(((Component)_affectedCharacter.Inventory.Pouch).transform); ((ContentTemplate)val).ApplyTemplate(); } } } public const string GUID = "NNNP.chryso"; public const string NAME = "Chryso"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; public static ConfigEntry<bool> ExampleConfig; internal void Awake() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; Log.LogMessage((object)"Hello world from Chryso 1.0.0!"); ExampleConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("ExampleCategory", "ExampleSetting", false, "This is an example setting."); new Harmony("NNNP.chryso").PatchAll(); SL.OnPacksLoaded += OnPacksLoadedSetup; } private void OnPacksLoadedSetup() { Transform val = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55027)).transform.Find("ShrimpBlast").Find("ExtraEffects"); Transform val2 = ((Component)((Component)val).GetComponent<ShootBlast>().BaseBlast).transform.Find("Effects"); ((Component)val2).gameObject.AddComponent<LegacyTrigger>(); StatusEffect statusEffectPrefab = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Chryso"); ((Component)val2).gameObject.AddComponent<ChrysoEff>(); } } public class LegacyTrigger : Effect { public override void ActivateLocally(Character _affectedCharacter, object[] _infos) { int[] array = new int[13] { 2200001, 2020131, 2110041, 2130011, 2130131, 2010051, 2000061, 2120051, 2130041, 2130031, 2160021, 2100211, 2300200 }; if (Extensions.Contains(array, ((Item)_affectedCharacter.CurrentWeapon).LegacyItemID)) { Weapon currentWeapon = _affectedCharacter.CurrentWeapon; Item val = ItemManager.Instance.GenerateItemNetwork(((Item)currentWeapon).LegacyItemID); Transform transform = ((Component)_affectedCharacter.m_inventory.Pouch).gameObject.transform; val.ChangeParent(transform); val.ForceUpdateParentChange(); _affectedCharacter.Inventory.Equipment.ForceEquipItem((Equipment)(object)((val is Equipment) ? val : null)); ((Item)currentWeapon).RemoveQuantity(1); } } }
RebisDLL/PSCraft.dll
Decompiled 3 weeks agousing System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace PsCraft; [BepInPlugin("NNNP.AlchCraft", "PsCraft", "1.0.0")] public class Plugin : BaseUnityPlugin { [HarmonyPatch(typeof(CraftingMenu), "CraftingDone")] public class CraftingMenu_CraftingDone { private static void Prefix(CraftingMenu __instance) { int num = ((__instance.m_lastRecipeIndex != -1) ? __instance.m_complexeRecipes[__instance.m_lastRecipeIndex].Key : __instance.m_lastFreeRecipeIndex); if (num == -1) { return; } for (int i = 0; i < __instance.m_allRecipes[num].Results.Length; i++) { HashSet<int> hashSet = new HashSet<int> { -55014, -55009, -55022, -55010, -55023, -55011, -55024, -55012, -55026, -55013, -55025, 5020021, 4400100, 4400090, 4100590 }; ItemReferenceQuantity val = __instance.m_allRecipes[num].Results[i]; if (!((CharacterKnowledge)((UIElement)__instance).LocalCharacter.Inventory.SkillKnowledge).IsItemLearned(-55015) && hashSet.Contains(val.m_itemID)) { __instance.m_lastRecipeIndex = -1; __instance.m_lastFreeRecipeIndex = -1; } } } } public const string GUID = "NNNP.AlchCraft"; public const string NAME = "PsCraft"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; public static ConfigEntry<bool> ExampleConfig; internal void Awake() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; Log.LogMessage((object)"Hello world from PsCraft 1.0.0!"); ExampleConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("ExampleCategory", "ExampleSetting", false, "This is an example setting."); new Harmony("NNNP.AlchCraft").PatchAll(); } }
RebisDLL/PsItem.dll
Decompiled 3 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using SideLoader; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace psitems; [BepInPlugin("NNNP.PS", "PS&Items", "1.0.0")] public class Plugin : BaseUnityPlugin { [HarmonyPatch(typeof(Character), "Update", new Type[] { })] public class Character_Update { private static void Postfix(Character __instance) { bool flag = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Possessed"); bool flag2 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Possessed Amplified"); bool flag3 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Blessed"); bool flag4 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Bless Amplified"); bool flag5 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Mist"); bool flag6 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Mist Amplified"); bool flag7 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Warm"); bool flag8 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Warm Amplified"); bool flag9 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Cool"); bool flag10 = __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Cool Amplified"); if (__instance.m_statusEffectManager.Statuses.Count < 2) { return; } if ((Object)(object)__instance != (Object)null && (Object)(object)__instance.m_statusEffectManager != (Object)null && __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Possessed Alchemical")) { if (flag) { StatusEffect val = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Possessed")); __instance.m_statusEffectManager.CleanseStatusEffect(val); Log.LogMessage((object)$"Removed {val}"); } if (flag2) { StatusEffect val2 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Possessed Amplified")); __instance.m_statusEffectManager.CleanseStatusEffect(val2); Log.LogMessage((object)$"Removed {val2}"); } } if ((Object)(object)__instance != (Object)null && (Object)(object)__instance.m_statusEffectManager != (Object)null && __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Bless Alchemical")) { if (flag3) { StatusEffect val3 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Blessed")); __instance.m_statusEffectManager.CleanseStatusEffect(val3); Log.LogMessage((object)$"Removed {val3}"); } if (flag4) { StatusEffect val4 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Bless Amplified")); __instance.m_statusEffectManager.CleanseStatusEffect(val4); Log.LogMessage((object)$"Removed {val4}"); } } if ((Object)(object)__instance != (Object)null && (Object)(object)__instance.m_statusEffectManager != (Object)null && __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Mist Alchemical")) { if (flag5) { StatusEffect val5 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Mist")); __instance.m_statusEffectManager.CleanseStatusEffect(val5); Log.LogMessage((object)$"Removed {val5}"); } if (flag6) { StatusEffect val6 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Mist Amplified")); __instance.m_statusEffectManager.CleanseStatusEffect(val6); Log.LogMessage((object)$"Removed {val6}"); } } if ((Object)(object)__instance != (Object)null && (Object)(object)__instance.m_statusEffectManager != (Object)null && __instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Warm Alchemical")) { if (flag7) { StatusEffect val7 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Warm")); __instance.m_statusEffectManager.CleanseStatusEffect(val7); Log.LogMessage((object)$"Removed {val7}"); } if (flag8) { StatusEffect val8 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Warm Amplified")); __instance.m_statusEffectManager.CleanseStatusEffect(val8); Log.LogMessage((object)$"Removed {val8}"); } } if (!((Object)(object)__instance != (Object)null) || !((Object)(object)__instance.m_statusEffectManager != (Object)null) || !__instance.m_statusEffectManager.Statuses.Any((StatusEffect s) => s.StatusName == "Cool Alchemical")) { return; } if (flag9) { StatusEffect val9 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Cool")); __instance.m_statusEffectManager.CleanseStatusEffect(val9); Log.LogMessage((object)$"Removed {val9}"); } if (flag10) { StatusEffect val10 = ((IEnumerable<StatusEffect>)__instance.m_statusEffectManager.Statuses).FirstOrDefault((Func<StatusEffect, bool>)((StatusEffect s) => s.StatusName == "Cool Amplified")); __instance.m_statusEffectManager.CleanseStatusEffect(val10); Log.LogMessage((object)$"Removed {val10}"); } } } [HarmonyPatch(typeof(PhysicProjectile), "Collision")] public class PhysicProjectile_Explode { private static void Postfix(PhysicProjectile __instance, Collision _collision) { Character characterOwner = UnityEngineExtensions.GetCharacterOwner(_collision.m_Collider); Log.LogError((object)$"char for bombs {characterOwner}"); if ((Object)(object)characterOwner != (Object)null && ((CharacterKnowledge)((EffectSynchronizer)__instance).OwnerCharacter.Inventory.SkillKnowledge).IsItemLearned(-55017)) { Log.LogError((object)"worked?"); ((Projectile)__instance).Explode(_collision); } else { Log.LogError((object)"chartar o skill NULL"); } } } [HarmonyPatch(typeof(Character), "ReceiveHit", new Type[] { typeof(Object), typeof(DamageList), typeof(Vector3), typeof(Vector3), typeof(float), typeof(float), typeof(Character), typeof(float), typeof(bool) })] public class Character_ReceiveHit { private static void Prefix(Character __instance, Object _damageSource, DamageList _damage, Vector3 _hitDir, Vector3 _hitPoint, float _angle, float _angleDir, Character _dealerChar, float _knockBack, ref bool __state, bool _hitInventory = true) { //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) Log.LogMessage((object)"PSitem called for psdurab in harmony alka??"); if (((CharacterKnowledge)_dealerChar.Inventory.SkillKnowledge).IsItemLearned(-55019) && _dealerChar.m_inventory.OwnsItem(-55014) && _damage != null) { if (!_damageSource.name.Contains("Grenade")) { ProjectileWeapon val = (ProjectileWeapon)(object)((_damageSource is ProjectileWeapon) ? _damageSource : null); if (val == null) { goto IL_0085; } } __state = _damage.IgnoreHalfResistances; _damage.IgnoreHalfResistances = true; PSDurab(_dealerChar, 0.75f); } goto IL_0085; IL_0085: if (((CharacterKnowledge)_dealerChar.Inventory.SkillKnowledge).IsItemLearned(-55019) && _dealerChar.m_inventory.OwnsItem(-55014) && _damage != null) { MeleeWeapon val2 = (MeleeWeapon)(object)((_damageSource is MeleeWeapon) ? _damageSource : null); if ((val2 != null && ((Weapon)val2).Imbued) || _damageSource.name.Contains("Flamethrower")) { __state = _damage.IgnoreHalfResistances; _damage.IgnoreHalfResistances = true; PSDurab(_dealerChar, 0.3f); } } if (__instance.StatusEffectMngr.HasStatusEffect("ShatterIce")) { DamageList val3 = new DamageList((Types)4, _knockBack + 100f); _dealerChar.Stats.GetAmplifiedDamage((IList<Tag>)Array.Empty<Tag>(), ref val3); __instance.Stats.GetMitigatedDamage(Array.Empty<Tag>(), ref val3, false); __instance.ReceiveDamage(val3.TotalDamage, __instance.CenterPosition, true); Log.LogMessage((object)$"Shatter called Instance: {__instance} DealerChar: {_dealerChar} DamageList: {val3} KnockBack: {_knockBack}"); } } private static void Postfix(Character __instance, Object _damageSource, DamageList _damage, Vector3 _hitDir, Vector3 _hitPoint, float _angle, float _angleDir, Character _dealerChar, float _knockBack, ref bool __state, bool _hitInventory = true) { if (_damage != null) { _damage.IgnoreHalfResistances = __state; } } } [HarmonyPatch(typeof(Dropable), "GenerateContents", new Type[] { typeof(ItemContainer) })] public class Dropable_GenerateContents { [HarmonyPrefix] public static void Prefix(Dropable __instance, ItemContainer _container) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance.ResponsibleCharacter == (Object)null || ((Item)_container).m_name == "tree" || ((Item)_container).m_name == "Firefly Eater") { return; } List<DropTable> mainDropTables = __instance.m_mainDropTables; if (((CharacterKnowledge)__instance.ResponsibleCharacter.Inventory.SkillKnowledge).IsItemLearned(-55018)) { ItemDropChance val = mainDropTables[0].m_itemDrops[0]; IList<Tag> tags = ((TagListSelectorComponent)((Component)((BasicItemDrop)val).ItemRef).gameObject.GetComponent<TagSource>()).Tags; foreach (Tag item in tags) { if (item.TagName == "Ingredient Alch") { ((BasicItemDrop)val).MinDropCount = ((BasicItemDrop)val).MinDropCount + 1; ((BasicItemDrop)val).MaxDropCount = ((BasicItemDrop)val).MaxDropCount + 1; } } if (__instance.ResponsibleCharacter.m_inventory.OwnsItem(-55014)) { PSDurab(__instance.ResponsibleCharacter, 0.15f); { foreach (DropTable item2 in mainDropTables) { foreach (ItemDropChance itemDrop in item2.m_itemDrops) { TagSource component = ((Component)((BasicItemDrop)itemDrop).ItemRef).gameObject.GetComponent<TagSource>(); foreach (Tag tag in ((TagListSelectorComponent)component).Tags) { if (tag.TagName == "Ingredient Alch" && Random.value < 0.68f) { ((Component)__instance.ResponsibleCharacter).GetComponent<CharacterInventory>().GenerateItem(((BasicItemDrop)itemDrop).ItemRef, 1, false); ((Component)__instance.ResponsibleCharacter).GetComponent<CharacterInventory>().NotifyItemTake(((BasicItemDrop)itemDrop).ItemRef, 1); } } } } return; } } Log.LogWarning((object)"mult no PS"); } else { Log.LogWarning((object)"mult no Skill"); } } } [HarmonyPatch(typeof(Item), "ReduceDurability", new Type[] { typeof(float) })] public class item_Reduce { [HarmonyPrefix] public static void Prefix(Item __instance, ref float _durabilityLost) { if ((!((Object)(object)__instance.m_ownerCharacter != (Object)null) || !__instance.m_ownerCharacter.StatusEffectMngr.HasStatusEffect("Palingenesis")) && (Object)(object)((Component)__instance).GetComponent<Equipment>() != (Object)null) { Log.LogWarning((object)$"ITEM: {__instance.m_name} durability loss: {_durabilityLost}"); } } } public const string GUID = "NNNP.PS"; public const string NAME = "PS&Items"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; public static ConfigEntry<bool> ExampleConfig; internal void Awake() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; Log.LogMessage((object)"Hello world from PS&Items 1.0.0!"); ExampleConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("ExampleCategory", "ExampleSetting", false, "This is an example setting."); new Harmony("NNNP.PS").PatchAll(); SL.OnPacksLoaded += OnPacksLoadedSetup; } internal void Update() { } private void OnPacksLoadedSetup() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) Item itemPrefab = ResourcesPrefabManager.Instance.GetItemPrefab(-55014); Object.Destroy((Object)(object)((Component)itemPrefab).GetComponent<MultipleUsage>()); Item component = ((Component)itemPrefab).GetComponent<Item>(); component.BehaviorOnNoDurability = (BehaviorOnNoDurabilityType)2; ItemStats component2 = ((Component)itemPrefab).GetComponent<ItemStats>(); component2.m_baseMaxDurability = 500; component.GroupItemInDisplay = true; component.LegacyItemID = -1; component.m_stackable = null; component.SellWarning = "Are you sure you want to sell these stones?"; StatusEffect statusEffectPrefab = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Congelation"); StatusEffect statusEffectPrefab2 = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Digestion"); if ((Object)(object)statusEffectPrefab != (Object)null) { TemperatureSource val = ((Component)statusEffectPrefab).gameObject.AddComponent<TemperatureSource>(); val.DistanceRanges = new List<Vector2> { new Vector2(0f, 1f) }; val.TemperaturePerIncrement = new List<int> { -3 }; } if ((Object)(object)statusEffectPrefab2 != (Object)null) { TemperatureSource val2 = ((Component)statusEffectPrefab2).gameObject.AddComponent<TemperatureSource>(); val2.DistanceRanges = new List<Vector2> { new Vector2(0f, 1f) }; val2.TemperaturePerIncrement = new List<int> { 4 }; } Item itemPrefab2 = ResourcesPrefabManager.Instance.GetItemPrefab(-55016); Item itemPrefab3 = ResourcesPrefabManager.Instance.GetItemPrefab(-55027); Item itemPrefab4 = ResourcesPrefabManager.Instance.GetItemPrefab(-55020); if ((Object)(object)itemPrefab2 != (Object)null) { PSDurability pSDurability = ((Component)((Component)itemPrefab2).transform.Find("Effects")).gameObject.AddComponent<PSDurability>(); pSDurability.Durability = 7.9f; } else { Log.LogMessage((object)"kin null"); } if ((Object)(object)itemPrefab4 != (Object)null) { Transform val3 = ((Component)itemPrefab4).transform.Find("Effects"); if ((Object)(object)val3 != (Object)null) { PSDurability pSDurability2 = ((Component)((Component)val3).transform).gameObject.AddComponent<PSDurability>(); pSDurability2.Durability = 2f; } } else { Log.LogMessage((object)"azoth null"); } if ((Object)(object)itemPrefab3 != (Object)null) { PSDurability pSDurability3 = ((Component)((Component)((Component)itemPrefab3).transform.Find("Effects")).transform).gameObject.AddComponent<PSDurability>(); pSDurability3.Durability = 7.9f; } else { Log.LogMessage((object)"chryso null"); } } public static void PSDurab(Character _affectedCharacter, float _amount) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown if ((Object)(object)_affectedCharacter == (Object)null) { return; } if (((CharacterKnowledge)_affectedCharacter.Inventory.SkillKnowledge).IsItemLearned(-55015)) { Transform transform = ((Component)_affectedCharacter.Inventory.Pouch).gameObject.transform; Transform val = (((Object)(object)_affectedCharacter.Inventory.EquippedBag != (Object)null) ? ((Component)((Component)_affectedCharacter.Inventory.EquippedBag).transform.Find("Content")).transform : null); foreach (Transform item in transform) { Transform val2 = item; Item component = ((Component)val2).GetComponent<Item>(); if ((Object)(object)component != (Object)null && component.ItemID == -55014) { component.ReduceDurability(_amount); return; } } if (!((Object)(object)val != (Object)null)) { return; } { foreach (Transform item2 in val) { Transform val3 = item2; Item component2 = ((Component)val3).GetComponent<Item>(); if ((Object)(object)component2 != (Object)null && component2.ItemID == -55014) { component2.ReduceDurability(_amount); break; } } return; } } Log.LogMessage((object)"No magnum opus"); } } public class PSDurability : Effect { public float Durability = 20f; public override void ActivateLocally(Character _affectedCharacter, object[] _infos) { Plugin.PSDurab(_affectedCharacter, Durability); } }
RebisDLL/RebisMoverRW.dll
Decompiled 3 weeks agousing System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Photon; using SideLoader; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace RebisMoverRW; [BepInPlugin("NNNP.RebisMoverRW", "RebisMoverRW", "1.0.0")] public class Plugin : BaseUnityPlugin { public class Sagani : Effect { public GameObject sagani; public override void ActivateLocally(Character _affectedCharacter, object[] _infos) { if (((CharacterKnowledge)_affectedCharacter.Inventory.SkillKnowledge).IsItemLearned(-55015)) { Character component = sagani.GetComponent<Character>(); Character currentSummon = _affectedCharacter.CurrentSummon; if ((Object)(object)currentSummon != (Object)null && (Object)(object)currentSummon != (Object)(object)component) { ((Component)currentSummon).gameObject.GetComponent<CharacterStats>().CurrentHealth = 0f; } Ress(sagani); ConjureElemental(sagani); InstData(sagani, _affectedCharacter); Summon(sagani, _affectedCharacter); Teleport(sagani, _affectedCharacter); IconManager(sagani); sagani.SetActive(true); _affectedCharacter.SetCurrentSummon(sagani.GetComponent<Character>()); } } } public class Recall : Effect { public override void ActivateLocally(Character _affectedCharacter, object[] _infos) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_affectedCharacter.CurrentSummon != (Object)null)) { return; } Summon(((Component)_affectedCharacter.CurrentSummon).gameObject, _affectedCharacter); if (!(Vector3.Distance(((Component)_affectedCharacter).transform.position, ((Component)_affectedCharacter.CurrentSummon).gameObject.transform.position) > 8f)) { return; } ((Component)_affectedCharacter.CurrentSummon).gameObject.SetActive(false); Teleport(((Component)_affectedCharacter.CurrentSummon).gameObject, _affectedCharacter); ((Component)_affectedCharacter.CurrentSummon).gameObject.SetActive(true); Transform val = ((Component)base.m_parentItem).gameObject.transform.Find("ShrimpBlast"); if (!((Object)(object)val != (Object)null)) { return; } ShootBlast component = ((Component)val.Find("ExtraEffects")).GetComponent<ShootBlast>(); if (!((Object)(object)component != (Object)null)) { return; } ShootBlast component2 = ((Component)((Component)component.BaseBlast).transform.Find("Effects")).GetComponent<ShootBlast>(); if ((Object)(object)component2 != (Object)null) { Blast baseBlast = component2.BaseBlast; if ((Object)(object)baseBlast != (Object)null) { baseBlast.Shoot(((Component)_affectedCharacter.m_currentSummon).transform.localPosition, ((Component)_affectedCharacter.m_currentSummon).transform.forward, -1f); } } } } [HarmonyPatch(typeof(StartingEquipment))] [HarmonyPatch("InitSkills")] public class StartingEquipmentPatch { public static bool Prefix(StartingEquipment __instance, Transform _skillHolder) { if (((Object)((Component)__instance.m_character).gameObject).name.Contains("NNNP") && ((Component)__instance.m_character).transform.Find("Skills").childCount == 3) { Log.LogWarning((object)"SkillsLock"); return false; } return true; } } [HarmonyPatch(typeof(EnvironmentConditions))] [HarmonyPatch("GoBackToMainMenu")] public class EnvironmentConditionsPatch { public static void Prefix(EnvironmentConditions __instance) { CharacterManager.Instance.m_characters.Remove("NNNPu0tyl14LQkuv9WYDAbKe6g"); CharacterManager.Instance.m_characters.Remove("NNNP3Blscwa0vUqK8OeyRv-rXw"); CharacterManager.Instance.m_characters.Remove("NNNPCXs-jxFWT0SgU4-DoRKctQ"); CharacterManager.Instance.m_characters.Remove("NNNPfex2_93uBEOhQ5m7IEzCkA"); CharacterManager.Instance.m_characters.Remove("NNNPZ9GQjVLC0EOJL0UBL_GZ_A"); } } [HarmonyPatch(typeof(Global))] [HarmonyPatch("OnApplicationQuit")] public class OnApplicationQuitPatch { public static void Prefix(Global __instance) { CharacterManager.Instance.m_characters.Remove("NNNPu0tyl14LQkuv9WYDAbKe6g"); CharacterManager.Instance.m_characters.Remove("NNNP3Blscwa0vUqK8OeyRv-rXw"); CharacterManager.Instance.m_characters.Remove("NNNPCXs-jxFWT0SgU4-DoRKctQ"); CharacterManager.Instance.m_characters.Remove("NNNPfex2_93uBEOhQ5m7IEzCkA"); CharacterManager.Instance.m_characters.Remove("NNNPZ9GQjVLC0EOJL0UBL_GZ_A"); } } [HarmonyPatch(typeof(SummonAI))] [HarmonyPatch("InitAI")] public class InitAIPatch { public static void Prefix(SummonAI __instance, Character _affectedCharacter) { if ((Object)(object)_affectedCharacter.CurrentSummon != (Object)null && ((Object)_affectedCharacter.CurrentSummon).name.Contains("NNNP")) { ((Component)_affectedCharacter.CurrentSummon).gameObject.GetComponent<CharacterStats>().CurrentHealth = 0f; ((Component)_affectedCharacter.CurrentSummon).gameObject.SetActive(false); } } } public const string GUID = "NNNP.RebisMoverRW"; public const string NAME = "RebisMoverRW"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; public static ConfigEntry<bool> ExampleConfig; public static GameObject eledec; public static GameObject eledecfx; public static GameObject elefir; public static GameObject elefirfx; public static GameObject eleeth; public static GameObject eleethfx; public static GameObject elefro; public static GameObject elefrofx; public static GameObject elelig; public static GameObject eleligfx; public static GameObject eleNPC; public static GameObject elesquad; public static List<GameObject> elementals = new List<GameObject>(); internal void Awake() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; Log.LogMessage((object)"Hello world from RebisMoverRW 1.0.0!"); ExampleConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("ExampleCategory", "ExampleSetting", false, "This is an example setting."); SL.OnPacksLoaded += OnPacksLoadedSetup; Harmony val = new Harmony("com.NNNP.rebismover"); val.PatchAll(); ((MonoBehaviour)this).StartCoroutine(RebMover()); } private void OnPacksLoadedSetup() { //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) Log.LogWarning((object)"PotMaker CALLED"); Transform transform = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55013)).transform; if ((Object)(object)transform != (Object)null) { Sagani sagani = ((Component)((Component)transform.Find("Effects")).transform).gameObject.AddComponent<Sagani>(); sagani.sagani = eledec; } Transform transform2 = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55012)).transform; if ((Object)(object)transform2 != (Object)null) { Sagani sagani2 = ((Component)((Component)transform2.Find("Effects")).transform).gameObject.AddComponent<Sagani>(); sagani2.sagani = elelig; } Transform transform3 = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55010)).transform; if ((Object)(object)transform3 != (Object)null) { Sagani sagani3 = ((Component)((Component)transform3.Find("Effects")).transform).gameObject.AddComponent<Sagani>(); sagani3.sagani = elefro; } Transform transform4 = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55009)).transform; if ((Object)(object)transform4 != (Object)null) { Sagani sagani4 = ((Component)((Component)transform4.Find("Effects")).transform).gameObject.AddComponent<Sagani>(); sagani4.sagani = elefir; } Transform transform5 = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55011)).transform; if ((Object)(object)transform != (Object)null) { Sagani sagani5 = ((Component)((Component)transform5.Find("Effects")).transform).gameObject.AddComponent<Sagani>(); sagani5.sagani = eleeth; } Transform transform6 = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55020)).transform; EmissionModule emission; MinMaxCurve rateOverTime; if ((Object)(object)transform6 != (Object)null) { Transform val = ((Component)((Component)((Component)((Component)((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55020)).transform.Find("ShrimpBlast").Find("ExtraEffects")).GetComponent<ShootBlast>().BaseBlast).transform.Find("Effects")).GetComponent<ShootBlast>().BaseBlast).transform.Find("ExplosionFX"); Transform val2 = ((Component)((Component)((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55020)).transform.Find("ShrimpBlast").Find("ExtraEffects")).GetComponent<ShootBlast>().BaseBlast).transform.Find("Effects"); if ((Object)(object)val != (Object)null) { Transform val3 = val.Find("BoltParticlesLargeSharp (3)"); Transform val4 = val.Find("smoke"); Transform val5 = val.Find("DiskPlanar"); Transform val6 = val.Find("DiskPlanarDisto"); Transform val7 = val.Find("boltCracklingFX (2)"); Object.Destroy((Object)(object)((Component)val5).gameObject); Object.Destroy((Object)(object)((Component)val6).gameObject); Object.Destroy((Object)(object)((Component)val7).gameObject); MainModule main = ((Component)val3).GetComponent<ParticleSystem>().main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(new Color(1f, 0f, 0f, 0.2f)); val.localScale = new Vector3(0.1f, 0.1f, 0.1f); emission = ((Component)val3).GetComponent<ParticleSystem>().emission; rateOverTime = ((EmissionModule)(ref emission)).rateOverTime; float constant = ((MinMaxCurve)(ref rateOverTime)).constant; constant = 0.01f; } Recall recall = ((Component)((Component)transform6.Find("Effects")).transform).gameObject.AddComponent<Recall>(); } else { Log.LogWarning((object)"rc NULL"); } Transform transform7 = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55027)).transform; if ((Object)(object)transform7 != (Object)null) { Transform val8 = ((Component)((Component)((Component)transform7).transform.Find("ShrimpBlast").Find("ExtraEffects")).GetComponent<ShootBlast>().BaseBlast).transform.Find("ExplosionFX"); if ((Object)(object)val8 != (Object)null) { Transform val9 = val8.Find("BoltParticlesLargeSharp (3)"); Transform val10 = val8.Find("smoke"); Transform val11 = val8.Find("DiskPlanar"); Transform val12 = val8.Find("DiskPlanarDisto"); Transform val13 = val8.Find("boltCracklingFX (2)"); Object.Destroy((Object)(object)((Component)val11).gameObject); Object.Destroy((Object)(object)((Component)val12).gameObject); Object.Destroy((Object)(object)((Component)val13).gameObject); MainModule main2 = ((Component)val9).GetComponent<ParticleSystem>().main; ((MainModule)(ref main2)).startColor = MinMaxGradient.op_Implicit(new Color(1f, 0f, 0f, 0.2f)); val8.localScale = new Vector3(0.1f, 0.1f, 0.1f); emission = ((Component)val9).GetComponent<ParticleSystem>().emission; rateOverTime = ((EmissionModule)(ref emission)).rateOverTime; float constant2 = ((MinMaxCurve)(ref rateOverTime)).constant; constant2 = 0.01f; } else { Log.LogWarning((object)"vfxchryso NULL"); } } else { Log.LogWarning((object)"chryso NULL"); } } private void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) if (((Scene)(ref scene)).name == "Harmattan") { if ((Object)(object)eledec != (Object)null) { if ((Object)(object)eleNPC == (Object)null) { Transform val = eledec.transform.Find("ElementalDecay_v"); eleNPC = Object.Instantiate<GameObject>(((Component)val).gameObject); } Object.DontDestroyOnLoad((Object)(object)eleNPC); eleNPC.transform.SetPositionAndRotation(new Vector3(93.5875f, 65.9225f, 829.8226f), Quaternion.Euler(0f, 168.4266f, 0f)); eleNPC.SetActive(true); } } else if ((Object)(object)eleNPC != (Object)null) { eleNPC.SetActive(false); } if (((Scene)(ref scene)).name == "MainMenu_Empty") { foreach (GameObject elemental in elementals) { UIDManager(elemental); } } if (!(((Scene)(ref scene)).name != "MainMenu_Empty") || !((Object)(object)CharacterManager.Instance.GetWorldHostCharacter() != (Object)null)) { return; } foreach (GameObject elemental2 in elementals) { PhotonManager(elemental2); ConjureElemental(elemental2); Teleport(elemental2, CharacterManager.Instance.GetWorldHostCharacter()); } if ((Object)(object)CharacterManager.Instance.GetWorldHostCharacter().CurrentSummon != (Object)null) { ((Component)CharacterManager.Instance.GetWorldHostCharacter().CurrentSummon).gameObject.SetActive(true); } } private void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; } public static IEnumerator RebMover() { AsyncOperation asyncLoad = SceneManager.LoadSceneAsync("AntiqueField", (LoadSceneMode)0); while (!asyncLoad.isDone) { yield return null; } Mover(); SceneManager.LoadSceneAsync("MainMenu_Empty", (LoadSceneMode)0); } private void UIDManager(GameObject enemies) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) string text = UID.op_Implicit(enemies.GetComponent<Character>().m_uid); if (!text.Contains("NNNP")) { enemies.GetComponent<Character>().SetUID(UID.op_Implicit("NNNP" + UID.op_Implicit(enemies.GetComponent<Character>().m_uid))); ((Object)enemies).name = "NNNP" + ((Object)enemies).name; } string text2 = UID.op_Implicit(elesquad.GetComponent<AISquad>().m_uid); if (!text2.Contains("NNNP")) { text2 = "NNNP" + text2; foreach (Transform item in elesquad.transform) { Transform val = item; if (((Object)val).name.Contains("Elemental") && !((Object)val).name.Contains("NNNP")) { ((Object)val).name = "NNNP" + ((Object)val).name; } } } StartingEquipment startingEquipment = enemies.GetComponent<Character>().m_startingEquipment; if ((Object)(object)startingEquipment != (Object)null) { startingEquipment.OverrideStartingEquipments[5] = null; startingEquipment.m_startingEquipment[5] = null; } enemies.GetComponent<Character>().m_startingEquipment = null; foreach (Transform item2 in enemies.transform) { Transform val2 = item2; if (((Object)val2).name.Contains("Pouch")) { Object.Destroy((Object)(object)((Component)val2).GetComponent<ItemContainer>()); ItemContainer val3 = ((Component)val2).gameObject.AddComponent<ItemContainer>(); ((Item)val3).m_UID = UID.op_Implicit(UID.Generate()); enemies.GetComponent<CharacterInventory>().m_inventoryPouch = val3; } } MeleeWeapon componentInChildren = enemies.GetComponentInChildren<MeleeWeapon>(); if ((Object)(object)componentInChildren != (Object)null) { Object.Destroy((Object)(object)((Component)componentInChildren).gameObject); } } private static void AIManager(GameObject enemies, Character conjurer) { //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Expected O, but got Unknown CharacterAI component = enemies.GetComponent<CharacterAI>(); GameObject gameObject = ((Component)component.AIStatesRoot).gameObject; if (((Behaviour)enemies.GetComponent<LootableOnDeath>()).enabled) { ((Behaviour)enemies.GetComponent<LootableOnDeath>()).enabled = false; } AISWander component2 = ((Component)gameObject.transform.Find("1_Wander")).gameObject.GetComponent<AISWander>(); component.AISquad = null; if ((Object)(object)gameObject != (Object)null) { AIESwitchState component3 = ((Component)gameObject.transform.Find("4_CombatRanged").Find("EndCombatEffects")).gameObject.GetComponent<AIESwitchState>(); AIESwitchState component4 = ((Component)gameObject.transform.Find("2_Suspicious").Find("Detection").Find("SuspiciousEffects")).gameObject.GetComponent<AIESwitchState>(); if ((Object)(object)component2 != (Object)null && (Object)(object)component3 != (Object)null && (Object)(object)component4 != (Object)null) { Log.LogWarning((object)"switched?"); component3.ToState = (AIState)(object)component2; component4.ToState = (AIState)(object)component2; } if ((Object)(object)((Component)gameObject.transform.Find("4_CombatRanged").Find("RangeBuff")).gameObject.GetComponent<AICOrder>() == (Object)null) { AICOrder val = ((Component)gameObject.transform.Find("4_CombatRanged").Find("RangeBuff")).gameObject.AddComponent<AICOrder>(); val.Order = 0; ((AICondition)val).GroupValidEffectTrans = ((Component)((Component)val).transform.GetChild(0)).transform; ((AICondition)val).m_characterAI = enemies.GetComponent<CharacterAI>(); FieldInfo field = typeof(AICondition).GetField("m_conditions", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(val, new AICondition[1] { (AICondition)val }); } ((AICondition)val).m_initialized = true; ((AICondition)val).ParentState = (AIState)(object)((Component)gameObject.transform.Find("4_CombatRanged")).GetComponent<AISCombatRanged>(); FieldInfo field2 = typeof(AICondition).GetField("m_validEffects", BindingFlags.Instance | BindingFlags.NonPublic); if (field2 != null) { field2.SetValue(val, new AIEffect[1] { (AIEffect)((Component)((Component)val).transform).GetComponentInChildren<AIEUseSkill>() }); } if ((Object)(object)gameObject.transform.Find("1_Wander").Find("RangeBuff") == (Object)null) { Transform val2 = Object.Instantiate<Transform>(gameObject.transform.Find("4_CombatRanged").Find("RangeBuff")); ((Component)val2).transform.parent = gameObject.transform.Find("1_Wander"); Object.Destroy((Object)(object)((Component)val2).GetComponent<AICRandomRoll>()); Object.Destroy((Object)(object)((Component)val2).GetComponent<AICAlliesHealthRatio>()); AICOrder component5 = ((Component)val2).GetComponent<AICOrder>(); if ((Object)(object)component5 != (Object)null) { ((AICondition)component5).ParentState = (AIState)(object)((Component)gameObject.transform.Find("1_Wander")).GetComponent<AISWander>(); ((AICondition)component5).m_characterAI = enemies.GetComponent<CharacterAI>(); ((AICondition)component5).m_initialized = true; FieldInfo field3 = typeof(AICondition).GetField("m_conditions", BindingFlags.Instance | BindingFlags.NonPublic); if (field3 != null) { field3.SetValue(component5, new AICondition[1] { (AICondition)component5 }); } FieldInfo field4 = typeof(AICondition).GetField("m_validEffects", BindingFlags.Instance | BindingFlags.NonPublic); if (field4 != null) { field4.SetValue(component5, new AIEffect[1] { (AIEffect)((Component)((Component)component5).transform).GetComponentInChildren<AIEUseSkill>() }); } } } } } if (Object.op_Implicit((Object)(object)component)) { ((AISWander)component.CurrentAiState).FollowTransform = ((Component)conjurer).transform; } if (!((Object)(object)enemies.transform.Find("Skills") != (Object)null)) { return; } foreach (Transform item in enemies.transform.Find("Skills")) { Transform val3 = item; if (((Object)val3).name.Contains("Buff") && !((Object)((Component)((Component)((Component)val3).GetComponentInChildren<ShootProjectile>().BaseProjectile).gameObject.transform).GetComponentInChildren<AddStatusEffect>().Status).name.Contains("Alchemical")) { if (((Object)val3).name.Contains("BuffDecay")) { StatusEffect statusEffectPrefab = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("PossessedBoon Alchemical"); ((Component)((Component)((Component)val3).GetComponentInChildren<ShootProjectile>().BaseProjectile).gameObject.transform).GetComponentInChildren<AddStatusEffect>().Status = statusEffectPrefab; } if (((Object)val3).name.Contains("BuffFrost")) { StatusEffect statusEffectPrefab2 = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("CoolBoon Alchemical"); ((Component)((Component)((Component)val3).GetComponentInChildren<ShootProjectile>().BaseProjectile).gameObject.transform).GetComponentInChildren<AddStatusEffect>().Status = statusEffectPrefab2; } if (((Object)val3).name.Contains("BuffFire")) { StatusEffect statusEffectPrefab3 = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("WarmBoon Alchemical"); ((Component)((Component)((Component)val3).GetComponentInChildren<ShootProjectile>().BaseProjectile).gameObject.transform).GetComponentInChildren<AddStatusEffect>().Status = statusEffectPrefab3; } if (((Object)val3).name.Contains("BuffLight")) { StatusEffect statusEffectPrefab4 = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("BlessBoon Alchemical"); ((Component)((Component)((Component)val3).GetComponentInChildren<ShootProjectile>().BaseProjectile).gameObject.transform).GetComponentInChildren<AddStatusEffect>().Status = statusEffectPrefab4; } if (((Object)val3).name.Contains("BuffEthereal")) { StatusEffect statusEffectPrefab5 = ResourcesPrefabManager.Instance.GetStatusEffectPrefab("MistBoon Alchemical"); ((Component)((Component)((Component)val3).GetComponentInChildren<ShootProjectile>().BaseProjectile).gameObject.transform).GetComponentInChildren<AddStatusEffect>().Status = statusEffectPrefab5; } } } } private static void Teleport(GameObject enemies, Character conjurer) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)conjurer != (Object)null) { Vector3 position = conjurer.m_transform.position; Vector3 val = conjurer.m_transform.right * 2f; enemies.transform.position = position + val; } else { Log.LogMessage((object)"Conjurer NULL"); } } private static void PhotonManager(GameObject enemies) { PhotonView component = enemies.GetComponent<PhotonView>(); if ((Object)(object)component == (Object)null) { enemies.AddComponent<PhotonView>(); } if ((Object)(object)component != (Object)null) { if (component.viewID == 0) { component.viewID = PhotonNetwork.AllocateViewID(); } if ((Object)(object)((MonoBehaviour)((MonoBehaviour)enemies.GetComponent<CharacterAI>()).photonView).pvCache == (Object)null) { ((MonoBehaviour)((MonoBehaviour)enemies.GetComponent<CharacterAI>()).photonView).pvCache = component; } } } private static void CharMangAdder(GameObject enemies) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (!CharacterManager.Instance.m_characters.ContainsKey(UID.op_Implicit(enemies.GetComponent<Character>().UID)) && !CharacterManager.Instance.m_characters.ContainsValue(enemies.GetComponent<Character>())) { CharacterManager.Instance.m_characters.Add(UID.op_Implicit(enemies.GetComponent<Character>().UID), enemies.GetComponent<Character>()); Log.LogMessage((object)"added to charManager?"); } } private static void InstData(GameObject enemies, Character conjurer) { PhotonView component = enemies.GetComponent<PhotonView>(); if ((Object)(object)component != (Object)null) { component.instantiationData = new object[4]; } if (component.instantiationData[3] == null) { component.instantiationData[0] = 3; component.instantiationData[1] = enemies.GetComponent<Character>().m_name; component.instantiationData[2] = ((object)(UID)(ref enemies.GetComponent<Character>().m_uid)).ToString(); component.instantiationData[3] = ((object)(UID)(ref ((Component)conjurer).GetComponent<Character>().m_uid)).ToString(); } } private static void Ress(GameObject enemies) { if (enemies.GetComponent<Character>().m_wasDead) { enemies.GetComponent<Character>().Resurrect(); } } private static void Summon(GameObject enemies, Character conjurer) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) if ((int)enemies.GetComponent<Character>().Faction == 1) { Log.LogMessage((object)$"{enemies} Player faction TRUE"); } else { enemies.GetComponent<Character>().ChangeFaction((Factions)1, true); Log.LogMessage((object)$"{enemies} SET Player faction"); } enemies.GetComponent<Character>().SummonType = (SummonTypes)1; enemies.GetComponent<Character>().m_summonerUID = UID.op_Implicit(((Component)conjurer).GetComponent<Character>().UID); enemies.GetComponent<Character>().m_summonLateInitRequired = true; enemies.GetComponent<Character>().m_instantiationType = (CharacterInstantiationTypes)3; } private static void StatusClean(GameObject enemies) { foreach (StatusEffect status in enemies.GetComponentInChildren<StatusEffectManager>().Statuses) { enemies.GetComponentInChildren<StatusEffectManager>().CleanseStatusEffect(status); } } public static void ConjureElemental(GameObject enemies) { Character worldHostCharacter = CharacterManager.Instance.GetWorldHostCharacter(); if ((Object)(object)worldHostCharacter != (Object)null && (Object)(object)enemies != (Object)null) { enemies.SetActive(true); AIManager(enemies, ((Component)worldHostCharacter).GetComponent<Character>()); CharMangAdder(enemies); enemies.SetActive(false); } } public static void IconManager(GameObject enemies) { if ((Object)(object)enemies.GetComponent<Character>().SummonIcon != (Object)null) { return; } string pluginPath = Paths.PluginPath; Log.LogWarning((object)("Percorso BepInex " + pluginPath)); Item itemPrefab = ResourcesPrefabManager.Instance.GetItemPrefab(8100150); if ((Object)(object)itemPrefab != (Object)null) { Sprite summonIcon = ((Component)((Summon)((Component)((Component)itemPrefab).transform.Find("SummonSoul").Find("ExtraEffects")).GetComponent<SummonAI>()).SummonedPrefab).gameObject.GetComponent<Character>().SummonIcon; if ((Object)(object)summonIcon != (Object)null) { enemies.GetComponent<Character>().SummonIcon = summonIcon; } else { Log.LogWarning((object)"icon2 null"); } } else { Log.LogWarning((object)"icon null"); } } public static void Mover() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Invalid comparison between Unknown and I4 Scene activeScene = SceneManager.GetActiveScene(); GameObject[] rootGameObjects = ((Scene)(ref activeScene)).GetRootGameObjects(); GameObject[] array = rootGameObjects; foreach (GameObject val in array) { if (!(((Object)val).name == "AISquadManagerStructure")) { continue; } Transform val2 = val.transform.Find("Squad_Elementals"); if (!((Object)(object)val2 != (Object)null)) { continue; } Transform val3 = ((Component)val2).transform.Find("ElementalDecay (1)_u0tyl14LQkuv9WYDAbKe6g"); Transform val4 = ((Component)val2).transform.Find("ElementalEthereal (1)_Z9GQjVLC0EOJL0UBL_GZ_A"); Transform val5 = ((Component)val2).transform.Find("ElementalFire (1)_3Blscwa0vUqK8OeyRv-rXw"); Transform val6 = ((Component)val2).transform.Find("ElementalFrost (1)_CXs-jxFWT0SgU4-DoRKctQ"); Transform val7 = ((Component)val2).transform.Find("ElementalLight (1)_fex2_93uBEOhQ5m7IEzCkA"); List<GameObject> list = new List<GameObject>(); list.Add(((Component)val3).gameObject); list.Add(((Component)val4).gameObject); list.Add(((Component)val5).gameObject); list.Add(((Component)val7).gameObject); list.Add(((Component)val6).gameObject); elesquad = ((Component)val2).gameObject; ((Component)val2).transform.SetParent((Transform)null); Object.DontDestroyOnLoad((Object)(object)val2); foreach (GameObject item in list) { ((Component)item.transform).GetComponent<AISquadMember>().AISquad = null; item.transform.SetParent((Transform)null); Object.Destroy((Object)(object)item.GetComponent<PhotonView>()); PhotonManager(item.gameObject); if ((int)item.GetComponent<Character>().Faction == 1) { Log.LogMessage((object)$"{item} Player faction TRUE"); } else { item.GetComponent<Character>().ChangeFaction((Factions)1, true); Log.LogMessage((object)$"{item} SET Player faction"); } item.gameObject.SetActive(false); } eledec = ((Component)val3).gameObject; eleeth = ((Component)val4).gameObject; elefro = ((Component)val6).gameObject; elelig = ((Component)val7).gameObject; elefir = ((Component)val5).gameObject; if (elementals.Count == 0) { elementals.Add(elefro); elementals.Add(elefir); elementals.Add(eledec); elementals.Add(eleeth); elementals.Add(elelig); } } } }
RebisDLL/Repair3rd.dll
Decompiled 3 weeks agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using SideLoader; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace OutwardModTemplate; [BepInPlugin("NNNP.Repair", "NNNP", "1.0.0")] public class Plugin : BaseUnityPlugin { public const string GUID = "NNNP.Repair"; public const string NAME = "NNNP"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; public static ConfigEntry<bool> ExampleConfig; internal void Awake() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; Log.LogMessage((object)"Hello banano from NNNP 1.0.0!"); ExampleConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("ExampleCategory", "ExampleSetting", false, "This is an example setting."); new Harmony("NNNP.Repair").PatchAll(); SL.OnPacksLoaded += OnPacksLoadedSetup; } private void OnPacksLoadedSetup() { Transform val = ((Component)ResourcesPrefabManager.Instance.GetItemPrefab(-55016)).transform.Find("Effect").Find("NormalEffects"); Transform val2 = ((Component)((Component)val).GetComponent<ShootBlast>().BaseBlast).transform.Find("Effects"); ((Component)((Component)val2).transform).gameObject.AddComponent<Repair>(); } } public class Repair : Effect { public override void ActivateLocally(Character _affectedCharacter, object[] _infos) { _affectedCharacter.Inventory.RepairEverything(false); } }
RebisDLL/Trasmute.dll
Decompiled 3 weeks agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using UnityEngine; using psitems; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Trasmute; [BepInPlugin("NNNP.Trasmute", "Trasmute", "1.0.0")] public class Trasmute : BaseUnityPlugin { [HarmonyPatch(typeof(Character), "ReceiveHit", new Type[] { typeof(Object), typeof(DamageList), typeof(Vector3), typeof(Vector3), typeof(float), typeof(float), typeof(Character), typeof(float), typeof(bool) })] public static class CharacterPatches { [HarmonyPatch("ReceiveHit")] [HarmonyPrefix] public static void Character_ReceiveHit_Prefix(Character __instance, ref DamageList _damage, ref DamageList __state) { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Expected O, but got Unknown //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Expected O, but got Unknown //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown Log.LogMessage((object)$"{__instance} reeive hit called"); if (__instance.StatusEffectMngr.HasStatusEffect("CoolBoon Alchemical") && ((CharacterKnowledge)__instance.Inventory.SkillKnowledge).IsItemLearned(-55021) && __instance.m_inventory.OwnsItem(-55014)) { __state = _damage.Clone(); DamageList val = _damage.Clone(); foreach (DamageType item in _damage.m_list) { item.Damage *= 0.1f; Log.LogMessage((object)$"{item.Type} set to {item.Damage}"); } _damage.m_list.Add(new DamageType((Types)4, val.TotalDamage * 0.9f)); Log.LogMessage((object)$"{(object)(Types)4}"); Plugin.PSDurab(__instance, 0.5f); } if (__instance.StatusEffectMngr.HasStatusEffect("WarmBoon Alchemical") && ((CharacterKnowledge)__instance.Inventory.SkillKnowledge).IsItemLearned(-55021) && __instance.m_inventory.OwnsItem(-55014)) { __state = _damage.Clone(); DamageList val2 = _damage.Clone(); foreach (DamageType item2 in _damage.m_list) { item2.Damage *= 0.1f; Log.LogMessage((object)$"{item2.Type} set to {item2.Damage}"); } _damage.m_list.Add(new DamageType((Types)5, val2.TotalDamage * 0.9f)); Log.LogMessage((object)$"{(object)(Types)5}"); Plugin.PSDurab(__instance, 0.5f); } if (__instance.StatusEffectMngr.HasStatusEffect("PossessedBoon Alchemical") && ((CharacterKnowledge)__instance.Inventory.SkillKnowledge).IsItemLearned(-55021) && __instance.m_inventory.OwnsItem(-55014)) { __state = _damage.Clone(); DamageList val3 = _damage.Clone(); foreach (DamageType item3 in _damage.m_list) { item3.Damage *= 0.1f; Log.LogMessage((object)$"{item3.Type} set to {item3.Damage}"); } _damage.m_list.Add(new DamageType((Types)2, val3.TotalDamage * 0.9f)); Log.LogMessage((object)$"{(object)(Types)2}"); Plugin.PSDurab(__instance, 0.5f); } if (__instance.StatusEffectMngr.HasStatusEffect("BlessBoon Alchemical") && ((CharacterKnowledge)__instance.Inventory.SkillKnowledge).IsItemLearned(-55021) && __instance.m_inventory.OwnsItem(-55014)) { __state = _damage.Clone(); DamageList val4 = _damage.Clone(); foreach (DamageType item4 in _damage.m_list) { item4.Damage *= 0.1f; Log.LogMessage((object)$"{item4.Type} set to {item4.Damage}"); } _damage.m_list.Add(new DamageType((Types)3, val4.TotalDamage * 0.9f)); Log.LogMessage((object)$"{(object)(Types)3}"); Plugin.PSDurab(__instance, 0.5f); } if (!__instance.StatusEffectMngr.HasStatusEffect("MistBoon Alchemical") || !((CharacterKnowledge)__instance.Inventory.SkillKnowledge).IsItemLearned(-55021) || !__instance.m_inventory.OwnsItem(-55014)) { return; } __state = _damage.Clone(); DamageList val5 = _damage.Clone(); foreach (DamageType item5 in _damage.m_list) { item5.Damage *= 0.1f; Log.LogMessage((object)$"{item5.Type} set to {item5.Damage}"); } _damage.m_list.Add(new DamageType((Types)1, val5.TotalDamage * 0.9f)); Log.LogMessage((object)$"{(object)(Types)1}"); Plugin.PSDurab(__instance, 0.5f); } [HarmonyPatch("ReceiveHit")] [HarmonyPostfix] public static void Character_ReceiveHit_Postfix(DamageList __state, ref DamageList _damage) { _damage = __state; } } public const string GUID = "NNNP.Trasmute"; public const string NAME = "Trasmute"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; public static ConfigEntry<bool> ExampleConfig; internal void Awake() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; Log.LogMessage((object)"Hello Banana from Trasmute 1.0.0!"); Harmony val = new Harmony("com.NNNP.Trasmute"); val.PatchAll(typeof(CharacterPatches)); } }