// Token: 0x06000020 RID: 32 RVA: 0x00002A90 File Offset: 0x00000C90 public static ImbueEffectPreset MakeImbuePreset(int imbueID, string name, string description, string iconFileName, int visualEffectID, float flatDamage, float scalingDamage, DamageType.Types damageType, string statusEffect, Skill skill, int chanceToContract = 0, int buildUp = 0) { Dictionary <int, EffectPreset> dictionary = (Dictionary <int, EffectPreset>)At.GetValue(typeof(ResourcesPrefabManager), null, "EFFECTPRESET_PREFABS"); bool flag = !dictionary.ContainsKey(imbueID); ImbueEffectPreset result; if (flag) { GameObject gameObject = new GameObject(imbueID.ToString() + "_" + name.Replace(" ", "")); gameObject.SetActive(true); UnityEngine.Object.DontDestroyOnLoad(gameObject); ImbueEffectPreset imbueEffectPreset = gameObject.AddComponent <ImbueEffectPreset>(); imbueEffectPreset.name = imbueID.ToString() + "_" + name.Replace(" ", ""); At.SetValue <int>(imbueID, typeof(EffectPreset), imbueEffectPreset, "m_StatusEffectID"); At.SetValue <string>(name, typeof(ImbueEffectPreset), imbueEffectPreset, "m_imbueNameKey"); At.SetValue <string>(description, typeof(ImbueEffectPreset), imbueEffectPreset, "m_imbueDescKey"); imbueEffectPreset.ImbueStatusIcon = ((ImbueEffectPreset)dictionary[visualEffectID]).ImbueStatusIcon; imbueEffectPreset.ImbueFX = ((ImbueEffectPreset)dictionary[visualEffectID]).ImbueFX; TinyEffectManager.SetNameAndDesc(imbueEffectPreset, name, description); dictionary.Add(imbueID, imbueEffectPreset); GameObject gameObject2 = new GameObject("Effects"); gameObject2.SetActive(true); UnityEngine.Object.DontDestroyOnLoad(gameObject2); gameObject2.transform.SetParent(imbueEffectPreset.transform); bool flag2 = statusEffect != null && chanceToContract > 0; if (flag2) { TinyEffectManager.AddStatusEffectChance(imbueEffectPreset, chanceToContract, statusEffect); } bool flag3 = statusEffect != null && buildUp > 0; if (flag3) { TinyEffectManager.AddStatusEffectBuildUp(imbueEffectPreset, (float)buildUp, statusEffect); } bool flag4 = scalingDamage > 0f || flatDamage > 0f; if (flag4) { TinyEffectManager.AddWeaponDamage(imbueEffectPreset, flatDamage, scalingDamage, damageType); } bool flag5 = skill != null; if (flag5) { skill.GetComponentInChildren <ImbueWeapon>().ImbuedEffect = imbueEffectPreset; } result = imbueEffectPreset; } else { result = null; } return(result); }