Repository navigation
Sync: opt-in alliance stream with the own alliance's league and level - #402
Open
blevouschurverantunt wants to merge 1 commit into
Open
blevouschurverantunt wants to merge 1 commit into
blevouschurverantunt wants to merge 1 commit into
Conversation
New sync option `alliance` (default false) and event type
`alliance_league`: {"type":"alliance_league","league":<n>,"level":<n>},
the league and level of the player's own alliance and nothing else (no
alliance id, name, tag, slogan, announcement or member count).
Source: the game server's AllianceDetails group (225), which decodes as
an AllianceProfile and arrives about every 30 seconds. It is one record
with a fixed key, so the framework sends it only when league or level
changes.
The group may describe an alliance other than the player's own, so it
is used only when its alliance id equals the alliance id listed in the
player's own profile record, read from the UserProfiles response. Until
that record has been read in the session nothing is sent. When the own
profile lists no alliance, nothing is sent either; the mod has no
verified signal for "no alliance" and does not guess.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Adds an opt-in sync option,
alliance, that sends onealliance_leaguerecord with the league and level of the player's own alliance. It is off by default, and only targets that enable it receive the record.Record shape, with invented values:
{"type":"alliance_league","league":2,"level":30}league: the alliance's league number.level: the alliance's level.Source and checks:
AllianceDetailsgroup (225), decoded as anAllianceProfile. Onlyleagueandlevelare read from it.UserProfilesresponse and remembered for the session.profileoption.Files:
src/mod/config.h,src/mod/sync/{records.cc,state.cc,sync.h},tests/sync_logic.cc, a row indocs/FEATURES.mdand the English settings example.Validation
zig build mods build-tests -Dtarget=x86_64-windows-msvc,zig build test-sync test-mod test-codegen, the fullReleaseFastDLL build, andzig build fmt.tests/sync_logic.cc,alliance league, checks:type,leagueandlevel, with name, tag and slogan in the input left out;ReleaseFast), against a private sync endpoint, onealliance_leaguerecord arrived at login with the player's own alliance's league and level. Records for other alliances are not sent.Settings and platforms
alliance, off by default, under[sync]and per target. Nothing is sent unless a target opts in.🤖 Generated with Claude Code