Skip to content

[Warlock] Fix Demonology/Destruction infinite loops, remove version guard#10956

Closed
Braxtar wants to merge 1 commit intosimulationcraft:midnightfrom
Braxtar:fix/warlock-midnight-bugs
Closed

[Warlock] Fix Demonology/Destruction infinite loops, remove version guard#10956
Braxtar wants to merge 1 commit intosimulationcraft:midnightfrom
Braxtar:fix/warlock-midnight-bugs

Conversation

@Braxtar
Copy link

@Braxtar Braxtar commented Feb 15, 2026

Summary

All three Warlock specs are currently blocked from simming on the midnight branch. After removing the version guard, I found two runtime bugs that cause infinite event loops:

Demonology — summon_vilefiend:

  • The talent spell summon_vilefiend (ID 1251778) has 0s duration and 0s cooldown in the Midnight DBC data. This is a trait_data mismatch — the actual gameplay values live on spell 1251781 (15s duration).
  • Without a cooldown, the sim re-casts vilefiend every event tick at t=0, creating an infinite loop.
  • Fix: use find_spell(1251781)->duration() for spawn duration/buff, hardcode 45s cooldown (matches in-game).
  • Also added set_default_duration for vilefiends — it was the only pet spawner missing this call.

Destruction — dimensional_rift:

  • The spell data already contains 3 charges / 45s recharge, but dimensional_rift_t never initializes the charge system in its constructor.
  • Without charges, the sim treats it as a 0-cooldown spell and casts it infinitely.
  • Fix: cooldown->charges = as<int>( data().charges() );

Version guard:

  • Removed the wowv_t( 13, 0, 0 ) check in validate_actor() since all three specs now sim successfully with these fixes.

Test results

Ran with load_default_gear=1 load_default_talents=1 default_actions=1 iterations=100:

Spec DPS Status
Affliction ~21,000 OK
Demonology ~11,000 OK (was infinite loop)
Destruction ~30,000 OK (was infinite loop)

Note: some APL talent references (e.g. vile_taint, eradication, the_houndmasters_gambit) log warnings because these talents were renamed in Midnight. The APL still runs — expressions with missing talents just evaluate to false. A separate APL update pass would clean those up.

Files changed

  • sc_warlock.cpp — removed version guard
  • sc_warlock_actions.cpp — vilefiend cooldown + duration fix, dimensional_rift charge init
  • sc_warlock_init.cpp — vilefiend set_default_duration + buff duration fix

…guard

Demonology - summon_vilefiend:
- Talent spell 1251778 has 0s duration AND 0s cooldown in Midnight DBC
- Spell 1251781 has the correct values (15s duration)
- Added cooldown->duration = 45s (matches in-game, both DBC spells show 0)
- Added set_default_duration for vilefiends pet spawner (was missing)
- Fixed vilefiend buff duration to use spell 1251781

Destruction - dimensional_rift:
- Spell data already has 3 charges / 45s recharge but the charge system
  was never initialized in the constructor
- Added cooldown->charges = data().charges()

Without these fixes both specs enter infinite event loops on the first
cast of vilefiend/dimensional_rift.

Tested: Affliction ~21k DPS, Demonology ~11k DPS, Destruction ~30k DPS
(default profiles, load_default_gear=1, load_default_talents=1, 100 iter)
@millanzarreta
Copy link
Contributor

The Warlock module hasn't been updated for Midnight yet, which is why there are so many errors.

There's a large pending PR that includes many changes for the initial implementation of the Warlock module for Midnight here: #10923

@vituscze
Copy link
Contributor

"Sim runs" and "sim gives accurate results" are two very distinct things. This does the former without doing the latter, which makes it basically useless.

@vituscze vituscze closed this Feb 16, 2026
@Braxtar
Copy link
Author

Braxtar commented Feb 16, 2026

Thank you for the feedback. You're right — these are band-aid fixes that make specs run without ensuring accuracy. Closing in favor of #10923 which is the proper Midnight implementation. Appreciate the pointer!

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.

3 participants