mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-16 16:05:09 -06:00
Touched up cooking a bit
This commit is contained in:
parent
ce4350915c
commit
77cccfb764
4 changed files with 5 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ import core.game.interaction.UseWithHandler;
|
|||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.system.task.Pulse;
|
||||
import org.rs09.consts.Items;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Plugin;
|
||||
|
|
@ -40,7 +41,7 @@ public class TutorialFurnaceHandler extends UseWithHandler {
|
|||
player.getInventory().remove(new Item(436, 1));
|
||||
player.getInventory().add(Bar.BRONZE.getProduct());
|
||||
player.getSkills().addExperience(Skills.SMITHING, Bar.BRONZE.getExperience());
|
||||
player.dispatch(new ResourceProducedEvent(Bar.BRONZE.getProduct().getId(), 1, player));
|
||||
player.dispatch(new ResourceProducedEvent(Bar.BRONZE.getProduct().getId(), 1, player, Items.COPPER_ORE_436));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ public class WoodcuttingSkillPulse extends Pulse {
|
|||
}
|
||||
//give the reward
|
||||
player.getInventory().add(new Item(reward, rewardAmount));
|
||||
player.dispatch(new ResourceProducedEvent(reward, rewardAmount, node));
|
||||
player.dispatch(new ResourceProducedEvent(reward, rewardAmount, node, -1));
|
||||
int cutLogs = player.getAttribute(STATS_BASE + ":" + STATS_LOGS,0);
|
||||
player.setAttribute("/save:" + STATS_BASE + ":" + STATS_LOGS,++cutLogs);
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public class SmithingPulse extends SkillPulse<Item> {
|
|||
player.getInventory().remove(new Item(bar.getBarType().getBarType(), bar.getSmithingType().getRequired()));
|
||||
final Item item = new Item(node.getId(), bar.getSmithingType().getProductAmount());
|
||||
player.getInventory().add(item);
|
||||
player.dispatch(new ResourceProducedEvent(item.getId(), 1, player));
|
||||
player.dispatch(new ResourceProducedEvent(item.getId(), 1, player, bar.getBarType().getBarType()));
|
||||
player.getSkills().addExperience(Skills.SMITHING, bar.getBarType().getExperience() * bar.getSmithingType().getRequired(), true);
|
||||
String message = StringUtils.isPlusN(ItemDefinition.forId(bar.getProduct()).getName().toLowerCase()) ? "an" : "a";
|
||||
player.getPacketDispatch().sendMessage("You hammer the " + bar.getBarType().getBarName().toLowerCase().replace("smithing", "") + "and make " + message + " " + ItemDefinition.forId(bar.getProduct()).getName().toLowerCase() + ".");
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ public class SmeltingPulse extends SkillPulse<Item> {
|
|||
}
|
||||
}
|
||||
player.getInventory().add(new Item(bar.getProduct().getId(), amt));
|
||||
player.dispatch(new ResourceProducedEvent(bar.getProduct().getId(), 1, player));
|
||||
player.dispatch(new ResourceProducedEvent(bar.getProduct().getId(), 1, player, -1));
|
||||
double xp = bar.getExperience() * amt;
|
||||
// Goldsmith gauntlets
|
||||
if (((player.getEquipment().get(EquipmentContainer.SLOT_HANDS) != null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue