From c39b1c18ff5544e69abcf801c5463e74532d77e0 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 24 Jan 2023 23:36:59 +0000 Subject: [PATCH] Added drop table for highwayman Added drop table for shantay guard Made highwayman diary trigger more specific --- Server/data/configs/drop_tables.json | 75 ++++++++++++++++++- .../node/entity/npc/other/HighwayManNPC.java | 19 ++--- 2 files changed, 79 insertions(+), 15 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index 327dd8239..d10827f19 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -59901,5 +59901,78 @@ "ids": "1235", "description": "Pointed", "main": [] + }, + { + "default": [ + { + "minAmount": "1", + "weight": "1.0", + "id": "1019", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "1.0", + "id": "527", + "maxAmount": "1" + } + ], + "charm": [], + "ids": "180", + "description": "Old-Highwayman", + "main": [] + }, + { + "default": [ + { + "minAmount": "1", + "weight": "1.0", + "id": "526", + "maxAmount": "1" + } + ], + "charm": [], + "ids": "837", + "description": "Shantay Guard", + "main": [] + }, + { + "default": [ + { + "minAmount": "1", + "weight": "1.0", + "id": "526", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "1.0", + "id": "1019", + "maxAmount": "1" + } + ], + "charm": [], + "ids": "2677", + "description": "New-Highwayman", + "main": [ + { + "minAmount": "1", + "weight": "1.0", + "id": "617", + "maxAmount": "25" + }, + { + "minAmount": "1", + "weight": "1.0", + "id": "9141", + "maxAmount": "15" + }, + { + "minAmount": "1", + "weight": "23.0", + "id": "0", + "maxAmount": "1" + } + ] } -] +] \ No newline at end of file diff --git a/Server/src/main/java/core/game/node/entity/npc/other/HighwayManNPC.java b/Server/src/main/java/core/game/node/entity/npc/other/HighwayManNPC.java index 5ed04ba9e..4ab8aa9a3 100644 --- a/Server/src/main/java/core/game/node/entity/npc/other/HighwayManNPC.java +++ b/Server/src/main/java/core/game/node/entity/npc/other/HighwayManNPC.java @@ -4,8 +4,6 @@ import core.game.node.entity.Entity; import core.game.node.entity.npc.AbstractNPC; import core.game.node.entity.player.Player; import core.game.node.entity.player.link.diary.DiaryType; -import core.game.node.item.GroundItemManager; -import core.game.node.item.Item; import core.plugin.Initializable; import core.game.world.map.Location; @@ -17,11 +15,6 @@ import core.game.world.map.Location; @Initializable public final class HighwayManNPC extends AbstractNPC { - /** - * Represents the cape item. - */ - private static final Item CAPE = new Item(1019); - /** * Constructs a new {@code HighwayManNPC} {@code Object}. * @param id the id. @@ -42,13 +35,11 @@ public final class HighwayManNPC extends AbstractNPC { public void finalizeDeath(Entity killer) { super.finalizeDeath(killer); if (getId() == 180) { - GroundItemManager.create(new Item(526), getLocation(), (Player) killer); - GroundItemManager.create(CAPE, getLocation(), (Player) killer); - } - if (killer instanceof Player) { - final Player player = killer.asPlayer(); - if (!player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).isComplete(0, 10)) { - player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).updateTask(player, 0, 10, true); + if (killer instanceof Player) { + final Player player = killer.asPlayer(); + if (!player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).isComplete(0, 10)) { + player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).updateTask(player, 0, 10, true); + } } } }