public IItemSize ParseElement(string data) { var item = ItemBasePreloader.GetItem(data); SizeX = item.Size_X; SizeY = item.Size_Y; return(this); }
public IItemBaseHeader ParseElement(string data) { var headerElements = Regex.Split(data, Environment.NewLine).RemoveEmpty(); Rarity = Regex.Replace(headerElements.First(), "Rarity: ", "").ToRarity(); BaseName = Rarity == ItemRarity.Unique ? headerElements.ToList()[1] : headerElements.Last(); var outItem = ItemBasePreloader.GetItem(BaseName); Class = outItem == null ? ItemClass.None : outItem.Class_ID; return(this); }