示例#1
0
 /// <summary>
 /// Gets a reference to the specified house item in the player's house inventory. This can be used to access other information about the item.
 /// </summary>
 /// <param name="id">The id of the item.</param>
 /// <returns>A reference to the specified house item.</returns>
 public InventoryItem GetHouseItemById(int id) => HouseItems.Find(x => x.ID == id);
示例#2
0
 /// <summary>
 /// Checks whether the player has the specified house item.
 /// </summary>
 /// <param name="item">Name of the house item to check for.</param>
 /// <returns></returns>
 public bool ContainsHouseItem(string item) => HouseItems.Contains(i => i.Name.Equals(item, StringComparison.OrdinalIgnoreCase));
示例#3
0
 /// <summary>
 /// Gets a reference to the specified house item in the player's house inventory. This can be used to access other information about the item.
 /// </summary>
 /// <param name="name">The name of the house item</param>
 /// <returns>A reference to the specified house item.</returns>
 public InventoryItem GetHouseItemByName(string name) => HouseItems.Find(x => x.Name.Equals(name, StringComparison.OrdinalIgnoreCase));