Closed jimmytaker closed 1 year ago
any updates on this i have testet @jimmytaker changes seams to be working just fine.
I've avoided merging this because I keep wanting to test it myself, but I am now admitting that I will never get to that. Merging. Thanks for the contribution!
After casting mount or mining or most cast actions with a yellow cast bar really, I consistently find that the bar does not go away but remains at 100% cast. You can force the bar to disappear by casting another spell or changing stances, etc.
I found the following 5 issues when using the master version of nampower:
To fix point 1 I disabled the "SendCast" hook. This hook seems to be only necessary for aoe spells (such as blizzard - with the green marker on the ground). Now the animations usually play as expected. They still do not play right if the cast is started before the ACK from the server for finishing the previous cast has arrived. I think to fix this we could try calling "interruptSpell" instead of "cancelSpell". However, the address of "interruptSpell" is not listed in "Offsets" and I do not feel like disassembling WoW.exe at this point in time. The author of nampower probably already has a nicely formatted disassembly and will find the address much faster than I.
I also enabled CastSpellHook to act on cursorMode == 2 - this is necessary for click casting.
To fix point 2 I added handling of SPELLCAST_INTERRUPTED event in the eventhandler setting cooldown to 0.
To fix point 3 I disabled the patch for CreateCastbar and the manual sending of SPELLCAST_START event right after calling castSpell; and allow the notification from the server to trigger the castbar. This visually delays the appearance of the castbar by the ping time. It does not alter the main purpose of this mod however - the actual casting time is still "patched". This is necessary, because HealComm sets up on a hook over CastSpell and triggers on a event filter over SPELLCAST_START. Having the manual signalEvent(SPELLCAST_START) call results in HealComm receiving SPELLCAST_START before CastSpell and as such cannot display anything because it does not yet know which spell this "START" is for.
To fix point 4 - QuickHeal works by sending a "CastSpell" immediately followed by "CancelSpell" with parameter notifyServer = true. The internal cooldown tracking of nampower only got reset when receiving (SPELLCAST_FAILED && !gNotifyServer). I simplified the condition to not be affected by the state of gNotifyServer. I am not aware of any adverse effects this might cause anywhere nor am I aware why this was there in the first place. Caution is advised here.
To fix poing 5 - I added and exclusion to handling spells with effect SPELL_EFFECT_CREATE_ITEM.