Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 595f858

Browse files
committed
Add support for clan capital
- Clan capital data for clan - Clan capital data for player
1 parent 256ebe4 commit 595f858

6 files changed

Lines changed: 42 additions & 1 deletion

File tree

build/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Patch: Backwards compatible bug fixes only
77
# -Suffix (optional): a hyphen followed by a string denoting a pre-release version (rc1, rc2, etc.)
88

9-
8.4.2-rc4
9+
8.4.2-rc5

src/ClashOfClans.Models/Clan.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public class Clan : Identity
4545

4646
public int RequiredTownhallLevel { get => _requiredTownhallLevel ?? default; set => _requiredTownhallLevel = value; }
4747

48+
public ClanCapital? ClanCapital { get; set; }
49+
4850
public WarFrequency WarFrequency { get => _warFrequency ?? default; set => _warFrequency = value; }
4951

5052
public Language? ChatLanguage { get; set; }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace ClashOfClans.Models
2+
{
3+
public class ClanCapital
4+
{
5+
private int? _capitalHallLevel;
6+
7+
public int CapitalHallLevel { get => _capitalHallLevel ?? default; set => _capitalHallLevel = value; }
8+
9+
public ClanDistrictDataList Districts { get; set; } = default!;
10+
}
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
namespace ClashOfClans.Models
2+
{
3+
public class ClanDistrictData
4+
{
5+
private int? _id;
6+
private int? _districtHallLevel;
7+
8+
public int Id { get => _id ?? default; set => _id = value; }
9+
10+
public string Name { get; set; } = default!;
11+
12+
public int DistrictHallLevel { get => _districtHallLevel ?? default; set => _districtHallLevel = value; }
13+
}
14+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System.Collections.Generic;
2+
3+
namespace ClashOfClans.Models
4+
{
5+
public class ClanDistrictDataList : List<ClanDistrictData>
6+
{
7+
}
8+
}

src/ClashOfClans.Models/Player.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class Player : Identity
1414
private int? _versusBattleWins;
1515
private int? _donations;
1616
private int? _donationsReceived;
17+
private int? _clanCapitalContributions;
1718
private int? _versusBattleWinCount;
1819

1920
public int TownHallLevel { get => _townHallLevel ?? default; set => _townHallLevel = value; }
@@ -69,6 +70,11 @@ public class Player : Identity
6970
/// </summary>
7071
public int DonationsReceived { get => _donationsReceived ?? default; set => _donationsReceived = value; }
7172

73+
/// <summary>
74+
/// Total capital contribution
75+
/// </summary>
76+
public int ClanCapitalContributions { get => _clanCapitalContributions ?? default; set => _clanCapitalContributions = value; }
77+
7278
public PlayerClan? Clan { get; set; }
7379

7480
public League? League { get; set; }

0 commit comments

Comments
 (0)