// Token: 0x06000018 RID: 24 RVA: 0x000025D0 File Offset: 0x000007D0 public static StatusEffect MakeStatusEffectPrefab(string effectName, string familyName, string description, float lifespan, float refreshRate, StatusEffectFamily.StackBehaviors stackBehavior, string targetStatusName, bool isMalusEffect, string tagID = null, UID?uid = null, string modGUID = null) { Dictionary <string, StatusEffect> dictionary = At.GetValue(typeof(ResourcesPrefabManager), null, "STATUSEFFECT_PREFABS") as Dictionary <string, StatusEffect>; StatusEffectFamily statusEffectFamily = TinyEffectManager.MakeStatusEffectFamiliy(familyName, stackBehavior, -1, StatusEffectFamily.LengthTypes.Short, null, null); GameObject gameObject = TinyEffectManager.InstantiateClone(dictionary[targetStatusName].gameObject, effectName, false, true); StatusEffect statusEffect = dictionary[effectName] = (gameObject.GetComponent <StatusEffect>() ?? gameObject.AddComponent <StatusEffect>()); At.SetValue <string>(effectName, typeof(StatusEffect), statusEffect, "m_identifierName"); At.SetValue <StatusEffectFamily>(statusEffectFamily, typeof(StatusEffect), statusEffect, "m_bindFamily"); At.SetValue <string>(effectName, typeof(StatusEffect), statusEffect, "m_nameLocKey"); At.SetValue <string>(description, typeof(StatusEffect), statusEffect, "m_descriptionLocKey"); statusEffect.RefreshRate = refreshRate; statusEffect.IsMalusEffect = isMalusEffect; At.SetValue <StatusEffect.EffectSignatureModes>(StatusEffect.EffectSignatureModes.Reference, typeof(StatusEffect), statusEffect, "m_effectSignatureMode"); At.SetValue <StatusEffect.FamilyModes>(StatusEffect.FamilyModes.Bind, typeof(StatusEffect), statusEffect, "m_familyMode"); TagSourceSelector value = (tagID != null) ? new TagSourceSelector(TagSourceManager.Instance.GetTag(tagID)) : new TagSourceSelector(); At.SetValue <TagSourceSelector>(value, typeof(StatusEffect), statusEffect, "m_effectType"); StatusData statusData = statusEffect.StatusData = new StatusData(statusEffect.StatusData); statusData.LifeSpan = lifespan; List <StatusData> list = At.GetValue(typeof(StatusEffect), statusEffect, "m_statusStack") as List <StatusData>; list[0] = statusData; UnityEngine.Object.Destroy(gameObject.GetComponentInChildren <EffectSignature>().gameObject); EffectSignature effectSignature = statusEffectFamily.EffectSignature = (statusData.EffectSignature = TinyEffectManager.MakeFreshObject("Signature", true, true, null).AddComponent <EffectSignature>()); effectSignature.name = "Signature"; effectSignature.SignatureUID = (uid ?? ((modGUID != null) ? TinyUIDManager.MakeUID(effectName, modGUID, "Status Effect") : UID.Generate())); StatusEffectFamilySelector statusEffectFamilySelector = new StatusEffectFamilySelector(); statusEffectFamilySelector.Set(statusEffectFamily); At.SetValue <StatusEffectFamilySelector>(statusEffectFamilySelector, typeof(StatusEffect), statusEffect, "m_stackingFamily"); return(statusEffect); }
// Token: 0x06000019 RID: 25 RVA: 0x00002810 File Offset: 0x00000A10 public static StatusEffectFamily MakeStatusEffectFamiliy(string familyName, StatusEffectFamily.StackBehaviors stackBehavior, int maxStackCount, StatusEffectFamily.LengthTypes lengthType, UID?uid = null, string modGUID = null) { StatusEffectFamily statusEffectFamily = new StatusEffectFamily(); uid = new UID?(uid ?? ((modGUID != null) ? TinyUIDManager.MakeUID(familyName, modGUID, "Status Effect Family") : UID.Generate())); At.SetValue <UID>(uid.Value, typeof(StatusEffectFamily), statusEffectFamily, "m_uid"); statusEffectFamily.Name = familyName; statusEffectFamily.StackBehavior = stackBehavior; statusEffectFamily.MaxStackCount = maxStackCount; statusEffectFamily.LengthType = lengthType; return(statusEffectFamily); }