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

Commit 0c91903

Browse files
author
Not Officer
committed
added Motds property
1 parent 29b1c86 commit 0c91903

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/Fortnite-API/Objects/News.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class News : IEquatable<News>
1010
[J("language")] public string Language;
1111
[J("title")] public string Title;
1212
[J("lastModified")] public DateTime LastModified;
13+
[J("motds")] public List<NewsMotd> Motds;
1314
[J("messages")] public List<NewsMessage> Messages;
1415

1516
public bool Equals(News other)
@@ -39,23 +40,17 @@ public override bool Equals(object obj)
3940
return true;
4041
}
4142

42-
if (obj is News news)
43+
if (obj.GetType() != typeof(News))
4344
{
44-
return Equals(news);
45+
return false;
4546
}
4647

47-
return false;
48+
return Equals((News)obj);
4849
}
4950

5051
public override int GetHashCode()
5152
{
52-
unchecked
53-
{
54-
var hashCode = Language.GetHashCode();
55-
hashCode = hashCode * 397 ^ Title.GetHashCode();
56-
hashCode = hashCode * 397 ^ LastModified.GetHashCode();
57-
return hashCode;
58-
}
53+
return HashCode.Combine(Language, Title, LastModified);
5954
}
6055

6156
public static bool operator ==(News left, News right)

0 commit comments

Comments
 (0)