From eb5e17cf68f47cc6dab2dfd18c0bfd3d37551d37 Mon Sep 17 00:00:00 2001 From: Zoey76 <zoey_76@msn.com> Date: Mon, 6 Feb 2012 02:21:09 +0000 Subject: [PATCH] BETA: Fix for Sweeper, thanks VlLight. --- .../data/scripts/handlers/skillhandlers/Sweep.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Sweep.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Sweep.java index 6b14ec98c4..cd7efc04e4 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Sweep.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Sweep.java @@ -38,7 +38,7 @@ public class Sweep implements ISkillHandler @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { - if (!(activeChar instanceof L2PcInstance)) + if (!activeChar.isPlayer()) { return; } @@ -48,22 +48,23 @@ public class Sweep implements ISkillHandler L2Attackable target; L2SkillSweeper sweep; SystemMessage sm; - boolean canSweep = true; + boolean canSweep; + boolean isSweeping; for (L2Object tgt : targets) { - if (!(tgt instanceof L2Attackable)) + if (!tgt.isAttackable()) { continue; } target = (L2Attackable) tgt; - canSweep &= target.checkSpoilOwner(player, true); + canSweep = target.checkSpoilOwner(player, true); canSweep &= target.checkCorpseTime(player, maxSweepTime, true); canSweep &= player.getInventory().checkInventorySlotsAndWeight(target.getSpoilLootItems(), true, false); if (canSweep) { - boolean isSweeping = false; + isSweeping = false; synchronized (target) { if (target.isSweepActive()) -- GitLab