public TagCompound Serialize(Affix affix) { UnloadedAffix unloadedAffix = affix as UnloadedAffix; if (unloadedAffix == null) { return(TagSerializables.Serialize(affix)); } else { TagCompound tag = new TagCompound(); tag["type"] = unloadedAffix.typeName; if (unloadedAffix.tag != null) { tag["data"] = unloadedAffix.tag; } return(tag); } }
public void RemoveAffix(Item item, Affix affix) { affixes.Remove(affix); }
public static void RemoveAffix(this Item item, Affix affix) { item.GetAffixInfo()?.RemoveAffix(item, affix); }
public void ApplyAffix(Item item, Affix affix) { affixes.Add(affix); }
public static void ApplyAffix(this Item item, Affix affix) { item.GetAffixInfo()?.ApplyAffix(item, affix); }