Skip to content

[17] Fix character enum flags mapping#94

Open
alseif0x wants to merge 2 commits into
3.4.3from
53-17-c-character1-character-enum-flagsdata-mapping-diverges-from-c++
Open

[17] Fix character enum flags mapping#94
alseif0x wants to merge 2 commits into
3.4.3from
53-17-c-character1-character-enum-flagsdata-mapping-diverges-from-c++

Conversation

@alseif0x

@alseif0x alseif0x commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Refs #53

QA pending: do not merge until character-list manual QA, capture comparison, CI, and Codex reviewer verdict are complete.

Summary:

  • Replaces inherited C# character enum flag mapping with C++-anchored helpers.
  • Handles rename, ghost, billing lock, declined-name config, Flags2 values, and pet family mapping.
  • Preserves packet field order for pet data.

Validation reported locally:

  • cargo test -p wow-packet enum_characters_result_preserves_pet_data_field_order_like_cpp --lib
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world enum_character --lib
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world --lib
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo check -p world-server
  • cargo fmt --all -- --check
  • git diff --check

Manual QA pending: visually validate character list and capture-diff enum response vs C++.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee552dc226

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/wow-world/src/handlers/character.rs

alseif0x commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

QA validation checklist:

  • Check the character select screen for normal alive characters: no unexpected disabled/ghost/rename/customization state should appear.
  • Check a dead/ghost character from logout to character select; the visible state should match what C++ shows for the same database state.
  • If a rename/customization flag can be set in DB, verify it appears on character select without leaking unrelated raw player flags.
  • Also test a character logged out in a rest area and compare the character-select state against the C++ server/client behavior.

Note: this PR still has a Codex reviewer disagreement/comment to resolve before it is merge-ready.

alseif0x commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review

I rechecked the review item against the local C++ source of truth and did not change the code because the requested CHARACTER_FLAG_RESTING mapping is not present in this branch's C++ reference.

C++ anchors checked:

  • /home/server/woltk-trinity-legacy/src/server/game/Server/Packets/CharacterPackets.cpp:118-145: EnumCharactersResult::CharacterInfo::CharacterInfo maps ghost, rename, billing lock, declined names, customize/faction/race, and first-login only. It does not map PLAYER_FLAGS_RESTING.
  • /home/server/woltk-trinity-legacy/src/server/game/Miscellaneous/SharedDefines.h:1021-1053: there is no named CHARACTER_FLAG_RESTING; bit 0x20 is CHARACTER_FLAG_UNK6.

Given AGENTS.md requires C++ as source of truth, this PR intentionally keeps resting out of character enum flags while preserving ghost/rename/customization handling.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee552dc226

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/wow-world/src/handlers/character.rs
@alseif0x

alseif0x commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Pushed 89c9e28 for the actionable current review item: character enum now executes the C++ equivalent before the enum select, so elapsed temporary bans are cleared before can map to . Added and validated with:

running 1 test
test handlers::character::tests::enum_character_query_statements_expire_bans_before_select_like_cpp ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2634 filtered out; finished in 0.00s

The resting enum flag item remains intentionally not changed because local C++ does not map for this packet in this branch.

@alseif0x

alseif0x commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Correction for the previous comment: pushed 89c9e286 for the actionable current review item. Character enum now executes the C++ CHAR_DEL_EXPIRED_BANS equivalent before the enum select, so elapsed temporary bans are cleared before banned_guid can map to CHARACTER_FLAG_LOCKED_BY_BILLING.

Validation:

  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world enum_character_query_statements_expire_bans_before_select_like_cpp --lib
  • cargo fmt --all -- --check
  • git diff --check
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo check -p world-server

The resting enum flag item remains intentionally not changed because local C++ CharacterPackets.cpp:118-145 does not map PLAYER_FLAGS_RESTING for this packet in this branch.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 89c9e286f8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[17] [C#-CHARACTER.1] Character enum flags/data mapping diverges from C++

1 participant