Prohibit auto attacking guards with skills.
This commit is contained in:
parent
1238cae65a
commit
370ceaa8ef
@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.model.ActionDataHolder;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.GuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
|
||||
@ -249,6 +250,12 @@ public class AutoUseTaskManager
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
// Do not attack guards.
|
||||
if (target instanceof GuardInstance)
|
||||
{
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
if (canUseMagic(player, target, skill))
|
||||
{
|
||||
player.useMagic(skill, null, true, false);
|
||||
|
@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.model.ActionDataHolder;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.GuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
|
||||
@ -249,6 +250,12 @@ public class AutoUseTaskManager
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
// Do not attack guards.
|
||||
if (target instanceof GuardInstance)
|
||||
{
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
if (canUseMagic(player, target, skill))
|
||||
{
|
||||
player.useMagic(skill, null, true, false);
|
||||
|
@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.model.ActionDataHolder;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.GuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
|
||||
@ -249,6 +250,12 @@ public class AutoUseTaskManager
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
// Do not attack guards.
|
||||
if (target instanceof GuardInstance)
|
||||
{
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
if (canUseMagic(player, target, skill))
|
||||
{
|
||||
player.useMagic(skill, null, true, false);
|
||||
|
@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.model.ActionDataHolder;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.GuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
|
||||
@ -249,6 +250,12 @@ public class AutoUseTaskManager
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
// Do not attack guards.
|
||||
if (target instanceof GuardInstance)
|
||||
{
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
if (canUseMagic(player, target, skill))
|
||||
{
|
||||
player.useMagic(skill, null, true, false);
|
||||
|
@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.model.ActionDataHolder;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.GuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
|
||||
@ -249,6 +250,12 @@ public class AutoUseTaskManager
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
// Do not attack guards.
|
||||
if (target instanceof GuardInstance)
|
||||
{
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
if (canUseMagic(player, target, skill))
|
||||
{
|
||||
player.useMagic(skill, null, true, false);
|
||||
|
@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.model.ActionDataHolder;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.GuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
|
||||
@ -249,6 +250,12 @@ public class AutoUseTaskManager
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
// Do not attack guards.
|
||||
if (target instanceof GuardInstance)
|
||||
{
|
||||
continue SKILLS;
|
||||
}
|
||||
|
||||
if (canUseMagic(player, target, skill))
|
||||
{
|
||||
player.useMagic(skill, null, true, false);
|
||||
|
Loading…
Reference in New Issue
Block a user