mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-05 11:28:39 +00:00
Fix serialization of plays in slots
This commit is contained in:
parent
81622441be
commit
3bedec5f70
2 changed files with 22 additions and 8 deletions
|
@ -142,4 +142,5 @@
|
|||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unheart/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unpublish/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unpushed/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=yourlbp/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=yourthumb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
@ -306,21 +306,34 @@ public class Slot
|
|||
LbpSerializer.StringElement("commentsEnabled", ServerSettings.Instance.LevelCommentsEnabled) +
|
||||
LbpSerializer.StringElement("reviewCount", this.ReviewCount);
|
||||
|
||||
int yourPlays;
|
||||
int plays;
|
||||
int playsComplete;
|
||||
int playsUnique;
|
||||
|
||||
if (gameVersion == GameVersion.LittleBigPlanetVita)
|
||||
{
|
||||
slotData += LbpSerializer.StringElement("yourlbp2PlayCount", yourVisitedStats?.PlaysLBPVita) +
|
||||
LbpSerializer.StringElement("lbp2PlayCount", this.PlaysLBPVita) +
|
||||
LbpSerializer.StringElement("lbp2CompletionCount", this.PlaysLBPVitaComplete) +
|
||||
LbpSerializer.StringElement("lbp2UniquePlayCount", this.PlaysLBPVitaUnique);
|
||||
yourPlays = yourVisitedStats?.PlaysLBPVita ?? 0;
|
||||
plays = this.PlaysLBPVita;
|
||||
playsComplete = this.PlaysLBPVitaComplete;
|
||||
playsUnique = this.PlaysLBPVitaUnique;
|
||||
}
|
||||
else
|
||||
{
|
||||
slotData += LbpSerializer.StringElement("yourlbp2PlayCount", yourVisitedStats?.PlaysLBP2) +
|
||||
LbpSerializer.StringElement("lbp2PlayCount", this.PlaysLBP2) +
|
||||
LbpSerializer.StringElement("lbp2CompletionCount", this.PlaysLBP2Complete) +
|
||||
LbpSerializer.StringElement("lbp2UniquePlayCount", this.PlaysLBP2Unique); // not actually used ingame, as per above comment
|
||||
yourPlays = yourVisitedStats?.PlaysLBP2 ?? 0;
|
||||
plays = this.PlaysLBP2;
|
||||
playsComplete = this.PlaysLBP2Complete;
|
||||
playsUnique = this.PlaysLBP2Unique;
|
||||
}
|
||||
|
||||
slotData += LbpSerializer.StringElement("yourlbp2PlayCount", yourPlays) +
|
||||
LbpSerializer.StringElement("lbp2PlayCount", plays) +
|
||||
LbpSerializer.StringElement("playCount", plays) +
|
||||
LbpSerializer.StringElement("lbp2CompletionCount", playsComplete) +
|
||||
LbpSerializer.StringElement("completionCount", playsComplete) +
|
||||
LbpSerializer.StringElement("lbp2UniquePlayCount", playsUnique) + // not actually used ingame, as per above comment
|
||||
LbpSerializer.StringElement("uniquePlayCount", playsUnique);
|
||||
|
||||
return LbpSerializer.TaggedStringElement("slot", slotData, "type", "user");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue