Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit caa6c1f

Browse files
author
Not Officer
committed
added useful properties
1 parent 1ff7442 commit caa6c1f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Fortnite-API/Objects/V2/BrCosmeticV2Images.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ public class BrCosmeticV2Images : IEquatable<BrCosmeticV2Images>
1212
[J] public Uri Featured { get; private set; }
1313
[J] public Dictionary<string, Uri> Other { get; private set; }
1414

15+
public bool HasSmallIcon => SmallIcon != null;
16+
public bool HasIcon => Icon != null;
17+
public bool HasFeatured => Featured != null;
18+
public bool HasOther => Other != null && Other.Count != 0;
19+
public Uri Get(bool useFeatured = true)
20+
{
21+
return useFeatured && HasFeatured ? Featured : Icon ?? SmallIcon;
22+
}
23+
1524
public bool Equals(BrCosmeticV2Images other)
1625
{
1726
if (ReferenceEquals(null, other))

0 commit comments

Comments
 (0)