Skip to content

fix: add missing InterruptFlags field#6

Merged
gtker merged 1 commit into
gtker:mainfrom
pikdum:main
May 21, 2026
Merged

fix: add missing InterruptFlags field#6
gtker merged 1 commit into
gtker:mainfrom
pikdum:main

Conversation

@pikdum

@pikdum pikdum commented May 16, 2026

Copy link
Copy Markdown
Contributor

From Claude:

The vanilla Spell.dbc has 173 uint32 fields per row. MaNGOS's SpellEntry (src/game/Server/DBCStructure.h) names field 21 as InterruptFlags, with AuraInterruptFlags at 22 and ChannelInterruptFlags at 23.

The previous parser was missing InterruptFlags entirely and compensated with an unknown_flag field between spell_priority and the localized string block, keeping the total field count at 173 but causing every field from byte offset 84 onwards to be misaligned by one position:

  • duration was actually reading spellLevel
  • power_type was reading DurationIndex
  • mana_cost was reading powerType
  • the effect[3] array was reading EquippedItemInventoryTypeMask + Effect[0] + Effect[1], silently dropping Effect[2]
  • ...and so on through the rest of the row.

Add interrupt_flags: i32 between category_recovery_time and aura_interrupt_flags; remove the placeholder unknown_flag between spell_priority and the name string. Row size is unchanged.

(vibe coded from Claude Code - confirmed it fixed my aura duration issue though)

@pikdum pikdum changed the title fix: add missing InterruptFlags field (#1) fix: add missing InterruptFlags field May 16, 2026
@gtker

gtker commented May 19, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR. This seems correct according to https://github.com/wowdev/WoWDBDefs/blob/58bea4ff45fa3655d5a59df0f2961bd25f39777b/definitions/Spell.dbd#L1337 as well.

Could you update the PR by removing the unknown_flag

and adding the new flag at then running cargo gen instead of changing the generated files directly? :)

The vanilla Spell.dbc has 173 uint32 fields per row. MaNGOS's SpellEntry
(src/game/Server/DBCStructure.h) names field 21 as InterruptFlags, with
AuraInterruptFlags at 22 and ChannelInterruptFlags at 23.

The previous parser was missing InterruptFlags entirely and compensated
with an `unknown_flag` field between spell_priority and the localized
string block, keeping the total field count at 173 but causing every
field from byte offset 84 onwards to be misaligned by one position:
- `duration` was actually reading spellLevel
- `power_type` was reading DurationIndex
- `mana_cost` was reading powerType
- the `effect[3]` array was reading EquippedItemInventoryTypeMask +
  Effect[0] + Effect[1], silently dropping Effect[2]
- ...and so on through the rest of the row.

Add `interrupt_flags: i32` between category_recovery_time and
aura_interrupt_flags; remove the placeholder `unknown_flag` between
spell_priority and the name string. Row size is unchanged.
@pikdum

pikdum commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

Updated the Spell.xml and ran cargo gen - hopefully this is good now.

@gtker gtker merged commit 64ff67c into gtker:main May 21, 2026
1 check passed
@gtker

gtker commented May 21, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR. :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants