public static List <ItemEntity> GetInteraction(this LootWrapper present) { if (present.InteractionLoot != null) { return(present.InteractionLoot.Loot.Items); } if (present.Unit != null) { return(present.Unit.Inventory.Items); } return(null); }
public static List <ItemEntity> GetLewtz(this LootWrapper present, string searchText = "") { if (present.InteractionLoot != null) { return(present.InteractionLoot.Loot.Items.Search(searchText).ToList()); } if (present.Unit != null) { return(present.Unit.Inventory.Items.Search(searchText).ToList()); } return(null); }
public static string GetName(this LootWrapper present) { if (present.InteractionLoot != null) { // var name = present.InteractionLoot.Owner.View.name; var name = present.InteractionLoot.Source.name; if (name == null || name.Length == 0) { name = "Ground"; } return(name); } if (present.Unit != null) { return(present.Unit.CharacterName); } return(null); }