SecretX33 / AutomaticWeaponRemoval

This addon automatically removes (swap) your weapons when bosses like Lady mind controls you.
https://www.curseforge.com/wow/addons/automaticweaponremoval
GNU Affero General Public License v3.0
3 stars 1 forks source link

Classic WoW mind control spells #1

Closed implave closed 6 months ago

implave commented 7 months ago

Hey there! Thanks for making the addon, recently found myself in need for one of those but for BWL, ZG, AQ40 and other instances of WoW Classic (running on 3.3.5a). Tried adding them myself by copying the ones already referenced by the addon but with no experience it's not something I can handle myself it appears.

How would one go about adding these to be picked up by the addon? Wasn't able to find anything related to mapIDs and such. ["CAUSE_INSANITY"] = 24327, -- Hakkar MC (ZulGurub) ["WILL_OF_HAKKAR"] = 24178, -- Hakkar MC2 (ZulGurub) ["SHADOW_COMMAND"] = 22667, -- Nefarian MC (Black Wing Lair) ["TRUE_FULFILLMENT"] = 785, -- Skeram (AQ40)

Thanks again!

implave commented 7 months ago

Saw some logic to determine if the addon should be enabled or not based on map data, maybe that's where it stops working? Some raids like ZG return 20 man. BWL and AQ are supposed to be 40 man.

SecretX33 commented 6 months ago

Hello, life's been busy and I've just seen your issue today. First of all, let me thank you for taking the time to open this issue, I'm glad that you liked the addon and also that you want to contribute to it.

Let me help you with that. There are two steps you need to do to get the addon working on any instance and identify any mind control spell you add.

1. Add the desired instance to the "valid instance" list

First of all, let me tell you that I also had issues when testing this addon, thus I've added two things to help me develop the addon, which still exists and can be used.

You can "ask" the addon its current state by using /awr status, the addon will print to you why it is or isn't enabled at that specific moment. You can use that to determine why the addon doesn't work in a specific instance. For example, if I use that command in Dalaran, I'll see something like:

AWR: status: the addon is currently off because you are not in a valid instance.

Which indicates the area I'm currently in is not a valid instance. What is a valid instance, you ask? All instances that have their name present in this list are considered a valid instance for the addon, thus it automatically turns itself on when you are inside one of them, and off then you step outside.

There's also another command that is very useful called /awr debug. When you turn this option ON, the addon will start printing lots of useful things about what is happening on the addon, and why they're happening. I recommend you turn that option ON and let it ON the entire time while you're modifying on the addon, and the insights the debug messages provide you might be helpful.

Ok, but how do I get an instance exact name?

See this, but long story short, enter the instance you want to get the name, and paste this on your chat:

/run print((select(1,GetInstanceInfo())))

You'll see something like this being print on your chat:

Icecrown Citadel

You must write the instance name exactly as you see, remember that the comparison is case-sensitive.

2. Add the mind control spells of that instance to the mind spell control lists

After adding the desired instance to the instance list, now it's time to add the spells of that instance. To add a specific mind control spell to the list of supported mind control spells, add:

Some tips that might be useful:

And then?

After you modify the addon, and test that your new changes are working, please contribute back to the addon, open a PR to this repository and I'll gladly merge any improvements you make to this codebase.

SecretX33 commented 6 months ago

If you'd like me to perform these changes in your regard let me know, but be aware that I'm currently very busy, and because of that the changes might take a while to happen. And since I'm not actively playing WoW anymore I won't be able to test them, especially because I can't do classic dungeons/raids since the players in the server I used to play aren't very fond of legacy content.

implave commented 6 months ago

Thanks for the reply! I managed to track down the issue and it did appear to be tied to the logic determining if the addon should be on or off for a particular dungeon, likely relating to the number of players for those particular mapids. I hacked around it by just removing the check and leaving it constantly on. The solution is subpar in terms of implementation but with my very limited knowledge of coding it should work for the use cases we have. Thank you again for your time!