Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of She Wolf v0.1.0
SheWolf.dll
Decompiled 11 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Microsoft.CodeAnalysis; using PinkVelvetBodysuit; using SheWolf; using TMPro; using UnityEngine; using UnityEngine.Audio; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SheWolf")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SheWolf")] [assembly: AssemblyTitle("SheWolf")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SheWolf { [BepInPlugin("com.Azura.shewolf", "She Wolf", "0.1.0")] public class SheWolfPlugin : BaseUnityPlugin { public const string PluginGUID = "com.Azura.shewolf"; public const string PluginName = "She Wolf"; public const string PluginVersion = "0.1.0"; private static GameObject conteneurPrefabs; private static readonly HashSet<string> Echecs = new HashSet<string>(); private void Awake() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) if (Directory.GetFiles(Paths.PluginPath, "PinkVelvetBodysuit.dll", SearchOption.AllDirectories).Length != 0) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"She Wolf v0.1.0 reste inactif : PinkVelvetBodysuit est installé et contient déjà la louve."); return; } Louve.Configurer(((BaseUnityPlugin)this).Config); Meche.Configurer(((BaseUnityPlugin)this).Config); Portee.Configurer(((BaseUnityPlugin)this).Config); LouveHud.Configurer(((BaseUnityPlugin)this).Config); Hurlement.Configurer(((BaseUnityPlugin)this).Config); new Harmony("com.Azura.shewolf").PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"She Wolf v0.1.0 chargé : phéromones de louve, essence et transformation en louve."); } public static Transform Conteneur() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown if ((Object)(object)conteneurPrefabs == (Object)null) { conteneurPrefabs = new GameObject("She Wolf_Prefabs"); conteneurPrefabs.SetActive(false); Object.DontDestroyOnLoad((Object)(object)conteneurPrefabs); } return conteneurPrefabs.transform; } public static void EnregistrerDansObjectDB(ObjectDB db) { if ((Object)(object)db == (Object)null || db.m_items.Count == 0 || (Object)(object)db.GetItemPrefab("Hammer") == (Object)null) { return; } if ((Object)(object)Louve.Gouttes == (Object)null) { Louve.Gouttes = Creer("gouttes de phéromones", () => Louve.CreerGouttes(db, Conteneur())); } if ((Object)(object)Louve.Gouttes != (Object)null && (Object)(object)Louve.Essence == (Object)null) { Louve.Essence = Creer("essence de phéromones", () => Louve.CreerEssence(db, Conteneur())); } Ajouter(db, Louve.Gouttes, null, null); Ajouter(db, Louve.Essence, "Recipe_LouvePheromoneEssence", () => Louve.CreerRecette(db)); if ((Object)(object)Louve.Effet != (Object)null && !db.m_StatusEffects.Contains((StatusEffect)(object)Louve.Effet)) { db.m_StatusEffects.Add((StatusEffect)(object)Louve.Effet); } if ((Object)(object)Portee.Effet == (Object)null) { Portee.Effet = Portee.CreerEffet(); } if (!db.m_StatusEffects.Contains((StatusEffect)(object)Portee.Effet)) { db.m_StatusEffects.Add((StatusEffect)(object)Portee.Effet); } AccessTools.Method(typeof(ObjectDB), "UpdateRegisters", (Type[])null, (Type[])null).Invoke(db, null); EnregistrerDansZNetScene(ZNetScene.instance); } public static void EnregistrerDansZNetScene(ZNetScene scene) { if ((Object)(object)scene == (Object)null) { return; } Dictionary<int, GameObject> dictionary = AccessTools.FieldRefAccess<ZNetScene, Dictionary<int, GameObject>>("m_namedPrefabs").Invoke(scene); GameObject[] array = (GameObject[])(object)new GameObject[2] { Louve.Gouttes, Louve.Essence }; foreach (GameObject val in array) { if (!((Object)(object)val == (Object)null)) { if (!scene.m_prefabs.Contains(val)) { scene.m_prefabs.Add(val); } dictionary[StringExtensionMethods.GetStableHashCode(((Object)val).name)] = val; } } Louve.EnregistrerDansZNetScene(scene); } private static GameObject Creer(string quoi, Func<GameObject> fabrique) { if (Echecs.Contains(quoi)) { return null; } try { GameObject val = fabrique(); if ((Object)(object)val == (Object)null) { Echecs.Add(quoi); } else { Outils3D.CalqueRamassage(val); } return val; } catch (Exception arg) { Echecs.Add(quoi); Debug.LogError((object)string.Format("[{0}] Création de l'objet « {1} » impossible : {2}", "She Wolf", quoi, arg)); return null; } } private static void Ajouter(ObjectDB db, GameObject prefab, string nomRecette, Func<Recipe> recette) { if (!((Object)(object)prefab == (Object)null)) { if (!db.m_items.Contains(prefab)) { db.m_items.Add(prefab); } if (nomRecette != null && !db.m_recipes.Exists((Recipe r) => (Object)(object)r != (Object)null && ((Object)r).name == nomRecette)) { db.m_recipes.Add(recette()); } } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] public static class SheWolf_ObjectDB_Awake_Patch { public static void Postfix(ObjectDB __instance) { SheWolfPlugin.EnregistrerDansObjectDB(__instance); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] public static class SheWolf_ObjectDB_CopyOtherDB_Patch { public static void Postfix(ObjectDB __instance) { SheWolfPlugin.EnregistrerDansObjectDB(__instance); } } [HarmonyPatch(typeof(ZNetScene), "Awake")] public static class SheWolf_ZNetScene_Awake_Patch { public static void Postfix(ZNetScene __instance) { SheWolfPlugin.EnregistrerDansZNetScene(__instance); } } } namespace PinkVelvetBodysuit { public static class Hote { private static AudioMixerGroup groupeEffets; public static string Nom => "She Wolf"; public static Color CouleurAnneau => new Color(0.91f, 0.77f, 0.35f); public static AudioMixerGroup GroupeEffets { get { if ((Object)(object)groupeEffets != (Object)null || (Object)(object)ObjectDB.instance == (Object)null) { return groupeEffets; } string[] array = new string[3] { "Club", "AxeStone", "SwordBronze" }; foreach (string text in array) { GameObject itemPrefab = ObjectDB.instance.GetItemPrefab(text); ItemDrop val = ((itemPrefab != null) ? itemPrefab.GetComponent<ItemDrop>() : null); if ((Object)(object)val != (Object)null && (Object)(object)(groupeEffets = Outils3D.GroupeAudio(val.m_itemData.m_shared)) != (Object)null) { break; } } return groupeEffets; } } public static Transform Conteneur() { return SheWolfPlugin.Conteneur(); } } public static class Louve { public const string NomGouttes = "LouvePheromoneGouttes"; public const string NomEssence = "LouvePheromoneEssence"; public const string NomRecetteEssence = "Recipe_LouvePheromoneEssence"; public const string NomEffet = "SE_LaivyLouve"; public const string CleRestant = "laivy_louve_restant"; public const string CleLouve = "laivy_louve"; public const string CleLaisse = "laivy_louve_laisse"; public const string RpcLaisse = "LaivyLouve_Laisse"; public static ConfigEntry<float> DureeMinutes; public static ConfigEntry<float> Chance; public static ConfigEntry<int> GouttesMin; public static ConfigEntry<int> GouttesMax; public static ConfigEntry<int> GouttesParEssence; public static ConfigEntry<float> BonusVitesse; public static ConfigEntry<float> DegatsPerforants; public static ConfigEntry<float> DegatsTranchants; public static ConfigEntry<float> BoostDegats; public static ConfigEntry<float> LongueurLaisse; public static ConfigEntry<float> RayonInstinct; public static ConfigEntry<string> CouleurCollierHex; public static ConfigEntry<string> CouleurLaisseHex; public static GameObject Gouttes; public static GameObject Essence; public static SE_Louve Effet; private static ItemDrop crocs; private static Dictionary<string, GameObject> versionsCuites; private static Material[] materiauxCollier; private static Material materiauCorde; private static float dernierMessage; public static void Configurer(ConfigFile config) { DureeMinutes = config.Bind<float>("Louve", "DureeMinutes", 45f, "Length of the she-wolf transformation (minutes of play): neither logging out nor dying ends it.\nDurée de la transformation en louve (minutes de jeu) : ni la déconnexion ni la mort n'y mettent fin."); Chance = config.Bind<float>("Louve", "ChanceGouttes", 0.5f, "Chance that a killed wolf drops pheromones (0.5 = 50 %).\nChance qu'un loup tué laisse des gouttes de phéromones (0.5 = 50 %)."); GouttesMin = config.Bind<int>("Louve", "GouttesMin", 1, "Minimum number of drops.\nNombre minimal de gouttes laissées."); GouttesMax = config.Bind<int>("Louve", "GouttesMax", 5, "Maximum number of drops.\nNombre maximal de gouttes laissées."); GouttesParEssence = config.Bind<int>("Louve", "GouttesParEssence", 50, "Drops needed for one essence (mead cauldron).\nGouttes nécessaires pour une essence (chaudron à hydromel)."); BonusVitesse = config.Bind<float>("Louve", "BonusVitesse", 0.4f, "Extra movement speed as a she-wolf (0.4 = +40 %).\nVitesse de déplacement en plus sous forme de louve (0.4 = +40 %)."); DegatsPerforants = config.Bind<float>("Louve", "DegatsPerforants", 35f, "Pierce damage of the fangs (bite).\nDégâts perforants des crocs (morsure)."); DegatsTranchants = config.Bind<float>("Louve", "DegatsTranchants", 25f, "Slash damage of the fangs and paws.\nDégâts tranchants des crocs et des pattes."); BoostDegats = config.Bind<float>("Louve", "BoostDegats", 1.5f, "Multiplier for all damage dealt as a she-wolf (1.5 = +50 %).\nMultiplicateur de tous les dégâts infligés sous forme de louve (1.5 = +50 %)."); LongueurLaisse = config.Bind<float>("Louve", "LongueurLaisse", 4f, "Leash length, in metres.\nLongueur de la laisse en mètres."); RayonInstinct = config.Bind<float>("Louve", "RayonInstinct", 45f, "Radius (metres) in which the she-wolf's instinct makes living creatures glow.\nRayon (mètres) dans lequel l'instinct de la louve fait briller les êtres vivants."); CouleurCollierHex = config.Bind<string>("Louve", "CouleurCollierHex", "#E05297", "Colour of the leather collar.\nCouleur du collier en cuir."); CouleurLaisseHex = config.Bind<string>("Louve", "CouleurLaisseHex", "#2B1B17", "Colour of the leather leash.\nCouleur de la laisse en cuir."); } public static GameObject CreerGouttes(ObjectDB db, Transform conteneur) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) GameObject val = ((IEnumerable<string>)new string[3] { "Resin", "Honey", "Guck" }).Select((Func<string, GameObject>)db.GetItemPrefab).FirstOrDefault((Func<GameObject, bool>)((GameObject p) => (Object)(object)p != (Object)null)); if ((Object)(object)val == (Object)null) { return null; } GameObject val2 = Object.Instantiate<GameObject>(val, conteneur, false); ((Object)val2).name = "LouvePheromoneGouttes"; val2.transform.localScale = Vector3.one; Outils3D.ViderModeles(val2); Maillage maillage = new Maillage(); Goutte(maillage, new Vector3(0f, 0f, 0f), 0.217f); Goutte(maillage, new Vector3(0.036f, 0f, 0.012f) * 3.5f, 0.1575f); Goutte(maillage, new Vector3(-0.012f, 0f, 0.034f) * 3.5f, 0.12599999f); Mesh val3 = maillage.Creer("Louve_Gouttes"); Color couleur = default(Color); ((Color)(ref couleur))..ctor(0.86f, 0.52f, 0.36f); GameObject obj = Outils3D.Objet("Gouttes_Modele", val3, (Material[])(object)new Material[1] { Outils3D.Materiau(db, "Louve_Gouttes", couleur, 0.92f, 0f) }, val2.transform); BoxCollider obj2 = obj.AddComponent<BoxCollider>(); Bounds bounds = val3.bounds; obj2.center = ((Bounds)(ref bounds)).center; bounds = val3.bounds; obj2.size = ((Bounds)(ref bounds)).size + Vector3.one * 0.01f; ItemDrop component = val2.GetComponent<ItemDrop>(); component.m_itemData.m_dropPrefab = val2; SharedData shared = component.m_itemData.m_shared; shared.m_name = Textes.Jeton("gouttes_nom"); shared.m_description = Textes.Jeton("gouttes_desc"); shared.m_itemType = (ItemType)1; shared.m_maxStackSize = 100; shared.m_weight = 0.1f; shared.m_teleportable = true; shared.m_value = 0; Sprite val4 = Outils3D.RendreIcone(obj, new Vector3(0.4f, 0.55f, -1f), "LouvePheromoneGouttes"); if ((Object)(object)val4 != (Object)null) { shared.m_icons = (Sprite[])(object)new Sprite[1] { val4 }; } return val2; } private static void Goutte(Maillage m, Vector3 pied, float hauteur) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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_0097: Unknown result type (might be due to invalid IL or missing references) List<Vector3> list = new List<Vector3>(); List<float> list2 = new List<float>(); for (int i = 0; i < 20; i++) { float num = MathF.PI * (float)i / 19f; float num2 = (Mathf.Cos(num) + 1f) * 0.5f * hauteur; float num3 = Mathf.Sin(num) * Mathf.Sin(num * 0.5f) * hauteur * 0.36f; list.Add(pied + new Vector3(0f, num2, 0f)); list2.Add(Mathf.Max(0.0004f, num3)); } Maillage.Reperes(list, Vector3.forward, out var droites, out var hauts); m.Tube(0, list, droites, hauts, list2, list2, 18, 2f, fermerDebut: false, fermerFin: false); } public static GameObject CreerEssence(ObjectDB db, Transform conteneur) { //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) GameObject val = ((IEnumerable<string>)new string[3] { "MeadHealthMinor", "MeadStaminaMinor", "MeadTasty" }).Select((Func<string, GameObject>)db.GetItemPrefab).FirstOrDefault((Func<GameObject, bool>)((GameObject p) => (Object)(object)p != (Object)null)) ?? ((IEnumerable<GameObject>)db.m_items).FirstOrDefault((Func<GameObject, bool>)delegate(GameObject i) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 if ((Object)(object)i != (Object)null) { ItemDrop component2 = i.GetComponent<ItemDrop>(); if (component2 != null && (int)component2.m_itemData.m_shared.m_itemType == 2) { return (Object)(object)i.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect != (Object)null; } } return false; }); if ((Object)(object)val == (Object)null) { return null; } GameObject val2 = Object.Instantiate<GameObject>(val, conteneur, false); ((Object)val2).name = "LouvePheromoneEssence"; val2.transform.localScale = Vector3.one; Outils3D.ViderModeles(val2); Material[] materiaux; Mesh val3 = ModeleFiole(db, out materiaux); GameObject obj = Outils3D.Objet("Essence_Modele", val3, materiaux, val2.transform); BoxCollider obj2 = obj.AddComponent<BoxCollider>(); Bounds bounds = val3.bounds; obj2.center = ((Bounds)(ref bounds)).center; bounds = val3.bounds; obj2.size = ((Bounds)(ref bounds)).size + Vector3.one * 0.01f; ItemDrop component = val2.GetComponent<ItemDrop>(); component.m_itemData.m_dropPrefab = val2; SharedData shared = component.m_itemData.m_shared; Sprite val4 = Outils3D.RendreIcone(obj, new Vector3(0.35f, 0.25f, -1f), "LouvePheromoneEssence"); Effet = CreerEffet(val4 ?? shared.m_icons.FirstOrDefault()); shared.m_name = Textes.Jeton("essence_nom"); shared.m_description = Textes.Jeton("essence_desc"); shared.m_itemType = (ItemType)2; shared.m_consumeStatusEffect = (StatusEffect)(object)Effet; shared.m_food = 0f; shared.m_foodStamina = 0f; shared.m_foodEitr = 0f; shared.m_maxStackSize = 10; shared.m_weight = 0.5f; shared.m_teleportable = true; if ((Object)(object)val4 != (Object)null) { shared.m_icons = (Sprite[])(object)new Sprite[1] { val4 }; } return val2; } private static Mesh ModeleFiole(ObjectDB db, out Material[] materiaux) { //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) Maillage maillage = new Maillage(); (float, float)[] profil = new(float, float)[14] { (0f, 0.0005f), (0.002f, 0.012f), (0.006f, 0.02f), (0.013f, 0.026f), (0.024f, 0.029f), (0.04f, 0.029f), (0.052f, 0.027f), (0.061f, 0.021f), (0.068f, 0.013f), (0.073f, 0.0095f), (0.09f, 0.009f), (0.093f, 0.0115f), (0.098f, 0.0115f), (0.1f, 0.009f) }; Tourner(maillage, 0, profil, 24); Tourner(maillage, 1, new(float, float)[5] { (0.09f, 0.008f), (0.1f, 0.0082f), (0.11f, 0.0092f), (0.114f, 0.0086f), (0.1155f, 0.0005f) }, 16); List<Vector3> list = new List<Vector3>(); for (int i = 0; i <= 24; i++) { float num = MathF.PI * 2f * (float)i / 24f; list.Add(new Vector3(Mathf.Cos(num) * 0.0102f, 0.082f, Mathf.Sin(num) * 0.0102f)); } Maillage.Reperes(list, Vector3.up, out var droites, out var hauts); float[] array = Enumerable.Repeat(0.0016f, list.Count).ToArray(); maillage.Tube(2, list, droites, hauts, array, array, 8, 2f, fermerDebut: false, fermerFin: false); List<Vector3> list2 = new List<Vector3> { new Vector3(0f, 0.082f, -0.0105f), new Vector3(0f, 0.075f, -0.018f), new Vector3(0f, 0.068f, -0.027f), new Vector3(0f, 0.061f, -0.0355f) }; Maillage.Reperes(list2, Vector3.right, out var droites2, out var hauts2); float[] array2 = Enumerable.Repeat(0.0012f, list2.Count).ToArray(); maillage.Tube(2, list2, droites2, hauts2, array2, array2, 6, 2f, fermerDebut: true, fermerFin: true); List<Vector3> list3 = new List<Vector3>(); List<float> list4 = new List<float>(); for (int j = 0; j <= 10; j++) { float num2 = (float)j / 10f; list3.Add(new Vector3(0f, 0.061f - 0.027f * num2, -0.037f - 0.007f * num2 * num2)); list4.Add(Mathf.Lerp(0.0048f, 0.0004f, Mathf.Pow(num2, 0.9f))); } Maillage.Reperes(list3, Vector3.right, out var droites3, out var hauts3); maillage.Tube(3, list3, droites3, hauts3, list4, list4, 10, 2f, fermerDebut: true, fermerFin: false); materiaux = (Material[])(object)new Material[4] { Outils3D.Materiau(db, "Essence_Verre", new Color(0.62f, 0.1f, 0.24f), 0.95f, 0.1f), Outils3D.Materiau(db, "Essence_Liege", new Color(0.62f, 0.45f, 0.28f), 0.15f, 0f), Outils3D.Materiau(db, "Essence_Cordelette", new Color(0.24f, 0.16f, 0.1f), 0.2f, 0f), Outils3D.Materiau(db, "Essence_Croc", new Color(0.93f, 0.9f, 0.8f), 0.55f, 0f) }; return maillage.Creer("Louve_Essence"); } private static void Tourner(Maillage m, int partie, IList<(float y, float r)> profil, int cotes) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) List<Vector3> centres = ((IEnumerable<(float, float)>)profil).Select((Func<(float, float), Vector3>)(((float y, float r) p) => new Vector3(0f, p.y, 0f))).ToList(); List<float> list = profil.Select(((float y, float r) p) => p.r).ToList(); Maillage.Reperes(centres, Vector3.forward, out var droites, out var hauts); m.Tube(partie, centres, droites, hauts, list, list, cotes, 2f, fermerDebut: false, fermerFin: false); } private static SE_Louve CreerEffet(Sprite icone) { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) SE_Louve sE_Louve = ScriptableObject.CreateInstance<SE_Louve>(); ((Object)sE_Louve).name = "SE_LaivyLouve"; ((StatusEffect)sE_Louve).m_name = Textes.Jeton("effet_nom"); ((StatusEffect)sE_Louve).m_category = "laivy_louve"; ((StatusEffect)sE_Louve).m_icon = icone; ((StatusEffect)sE_Louve).m_tooltip = Textes.Jeton("effet_info"); ((StatusEffect)sE_Louve).m_ttl = Mathf.Max(1f, DureeMinutes.Value) * 60f; ((SE_Stats)sE_Louve).m_speedModifier = BonusVitesse.Value; ((SE_Stats)sE_Louve).m_modifyAttackSkill = (SkillType)999; ((SE_Stats)sE_Louve).m_damageModifier = Mathf.Max(1f, BoostDegats.Value); ((SE_Stats)sE_Louve).m_runStaminaDrainModifier = -0.5f; ((SE_Stats)sE_Louve).m_jumpStaminaUseModifier = -0.3f; ((SE_Stats)sE_Louve).m_jumpModifier = new Vector3(0f, 0.25f, 0.25f); ((SE_Stats)sE_Louve).m_noiseModifier = -0.3f; ((StatusEffect)sE_Louve).m_startMessageType = (MessageType)2; ((StatusEffect)sE_Louve).m_startMessage = Textes.Jeton("effet_debut"); ((StatusEffect)sE_Louve).m_stopMessageType = (MessageType)2; ((StatusEffect)sE_Louve).m_stopMessage = Textes.Jeton("effet_fin"); return sE_Louve; } public static Recipe CreerRecette(ObjectDB db) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_0033: Expected O, but got Unknown Requirement val = new Requirement { m_resItem = Gouttes.GetComponent<ItemDrop>(), m_amount = Mathf.Max(1, GouttesParEssence.Value), m_recover = true }; return Outils3D.Recette("Recipe_LouvePheromoneEssence", Essence, ChaudronHydromel(db), 1, val); } public static CraftingStation ChaudronHydromel(ObjectDB db) { IEnumerable<CraftingStation> enumerable = from r in db.m_recipes select (!((Object)(object)r != (Object)null)) ? null : r.m_craftingStation into s where (Object)(object)s != (Object)null select s; if ((Object)(object)ZNetScene.instance != (Object)null) { enumerable = enumerable.Concat(from p in ZNetScene.instance.m_prefabs where (Object)(object)p != (Object)null select p.GetComponent<CraftingStation>() into s where (Object)(object)s != (Object)null select s); } return enumerable.FirstOrDefault((Func<CraftingStation, bool>)((CraftingStation s) => s.m_name == "$piece_meadcauldron")) ?? enumerable.FirstOrDefault((Func<CraftingStation, bool>)((CraftingStation s) => s.m_name == "$piece_cauldron")); } public static void EnregistrerDansZNetScene(ZNetScene scene) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown if ((Object)(object)scene == (Object)null || (Object)(object)Gouttes == (Object)null) { return; } GameObject prefab = scene.GetPrefab("Wolf"); CharacterDrop val = (((Object)(object)prefab != (Object)null) ? prefab.GetComponent<CharacterDrop>() : null); if ((Object)(object)val != (Object)null && !val.m_drops.Any((Drop d) => (Object)(object)d.m_prefab == (Object)(object)Gouttes)) { int num = Mathf.Max(1, GouttesMin.Value); val.m_drops.Add(new Drop { m_prefab = Gouttes, m_amountMin = num, m_amountMax = Mathf.Max(num, GouttesMax.Value) + 1, m_chance = Mathf.Clamp01(Chance.Value), m_levelMultiplier = false, m_onePerPlayer = false }); } if ((Object)(object)ObjectDB.instance != (Object)null) { Recipe val2 = ((IEnumerable<Recipe>)ObjectDB.instance.m_recipes).FirstOrDefault((Func<Recipe, bool>)((Recipe r) => (Object)(object)r != (Object)null && ((Object)r).name == "Recipe_LouvePheromoneEssence")); CraftingStation val3 = ChaudronHydromel(ObjectDB.instance); if ((Object)(object)val2 != (Object)null && (Object)(object)val3 != (Object)null && (Object)(object)val2.m_craftingStation != (Object)(object)val3) { val2.m_craftingStation = val3; val2.m_repairStation = val3; } } } public static LouveJoueur Etat(Character c) { if (!((Object)(object)c != (Object)null) || !LouveJoueur.Tous.TryGetValue(c, out var value)) { return null; } return value; } public static bool EstLouve(Character c) { LouveJoueur louveJoueur = Etat(c); if ((Object)(object)louveJoueur != (Object)null) { return louveJoueur.Louve; } return false; } public static void Dire(Character c, string message) { if ((Object)(object)c != (Object)(object)Player.m_localPlayer || Time.time - dernierMessage < 0.8f) { return; } dernierMessage = Time.time; try { c.Message((MessageType)2, message, 0, (Sprite)null, false); } catch { } } public static ItemDrop Crocs(Player joueur) { //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)crocs != (Object)null) { return crocs; } GameObject val = (((Object)(object)ZNetScene.instance != (Object)null) ? ZNetScene.instance.GetPrefab("Wolf") : null); Humanoid val2 = (((Object)(object)val != (Object)null) ? val.GetComponent<Humanoid>() : null); ItemDrop unarmedWeapon = ((Humanoid)joueur).m_unarmedWeapon; if ((Object)(object)val2 == (Object)null || (Object)(object)unarmedWeapon == (Object)null) { return null; } List<ItemDrop> list = (from g in ((IEnumerable<GameObject>)(((object)val2.m_defaultItems) ?? ((object)new GameObject[0]))).Concat((IEnumerable<GameObject>)(((object)val2.m_randomWeapon) ?? ((object)new GameObject[0]))) where (Object)(object)g != (Object)null select g.GetComponent<ItemDrop>() into d where (Object)(object)d != (Object)null && d.m_itemData.m_shared.m_attack != null && !string.IsNullOrEmpty(d.m_itemData.m_shared.m_attack.m_attackAnimation) select d).Distinct().ToList(); if (list.Count == 0) { return null; } foreach (ItemDrop item in list) { Attack attack = item.m_itemData.m_shared.m_attack; Debug.Log((object)$"[{Hote.Nom}] Attaque de loup : {((Object)item).name} anim={attack.m_attackAnimation} type={attack.m_attackType} portée={attack.m_attackRange} hauteur={attack.m_attackHeight} angle={attack.m_attackAngle} os={attack.m_attackOriginJoint}"); } list = list.OrderBy<ItemDrop, string>((ItemDrop a) => a.m_itemData.m_shared.m_attack.m_attackAnimation, StringComparer.Ordinal).ToList(); ItemDrop val3 = list.First(); ItemDrop val4 = list.Last(); GameObject val5 = Object.Instantiate<GameObject>(((Component)unarmedWeapon).gameObject, Hote.Conteneur(), false); ((Object)val5).name = "LouveCrocs"; ItemDrop component = val5.GetComponent<ItemDrop>(); component.m_itemData.m_dropPrefab = val5; SharedData shared = component.m_itemData.m_shared; shared.m_name = Textes.Jeton("crocs_nom"); shared.m_skillType = (SkillType)11; shared.m_damages = new DamageTypes { m_pierce = DegatsPerforants.Value, m_slash = DegatsTranchants.Value }; shared.m_damagesPerLevel = default(DamageTypes); shared.m_attackForce = 45f; shared.m_backstabBonus = 3f; shared.m_blockPower = 0f; shared.m_useDurability = false; shared.m_attackStatusEffect = null; shared.m_spawnOnHit = null; shared.m_attack = val3.m_itemData.m_shared.m_attack.Clone(); shared.m_attack.m_attackOriginJoint = ""; shared.m_attack.m_attackStamina = 8f; shared.m_attack.m_attackEitr = 0f; shared.m_attack.m_attackHealth = 0f; shared.m_attack.m_damageMultiplier = 1f; shared.m_secondaryAttack = val4.m_itemData.m_shared.m_attack.Clone(); shared.m_secondaryAttack.m_attackOriginJoint = ""; shared.m_secondaryAttack.m_attackStamina = 18f; shared.m_secondaryAttack.m_attackEitr = 0f; shared.m_secondaryAttack.m_attackHealth = 0f; shared.m_secondaryAttack.m_damageMultiplier = 1.5f; shared.m_secondaryAttack.m_forceMultiplier = 2f; shared.m_secondaryAttack.m_staggerMultiplier = 2f; crocs = component; return component; } public static GameObject VersionCuite(ItemData cru) { if ((Object)(object)cru?.m_dropPrefab == (Object)null || (Object)(object)ZNetScene.instance == (Object)null) { return null; } if (versionsCuites == null) { versionsCuites = new Dictionary<string, GameObject>(); foreach (GameObject item in ZNetScene.instance.m_prefabs.Where((GameObject p) => (Object)(object)p != (Object)null)) { CookingStation component = item.GetComponent<CookingStation>(); if (component?.m_conversion == null) { continue; } foreach (ItemConversion item2 in component.m_conversion) { if ((Object)(object)item2?.m_from != (Object)null && (Object)(object)item2.m_to != (Object)null && item2.m_to.m_itemData.m_shared.m_food > 0f && !versionsCuites.ContainsKey(((Object)item2.m_from).name)) { versionsCuites[((Object)item2.m_from).name] = ((Component)item2.m_to).gameObject; } } } } if (!versionsCuites.TryGetValue(((Object)cru.m_dropPrefab).name, out var value)) { return null; } return value; } public static void MangerCru(Player joueur, Inventory inventaire, ItemData cru, GameObject cuit) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) ItemData val = cuit.GetComponent<ItemDrop>().m_itemData.Clone(); val.m_dropPrefab = cuit; val.m_stack = 1; if (joueur.CanEat(val, true) && joueur.EatFood(val)) { inventaire.RemoveOneItem(cru); ((Humanoid)joueur).m_consumeItemEffects.Create(((Component)joueur).transform.position, Quaternion.identity, (Transform)null, 1f, -1, ((Character)joueur).GetZDOID()); ZSyncAnimation component = ((Component)joueur).GetComponent<ZSyncAnimation>(); if (component != null) { component.SetTrigger("eat"); } ((Character)joueur).Message((MessageType)1, Textes.T("mange_cru", Localization.instance.Localize(cru.m_shared.m_name)), 0, (Sprite)null, false); } } public static void Debut(Player joueur) { LouveJoueur louveJoueur = Etat((Character)(object)joueur); if (!((Object)(object)louveJoueur == (Object)null) && louveJoueur.Proprietaire) { if (((Character)joueur).IsAttached()) { ((Character)joueur).AttachStop(); } if ((Object)(object)InventoryGui.instance != (Object)null && (Object)(object)joueur == (Object)(object)Player.m_localPlayer && (Object)(object)joueur.GetCurrentCraftingStation() != (Object)null) { InventoryGui.instance.Hide(); } ((Humanoid)joueur).HideHandItems(false, false); louveJoueur.DebutLouve(Crocs(joueur)); } } public static void Fin(Player joueur, bool garderTemps) { LouveJoueur louveJoueur = Etat((Character)(object)joueur); if (!((Object)(object)louveJoueur == (Object)null) && louveJoueur.Proprietaire) { if (!garderTemps) { ((Component)joueur).GetComponent<LouvePortee>()?.MettreBasSiAttendue(); } louveJoueur.FinLouve(); if (!garderTemps) { joueur.m_customData.Remove("laivy_louve_restant"); AccessTools.Method(typeof(Humanoid), "ShowHandItems", (Type[])null, (Type[])null).Invoke(joueur, new object[2] { false, false }); } } } public static Material[] MateriauxCollier() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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) if (materiauxCollier != null || (Object)(object)ObjectDB.instance == (Object)null) { return materiauxCollier; } Material[] result = new Material[2] { Outils3D.Materiau(ObjectDB.instance, "Louve_Collier", Outils3D.Couleur(CouleurCollierHex.Value, new Color(0.88f, 0.32f, 0.59f)), 0.45f, 0f), Outils3D.Materiau(ObjectDB.instance, "Louve_Anneau", Hote.CouleurAnneau, 0.75f, 0.7f) }; materiauxCollier = (Material[])(object)result; return (Material[])(object)result; } public static Material MateriauCorde() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)materiauCorde != (Object)null || (Object)(object)ObjectDB.instance == (Object)null) { return materiauCorde; } return materiauCorde = Outils3D.Materiau(ObjectDB.instance, "Louve_Laisse", Outils3D.Couleur(CouleurLaisseHex.Value, new Color(0.17f, 0.11f, 0.09f)), 0.35f, 0f); } } public class SE_Louve : SE_Stats { private float sauvegarde; public override void Setup(Character character) { Player val = (Player)(object)((character is Player) ? character : null); float num = ((val != null) ? Restant(val) : 0f); if (num > 0f && num < ((StatusEffect)this).m_ttl) { ((StatusEffect)this).m_time = ((StatusEffect)this).m_ttl - num; ((StatusEffect)this).m_startMessage = Textes.T("encore_louve", Mathf.CeilToInt(num / 60f)); } ((SE_Stats)this).Setup(character); Player val2 = (Player)(object)((character is Player) ? character : null); if (val2 != null) { Louve.Debut(val2); Sauver(); } } public static float Restant(Player joueur) { if (!joueur.m_customData.TryGetValue("laivy_louve_restant", out var value) || !float.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out var result)) { return 0f; } return result; } private void Sauver() { Character character = ((StatusEffect)this).m_character; Player val = (Player)(object)((character is Player) ? character : null); if (val != null) { val.m_customData["laivy_louve_restant"] = Mathf.Max(1f, ((StatusEffect)this).m_ttl - ((StatusEffect)this).m_time).ToString("0", CultureInfo.InvariantCulture); } } public override void UpdateStatusEffect(float dt) { ((SE_Stats)this).UpdateStatusEffect(dt); sauvegarde += dt; if (sauvegarde >= 1f) { sauvegarde = 0f; Sauver(); } } public override void Stop() { Character character = ((StatusEffect)this).m_character; Player val = (Player)(object)((character is Player) ? character : null); if (val != null) { bool flag = ((Character)val).IsDead() && !((StatusEffect)this).IsDone(); if (flag) { Sauver(); ((StatusEffect)this).m_stopMessage = ""; } Louve.Fin(val, flag); } ((StatusEffect)this).Stop(); } public override void ModifyWalkVelocity(ref Vector3 vel) { ((SE_Stats)this).ModifyWalkVelocity(ref vel); Louve.Etat(((StatusEffect)this).m_character)?.TirerLaisse(ref vel); } } public class LouveJoueur : MonoBehaviour, Interactable { public static readonly Dictionary<Character, LouveJoueur> Tous = new Dictionary<Character, LouveJoueur>(); private static readonly FieldRef<Character, Animator> AnimPerso = AccessTools.FieldRefAccess<Character, Animator>("m_animator"); private static readonly FieldRef<Character, CharacterAnimEvent> EvtPerso = AccessTools.FieldRefAccess<Character, CharacterAnimEvent>("m_animEvent"); private static readonly FieldRef<ZSyncAnimation, Animator> AnimSync = AccessTools.FieldRefAccess<ZSyncAnimation, Animator>("m_animator"); private static readonly int Emission = Shader.PropertyToID("_EmissionColor"); private Player joueur; private ZNetView nview; private ZSyncAnimation zanim; private ItemDrop mainsNues; private Animator animHumain; private Animator animLouve; private CharacterAnimEvent evtHumain; private CharacterAnimEvent evtLouve; private float prochainMasquage; private GameObject collier; private Transform anneau; private GameObject corde; private Mesh maillageCorde; private bool echecVisuel; private static readonly FieldRef<Character, Vector3> Direction = AccessTools.FieldRefAccess<Character, Vector3>("m_moveDir"); private static readonly FieldRef<Character, bool> Course = AccessTools.FieldRefAccess<Character, bool>("m_run"); private static readonly FieldRef<Character, bool> Marche = AccessTools.FieldRefAccess<Character, bool>("m_walk"); private float holderAbsentDepuis; private float prochaineTeleportation; private float prochainRappel; private readonly HashSet<Character> surlignes = new HashSet<Character>(); private float prochainInstinct; private float restaurationA = -1f; private static readonly Func<Character, bool> PrendEntree = AccessTools.MethodDelegate<Func<Character, bool>>(AccessTools.Method(typeof(Character), "TakeInput", (Type[])null, (Type[])null), (object)null, true); private Transform osCou; private Transform osTete; private Transform osMachoire; private float hurlementDebut = -99f; private float hurlementDuree = 3f; private AudioSource voix; public bool Transforme { get; private set; } public GameObject Visuel { get; private set; } public bool Proprietaire { get { if ((Object)(object)nview != (Object)null && nview.IsValid()) { return nview.IsOwner(); } return false; } } public bool Louve { get { if ((Object)(object)nview != (Object)null && nview.IsValid()) { return nview.GetZDO().GetBool("laivy_louve", false); } return false; } } public ZDOID Tenant { get { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)nview != (Object)null) || !nview.IsValid()) { return ZDOID.None; } return nview.GetZDO().GetZDOID("laivy_louve_laisse"); } } public bool Hurle => Time.time < hurlementDebut + hurlementDuree; private void Awake() { joueur = ((Component)this).GetComponent<Player>(); nview = ((Component)this).GetComponent<ZNetView>(); zanim = ((Component)this).GetComponent<ZSyncAnimation>(); Tous[(Character)(object)joueur] = this; if ((Object)(object)nview != (Object)null && nview.GetZDO() != null) { nview.Register<ZDOID>("LaivyLouve_Laisse", (Action<long, ZDOID>)RPC_Laisse); nview.Register("LaivyLouve_Hurler", (Action<long>)RPC_Hurler); } restaurationA = Time.time + 2f; } private void OnDestroy() { Tous.Remove((Character)(object)joueur); EteindreInstinct(); if ((Object)(object)corde != (Object)null) { Object.Destroy((Object)(object)corde); } } public void DebutLouve(ItemDrop crocs) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (Proprietaire) { if ((Object)(object)mainsNues == (Object)null) { mainsNues = ((Humanoid)joueur).m_unarmedWeapon; } if ((Object)(object)crocs != (Object)null) { ((Humanoid)joueur).m_unarmedWeapon = crocs; } nview.GetZDO().Set("laivy_louve_laisse", ZDOID.None); nview.GetZDO().Set("laivy_louve", true); } } public void FinLouve() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainsNues != (Object)null) { ((Humanoid)joueur).m_unarmedWeapon = mainsNues; } if (Proprietaire) { nview.GetZDO().Set("laivy_louve", false); nview.GetZDO().Set("laivy_louve_laisse", ZDOID.None); } } private void Update() { //IL_017b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)nview == (Object)null || !nview.IsValid()) { return; } if (restaurationA > 0f && Time.time > restaurationA && Proprietaire && (Object)(object)joueur == (Object)(object)Player.m_localPlayer) { restaurationA = -1f; if (SE_Louve.Restant(joueur) > 0f && (Object)(object)PinkVelvetBodysuit.Louve.Effet != (Object)null && !((Character)joueur).GetSEMan().HaveStatusEffect(((StatusEffect)PinkVelvetBodysuit.Louve.Effet).NameHash())) { ((Character)joueur).GetSEMan().AddStatusEffect((StatusEffect)(object)PinkVelvetBodysuit.Louve.Effet, true, 0, 0f, (short)(-1)); } } bool flag = Louve && !((Character)joueur).IsDead(); if (flag != Transforme) { if (flag) { Transformer(); } else { Retransformer(); } } if (Transforme && Time.time >= prochainMasquage) { prochainMasquage = Time.time + 0.25f; MasquerHumain(masquer: true); if ((Object)(object)animHumain != (Object)null && ((Behaviour)animHumain).enabled) { ((Behaviour)animHumain).enabled = false; } } if (Proprietaire && Transforme) { SurveillerLaisse(); } if ((Object)(object)joueur == (Object)(object)Player.m_localPlayer && Transforme && Hurlement.Touche != null && Input.GetKeyDown(Hurlement.Touche.Value) && PrendEntree((Character)(object)joueur)) { Hurler(); } if ((Object)(object)joueur == (Object)(object)Player.m_localPlayer && Transforme) { if (Time.time >= prochainInstinct) { prochainInstinct = Time.time + 0.5f; Instinct(); } } else if (surlignes.Count > 0) { EteindreInstinct(); } } private void LateUpdate() { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) if (Transforme) { PoseHurlement(); } if (!Transforme) { if ((Object)(object)corde != (Object)null && corde.activeSelf) { corde.SetActive(false); } return; } Character val = TrouverTenant(); bool flag = (Object)(object)val != (Object)null; if ((Object)(object)collier != (Object)null && collier.activeSelf != flag) { collier.SetActive(flag); } if (!flag) { if ((Object)(object)corde != (Object)null && corde.activeSelf) { corde.SetActive(false); } } else { DessinerCorde(((Object)(object)anneau != (Object)null) ? anneau.position : ((Character)joueur).GetCenterPoint(), PointMain(val)); } } public bool Hurler() { if (!Transforme || !Proprietaire || ((Character)joueur).IsDead() || ((Character)joueur).InAttack() || Time.time < hurlementDebut + hurlementDuree + 0.8f) { return false; } nview.InvokeRPC(ZNetView.Everybody, "LaivyLouve_Hurler", Array.Empty<object>()); return true; } private void RPC_Hurler(long expediteur) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) if (!Transforme) { return; } AudioClip val = Hurlement.Son(); hurlementDebut = Time.time; float num = 1.08f + Random.Range(-0.02f, 0.02f); hurlementDuree = (((Object)(object)val != (Object)null) ? Mathf.Clamp(val.length / num, 2.5f, 6f) : 3f); if (!((Object)(object)val == (Object)null)) { if ((Object)(object)voix == (Object)null) { GameObject val2 = new GameObject("LouveVoix"); val2.transform.SetParent(((Component)this).transform, false); val2.transform.localPosition = new Vector3(0f, 1.4f, 0.7f); voix = val2.AddComponent<AudioSource>(); voix.playOnAwake = false; voix.spatialBlend = 1f; voix.rolloffMode = (AudioRolloffMode)1; voix.minDistance = 8f; voix.maxDistance = 110f; voix.dopplerLevel = 0f; } voix.outputAudioMixerGroup = Hote.GroupeEffets; voix.volume = Mathf.Clamp01(Hurlement.Volume.Value); voix.pitch = num; voix.clip = val; voix.Play(); } } private void PoseHurlement() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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) float num = Time.time - hurlementDebut; if (!(num < 0f) && !(num > hurlementDuree) && !((Object)(object)osTete == (Object)null)) { float num2 = Mathf.SmoothStep(0f, 1f, num / 0.35f) * (1f - Mathf.SmoothStep(0f, 1f, (num - (hurlementDuree - 0.5f)) / 0.5f)); Vector3 right = ((Component)joueur).transform.right; if ((Object)(object)osCou != (Object)null && (Object)(object)osCou != (Object)(object)osTete) { osCou.rotation = Quaternion.AngleAxis(-32f * num2, right) * osCou.rotation; } osTete.rotation = Quaternion.AngleAxis(-30f * num2, right) * osTete.rotation; if ((Object)(object)osMachoire != (Object)null) { osMachoire.rotation = Quaternion.AngleAxis(24f * num2 * (0.75f + 0.25f * Mathf.Sin(num * 5.5f)), right) * osMachoire.rotation; } } } private void Transformer() { if (echecVisuel) { return; } try { GameObject val = (((Object)(object)ZNetScene.instance != (Object)null) ? ZNetScene.instance.GetPrefab("Wolf") : null); Transform val2 = (((Object)(object)val != (Object)null) ? val.transform.Find("Visual") : null); if ((Object)(object)val2 == (Object)null) { echecVisuel = true; Debug.LogWarning((object)("[" + Hote.Nom + "] Modèle du loup introuvable : la louve garde son apparence.")); return; } Visuel = Object.Instantiate<GameObject>(((Component)val2).gameObject, ((Component)this).transform, false); ((Object)Visuel).name = "LouveVisuel"; Collider[] componentsInChildren = Visuel.GetComponentsInChildren<Collider>(true); for (int i = 0; i < componentsInChildren.Length; i++) { Object.Destroy((Object)(object)componentsInChildren[i]); } Rigidbody[] componentsInChildren2 = Visuel.GetComponentsInChildren<Rigidbody>(true); for (int i = 0; i < componentsInChildren2.Length; i++) { Object.Destroy((Object)(object)componentsInChildren2[i]); } animLouve = Visuel.GetComponentInChildren<Animator>(true); evtLouve = (((Object)(object)animLouve != (Object)null) ? ((Component)animLouve).GetComponent<CharacterAnimEvent>() : null); if ((Object)(object)animLouve == (Object)null) { Object.Destroy((Object)(object)Visuel); echecVisuel = true; return; } animLouve.logWarnings = false; animLouve.cullingMode = (AnimatorCullingMode)0; animHumain = AnimPerso.Invoke((Character)(object)joueur); evtHumain = EvtPerso.Invoke((Character)(object)joueur); AnimPerso.Invoke((Character)(object)joueur) = animLouve; if ((Object)(object)evtLouve != (Object)null) { EvtPerso.Invoke((Character)(object)joueur) = evtLouve; } if ((Object)(object)zanim != (Object)null) { AnimSync.Invoke(zanim) = animLouve; } if ((Object)(object)animHumain != (Object)null) { ((Behaviour)animHumain).enabled = false; } if ((Object)(object)evtHumain != (Object)null) { ((Behaviour)evtHumain).enabled = false; } MasquerHumain(masquer: true); ConstruireCollier(); ConstruireMeche(); Transform[] componentsInChildren3 = Visuel.GetComponentsInChildren<Transform>(true); osCou = ((IEnumerable<Transform>)componentsInChildren3).FirstOrDefault((Func<Transform, bool>)((Transform t) => ((Object)t).name.IndexOf("neck", StringComparison.OrdinalIgnoreCase) >= 0)); osTete = ((IEnumerable<Transform>)componentsInChildren3).FirstOrDefault((Func<Transform, bool>)((Transform t) => ((Object)t).name.IndexOf("head", StringComparison.OrdinalIgnoreCase) >= 0)); osMachoire = ((IEnumerable<Transform>)componentsInChildren3).FirstOrDefault((Func<Transform, bool>)((Transform t) => ((Object)t).name.IndexOf("jaw", StringComparison.OrdinalIgnoreCase) >= 0)); Transforme = true; } catch (Exception arg) { echecVisuel = true; Debug.LogError((object)$"[{Hote.Nom}] Transformation en louve impossible : {arg}"); Retransformer(); } } private void Retransformer() { if ((Object)(object)animHumain != (Object)null) { AnimPerso.Invoke((Character)(object)joueur) = animHumain; if ((Object)(object)zanim != (Object)null) { AnimSync.Invoke(zanim) = animHumain; } ((Behaviour)animHumain).enabled = true; } if ((Object)(object)evtHumain != (Object)null) { EvtPerso.Invoke((Character)(object)joueur) = evtHumain; ((Behaviour)evtHumain).enabled = true; } MasquerHumain(masquer: false); if ((Object)(object)Visuel != (Object)null) { Object.Destroy((Object)(object)Visuel); } Visuel = null; collier = null; anneau = null; osCou = (osTete = (osMachoire = null)); hurlementDebut = -99f; if ((Object)(object)voix != (Object)null) { voix.Stop(); } animLouve = null; evtLouve = null; if ((Object)(object)corde != (Object)null) { corde.SetActive(false); } EteindreInstinct(); Transforme = false; } private void MasquerHumain(bool masquer) { GameObject visual = ((Character)joueur).GetVisual(); if ((Object)(object)visual == (Object)null) { return; } Renderer[] componentsInChildren = visual.GetComponentsInChildren<Renderer>(true); foreach (Renderer val in componentsInChildren) { if (val.forceRenderingOff != masquer) { val.forceRenderingOff = masquer; } } } private void ConstruireCollier() { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_056c: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_06c4: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) Transform val = ((IEnumerable<Transform>)Visuel.GetComponentsInChildren<Transform>(true)).FirstOrDefault((Func<Transform, bool>)((Transform t) => ((Object)t).name.IndexOf("neck", StringComparison.OrdinalIgnoreCase) >= 0)); Transform val2 = ((IEnumerable<Transform>)Visuel.GetComponentsInChildren<Transform>(true)).FirstOrDefault((Func<Transform, bool>)((Transform t) => ((Object)t).name.IndexOf("head", StringComparison.OrdinalIgnoreCase) >= 0)); if ((Object)(object)val == (Object)null && (Object)(object)val2 != (Object)null) { val = val2.parent; } SkinnedMeshRenderer val3 = (from r in Visuel.GetComponentsInChildren<SkinnedMeshRenderer>(true) orderby ((Object)(object)r.sharedMesh != (Object)null) ? r.sharedMesh.vertexCount : 0 descending select r).FirstOrDefault(); Material[] array = PinkVelvetBodysuit.Louve.MateriauxCollier(); if ((Object)(object)val == (Object)null || (Object)(object)val3 == (Object)null || array == null) { return; } Vector3 position = val.position; Vector3 val4 = (((Object)(object)val2 != (Object)null && (Object)(object)val2 != (Object)(object)val) ? (val2.position - position) : val.TransformDirection(Vector3.up)); float num = Mathf.Max(0.05f, ((Vector3)(ref val4)).magnitude); Vector3 normalized = ((Vector3)(ref val4)).normalized; Vector3 val5 = position + normalized * (num * 0.35f); Vector3[] array2 = PointsMonde(val3); Vector3 val6 = Vector3.ProjectOnPlane(Vector3.down, normalized); Vector3 bas = ((Vector3)(ref val6)).normalized; if (((Vector3)(ref bas)).sqrMagnitude < 0.5f) { val6 = Vector3.ProjectOnPlane(Vector3.forward, normalized); bas = ((Vector3)(ref val6)).normalized; } val6 = Vector3.Cross(normalized, bas); Vector3 cote = ((Vector3)(ref val6)).normalized; int indexCou = Array.IndexOf(val3.bones, val); BoneWeight[] poids = (val3.sharedMesh.isReadable ? val3.sharedMesh.boneWeights : null); bool parPoids = indexCou >= 0 && poids != null && poids.Length == array2.Length; List<Vector3> list = Radiaux(array2, val5, normalized, (int i) => parPoids && ((BoneWeight)(ref poids[i])).boneIndex0 == indexCou && ((BoneWeight)(ref poids[i])).weight0 >= 0.5f, num * 0.5f); if (list.Count < 8) { list = Radiaux(array2, val5, normalized, (int i) => true, Mathf.Clamp(num * 0.3f, 0.04f, 0.08f)); } float num2 = 0.115f; float num3 = 0.1f; if (list.Count >= 8) { float mediane = Centile(list.Select((Vector3 r) => ((Vector3)(ref r)).magnitude).ToList(), 0.5f); List<Vector3> source = list.Where((Vector3 r) => ((Vector3)(ref r)).magnitude < mediane * 1.4f).ToList(); num2 = Centile(source.Select((Vector3 r) => Mathf.Abs(Vector3.Dot(r, bas))).ToList(), 0.95f); num3 = Centile(source.Select((Vector3 r) => Mathf.Abs(Vector3.Dot(r, cote))).ToList(), 0.95f); } num2 = Mathf.Clamp(num2, 0.04f, 0.26f) + 0.018f; num3 = Mathf.Clamp(num3, 0.04f, 0.26f) + 0.018f; Debug.Log((object)$"[{Hote.Nom}] Collier de louve : os {((Object)val).name}, {list.Count} sommets mesurés, rayons {num2:0.000} x {num3:0.000} m"); Maillage maillage = new Maillage(); List<Vector3> list2 = new List<Vector3>(); for (int num4 = 0; num4 <= 36; num4++) { float num5 = MathF.PI * 2f * (float)num4 / 36f; list2.Add(val5 + bas * (Mathf.Cos(num5) * num2) + cote * (Mathf.Sin(num5) * num3)); } Vector3[] array3 = (Vector3[])(object)new Vector3[list2.Count]; Vector3[] array4 = (Vector3[])(object)new Vector3[list2.Count]; for (int num6 = 0; num6 < list2.Count; num6++) { val6 = list2[Mathf.Min(list2.Count - 1, num6 + 1)] - list2[Mathf.Max(0, num6 - 1)]; Vector3 normalized2 = ((Vector3)(ref val6)).normalized; val6 = list2[num6] - val5; Vector3 val7 = (array4[num6] = ((Vector3)(ref val6)).normalized); int num7 = num6; val6 = Vector3.Cross(val7, normalized2); array3[num7] = ((Vector3)(ref val6)).normalized; } float num8 = Mathf.Clamp(Mathf.Max(num2, num3) * 0.42f, 0.02f, 0.05f); maillage.Tube(0, list2, array3, array4, Enumerable.Repeat(num8 * 0.5f, list2.Count).ToArray(), Enumerable.Repeat(0.008f, list2.Count).ToArray(), 12, 4f, fermerDebut: false, fermerFin: false); Vector3 val8 = val5 + bas * (num2 + 0.006f); List<Vector3> list3 = new List<Vector3>(); float num9 = Mathf.Clamp(num8 * 0.45f, 0.012f, 0.02f); Vector3 val9 = val8 + bas * num9; for (int num10 = 0; num10 <= 24; num10++) { float num11 = MathF.PI * 2f * (float)num10 / 24f; list3.Add(val9 + bas * (Mathf.Cos(num11) * num9) + normalized * (Mathf.Sin(num11) * num9)); } Maillage.Reperes(list3, cote, out var droites, out var hauts); float[] array5 = Enumerable.Repeat(0.0028f, list3.Count).ToArray(); maillage.Tube(1, list3, droites, hauts, array5, array5, 10, 2f, fermerDebut: false, fermerFin: false); Vector3 val10 = val9 + bas * (num9 + 0.02f); maillage.Disque(1, val10 - cote * 0.0015f, bas, normalized, 0.016f, 20); maillage.Disque(1, val10 + cote * 0.0015f, normalized, bas, 0.016f, 20); Mesh val11 = maillage.Creer("Louve_Collier"); Vector3[] vertices = val11.vertices; Vector3[] normals = val11.normals; for (int num12 = 0; num12 < vertices.Length; num12++) { vertices[num12] = val.InverseTransformPoint(vertices[num12]); int num13 = num12; val6 = val.InverseTransformDirection(normals[num12]); normals[num13] = ((Vector3)(ref val6)).normalized; } val11.vertices = vertices; val11.normals = normals; val11.RecalculateBounds(); val11.RecalculateTangents(); collier = Outils3D.Objet("Louve_Collier", val11, array, val); collier.layer = Visuel.layer; anneau = new GameObject("Louve_Anneau").transform; anneau.SetParent(val, false); anneau.position = val9 + bas * num9; collier.SetActive(false); } private void ConstruireMeche() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) try { Transform val = ((IEnumerable<Transform>)Visuel.GetComponentsInChildren<Transform>(true)).FirstOrDefault((Func<Transform, bool>)((Transform t) => ((Object)t).name.IndexOf("head", StringComparison.OrdinalIgnoreCase) >= 0)); SkinnedMeshRenderer val2 = (from r in Visuel.GetComponentsInChildren<SkinnedMeshRenderer>(true) orderby ((Object)(object)r.sharedMesh != (Object)null) ? r.sharedMesh.vertexCount : 0 descending select r).FirstOrDefault(); if ((Object)(object)val != (Object)null && (Object)(object)val2 != (Object)null) { Meche.Construire(val2, PointsMonde(val2), val, ((Component)joueur).transform.forward, Visuel.layer); } } catch (Exception ex) { Debug.LogWarning((object)("[" + Hote.Nom + "] Mèche de la louve impossible : " + ex.Message)); } } private static Vector3[] PointsMonde(SkinnedMeshRenderer peau) { //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) Mesh sharedMesh = peau.sharedMesh; Transform[] bones = peau.bones; if (sharedMesh.isReadable && bones != null && bones.Length != 0) { Vector3[] vertices = sharedMesh.vertices; BoneWeight[] boneWeights = sharedMesh.boneWeights; Matrix4x4[] bindposes = sharedMesh.bindposes; if (boneWeights.Length == vertices.Length && bindposes.Length == bones.Length) { Matrix4x4[] array = (Matrix4x4[])(object)new Matrix4x4[bones.Length]; for (int i = 0; i < bones.Length; i++) { array[i] = (((Object)(object)bones[i] != (Object)null) ? (bones[i].localToWorldMatrix * bindposes[i]) : Matrix4x4.zero); } Vector3[] array2 = (Vector3[])(object)new Vector3[vertices.Length]; for (int j = 0; j < vertices.Length; j++) { BoneWeight val = boneWeights[j]; array2[j] = ((Matrix4x4)(ref array[((BoneWeight)(ref val)).boneIndex0])).MultiplyPoint3x4(vertices[j]) * ((BoneWeight)(ref val)).weight0 + ((Matrix4x4)(ref array[((BoneWeight)(ref val)).boneIndex1])).MultiplyPoint3x4(vertices[j]) * ((BoneWeight)(ref val)).weight1 + ((Matrix4x4)(ref array[((BoneWeight)(ref val)).boneIndex2])).MultiplyPoint3x4(vertices[j]) * ((BoneWeight)(ref val)).weight2 + ((Matrix4x4)(ref array[((BoneWeight)(ref val)).boneIndex3])).MultiplyPoint3x4(vertices[j]) * ((BoneWeight)(ref val)).weight3; } return array2; } } Mesh val2 = new Mesh(); peau.BakeMesh(val2); Vector3[] vertices2 = val2.vertices; Object.Destroy((Object)(object)val2); Matrix4x4 avecEchelle = ((Component)peau).transform.localToWorldMatrix; Matrix4x4 sansEchelle = Matrix4x4.TRS(((Component)peau).transform.position, ((Component)peau).transform.rotation, Vector3.one); Vector3[] array3 = vertices2.Select((Vector3 p) => ((Matrix4x4)(ref avecEchelle)).MultiplyPoint3x4(p)).ToArray(); Vector3[] array4 = vertices2.Select((Vector3 p) => ((Matrix4x4)(ref sansEchelle)).MultiplyPoint3x4(p)).ToArray(); Bounds val3 = Boite(array3); Vector3 size = ((Bounds)(ref val3)).size; float magnitude = ((Vector3)(ref size)).magnitude; val3 = ((Renderer)peau).bounds; size = ((Bounds)(ref val3)).size; float num = Mathf.Abs(magnitude - ((Vector3)(ref size)).magnitude); val3 = Boite(array4); size = ((Bounds)(ref val3)).size; float magnitude2 = ((Vector3)(ref size)).magnitude; val3 = ((Renderer)peau).bounds; size = ((Bounds)(ref val3)).size; float num2 = Mathf.Abs(magnitude2 - ((Vector3)(ref size)).magnitude); if (!(num <= num2)) { return array4; } return array3; } private static List<Vector3> Radiaux(Vector3[] sommets, Vector3 centre, Vector3 axe, Func<int, bool> retenu, float demiLongueur) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) List<Vector3> list = new List<Vector3>(); for (int i = 0; i < sommets.Length; i++) { if (!retenu(i)) { continue; } Vector3 val = sommets[i] - centre; float num = Vector3.Dot(val, axe); if (!(Mathf.Abs(num) > demiLongueur)) { Vector3 item = val - axe * num; if (((Vector3)(ref item)).magnitude < 0.3f) { list.Add(item); } } } return list; } private static float Centile(List<float> valeurs, float q) { if (valeurs.Count == 0) { return 0f; } valeurs.Sort(); return valeurs[Mathf.Clamp(Mathf.RoundToInt(q * (float)(valeurs.Count - 1)), 0, valeurs.Count - 1)]; } private static Bounds Boite(Vector3[] points) { //IL_000f: 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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) Bounds result = default(Bounds); ((Bounds)(ref result))..ctor((points.Length != 0) ? points[0] : Vector3.zero, Vector3.zero); foreach (Vector3 val in points) { ((Bounds)(ref result)).Encapsulate(val); } return result; } public Character TrouverTenant() { //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_0024: Unknown result type (might be due to invalid IL or missing references) ZDOID tenant = Tenant; if (((ZDOID)(ref tenant)).IsNone() || (Object)(object)ZNetScene.instance == (Object)null) { return null; } GameObject val = ZNetScene.instance.FindInstance(tenant); Character val2 = (((Object)(object)val != (Object)null) ? val.GetComponent<Character>() : null); if (!((Object)(object)val2 != (Object)null) || val2.IsDead()) { return null; } return val2; } private static Vector3 PointMain(Character tenant) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) Player val = (Player)(object)((tenant is Player) ? tenant : null); if (val != null) { LouveJoueur louveJoueur = PinkVelvetBodysuit.Louve.Etat((Character)(object)val); VisEquipment component = ((Component)val).GetComponent<VisEquipment>(); if (((Object)(object)louveJoueur == (Object)null || !louveJoueur.Transforme) && (Object)(object)component != (Object)null && (Object)(object)component.m_rightHand != (Object)null) { return component.m_rightHand.position; } } return tenant.GetCenterPoint(); } private void RPC_Laisse(long expediteur, ZDOID tenant) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) if (Proprietaire && Louve) { ZDOID tenant2 = Tenant; GameObject val = (((Object)(object)ZNetScene.instance != (Object)null) ? ZNetScene.instance.FindInstance(tenant) : null); string text = (((Object)(object)val != (Object)null && (Object)(object)val.GetComponent<Player>() != (Object)null) ? val.GetComponent<Player>().GetPlayerName() : Textes.T("quelquun")); if (tenant2 == tenant) { nview.GetZDO().Set("laivy_louve_laisse", ZDOID.None); ((Character)joueur).Message((MessageType)2, Textes.T("laisse_retiree_par", text), 0, (Sprite)null, false); } else if ((Object)(object)val != (Object)null) { nview.GetZDO().Set("laivy_louve_laisse", tenant); ((Character)joueur).Message((MessageType)2, Textes.T("laisse_passee_par", text), 0, (Sprite)null, false); holderAbsentDepuis = 0f; } } } public void AttacherPour(Character tenant) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (Proprietaire && (Object)(object)tenant != (Object)null) { nview.GetZDO().Set("laivy_louve_laisse", tenant.GetZDOID()); } } private void SurveillerLaisse() { //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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) ZDOID tenant = Tenant; if (((ZDOID)(ref tenant)).IsNone()) { return; } Character val = TrouverTenant(); Vector3? val2 = (((Object)(object)val != (Object)null) ? new Vector3?(((Component)val).transform.position) : PositionConnue(tenant)); if (!val2.HasValue) { holderAbsentDepuis += Time.deltaTime; if (holderAbsentDepuis > 10f) { nview.GetZDO().Set("laivy_louve_laisse", ZDOID.None); } return; } holderAbsentDepuis = 0f; float num = Vector3.Distance(val2.Value, ((Component)joueur).transform.position); float num2 = Mathf.Max(1f, PinkVelvetBodysuit.Louve.LongueurLaisse.Value); if (num > 25f) { if (Time.time >= prochaineTeleportation && !((Character)joueur).IsTeleporting()) { prochaineTeleportation = Time.time + 6f; Vector3 val3 = ((Component)joueur).transform.position - val2.Value; val3.y = 0f; Vector3 val4 = val2.Value + ((((Vector3)(ref val3)).sqrMagnitude > 0.01f) ? ((Vector3)(ref val3)).normalized : Vector3.back) * 2f; ((Character)joueur).TeleportTo(val4, ((Component)joueur).transform.rotation, num > 60f); ((Character)joueur).Message((MessageType)2, Textes.T("laisse_entraine"), 0, (Sprite)null, false); } } else if ((Object)(object)val != (Object)null && num > num2 + 6f && !((Character)joueur).IsAttached()) { Vector3 val5 = ((Component)joueur).transform.position - ((Component)val).transform.position; val5.y = 0f; Vector3 val6 = ((Component)val).transform.position + ((Vector3)(ref val5)).normalized * (num2 + 0.5f); val6.y = Mathf.Max(val6.y, ((Component)val).transform.position.y); Rigidbody component = ((Component)joueur).GetComponent<Rigidbody>(); if ((Object)(object)component != (Object)null) { component.position = val6; } ((Component)joueur).transform.position = val6; } } private static Vector3? PositionConnue(ZDOID id) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) ZDO val = ((ZDOMan.instance != null) ? ZDOMan.instance.GetZDO(id) : null); if (val != null) { return val.GetPosition(); } if ((Object)(object)ZNet.instance == (Object)null) { return null; } foreach (PlayerInfo player in ZNet.instance.GetPlayerList()) { if (player.m_characterID == id && player.m_publicPosition) { return player.m_position; } } return null; } public void Mener(Vector3 voulu) { //IL_0028: 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_003d: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) if (!Transforme || !Proprietaire) { return; } Character val = TrouverTenant(); if (!((Object)(object)val == (Object)null)) { Vector3 val2 = ((Component)val).transform.position - ((Component)joueur).transform.position; val2.y = 0f; float magnitude = ((Vector3)(ref val2)).magnitude; Direction.Invoke((Character)(object)joueur) = ((magnitude > 1.8f) ? (val2 / magnitude) : Vector3.zero); Course.Invoke((Character)(object)joueur) = magnitude > 3.2f; Marche.Invoke((Character)(object)joueur) = false; joueur.m_autoRun = false; if (((Vector3)(ref voulu)).sqrMagnitude > 0.1f && Time.time >= prochainRappel) { prochainRappel = Time.time + 6f; Player val3 = (Player)(object)((val is Player) ? val : null); string text = ((val3 != null) ? val3.GetPlayerName() : Textes.T("ton_maitre")); ((Character)joueur).Message((MessageType)1, Textes.T("laisse_mene", text), 0, (Sprite)null, false); } } } public void TirerLaisse(ref Vector3 vitesse) { //IL_002d: 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_003d: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) if (!Transforme || !Proprietaire) { return; } Character val = TrouverTenant(); if ((Object)(object)val == (Object)null) { return; } Vector3 val2 = ((Component)joueur).transform.position - ((Component)val).transform.position; val2.y = 0f; float magnitude = ((Vector3)(ref val2)).magnitude; float num = Mathf.Max(1f, PinkVelvetBodysuit.Louve.LongueurLaisse.Value); if (!(magnitude <= num) && !(magnitude < 0.01f)) { Vector3 val3 = val2 / magnitude; float num2 = Vector3.Dot(vitesse, val3); if (num2 > 0f) { vitesse -= val3 * num2; } vitesse -= val3 * Mathf.Min(9f, (magnitude - num) * 4f); } } private void DessinerCorde(Vector3 a, Vector3 b) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) Material val = PinkVelvetBodysuit.Louve.MateriauCorde(); if ((Object)(object)val == (Object)null) { return; } if ((Object)(object)corde == (Object)null) { corde = new GameObject("Louve_Laisse"); maillageCorde = new Mesh { name = "Louve_Laisse" }; maillageCorde.MarkDynamic(); corde.AddComponent<MeshFilter>().sharedMesh = maillageCorde; ((Renderer)corde.AddComponent<MeshRenderer>()).sharedMaterial = val; } if (!corde.activeSelf) { corde.SetActive(true); } float num = Vector3.Distance(a, b); float num2 = Mathf.Max(1f, PinkVelvetBodysuit.Louve.LongueurLaisse.Value) + 0.4f; float num3 = Mathf.Sqrt(Mathf.Max(0f, num2 * num2 - num * num)) * 0.45f + 0.015f; Vector3[] array = (Vector3[])(object)new Vector3[18]; for (int i = 0; i < 18; i++) { float num4 = (float)i / 17f; array[i] = Vector3.Lerp(a, b, num4) + Vector3.down * (num3 * 4f * num4 * (1f - num4)); } corde.transform.position = a; corde.transform.rotation = Quaternion.identity; Vector3[] array2 = (Vector3[])(object)new Vector3[126]; Vector3[] array3 = (Vector3[])(object)new Vector3[array2.Length]; for (int j = 0; j < 18; j++) { Vector3 val2 = array[Mathf.Min(17, j + 1)] - array[Mathf.Max(0, j - 1)]; Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = Vector3.Cross(Vector3.up, normalized); if (((Vector3)(ref val3)).sqrMagnitude < 1E-06f) { val3 = Vector3.right; } ((Vector3)(ref val3)).Normalize(); Vector3 val4 = Vector3.Cross(normalized, val3); for (int k = 0; k <= 6; k++) { float num5 = MathF.PI * 2f * (float)k / 6f; Vector3 val5 = val3 * Mathf.Cos(num5) + val4 * Mathf.Sin(num5); array2[j * 7 + k] = array[j] - a + val5 * 0.009f; array3[j * 7 + k] = val5; } } if (maillageCorde.vertexCount != array2.Length) { maillageCorde.Clear(); maillageCorde.vertices = array2; List<int> list = new List<int>(); for (int l = 0; l < 17; l++) { for (int m = 0; m < 6; m++) { int num6 = l * 7 + m; int num7 = num6 + 6 + 1; list.AddRange(new int[6] { num6, num6 + 1, num7, num6 + 1, num7 + 1, num7 }); } } maillageCorde.triangles = list.ToArray(); } else { maillageCorde.vertices = array2; } maillageCorde.normals = array3; maillageCorde.RecalculateBounds(); } public bool Interact(Humanoid user, bool hold, bool alt) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) if (!hold && Louve) { Player val = (Player)(object)((user is Player) ? user : null); if (val != null && !((Object)(object)val == (Object)(object)joueur) && !((Object)(object)val != (Object)(object)Player.m_localPlayer)) { if (PinkVelvetBodysuit.Louve.EstLouve((Character)(object)val)) { ((Character)val).Message((MessageType)2, Textes.T("louve_sans_laisse"), 0, (Sprite)null, false); return false; } ZDOID zDOID = ((Character)val).GetZDOID(); bool flag = Tenant == zDOID; nview.InvokeRPC("LaivyLouve_Laisse", new object[1] { zDOID }); ((Character)val).Message((MessageType)2, Textes.T(flag ? "tu_retires_laisse" : "tu_passes_laisse", joueur.GetPlayerName()), 0, (Sprite)null, false); return true; } }