feat(stats): zone statistics for quickbuilds and achievements reach the client

Live sent the player ModifyPlayerZoneStatistic(set false, value 1, the
current map) for "QuickBuildsCompleted" (227) after a quickbuild's
EnableRebuild and for "AchievementsCompleted" (186) at the end of an
achievement's completion. DLU counted both server side (they are saved
and shown at the next load) but never told the client, so the zone
summary only caught up after a zone change. The client counts
enemies, coins and bricks itself and sends those to the server.

Check: complete a quickbuild and an achievement, then open the zone
summary (passport / map zone stats) without changing zones: both
counts went up by one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 03:16:39 -05:00
parent 08053a1b01
commit 73fbfa840a
5 changed files with 59 additions and 0 deletions

View File

@@ -477,6 +477,7 @@ void QuickBuildComponent::CompleteQuickBuild(Entity* const user) {
enableRebuild.fDuration = 0.0f;
enableRebuild.user = user->GetObjectID();
enableRebuild.Send(UNASSIGNED_SYSTEM_ADDRESS);
characterComponent->SendZoneStatisticIncrement(u"QuickBuildsCompleted");
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, m_Parent->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);