mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-04 02:58:37 +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 int Hearts {
|
||||
get {
|
||||
using Database database = new();
|
||||
|
||||
return database.HeartedProfiles.Count(s => s.HeartedUserId == this.UserId);
|
||||
}
|
||||
}
|
||||
|
||||
public string Serialize()
|
||||
{
|
||||
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("planets", this.PlanetHash) +
|
||||
LbpSerializer.BlankElement("photos") +
|
||||
LbpSerializer.StringElement("heartCount", Hearts);
|
||||
this.ClientsConnected.Serialize();
|
||||
|
||||
return LbpSerializer.TaggedStringElement("user", user, "type", "user");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue