-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Unable to set spell group to 'NONE' #4872
base: master
Are you sure you want to change the base?
Conversation
Using the spellgroup("none"), didn't work as below in the code, after it was already loaded, the code: if (group == SPELLGROUP_NONE) {, would have overriden it and set none to either attack or healing group. This successfully fixes it. If group is none, then we don't want to load/change group cooldowns, as other checks in the code for spell cooldown check only groupCooldown > 0, and not group != SPELLGROUP_NONE, so I think it will be more efficient to block it at loading.
Need to consider that initialization of variable groupCooldown is 1000, which is not supported by |
Okay so as @ArturKnopik said when I asked him on discord, he told me every spell has a group So I've read more into that and currently he is right. There are 2 options that I think are viable:
What do you think? |
Updated commit to adapt revscript loading, showing how it could look. I dont like how I had to add new enum, especially with value 255, but Im pretty restricted as I must have in mind to keep everything compatible. |
Pull Request Prelude
Changes Proposed
Using the spellgroup("none"), didn't work as below in the code, after it was already loaded, the code: if (group == SPELLGROUP_NONE) {, would have overriden it and set none to either attack or healing group.
This successfully fixes it.
If group is none, then we don't want to load/change group cooldowns, as other checks in the code for spell cooldown check only groupCooldown > 0, and not group != SPELLGROUP_NONE, so I think it will be more efficient to block it at loading.
Issues addressed:
'none' spell tag not working.
How to test:
Try to set spell's group to none, you will see using the spell will still put cd on attacking/healing group as this is what none is set to currently.