public static StatusEffect_Extended ExtendedStatusEffect(this StatusEffect __instance, bool create = false) { var key = __instance.GetInstanceID().ToString(); if (key == null) { return(null); } var ext = mapping.ContainsKey(key) ? mapping[key] : null; if (ext == null && create) { mapping[key] = ext = new StatusEffect_Extended(); RunicPower.Debug("ExtendedStatusEffect: " + mapping.Count); } return(ext); }
public static void SetRuneByKey(string key, RuneData data) { if (key == null) { return; } var ext = mapping.ContainsKey(key) ? mapping[key] : null; if (ext == null) { mapping[key] = ext = new ItemDropData_Extended(); if (!key.Contains("(Clone)")) { mapping[key + "(Clone)"] = ext; } RunicPower.Debug("ExtendedItemDrop: " + mapping.Count); } ext.rune = data; }