Fixed SpellCastEvents not being dispatched properly
Fixes achievement diary tasks that trigger on spell cast
This commit is contained in:
@@ -44,10 +44,7 @@ public final class MagicBookInterface extends ComponentPlugin {
|
|||||||
|
|
||||||
SpellListeners.run(button, SpellListener.NONE, SpellUtils.getBookFromInterface(component.getId()),player,null);
|
SpellListeners.run(button, SpellListener.NONE, SpellUtils.getBookFromInterface(component.getId()),player,null);
|
||||||
boolean result = MagicSpell.castSpell(player, spellBook, button, player);
|
boolean result = MagicSpell.castSpell(player, spellBook, button, player);
|
||||||
|
player.dispatch(new SpellCastEvent(spellBook, button));
|
||||||
if (result) {
|
|
||||||
player.dispatch(new SpellCastEvent(spellBook, button));
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user