コード例 #1
0
ファイル: LootHelper.cs プロジェクト: cabarius/ToyBox
 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);
 }
コード例 #2
0
ファイル: LootHelper.cs プロジェクト: cabarius/ToyBox
 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);
 }
コード例 #3
0
ファイル: LootHelper.cs プロジェクト: cabarius/ToyBox
 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);
 }