public static List <StaticHouseDescription> GetAllStaticHouseDescriptions() { List <StaticHouseDescription> returnList = new List <StaticHouseDescription>(); try { foreach (DictionaryEntry de in m_BlueprintList) { HouseBlueprint hb = de.Value as HouseBlueprint; if (hb != null) { try { string id = hb.ID; // element["id"].InnerText; string desc = hb.Description; // element["Description"].InnerText; desc += " by "; desc += hb.OriginalOwnerName; // element["OriginalOwnerName"].InnerText; int price = hb.Price; StaticHouseDescription shd = new StaticHouseDescription(id, desc, price); returnList.Add(shd); } catch (Exception e) { Server.Commands.LogHelper.LogException(e, "Possible bad element in static house xml: element[id]."); } } } } catch (Exception e) { Server.Commands.LogHelper.LogException(e, "Botched Static Housing xml."); } return(returnList); }
public static List<StaticHouseDescription> GetAllStaticHouseDescriptions() { List<StaticHouseDescription> returnList = new List<StaticHouseDescription>(); try { foreach (DictionaryEntry de in m_BlueprintList) { HouseBlueprint hb = de.Value as HouseBlueprint; if (hb != null) { try { string id = hb.ID; // element["id"].InnerText; string desc = hb.Description; // element["Description"].InnerText; desc += " by "; desc += hb.OriginalOwnerName; // element["OriginalOwnerName"].InnerText; int price = hb.Price; StaticHouseDescription shd = new StaticHouseDescription(id, desc, price); returnList.Add(shd); } catch (Exception e) { Scripts.Commands.LogHelper.LogException(e, "Possible bad element in static house xml: element[id]."); } } } } catch (Exception e) { Scripts.Commands.LogHelper.LogException(e, "Botched Static Housing xml."); } return returnList; }