Added drop table for highwayman

Added drop table for shantay guard
Made highwayman diary trigger more specific
This commit is contained in:
Sam
2023-01-24 23:36:59 +00:00
committed by Ryan
parent 5635e9235e
commit c39b1c18ff
2 changed files with 79 additions and 15 deletions
+73
View File
@@ -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"
}
]
}
]
@@ -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,9 +35,6 @@ 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)) {
@@ -52,6 +42,7 @@ public final class HighwayManNPC extends AbstractNPC {
}
}
}
}
@Override
public void onAttack(Entity target) {