Fixed extra animation when trying to cook more items than possible
This commit is contained in:
@@ -43,7 +43,6 @@ public class IntentionalBurnPulse extends StandardCookingPulse {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean cook(Player player, Scenery object, boolean burned, int initial, int product) {
|
public boolean cook(Player player, Scenery object, boolean burned, int initial, int product) {
|
||||||
super.animate();
|
|
||||||
Item initialItem = new Item(initial);
|
Item initialItem = new Item(initial);
|
||||||
Item productItem = new Item(product);
|
Item productItem = new Item(product);
|
||||||
|
|
||||||
@@ -51,6 +50,7 @@ public class IntentionalBurnPulse extends StandardCookingPulse {
|
|||||||
player.getInventory().add(productItem);
|
player.getInventory().add(productItem);
|
||||||
player.getPacketDispatch().sendMessage(getMessage(initialItem, productItem, burned));
|
player.getPacketDispatch().sendMessage(getMessage(initialItem, productItem, burned));
|
||||||
playAudio(player, Sounds.FRY_2577);
|
playAudio(player, Sounds.FRY_2577);
|
||||||
|
super.animate();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -149,7 +149,6 @@ public class StandardCookingPulse extends Pulse {
|
|||||||
public boolean cook(final Player player, final Scenery object, final boolean burned, final int initial, final int product) {
|
public boolean cook(final Player player, final Scenery object, final boolean burned, final int initial, final int product) {
|
||||||
Item initialItem = new Item(initial);
|
Item initialItem = new Item(initial);
|
||||||
Item productItem = new Item(product);
|
Item productItem = new Item(product);
|
||||||
animate();
|
|
||||||
|
|
||||||
//handle special cooking results (spits, cake, etc) that don't justify separate plugin
|
//handle special cooking results (spits, cake, etc) that don't justify separate plugin
|
||||||
switch (initial) {
|
switch (initial) {
|
||||||
@@ -188,6 +187,7 @@ public class StandardCookingPulse extends Pulse {
|
|||||||
}
|
}
|
||||||
player.getPacketDispatch().sendMessage(getMessage(initialItem, productItem, burned));
|
player.getPacketDispatch().sendMessage(getMessage(initialItem, productItem, burned));
|
||||||
playAudio(player, Sounds.FRY_2577);
|
playAudio(player, Sounds.FRY_2577);
|
||||||
|
animate();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user