Implement Authentic Interaction Subsystem
Implemented authentic script/interaction queues This does now mean we have a total of 3 interaction systems, but this additional system is necessary to fix certain categories of bug and implement some authentic features Converted mining to new system Converted fishing to new system Converted woodcutting to new system Provided an example of soft-queued scripts with GrandTreePodListener Implemented tick-eating (it is now possible to eat a shark, drink a potion, and eat a karambwan all on the same tick) Can now eat and drop items while stunned
This commit is contained in:
@@ -40,7 +40,7 @@ public final class StatBoostSpell extends MagicSpell {
|
||||
public boolean cast(Entity entity, Node target) {
|
||||
final Player player = ((Player) entity);
|
||||
Item item = ((Item) target);
|
||||
final Potion potion = (Potion) Consumables.getConsumableById(item.getId());
|
||||
final Potion potion = (Potion) Consumables.getConsumableById(item.getId()).getConsumable();
|
||||
player.getInterfaceManager().setViewedTab(6);
|
||||
if (potion == null) {
|
||||
player.getPacketDispatch().sendMessage("You can only cast this spell on a potion.");
|
||||
|
||||
@@ -42,7 +42,7 @@ public class StatRestoreSpell extends MagicSpell {
|
||||
public boolean cast(Entity entity, Node target) {
|
||||
final Player player = ((Player) entity);
|
||||
Item item = ((Item) target);
|
||||
final Potion potion = (Potion) Consumables.getConsumableById(item.getId());
|
||||
final Potion potion = (Potion) Consumables.getConsumableById(item.getId()).getConsumable();
|
||||
player.getInterfaceManager().setViewedTab(6);
|
||||
if (potion == null) {
|
||||
player.getPacketDispatch().sendMessage("You can only cast this spell on a potion.");
|
||||
|
||||
Reference in New Issue
Block a user