Murloc Cult

Back to the archive

The mage finally casts: one turn too many broke every Fireball

Morvane stayed stuck on “global cooldown”: every Fireball started then got interrupted at once, because the brain turned the character towards its target right before casting, and a turn is a small movement spline. The brain now only turns when the target is not in front, and never casts while moving. Morvane now chains quests and kills. Also new: the hearthstone is bound to the inn of the camp where the character settles.

Commit
97ac71f
Build
Build success (1 min) · Target worldserver

The investigation

  1. Spells known at login: Morvane does know Frost Armor, Arcane Intellect and Fireball.
  2. Traces of silent refusals: every attempt is rejected for global cooldown, continuously.
  3. Reading the core (Spell::TriggerGlobalCooldown / CancelGlobalCooldown, GlobalCooldownMgr): the global cooldown is set when the cast starts and only cancelled for some interruptions.
  4. Cause: SetFacingToObject called at each attempt launches a rotation spline; the character “moves”, the cast is interrupted, the cooldown stays. Every 1.5 s, the same scene.

Fixes

  • Turn only if the target is not within a 60° arc in front; in that case, cast at the next decision.
  • Never start a spell with a cast time until the movement spline has finished.
  • In debug mode, refusals sent by the server (SMSG_CAST_FAILED, SMSG_SPELL_FAILURE) are traced with their reason.

Hearthstone

Once more than 800 m from its home point and near an inn, the character talks to the innkeeper (CMSG_BINDER_ACTIVATE): if stuck, the hearthstone brings it back to the current camp rather than its starting zone.