mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-04 10:58:38 +00:00
Implement user heart count
This commit is contained in:
parent
c7f4cd668a
commit
c98094cf38
1 changed files with 10 additions and 1 deletions
|
@ -62,6 +62,14 @@ namespace LBPUnion.ProjectLighthouse.Types
|
||||||
|
|
||||||
public string PlanetHash { get; set; } = "";
|
public string PlanetHash { get; set; } = "";
|
||||||
|
|
||||||
|
public int Hearts {
|
||||||
|
get {
|
||||||
|
using Database database = new();
|
||||||
|
|
||||||
|
return database.HeartedProfiles.Count(s => s.HeartedUserId == this.UserId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string Serialize()
|
public string Serialize()
|
||||||
{
|
{
|
||||||
string user = LbpSerializer.TaggedStringElement("npHandle", this.Username, "icon", this.IconHash) +
|
string user = LbpSerializer.TaggedStringElement("npHandle", this.Username, "icon", this.IconHash) +
|
||||||
|
@ -88,6 +96,7 @@ namespace LBPUnion.ProjectLighthouse.Types
|
||||||
LbpSerializer.StringElement("staffChallengeBronzeCount", this.StaffChallengeBronzeCount) +
|
LbpSerializer.StringElement("staffChallengeBronzeCount", this.StaffChallengeBronzeCount) +
|
||||||
LbpSerializer.StringElement("planets", this.PlanetHash) +
|
LbpSerializer.StringElement("planets", this.PlanetHash) +
|
||||||
LbpSerializer.BlankElement("photos") +
|
LbpSerializer.BlankElement("photos") +
|
||||||
|
LbpSerializer.StringElement("heartCount", Hearts);
|
||||||
this.ClientsConnected.Serialize();
|
this.ClientsConnected.Serialize();
|
||||||
|
|
||||||
return LbpSerializer.TaggedStringElement("user", user, "type", "user");
|
return LbpSerializer.TaggedStringElement("user", user, "type", "user");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue