Fix continuous scrolls not tracking spell modifiers properly

This commit is contained in:
Electroblob77
2020-06-11 22:11:34 +01:00
parent 937c791196
commit 72971b5f16
@@ -1,6 +1,7 @@
package electroblob.wizardry.item;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.data.WizardData;
import electroblob.wizardry.event.SpellCastEvent;
import electroblob.wizardry.event.SpellCastEvent.Source;
import electroblob.wizardry.packet.PacketCastSpell;
@@ -121,6 +122,8 @@ public class ItemScroll extends Item implements ISpellCastingItem, IWorkbenchIte
if(spell.isContinuous){
if(!player.isHandActive()){
player.setActiveHand(hand);
// Store the modifiers for use each tick (there aren't any by default but there could be, as above)
if(WizardData.get(player) != null) WizardData.get(player).itemCastingModifiers = modifiers;
return new ActionResult<>(EnumActionResult.SUCCESS, stack);
}
}else{