Passive effect changes.
This commit is contained in:
@@ -17,14 +17,14 @@
|
|||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
|
||||||
import com.l2jmobius.gameserver.model.conditions.Condition;
|
import com.l2jmobius.gameserver.model.conditions.Condition;
|
||||||
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
|
import com.l2jmobius.gameserver.model.effects.EffectFlag;
|
||||||
import com.l2jmobius.gameserver.model.skills.BuffInfo;
|
import com.l2jmobius.gameserver.model.skills.BuffInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Passive effect implementation.
|
* Passive effect implementation.
|
||||||
* @author Adry_85
|
* @author Mobius
|
||||||
*/
|
*/
|
||||||
public final class Passive extends AbstractEffect
|
public final class Passive extends AbstractEffect
|
||||||
{
|
{
|
||||||
@@ -34,10 +34,9 @@ public final class Passive extends AbstractEffect
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExit(BuffInfo info)
|
public int getEffectFlags()
|
||||||
{
|
{
|
||||||
info.getEffected().enableAllSkills();
|
return EffectFlag.PASSIVE.getMask();
|
||||||
info.getEffected().setIsImmobilized(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -45,14 +44,4 @@ public final class Passive extends AbstractEffect
|
|||||||
{
|
{
|
||||||
return info.getEffected().isAttackable();
|
return info.getEffected().isAttackable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart(BuffInfo info)
|
|
||||||
{
|
|
||||||
final L2Attackable target = (L2Attackable) info.getEffected();
|
|
||||||
target.abortAttack();
|
|
||||||
target.abortCast();
|
|
||||||
target.disableAllSkills();
|
|
||||||
target.setIsImmobilized(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -5703,7 +5703,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// notify target AI about the attack
|
// notify target AI about the attack
|
||||||
if (((L2Character) target).hasAI() && !skill.hasEffectType(L2EffectType.HATE))
|
if (((L2Character) target).hasAI() && !skill.hasEffectType(L2EffectType.HATE) && (skill.getAbnormalType() != AbnormalType.TURN_PASSIVE))
|
||||||
{
|
{
|
||||||
((L2Character) target).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
((L2Character) target).getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, this);
|
||||||
}
|
}
|
||||||
|
@@ -24,6 +24,7 @@ import com.l2jmobius.gameserver.model.L2Object;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||||
|
import com.l2jmobius.gameserver.model.effects.EffectFlag;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.util.MinionList;
|
import com.l2jmobius.gameserver.util.MinionList;
|
||||||
|
|
||||||
@@ -94,7 +95,7 @@ public class L2MonsterInstance extends L2Attackable
|
|||||||
@Override
|
@Override
|
||||||
public boolean isAggressive()
|
public boolean isAggressive()
|
||||||
{
|
{
|
||||||
return getTemplate().isAggressive() && !isEventMob();
|
return getTemplate().isAggressive() && !isEventMob() && !isAffected(EffectFlag.PASSIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -32,6 +32,7 @@ public enum EffectFlag
|
|||||||
MUTED,
|
MUTED,
|
||||||
PSYCHICAL_MUTED,
|
PSYCHICAL_MUTED,
|
||||||
PSYCHICAL_ATTACK_MUTED,
|
PSYCHICAL_ATTACK_MUTED,
|
||||||
|
PASSIVE,
|
||||||
DISARMED,
|
DISARMED,
|
||||||
ROOTED,
|
ROOTED,
|
||||||
SLEEP,
|
SLEEP,
|
||||||
|
Reference in New Issue
Block a user