diff --git a/Server/src/main/content/global/skill/construction/HouseZone.java b/Server/src/main/content/global/skill/construction/HouseZone.java index 83bbd1da2..8b6a89548 100644 --- a/Server/src/main/content/global/skill/construction/HouseZone.java +++ b/Server/src/main/content/global/skill/construction/HouseZone.java @@ -1,12 +1,15 @@ package content.global.skill.construction; +import core.api.Container; import core.game.node.entity.Entity; import core.game.node.entity.player.Player; import core.game.world.map.zone.MapZone; import core.game.world.map.RegionManager; import core.game.world.map.Region; import core.game.system.task.Pulse; +import org.rs09.consts.Items; +import core.game.world.map.zone.ZoneRestriction; import core.game.world.map.zone.ZoneType; import static core.api.ContentAPIKt.*; @@ -91,6 +94,7 @@ public final class HouseZone extends MapZone { public boolean leave(Entity e, boolean logout) { if (e instanceof Player) { Player p = (Player) e; + remove_items(p); // The below tears down the house if the owner was the one who left if (house == p.getHouseManager()) { house.expelGuests(p); @@ -121,4 +125,40 @@ public final class HouseZone extends MapZone { } return true; } + + private final int[] itemsToRemove = { + Items.POT_OF_TEA_4_7692, + Items.POT_OF_TEA_3_7694, + Items.POT_OF_TEA_2_7696, + Items.POT_OF_TEA_1_7698, + Items.POT_OF_TEA_4_7704, + Items.POT_OF_TEA_3_7706, + Items.POT_OF_TEA_2_7708, + Items.POT_OF_TEA_1_7710, + Items.POT_OF_TEA_4_7716, + Items.POT_OF_TEA_3_7718, + Items.POT_OF_TEA_2_7720, + Items.POT_OF_TEA_1_7722, + Items.TEAPOT_WITH_LEAVES_7700, + Items.TEAPOT_WITH_LEAVES_7712, + Items.TEAPOT_WITH_LEAVES_7724, + Items.TEAPOT_7702, + Items.TEAPOT_7714, + Items.TEAPOT_7726, + Items.EMPTY_CUP_7728, + Items.CUP_OF_TEA_7730, + Items.PORCELAIN_CUP_7732, + Items.CUP_OF_TEA_7733, + Items.CUP_OF_TEA_7734, + Items.PORCELAIN_CUP_7735, + Items.CUP_OF_TEA_7736, + Items.CUP_OF_TEA_7737, + }; + + private void remove_items(Player p) { + // todo check BoB + for (int item : itemsToRemove) { + removeItem(p, item, Container.INVENTORY); + } + } }