Skip to content

[02.1] Fix SpellPower review issues from PR #78#83

Merged
alseif0x merged 6 commits into
3.4.3from
79-021-follow-up-fix-spellpower-review-issues-from-pr-78
Jul 1, 2026
Merged

[02.1] Fix SpellPower review issues from PR #78#83
alseif0x merged 6 commits into
3.4.3from
79-021-follow-up-fix-spellpower-review-issues-from-pr-78

Conversation

@alseif0x

@alseif0x alseif0x commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Closes #79

Summary

  • Re-anchor represented spell power handling to C++ check/take phases so failed casts do not spend power and queued casts still check/deduct at execution.
  • Fix class primary-power setup so non-mana classes do not keep a stale mana slot mapping.
  • Preserve current slot-0 power across login/stat updates and persist represented current powers on logout/disconnect.
  • Add trace logging for spell power spend/save and login stat power updates behind RUSTYCORE_SPELL_POWER_TRACE.

Validation

  • cargo fmt --all -- --check
  • git diff --check
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world power --lib
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world --lib
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-data player_stats --lib
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo check -p world-server
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo build -p world-server --release
  • Live server restarted with pm2; client validation confirmed mana is spent and remains persisted after logout/relogin.

Follow-ups Split Out

Do not merge/close until CI is green and the configured Codex reviewer has given its verdict, with all actionable review comments handled or explicitly deferred.

@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: 9ca70a2273

ℹ️ 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/session.rs Outdated
Comment thread crates/wow-world/src/handlers/character.rs Outdated
@alseif0x

alseif0x commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@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

let current = player.get_power(power_type);
player
.unit_mut()
.set_power(power_type, current.saturating_sub(cost.amount));

P2 Badge Mirror power spends into session snapshots

When a client cast spends power here, only the canonical Player is mutated. Paths such as start_player_attack_like_cpp call ensure_canonical_world_map_for_current_player_like_cpp, which rebuilds the canonical player from session state that does not carry powers, so casting a spell and then starting an attack/entering another resync path can replace the spent value with a fresh default before logout save. Please preserve the updated powers during canonical resync or mirror them into the session snapshot.

ℹ️ 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
Comment thread crates/wow-world/src/session.rs
@alseif0x

alseif0x commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 654c29f040

ℹ️ 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".

@alseif0x

alseif0x commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@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: d0ea708651

ℹ️ 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 .github/workflows/codex-review-gate.yml Outdated
Comment thread crates/wow-world/src/session.rs
Comment thread .github/workflows/codex-review-gate.yml Outdated
@alseif0x

alseif0x commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 8bc730c492

ℹ️ 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".

@alseif0x alseif0x merged commit 7da2ae4 into 3.4.3 Jul 1, 2026
6 checks passed
@alseif0x alseif0x deleted the 79-021-follow-up-fix-spellpower-review-issues-from-pr-78 branch July 1, 2026 11:04
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.

[02.1 follow-up] Fix SpellPower review issues from PR #78

1 participant