From 375474e4b5da1787cab0ec5fb7ab42682465dcda Mon Sep 17 00:00:00 2001 From: Neon Date: Thu, 22 Aug 2024 23:44:37 +0200 Subject: [PATCH] Added missing item use check --- .../model/templates/item/actions/SkillUseAction.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/game-server/src/com/aionemu/gameserver/model/templates/item/actions/SkillUseAction.java b/game-server/src/com/aionemu/gameserver/model/templates/item/actions/SkillUseAction.java index 2719e0b0d..8349cd01d 100644 --- a/game-server/src/com/aionemu/gameserver/model/templates/item/actions/SkillUseAction.java +++ b/game-server/src/com/aionemu/gameserver/model/templates/item/actions/SkillUseAction.java @@ -49,6 +49,10 @@ public int getLevel() { @Override public boolean canAct(Player player, Item parentItem, Item targetItem, Object... params) { + if (mapid != 0 && player.getWorldId() != mapid) { + PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_SKILL_CAN_NOT_USE_ITEM_IN_CURRENT_POSITION()); + return false; + } Skill skill = SkillEngine.getInstance().getSkill(player, skillid, level, player.getTarget(), parentItem.getItemTemplate()); if (skill == null) return false;