Slothpala / RaidFrameSettings

RaidFrameSettings is a party/raid frame add-on that enhances the default World of Warcraft raid frames with many customization options and aura indicators.
https://www.curseforge.com/wow/addons/raid-frame-settings
GNU General Public License v2.0
4 stars 4 forks source link

Prevents duplicate script hooks #52

Closed excorp closed 5 months ago

excorp commented 6 months ago

I noticed that when I set a new script with SetScript, the previously set hooked script disappears, and when I run GetScript after using HookScript, the address changes. I'm guessing that HookScript is probably creating a function that executes the existing script and executes the new script, and then does the SetScript processing.

So, if it was already hooked by RFS, I kept track of the address and prevented it from being hooked twice.

In the old way, disabling and enabling the AuraHighlight module was causing double hooking of the script.

But I still don't know much about addon development, so I'm not even sure if my fix is the right one. It would be great if you could review it.

Slothpala commented 6 months ago

I will investigate it. Thank you.

Slothpala commented 5 months ago

The issue lies in AuraHighlight itself. I will however not fix this at the moment as i am rewriting the entire module and a lot of backend stuff alongside.