Skip to content
Snippets Groups Projects
Commit eb5e17cf authored by Zoey76's avatar Zoey76
Browse files

BETA: Fix for Sweeper, thanks VlLight.

parent 0a334644
No related branches found
No related tags found
No related merge requests found
......@@ -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())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment