forked from 2009Scape/Server
Implemented familiar auto loot blocklist
Adding the name of an item to the player ignore list will prevent familiars from looting that item.
This commit is contained in:
parent
97053798ff
commit
579df71848
1 changed files with 3 additions and 0 deletions
|
|
@ -172,6 +172,9 @@ public final class NPCDropTables {
|
|||
* @return true if item was successfully added.
|
||||
*/
|
||||
private boolean addItemFamiliar(Player player, Item item) {
|
||||
if (player.getCommunication().getBlocked().contains(item.getName().toLowerCase().replace(" ","_"))) {
|
||||
return false;
|
||||
}
|
||||
if ((player.getFamiliarManager().getFamiliar() instanceof PackYakNPC) && ((BurdenBeast) player.getFamiliarManager().getFamiliar()).getContainer().contains(12435, 1) && player.getBank().add(item)) {
|
||||
((BurdenBeast) player.getFamiliarManager().getFamiliar()).getContainer().remove(new Item(12435, 1));
|
||||
player.sendMessage("Your familiar picked up and banked " + item.getAmount() + " " + item.getName() + ".");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue