Added support to fire off a discord alert to a webhook (set in server config as server.openrsc_integration_webhook) when Wormbrain's map piece is collected so that rsc plate pures are possible
This commit is contained in:
@@ -44,7 +44,6 @@ public final class MagicBookInterface extends ComponentPlugin {
|
||||
|
||||
SpellListeners.run(button, SpellListener.NONE, SpellUtils.getBookFromInterface(component.getId()),player,null);
|
||||
boolean result = MagicSpell.castSpell(player, spellBook, button, player);
|
||||
player.dispatch(new SpellCastEvent(spellBook, button));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package content.global.skill.magic
|
||||
|
||||
import core.game.event.SpellCastEvent
|
||||
import core.api.log
|
||||
import core.game.node.Node
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.SpellBookManager
|
||||
import core.tools.Log
|
||||
import core.tools.SystemLogger
|
||||
|
||||
@@ -34,6 +36,7 @@ object SpellListeners {
|
||||
val method = get(button,type,node?.id ?: 0,book) ?: get(button,type,book) ?: return
|
||||
try {
|
||||
method.invoke(player, node)
|
||||
player.dispatch(SpellCastEvent(SpellBookManager.SpellBook.valueOf(book.uppercase()), button, node))
|
||||
} catch (e: IllegalStateException){
|
||||
player.removeAttribute("spell:runes")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user