server
server copied to clipboard
[LUA] Elemental Siphon should not be usable with no pet
I affirm:
- [x] I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
- [x] I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
- [x] I have read and understood the Contributing Guide and the Code of Conduct.
- [x] I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.
What does this pull request do?
Elemental siphon is usable without a pet, since petID is initialized to zero, the ID of fire spirit
The current code would also spit errors due to spirit
being undefined in the ability use section. I'm not sure it's possible to hit that with the updated onAbilityCheck
, but I've added a check there as well to cleanly return 0:
Steps to test these changes
Summon an avatar, see that siphon is not usable, release and see it's still not usable, summon spirit and see siphon is usable.