Skip to content

[Decomp][Spell] Cohesion split: extract Spell.cpp pipeline to Spell*.cpp - #220

Merged
billy1arm merged 1 commit into
mangostwo:masterfrom
r-log:decomp/spell-cohesion
Jun 29, 2026
Merged

billy1arm merged 1 commit into
mangostwo:masterfrom
r-log:decomp/spell-cohesion

Conversation

@r-log

@r-log r-log commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Mirror of mangosthree #197-207 (bundled — all touch Spell.cpp). Pure cohesion split of Spell.cpp (10,284 → 1,828 lines) with no behaviour change. The 61 cast-pipeline / targeting / check methods move to 11 dedicated TUs:

SpellPackets · SpellChecks · SpellTargeting (carries the ChainHealing/TargetDistance sort functors) · SpellCast · SpellHit · SpellPower · SpellCooldown · SpellTargetList · SpellEffectDispatch (externs the SpellEffects dispatch table) · SpellCheckTarget · SpellAreaTargets (carries the Prioritize* mana/health priority-queue helpers).

Spell.h untouched. CMake file(GLOB) auto-compiles the new TUs. Verbatim move (incl. template-prefixed methods + the file-local sort/priority helpers), no dropped/duplicated defs. Builds clean (MSVC 2022, Release).

Completes the Spell trio split alongside SpellEffects (#218) and SpellAuras (#219).


This change is Reviewable

Mirror of mangosthree mangostwo#197-207 (bundled, same source file). Pure cohesion
split of Spell.cpp (10,284 -> 1,828 lines) with no behaviour change. The
cast pipeline / targeting / checks move to dedicated TUs:

- SpellPackets.cpp       - packet senders.
- SpellChecks.cpp        - pre-cast validation (CheckCast and friends).
- SpellTargeting.cpp     - SetTargetMap selection (carries the ChainHealing/
  TargetDistance sort functors).
- SpellCast.cpp          - cast pipeline (prepare/cast/finish).
- SpellHit.cpp           - effect delivery to target.
- SpellPower.cpp         - power/cost calculation.
- SpellCooldown.cpp      - global cooldown.
- SpellTargetList.cpp    - target-list assembly.
- SpellEffectDispatch.cpp- per-effect dispatch (externs the SpellEffects table).
- SpellCheckTarget.cpp   - target validation.
- SpellAreaTargets.cpp   - area/raid targeting (carries the Prioritize
  mana/health priority-queue helpers).

Spell.h is unchanged. CMake file(GLOB) auto-compiles the new TUs.
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 3 medium

Alerts:
⚠ 3 issues (≤ 0 issues of at least minor severity)

Results:
3 new issues

Category Results
UnusedCode 2 medium
Performance 1 medium

View in Codacy

🟢 Metrics 2552 complexity · 43 duplication

Metric Results
Complexity 2552
Duplication 43

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@billy1arm
billy1arm merged commit fd88002 into mangostwo:master Jun 29, 2026
6 of 8 checks passed
@AppVeyorBot

Copy link
Copy Markdown

@r-log
r-log deleted the decomp/spell-cohesion branch June 30, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants