Merge branch 'clues' into 'master'

fix clue scroll drops.

See merge request 2009scape/2009scape!278
This commit is contained in:
Ceikry 2021-09-28 13:47:27 +00:00
commit f15d0d3357
2 changed files with 1 additions and 61 deletions

View file

@ -132,16 +132,7 @@ public final class TreasureTrailPlugin extends OptionHandler {
@Override @Override
public boolean createDrop(Item item, Player player, NPC npc, Location l) { public boolean createDrop(Item item, Player player, NPC npc, Location l) {
if ((npc.getId() == 49 || npc.getId() == 3586)) { return !hasClue(player);
return true;
}
if (npc.getDefinition().getDropTables().getMainTable().size() < 3) {
return false;
}
if (!hasClue(player)) {
return true;
}
return false;
} }
@Override @Override

View file

@ -10,7 +10,6 @@ import core.game.node.entity.skill.Skills;
import core.game.node.item.GroundItem; import core.game.node.item.GroundItem;
import core.game.node.item.GroundItemManager; import core.game.node.item.GroundItemManager;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.game.node.item.WeightedChanceItem;
import core.game.world.map.Location; import core.game.world.map.Location;
import core.game.world.map.RegionManager; import core.game.world.map.RegionManager;
import core.tools.RandomFunction; import core.tools.RandomFunction;
@ -41,21 +40,6 @@ public final class NPCDropTables {
* The npcs that will display drop messages * The npcs that will display drop messages
*/ */
public static final int[] MESSAGE_NPCS = { 50, 7133, 7134, 2881, 2882, 2883, 3200, 3340, 6247, 6203, 6260, 6222, 2745, 1160, 8133, 8610, 8611, 8612, 8613, 8614, 6204, 6206, 6208, 6261, 6263, 6265, 6223, 6225, 6227 }; public static final int[] MESSAGE_NPCS = { 50, 7133, 7134, 2881, 2882, 2883, 3200, 3340, 6247, 6203, 6260, 6222, 2745, 1160, 8133, 8610, 8611, 8612, 8613, 8614, 6204, 6206, 6208, 6261, 6263, 6265, 6223, 6225, 6227 };
/**
* The default drop table (holding the 100% drops).
*/
private final List<WeightedChanceItem> defaultTable = new ArrayList<>(20);
/**
* The charms drop table (holding the charm drops).
*/
private final List<WeightedChanceItem> charmTable = new ArrayList<>(20);
/**
* The main drop table (holding the main drops).
*/
private final List<WeightedChanceItem> mainTable = new ArrayList<>(20);
public final NPCDropTable table = new NPCDropTable(); public final NPCDropTable table = new NPCDropTable();
@ -239,41 +223,6 @@ public final class NPCDropTables {
return (1 / (1 + def.getCombatLevel())) * 10; return (1 / (1 + def.getCombatLevel())) * 10;
} }
/**
* @return the defaultTable.
*/
public List<WeightedChanceItem> getDefaultTable() {
return defaultTable;
}
/**
* @return the charmTable.
*/
public List<WeightedChanceItem> getCharmTable() {
return charmTable;
}
/**
* @return the mainTable.
*/
public List<WeightedChanceItem> getMainTable() {
return mainTable;
}
/**
* @return the mainTableSize.
*/
public int getMainTableSize() {
return mainTableSize;
}
/**
* @param mainTableSize the mainTableSize to set.
*/
public void setMainTableSize(int mainTableSize) {
this.mainTableSize = mainTableSize;
}
/** /**
* Gets the modRate. * Gets the modRate.
* @return The modRate. * @return The modRate.