Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Prelude
Changes Proposed
Did you ever think about blocking all spells, or maybe just one specific spell for a player? Or for a group of players? Or maybe something even crazier?
Well, it's actually possible to do that using global variables or player storage. However, in order for it to work properly, we really have to modify and add some extra conditionals to all the spells we want to control. This is totally horrible.
This new event comes to solve this problem. The
onSpellCheck
event has two arguments: one is the player and the other is a table with some fields. In these fields, you can find some properties of the spell in question, for example the name.Here is an example code fragment using the new event:
Issues addressed: Nothing!