Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Maple2.Model/Game/User/Home.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public void GainExp(long exp, IReadOnlyDictionary<int, MasteryUgcHousingTable.En
DecorationLevel++;
}

DecorationRewardTimestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
DecorationExp += exp;
}

Expand Down
5 changes: 5 additions & 0 deletions Maple2.Server.Game/Manager/HousingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ public void InitNewHome(string characterName, ExportedUgcMapMetadata? template)
public void InteriorCheckIn(Plot plot) {
if (session.Field is null) return;

if (Home.DecorationRewardTimestamp != 0) {
return;
}

Dictionary<HousingCategory, int> decorationCurrent = plot.Cubes.Values
.Where(plotCube => plotCube.Metadata.Housing != null)
.GroupBy(plotCube => plotCube.Metadata.Housing!.HousingCategory)
Expand Down Expand Up @@ -468,6 +472,7 @@ public void InteriorCheckIn(Plot plot) {
}

Home.GainExp(decorationScore, tableMetadata.MasteryUgcHousingTable.Entries);
Home.DecorationRewardTimestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
session.Send(CubePacket.DesignRankReward(Home));
}

Expand Down
Loading