Skill related enums rework.
This commit is contained in:
@@ -53,6 +53,7 @@ import org.l2jmobius.gameserver.model.item.Weapon;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.quest.EventType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||
import org.l2jmobius.gameserver.taskmanager.AttackableThinkTaskManager;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
@@ -880,17 +881,17 @@ public class AttackableAI extends CreatureAI
|
||||
inRange = true;
|
||||
}
|
||||
|
||||
if (((sk.getSkillType() == Skill.SkillType.BUFF) || (sk.getSkillType() == Skill.SkillType.HEAL) || inRange) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive() && (Rnd.get(100) <= 5))
|
||||
if (((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL) || inRange) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive() && (Rnd.get(100) <= 5))
|
||||
{
|
||||
if ((sk.getSkillType() == Skill.SkillType.BUFF) || (sk.getSkillType() == Skill.SkillType.HEAL))
|
||||
if ((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL))
|
||||
{
|
||||
if ((sk.getSkillType() == Skill.SkillType.HEAL) && (_actor.getCurrentHp() > (int) (_actor.getMaxHp() / 1.5)))
|
||||
if ((sk.getSkillType() == SkillType.HEAL) && (_actor.getCurrentHp() > (int) (_actor.getMaxHp() / 1.5)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
boolean useSkillSelf = true;
|
||||
if (sk.getSkillType() == Skill.SkillType.BUFF)
|
||||
if (sk.getSkillType() == SkillType.BUFF)
|
||||
{
|
||||
for (Effect effect : _actor.getAllEffects())
|
||||
{
|
||||
@@ -940,15 +941,15 @@ public class AttackableAI extends CreatureAI
|
||||
{
|
||||
if (/* sk.getCastRange() >= dist && sk.getCastRange() <= 70 && */!sk.isPassive() && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !_actor.isSkillDisabled(sk) && ((Rnd.get(100) <= 8) || ((_actor instanceof PenaltyMonster) && (Rnd.get(100) <= 20))))
|
||||
{
|
||||
if ((sk.getSkillType() == Skill.SkillType.BUFF) || (sk.getSkillType() == Skill.SkillType.HEAL))
|
||||
if ((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL))
|
||||
{
|
||||
if ((sk.getSkillType() == Skill.SkillType.HEAL) && (_actor.getCurrentHp() > (int) (_actor.getMaxHp() / 1.5)))
|
||||
if ((sk.getSkillType() == SkillType.HEAL) && (_actor.getCurrentHp() > (int) (_actor.getMaxHp() / 1.5)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
useSkillSelf = true;
|
||||
if (sk.getSkillType() == Skill.SkillType.BUFF)
|
||||
if (sk.getSkillType() == SkillType.BUFF)
|
||||
{
|
||||
for (Effect effect : _actor.getAllEffects())
|
||||
{
|
||||
|
@@ -31,7 +31,6 @@ import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@@ -43,6 +42,7 @@ import org.l2jmobius.gameserver.model.actor.instance.Commander;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Door;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Folk;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FortSiegeGuard;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
|
@@ -39,6 +39,7 @@ import org.l2jmobius.gameserver.model.actor.instance.Door;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Folk;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Monster;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.SiegeGuard;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||
|
||||
/**
|
||||
@@ -363,17 +364,17 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
for (Skill sk : skills)
|
||||
{
|
||||
final int castRange = sk.getCastRange();
|
||||
if (((sk.getSkillType() == Skill.SkillType.BUFF) || (sk.getSkillType() == Skill.SkillType.HEAL) || ((dist2 >= ((castRange * castRange) / 9)) && (dist2 <= (castRange * castRange)) && (castRange > 70))) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive())
|
||||
if (((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL) || ((dist2 >= ((castRange * castRange) / 9)) && (dist2 <= (castRange * castRange)) && (castRange > 70))) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive())
|
||||
{
|
||||
if ((sk.getSkillType() == Skill.SkillType.BUFF) || (sk.getSkillType() == Skill.SkillType.HEAL))
|
||||
if ((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL))
|
||||
{
|
||||
if (((sk.getSkillType() == Skill.SkillType.BUFF) || (sk.getSkillType() == Skill.SkillType.HEAL) || ((dist2 >= ((castRange * castRange) / 9)) && (dist2 <= (castRange * castRange)) && (castRange > 70))) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive())
|
||||
if (((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL) || ((dist2 >= ((castRange * castRange) / 9)) && (dist2 <= (castRange * castRange)) && (castRange > 70))) && !_actor.isSkillDisabled(sk) && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !sk.isPassive())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
boolean useSkillSelf = true;
|
||||
if (sk.getSkillType() == Skill.SkillType.BUFF)
|
||||
if (sk.getSkillType() == SkillType.BUFF)
|
||||
{
|
||||
for (Effect effect : _actor.getAllEffects())
|
||||
{
|
||||
@@ -479,15 +480,15 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
final int castRange = sk.getCastRange();
|
||||
if (((castRange * castRange) >= dist2) && (castRange <= 70) && !sk.isPassive() && (_actor.getCurrentMp() >= _actor.getStat().getMpConsume(sk)) && !_actor.isSkillDisabled(sk))
|
||||
{
|
||||
if ((sk.getSkillType() == Skill.SkillType.BUFF) || (sk.getSkillType() == Skill.SkillType.HEAL))
|
||||
if ((sk.getSkillType() == SkillType.BUFF) || (sk.getSkillType() == SkillType.HEAL))
|
||||
{
|
||||
if ((sk.getSkillType() == Skill.SkillType.HEAL) && (_actor.getCurrentHp() > (int) (_actor.getMaxHp() / 1.5)))
|
||||
if ((sk.getSkillType() == SkillType.HEAL) && (_actor.getCurrentHp() > (int) (_actor.getMaxHp() / 1.5)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
boolean useSkillSelf = true;
|
||||
if (sk.getSkillType() == Skill.SkillType.BUFF)
|
||||
if (sk.getSkillType() == SkillType.BUFF)
|
||||
{
|
||||
for (Effect effect : _actor.getAllEffects())
|
||||
{
|
||||
|
@@ -19,8 +19,8 @@ package org.l2jmobius.gameserver.handler;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
public interface ISkillHandler
|
||||
{
|
||||
|
@@ -55,7 +55,7 @@ import org.l2jmobius.gameserver.handler.skillhandlers.TakeCastle;
|
||||
import org.l2jmobius.gameserver.handler.skillhandlers.Unlock;
|
||||
import org.l2jmobius.gameserver.handler.skillhandlers.ZakenPlayer;
|
||||
import org.l2jmobius.gameserver.handler.skillhandlers.ZakenSelf;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
public class SkillHandler
|
||||
{
|
||||
|
@@ -18,11 +18,11 @@ package org.l2jmobius.gameserver.handler.itemhandlers;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Pet;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class Remedy implements IItemHandler
|
||||
{
|
||||
for (Effect effect : player.getAllEffects())
|
||||
{
|
||||
if ((effect.getSkill().getSkillType() == Skill.SkillType.POISON) && (effect.getSkill().getLevel() <= 3))
|
||||
if ((effect.getSkill().getSkillType() == SkillType.POISON) && (effect.getSkill().getLevel() <= 3))
|
||||
{
|
||||
effect.exit(true);
|
||||
break;
|
||||
@@ -80,7 +80,7 @@ public class Remedy implements IItemHandler
|
||||
{
|
||||
for (Effect effect : player.getAllEffects())
|
||||
{
|
||||
if ((effect.getSkill().getSkillType() == Skill.SkillType.POISON) && (effect.getSkill().getLevel() <= 7))
|
||||
if ((effect.getSkill().getSkillType() == SkillType.POISON) && (effect.getSkill().getLevel() <= 7))
|
||||
{
|
||||
effect.exit(true);
|
||||
break;
|
||||
@@ -95,7 +95,7 @@ public class Remedy implements IItemHandler
|
||||
{
|
||||
for (Effect effect : player.getAllEffects())
|
||||
{
|
||||
if ((effect.getSkill().getSkillType() == Skill.SkillType.BLEED) && (effect.getSkill().getLevel() <= 3))
|
||||
if ((effect.getSkill().getSkillType() == SkillType.BLEED) && (effect.getSkill().getLevel() <= 3))
|
||||
{
|
||||
effect.exit(true);
|
||||
break;
|
||||
@@ -110,7 +110,7 @@ public class Remedy implements IItemHandler
|
||||
{
|
||||
for (Effect effect : player.getAllEffects())
|
||||
{
|
||||
if ((effect.getSkill().getSkillType() == Skill.SkillType.BLEED) && (effect.getSkill().getLevel() <= 7))
|
||||
if ((effect.getSkill().getSkillType() == SkillType.BLEED) && (effect.getSkill().getLevel() <= 7))
|
||||
{
|
||||
effect.exit(true);
|
||||
break;
|
||||
|
@@ -22,9 +22,9 @@ import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.handler.SkillHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
|
||||
/**
|
||||
|
@@ -20,9 +20,9 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
/**
|
||||
* @author _drunk_
|
||||
|
@@ -23,7 +23,6 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
@@ -33,6 +32,7 @@ import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||
import org.l2jmobius.gameserver.model.skill.BaseStat;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
|
@@ -21,10 +21,10 @@ import java.util.List;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
public class Charge implements ISkillHandler
|
||||
{
|
||||
|
@@ -24,11 +24,11 @@ import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
@@ -21,9 +21,9 @@ import java.util.List;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.handler.SkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
@@ -28,7 +28,6 @@ import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@@ -38,6 +37,8 @@ import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Door;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
@@ -234,7 +235,7 @@ public class Continuous implements ISkillHandler
|
||||
}
|
||||
}
|
||||
|
||||
if (target.isDead() && (skill.getTargetType() == Skill.SkillTargetType.TARGET_AREA_CORPSE_MOB) && (target instanceof Npc))
|
||||
if (target.isDead() && (skill.getTargetType() == SkillTargetType.AREA_CORPSE_MOB) && (target instanceof Npc))
|
||||
{
|
||||
((Npc) target).endDecayTask();
|
||||
}
|
||||
|
@@ -20,12 +20,12 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
/**
|
||||
* Just a quick draft to support Wrath skill. Missing angle based calculation etc.
|
||||
|
@@ -21,9 +21,9 @@ import java.util.List;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.RecipeManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
|
||||
public class Craft implements ISkillHandler
|
||||
|
@@ -20,9 +20,9 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
/**
|
||||
* @author Julian
|
||||
|
@@ -33,7 +33,6 @@ import org.l2jmobius.gameserver.handler.SkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Effect.EffectType;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@@ -43,6 +42,8 @@ import org.l2jmobius.gameserver.model.actor.instance.Pet;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.SiegeSummon;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.player.CancelSkillRestoreTask;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@@ -298,7 +299,7 @@ public class Disablers implements ISkillHandler
|
||||
{
|
||||
if (Formulas.getInstance().calcSkillSuccess(creature, target, skill, ss, sps, bss))
|
||||
{
|
||||
if (skill.getTargetType() == Skill.SkillTargetType.TARGET_UNDEAD)
|
||||
if (skill.getTargetType() == SkillTargetType.UNDEAD)
|
||||
{
|
||||
if (target.isUndead())
|
||||
{
|
||||
|
@@ -20,9 +20,9 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
/**
|
||||
* @author _drunk_ TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
|
||||
|
@@ -25,13 +25,13 @@ import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.item.Weapon;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.zone.type.FishingZone;
|
||||
import org.l2jmobius.gameserver.model.zone.type.WaterZone;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
|
@@ -21,12 +21,12 @@ import java.util.List;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Fishing;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.item.Weapon;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
@@ -21,10 +21,10 @@ import java.util.List;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
|
||||
public class GetPlayer implements ISkillHandler
|
||||
|
@@ -20,9 +20,9 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
/**
|
||||
* @author Forsaiken
|
||||
|
@@ -22,13 +22,13 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Monster;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
|
||||
|
@@ -22,7 +22,6 @@ import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.handler.SkillHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
@@ -30,6 +29,7 @@ import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Door;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.RaidBoss;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
|
@@ -20,9 +20,9 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
|
@@ -20,13 +20,13 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
@@ -21,12 +21,13 @@ import java.util.List;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
@@ -62,7 +63,7 @@ public class Mdam implements ISkillHandler
|
||||
}
|
||||
else if (target.isAlikeDead())
|
||||
{
|
||||
if ((skill.getTargetType() == Skill.SkillTargetType.TARGET_AREA_CORPSE_MOB) && (target instanceof Npc))
|
||||
if ((skill.getTargetType() == SkillTargetType.AREA_CORPSE_MOB) && (target instanceof Npc))
|
||||
{
|
||||
((Npc) target).endDecayTask();
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@ import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
@@ -36,6 +35,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.skill.BaseStat;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
@@ -22,10 +22,10 @@ import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
@@ -21,13 +21,13 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Pet;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class Resurrect implements ISkillHandler
|
||||
targetPlayer = (Player) target;
|
||||
|
||||
// Check for same party or for same clan, if target is for clan.
|
||||
if ((skill.getTargetType() == SkillTargetType.TARGET_CORPSE_CLAN) && ((player == null) || (player.getClanId() != targetPlayer.getClanId())))
|
||||
if ((skill.getTargetType() == SkillTargetType.CORPSE_CLAN) && ((player == null) || (player.getClanId() != targetPlayer.getClanId())))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@@ -26,11 +26,11 @@ import org.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.IdManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
|
||||
/**
|
||||
|
@@ -23,11 +23,11 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.data.xml.ManorSeedData;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Monster;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||
|
@@ -21,12 +21,12 @@ import java.util.List;
|
||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Monster;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
|
@@ -22,7 +22,6 @@ import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
@@ -32,6 +31,7 @@ import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
|
@@ -21,10 +21,10 @@ import java.util.List;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ConfirmDlg;
|
||||
|
@@ -22,9 +22,9 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
/**
|
||||
* @author evill33t
|
||||
|
@@ -21,13 +21,13 @@ import java.util.List;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
|
||||
|
@@ -22,12 +22,12 @@ import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Artefact;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
|
@@ -22,12 +22,12 @@ import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Chest;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Door;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
@@ -21,15 +21,15 @@ import java.util.List;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
public class ZakenPlayer implements ISkillHandler
|
||||
{
|
||||
private static final SkillType[] SKILL_TYPES =
|
||||
{
|
||||
SkillType.ZAKENPLAYER
|
||||
SkillType.ZAKEN_PLAYER
|
||||
};
|
||||
|
||||
@Override
|
||||
|
@@ -21,15 +21,15 @@ import java.util.List;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
public class ZakenSelf implements ISkillHandler
|
||||
{
|
||||
private static final SkillType[] SKILL_TYPES =
|
||||
{
|
||||
SkillType.ZAKENSELF
|
||||
SkillType.ZAKEN_SELF
|
||||
};
|
||||
|
||||
@Override
|
||||
|
@@ -24,10 +24,10 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.threads.ThreadPool;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.Func;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.FuncTemplate;
|
||||
|
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -48,22 +47,15 @@ import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
import org.l2jmobius.gameserver.model.skill.BaseStat;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillOperateType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.Condition;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.Func;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.FuncTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillCharge;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillChargeDmg;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillChargeEffect;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillCreateItem;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillDefault;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillDrain;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSeed;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSignet;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSignetCasttime;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSummon;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@@ -87,203 +79,6 @@ public abstract class Skill
|
||||
public static final int SKILL_FAKE_DEX = 9005;
|
||||
public static final int SKILL_FAKE_STR = 9006;
|
||||
|
||||
private final int _targetConsumeId;
|
||||
private final int _targetConsume;
|
||||
|
||||
public enum SkillOpType
|
||||
{
|
||||
OP_PASSIVE,
|
||||
OP_ACTIVE,
|
||||
OP_TOGGLE,
|
||||
OP_CHANCE
|
||||
}
|
||||
|
||||
/** Target types of skills : SELF, PARTY, CLAN, PET... */
|
||||
public enum SkillTargetType
|
||||
{
|
||||
TARGET_NONE,
|
||||
TARGET_SELF,
|
||||
TARGET_ONE,
|
||||
TARGET_PARTY,
|
||||
TARGET_ALLY,
|
||||
TARGET_CLAN,
|
||||
TARGET_PET,
|
||||
TARGET_AREA,
|
||||
TARGET_AURA,
|
||||
TARGET_CORPSE,
|
||||
TARGET_UNDEAD,
|
||||
TARGET_AREA_UNDEAD,
|
||||
TARGET_MULTIFACE,
|
||||
TARGET_CORPSE_ALLY,
|
||||
TARGET_CORPSE_CLAN,
|
||||
TARGET_CORPSE_PLAYER,
|
||||
TARGET_CORPSE_PET,
|
||||
TARGET_ITEM,
|
||||
TARGET_AREA_CORPSE_MOB,
|
||||
TARGET_CORPSE_MOB,
|
||||
TARGET_UNLOCKABLE,
|
||||
TARGET_HOLY,
|
||||
TARGET_PARTY_MEMBER,
|
||||
TARGET_PARTY_OTHER,
|
||||
TARGET_ENEMY_SUMMON,
|
||||
TARGET_OWNER_PET,
|
||||
TARGET_GROUND,
|
||||
TARGET_SIEGE,
|
||||
TARGET_TYRANNOSAURUS,
|
||||
TARGET_AREA_AIM_CORPSE,
|
||||
TARGET_CLAN_MEMBER
|
||||
}
|
||||
|
||||
public enum SkillType
|
||||
{
|
||||
// Damage
|
||||
PDAM,
|
||||
MDAM,
|
||||
CPDAM,
|
||||
MANADAM,
|
||||
DOT,
|
||||
MDOT,
|
||||
DRAIN_SOUL,
|
||||
DRAIN(SkillDrain.class),
|
||||
DEATHLINK,
|
||||
FATALCOUNTER,
|
||||
BLOW,
|
||||
|
||||
// Disablers
|
||||
BLEED,
|
||||
POISON,
|
||||
STUN,
|
||||
ROOT,
|
||||
CONFUSION,
|
||||
FEAR,
|
||||
SLEEP,
|
||||
CONFUSE_MOB_ONLY,
|
||||
MUTE,
|
||||
PARALYZE,
|
||||
WEAKNESS,
|
||||
|
||||
// hp, mp, cp
|
||||
HEAL,
|
||||
HOT,
|
||||
BALANCE_LIFE,
|
||||
HEAL_PERCENT,
|
||||
HEAL_STATIC,
|
||||
COMBATPOINTHEAL,
|
||||
COMBATPOINTPERCENTHEAL,
|
||||
CPHOT,
|
||||
MANAHEAL,
|
||||
MANA_BY_LEVEL,
|
||||
MANAHEAL_PERCENT,
|
||||
MANARECHARGE,
|
||||
MPHOT,
|
||||
|
||||
// Aggro
|
||||
AGGDAMAGE,
|
||||
AGGREDUCE,
|
||||
AGGREMOVE,
|
||||
AGGREDUCE_CHAR,
|
||||
AGGDEBUFF,
|
||||
|
||||
// Fishing
|
||||
FISHING,
|
||||
PUMPING,
|
||||
REELING,
|
||||
|
||||
// MISC
|
||||
UNLOCK,
|
||||
ENCHANT_ARMOR,
|
||||
ENCHANT_WEAPON,
|
||||
SOULSHOT,
|
||||
SPIRITSHOT,
|
||||
SIEGEFLAG,
|
||||
TAKECASTLE,
|
||||
DELUXE_KEY_UNLOCK,
|
||||
SOW,
|
||||
HARVEST,
|
||||
GET_PLAYER,
|
||||
|
||||
// Creation
|
||||
COMMON_CRAFT,
|
||||
DWARVEN_CRAFT,
|
||||
CREATE_ITEM(SkillCreateItem.class),
|
||||
SUMMON_TREASURE_KEY,
|
||||
|
||||
// Summons
|
||||
SUMMON(SkillSummon.class),
|
||||
FEED_PET,
|
||||
DEATHLINK_PET,
|
||||
STRSIEGEASSAULT,
|
||||
ERASE,
|
||||
BETRAY,
|
||||
|
||||
// Cancel
|
||||
CANCEL,
|
||||
MAGE_BANE,
|
||||
WARRIOR_BANE,
|
||||
NEGATE,
|
||||
|
||||
BUFF,
|
||||
DEBUFF,
|
||||
PASSIVE,
|
||||
CONT,
|
||||
SIGNET(SkillSignet.class),
|
||||
SIGNET_CASTTIME(SkillSignetCasttime.class),
|
||||
|
||||
RESURRECT,
|
||||
CHARGE(SkillCharge.class),
|
||||
CHARGE_EFFECT(SkillChargeEffect.class),
|
||||
CHARGEDAM(SkillChargeDmg.class),
|
||||
MHOT,
|
||||
DETECT_WEAKNESS,
|
||||
LUCK,
|
||||
RECALL,
|
||||
SUMMON_FRIEND,
|
||||
REFLECT,
|
||||
SPOIL,
|
||||
SWEEP,
|
||||
FAKE_DEATH,
|
||||
UNBLEED,
|
||||
UNPOISON,
|
||||
UNDEAD_DEFENSE,
|
||||
SEED(SkillSeed.class),
|
||||
BEAST_FEED,
|
||||
FORCE_BUFF,
|
||||
CLAN_GATE,
|
||||
GIVE_SP,
|
||||
COREDONE,
|
||||
ZAKENPLAYER,
|
||||
ZAKENSELF,
|
||||
|
||||
// unimplemented
|
||||
NOTDONE;
|
||||
|
||||
private final Class<? extends Skill> _class;
|
||||
|
||||
public Skill makeSkill(StatSet set)
|
||||
{
|
||||
try
|
||||
{
|
||||
final Constructor<? extends Skill> c = _class.getConstructor(StatSet.class);
|
||||
return c.newInstance(set);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private SkillType()
|
||||
{
|
||||
_class = SkillDefault.class;
|
||||
}
|
||||
|
||||
private SkillType(Class<? extends Skill> classType)
|
||||
{
|
||||
_class = classType;
|
||||
}
|
||||
}
|
||||
|
||||
protected ChanceCondition _chanceCondition = null;
|
||||
// elements
|
||||
public static final int ELEMENT_WIND = 1;
|
||||
public static final int ELEMENT_FIRE = 2;
|
||||
@@ -385,7 +180,7 @@ public abstract class Skill
|
||||
|
||||
// not needed, just for easier debug
|
||||
private final String _name;
|
||||
private final SkillOpType _operateType;
|
||||
private final SkillOperateType _operateType;
|
||||
private final boolean _magic;
|
||||
private final boolean _staticReuse;
|
||||
private final boolean _staticHitTime;
|
||||
@@ -503,6 +298,11 @@ public abstract class Skill
|
||||
private final boolean _advancedFlag;
|
||||
private final int _advancedMultiplier;
|
||||
|
||||
private final int _targetConsumeId;
|
||||
private final int _targetConsume;
|
||||
|
||||
protected ChanceCondition _chanceCondition = null;
|
||||
|
||||
protected Skill(StatSet set)
|
||||
{
|
||||
_id = set.getInt("skill_id", 0);
|
||||
@@ -511,7 +311,7 @@ public abstract class Skill
|
||||
_advancedMultiplier = set.getInt("advancedMultiplier", 1);
|
||||
_displayId = set.getInt("displayId", _id);
|
||||
_name = set.getString("name");
|
||||
_operateType = set.getEnum("operateType", SkillOpType.class);
|
||||
_operateType = set.getEnum("operateType", SkillOperateType.class);
|
||||
_magic = set.getBoolean("isMagic", false);
|
||||
_staticReuse = set.getBoolean("staticReuse", false);
|
||||
_staticHitTime = set.getBoolean("staticHitTime", false);
|
||||
@@ -571,7 +371,7 @@ public abstract class Skill
|
||||
_bestowed = set.getBoolean("bestowed", false);
|
||||
_targetConsume = set.getInt("targetConsumeCount", 0);
|
||||
_targetConsumeId = set.getInt("targetConsumeId", 0);
|
||||
if (_operateType == SkillOpType.OP_CHANCE)
|
||||
if (_operateType == SkillOperateType.CHANCE)
|
||||
{
|
||||
_chanceCondition = ChanceCondition.parse(set);
|
||||
}
|
||||
@@ -1047,22 +847,22 @@ public abstract class Skill
|
||||
|
||||
public boolean isActive()
|
||||
{
|
||||
return _operateType == SkillOpType.OP_ACTIVE;
|
||||
return _operateType == SkillOperateType.ACTIVE;
|
||||
}
|
||||
|
||||
public boolean isPassive()
|
||||
{
|
||||
return _operateType == SkillOpType.OP_PASSIVE;
|
||||
return _operateType == SkillOperateType.PASSIVE;
|
||||
}
|
||||
|
||||
public boolean isToggle()
|
||||
{
|
||||
return _operateType == SkillOpType.OP_TOGGLE;
|
||||
return _operateType == SkillOperateType.TOGGLE;
|
||||
}
|
||||
|
||||
public boolean isChance()
|
||||
{
|
||||
return _operateType == SkillOpType.OP_CHANCE;
|
||||
return _operateType == SkillOperateType.CHANCE;
|
||||
}
|
||||
|
||||
public ChanceCondition getChanceCondition()
|
||||
@@ -1420,7 +1220,7 @@ public abstract class Skill
|
||||
switch (_targetType)
|
||||
{
|
||||
// The skill can only be used on the Creature targeted, or on the caster itself
|
||||
case TARGET_ONE:
|
||||
case ONE:
|
||||
{
|
||||
boolean canTargetSelf = false;
|
||||
switch (_skillType)
|
||||
@@ -1521,13 +1321,13 @@ public abstract class Skill
|
||||
targetList.add(target);
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_SELF:
|
||||
case TARGET_GROUND:
|
||||
case SELF:
|
||||
case GROUND:
|
||||
{
|
||||
targetList.add(creature);
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_HOLY:
|
||||
case HOLY:
|
||||
{
|
||||
if ((creature instanceof Player) && (creature.getTarget() instanceof Artefact))
|
||||
{
|
||||
@@ -1537,7 +1337,7 @@ public abstract class Skill
|
||||
return null;
|
||||
}
|
||||
|
||||
case TARGET_PET:
|
||||
case PET:
|
||||
{
|
||||
target = creature.getPet();
|
||||
if ((target != null) && !target.isDead())
|
||||
@@ -1547,7 +1347,7 @@ public abstract class Skill
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case TARGET_OWNER_PET:
|
||||
case OWNER_PET:
|
||||
{
|
||||
if (creature instanceof Summon)
|
||||
{
|
||||
@@ -1560,7 +1360,7 @@ public abstract class Skill
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case TARGET_CORPSE_PET:
|
||||
case CORPSE_PET:
|
||||
{
|
||||
if (creature instanceof Player)
|
||||
{
|
||||
@@ -1573,7 +1373,7 @@ public abstract class Skill
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case TARGET_AURA:
|
||||
case AURA:
|
||||
{
|
||||
final int radius = _skillRadius;
|
||||
final boolean srcInArena = creature.isInsideZone(ZoneId.PVP) && !creature.isInsideZone(ZoneId.SIEGE);
|
||||
@@ -1681,7 +1481,7 @@ public abstract class Skill
|
||||
}
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_AREA:
|
||||
case AREA:
|
||||
{
|
||||
// Like L2OFF players can use TARGET_AREA skills on NPC in peacezone
|
||||
if ((!(target instanceof Attackable) && !(target instanceof Playable) && !(target instanceof Npc)) || // Target is not Attackable or PlayableInstance or Npc
|
||||
@@ -1862,7 +1662,7 @@ public abstract class Skill
|
||||
}
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_MULTIFACE:
|
||||
case MULTIFACE:
|
||||
{
|
||||
if (!(target instanceof Attackable) && !(target instanceof Player))
|
||||
{
|
||||
@@ -1939,7 +1739,7 @@ public abstract class Skill
|
||||
return targetList;
|
||||
// TODO multiface targets all around right now. need it to just get targets the character is facing.
|
||||
}
|
||||
case TARGET_PARTY:
|
||||
case PARTY:
|
||||
{
|
||||
targetList.add(creature);
|
||||
if (onlyFirst)
|
||||
@@ -2004,7 +1804,7 @@ public abstract class Skill
|
||||
}
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_PARTY_MEMBER:
|
||||
case PARTY_MEMBER:
|
||||
{
|
||||
if ((target != null) && !target.isDead() && ((target == creature) || ((creature.getParty() != null) && (target.getParty() != null) && (creature.getParty().getPartyLeaderOID() == target.getParty().getPartyLeaderOID())) || (creature.getPet() == target) || (creature == target.getPet())))
|
||||
{
|
||||
@@ -2015,7 +1815,7 @@ public abstract class Skill
|
||||
creature.sendPacket(new SystemMessage(SystemMessageId.THAT_IS_THE_INCORRECT_TARGET));
|
||||
return null;
|
||||
}
|
||||
case TARGET_PARTY_OTHER:
|
||||
case PARTY_OTHER:
|
||||
{
|
||||
if ((target != creature) && (target != null) && !target.isDead() && (creature.getParty() != null) && (target.getParty() != null) && (creature.getParty().getPartyLeaderOID() == target.getParty().getPartyLeaderOID()))
|
||||
{
|
||||
@@ -2026,15 +1826,15 @@ public abstract class Skill
|
||||
creature.sendPacket(new SystemMessage(SystemMessageId.THAT_IS_THE_INCORRECT_TARGET));
|
||||
return null;
|
||||
}
|
||||
case TARGET_CORPSE_ALLY:
|
||||
case TARGET_ALLY:
|
||||
case CORPSE_ALLY:
|
||||
case ALLY:
|
||||
{
|
||||
if (creature instanceof Player)
|
||||
{
|
||||
final int radius = _skillRadius;
|
||||
final Player player = (Player) creature;
|
||||
final Clan clan = player.getClan();
|
||||
if (_targetType != SkillTargetType.TARGET_CORPSE_ALLY) // if corpse, the caster is not included
|
||||
if (_targetType != SkillTargetType.CORPSE_ALLY) // if corpse, the caster is not included
|
||||
{
|
||||
if (player.isInOlympiadMode())
|
||||
{
|
||||
@@ -2058,7 +1858,7 @@ public abstract class Skill
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (newPlayer.isDead() && (_targetType != SkillTargetType.TARGET_CORPSE_ALLY))
|
||||
if (newPlayer.isDead() && (_targetType != SkillTargetType.CORPSE_ALLY))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -2077,15 +1877,15 @@ public abstract class Skill
|
||||
}
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_CORPSE_CLAN:
|
||||
case TARGET_CLAN:
|
||||
case CORPSE_CLAN:
|
||||
case CLAN:
|
||||
{
|
||||
if (creature instanceof Player)
|
||||
{
|
||||
final int radius = _skillRadius;
|
||||
final Player player = (Player) creature;
|
||||
final Clan clan = player.getClan();
|
||||
if (_targetType != SkillTargetType.TARGET_CORPSE_CLAN)
|
||||
if (_targetType != SkillTargetType.CORPSE_CLAN)
|
||||
{
|
||||
if (player.isInOlympiadMode())
|
||||
{
|
||||
@@ -2120,11 +1920,11 @@ public abstract class Skill
|
||||
}
|
||||
|
||||
final Summon pet = newTarget.getPet();
|
||||
if ((pet != null) && Util.checkIfInRange(radius, creature, pet, true) && !onlyFirst && (((_targetType == SkillTargetType.TARGET_CORPSE_CLAN) && pet.isDead()) || ((_targetType == SkillTargetType.TARGET_CLAN) && !pet.isDead())) && player.checkPvpSkill(newTarget, this))
|
||||
if ((pet != null) && Util.checkIfInRange(radius, creature, pet, true) && !onlyFirst && (((_targetType == SkillTargetType.CORPSE_CLAN) && pet.isDead()) || ((_targetType == SkillTargetType.CLAN) && !pet.isDead())) && player.checkPvpSkill(newTarget, this))
|
||||
{
|
||||
targetList.add(pet);
|
||||
}
|
||||
if (_targetType == SkillTargetType.TARGET_CORPSE_CLAN)
|
||||
if (_targetType == SkillTargetType.CORPSE_CLAN)
|
||||
{
|
||||
if (!newTarget.isDead())
|
||||
{
|
||||
@@ -2186,7 +1986,7 @@ public abstract class Skill
|
||||
}
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_CORPSE_PLAYER:
|
||||
case CORPSE_PLAYER:
|
||||
{
|
||||
if ((target != null) && target.isDead())
|
||||
{
|
||||
@@ -2250,7 +2050,7 @@ public abstract class Skill
|
||||
creature.sendPacket(new SystemMessage(SystemMessageId.THAT_IS_THE_INCORRECT_TARGET));
|
||||
return null;
|
||||
}
|
||||
case TARGET_CORPSE_MOB:
|
||||
case CORPSE_MOB:
|
||||
{
|
||||
if (!(target instanceof Attackable) || !target.isDead())
|
||||
{
|
||||
@@ -2261,7 +2061,7 @@ public abstract class Skill
|
||||
targetList.add(target);
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_AREA_CORPSE_MOB:
|
||||
case AREA_CORPSE_MOB:
|
||||
{
|
||||
if (!(target instanceof Attackable) || !target.isDead())
|
||||
{
|
||||
@@ -2378,7 +2178,7 @@ public abstract class Skill
|
||||
}
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_UNLOCKABLE:
|
||||
case UNLOCKABLE:
|
||||
{
|
||||
if (!(target instanceof Door) && !(target instanceof Chest))
|
||||
{
|
||||
@@ -2390,12 +2190,12 @@ public abstract class Skill
|
||||
targetList.add(target);
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_ITEM:
|
||||
case ITEM:
|
||||
{
|
||||
creature.sendMessage("Target type of skill is not currently handled.");
|
||||
return null;
|
||||
}
|
||||
case TARGET_UNDEAD:
|
||||
case UNDEAD:
|
||||
{
|
||||
if ((target instanceof Npc) || (target instanceof Servitor))
|
||||
{
|
||||
@@ -2411,7 +2211,7 @@ public abstract class Skill
|
||||
creature.sendPacket(new SystemMessage(SystemMessageId.THAT_IS_THE_INCORRECT_TARGET));
|
||||
return null;
|
||||
}
|
||||
case TARGET_AREA_UNDEAD:
|
||||
case AREA_UNDEAD:
|
||||
{
|
||||
Creature cha;
|
||||
final int radius = _skillRadius;
|
||||
@@ -2477,7 +2277,7 @@ public abstract class Skill
|
||||
}
|
||||
return targetList;
|
||||
}
|
||||
case TARGET_ENEMY_SUMMON:
|
||||
case ENEMY_SUMMON:
|
||||
{
|
||||
if (target instanceof Summon)
|
||||
{
|
||||
@@ -2490,7 +2290,7 @@ public abstract class Skill
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case TARGET_SIEGE:
|
||||
case SIEGE:
|
||||
{
|
||||
if ((target != null) && !target.isDead() && ((target instanceof Door) || (target instanceof ControlTower)))
|
||||
{
|
||||
@@ -2499,7 +2299,7 @@ public abstract class Skill
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case TARGET_TYRANNOSAURUS:
|
||||
case TYRANNOSAURUS:
|
||||
{
|
||||
if (target instanceof Player)
|
||||
{
|
||||
@@ -2513,7 +2313,7 @@ public abstract class Skill
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case TARGET_AREA_AIM_CORPSE:
|
||||
case AREA_AIM_CORPSE:
|
||||
{
|
||||
if ((target != null) && target.isDead())
|
||||
{
|
||||
@@ -2523,7 +2323,7 @@ public abstract class Skill
|
||||
return null;
|
||||
}
|
||||
// npc only for now - untested
|
||||
case TARGET_CLAN_MEMBER:
|
||||
case CLAN_MEMBER:
|
||||
{
|
||||
if (creature instanceof Npc)
|
||||
{
|
||||
|
@@ -54,8 +54,6 @@ import org.l2jmobius.gameserver.model.ForceBuff;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
@@ -89,6 +87,8 @@ import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.skill.Calculator;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.Func;
|
||||
@@ -1337,7 +1337,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
return;
|
||||
}
|
||||
boolean canCast = true;
|
||||
if ((skill.getTargetType() == SkillTargetType.TARGET_GROUND) && (this instanceof Player))
|
||||
if ((skill.getTargetType() == SkillTargetType.GROUND) && (this instanceof Player))
|
||||
{
|
||||
final Location wp = ((Player) this).getCurrentSkillWorldPosition();
|
||||
if (!region.checkEffectRangeInsidePeaceZone(skill, wp.getX(), wp.getY(), wp.getZ()))
|
||||
@@ -1386,7 +1386,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
final List<Creature> targets = skill.getTargetList(this);
|
||||
// Set the target of the skill in function of Skill Type and Target Type
|
||||
Creature target = null;
|
||||
if ((skill.getTargetType() == SkillTargetType.TARGET_AURA) || (skill.getTargetType() == SkillTargetType.TARGET_GROUND) || skill.isPotion())
|
||||
if ((skill.getTargetType() == SkillTargetType.AURA) || (skill.getTargetType() == SkillTargetType.GROUND) || skill.isPotion())
|
||||
{
|
||||
target = this;
|
||||
}
|
||||
@@ -1395,7 +1395,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
getAI().notifyEvent(CtrlEvent.EVT_CANCEL);
|
||||
return;
|
||||
}
|
||||
else if (((skill.getSkillType() == SkillType.BUFF) || (skill.getSkillType() == SkillType.HEAL) || (skill.getSkillType() == SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == SkillType.COMBATPOINTPERCENTHEAL) || (skill.getSkillType() == SkillType.MANAHEAL) || (skill.getSkillType() == SkillType.REFLECT) || (skill.getSkillType() == SkillType.SEED) || (skill.getTargetType() == SkillTargetType.TARGET_SELF) || (skill.getTargetType() == SkillTargetType.TARGET_PET) || (skill.getTargetType() == SkillTargetType.TARGET_PARTY) || (skill.getTargetType() == SkillTargetType.TARGET_CLAN) || (skill.getTargetType() == SkillTargetType.TARGET_ALLY)) && !skill.isPotion())
|
||||
else if (((skill.getSkillType() == SkillType.BUFF) || (skill.getSkillType() == SkillType.HEAL) || (skill.getSkillType() == SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == SkillType.COMBATPOINTPERCENTHEAL) || (skill.getSkillType() == SkillType.MANAHEAL) || (skill.getSkillType() == SkillType.REFLECT) || (skill.getSkillType() == SkillType.SEED) || (skill.getTargetType() == SkillTargetType.SELF) || (skill.getTargetType() == SkillTargetType.PET) || (skill.getTargetType() == SkillTargetType.PARTY) || (skill.getTargetType() == SkillTargetType.CLAN) || (skill.getTargetType() == SkillTargetType.ALLY)) && !skill.isPotion())
|
||||
{
|
||||
target = targets.get(0);
|
||||
}
|
||||
@@ -1899,8 +1899,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
|
||||
switch (skill.getTargetType())
|
||||
{
|
||||
case TARGET_AURA: // AURA, SELF should be cast even if no target has been found
|
||||
case TARGET_SELF:
|
||||
case AURA: // AURA, SELF should be cast even if no target has been found
|
||||
case SELF:
|
||||
{
|
||||
target = this;
|
||||
break;
|
||||
@@ -6820,7 +6820,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
*/
|
||||
public void onMagicLaunchedTimer(List<Creature> targets, Skill skill, int coolTime, boolean instant)
|
||||
{
|
||||
if ((skill == null) || (((targets == null) || targets.isEmpty()) && (skill.getTargetType() != SkillTargetType.TARGET_AURA)))
|
||||
if ((skill == null) || (((targets == null) || targets.isEmpty()) && (skill.getTargetType() != SkillTargetType.AURA)))
|
||||
{
|
||||
_skillCast = null;
|
||||
enableAllSkills();
|
||||
@@ -6878,7 +6878,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
}
|
||||
|
||||
if (targetList.isEmpty() && (skill.getTargetType() != SkillTargetType.TARGET_AURA))
|
||||
if (targetList.isEmpty() && (skill.getTargetType() != SkillTargetType.AURA))
|
||||
{
|
||||
if (this instanceof Player)
|
||||
{
|
||||
@@ -6949,7 +6949,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
*/
|
||||
public void onMagicHitTimer(List<Creature> targets, Skill skill, int coolTime, boolean instant)
|
||||
{
|
||||
if ((skill == null) || (((targets == null) || targets.isEmpty()) && (skill.getTargetType() != SkillTargetType.TARGET_AURA)))
|
||||
if ((skill == null) || (((targets == null) || targets.isEmpty()) && (skill.getTargetType() != SkillTargetType.AURA)))
|
||||
{
|
||||
_skillCast = null;
|
||||
enableAllSkills();
|
||||
|
@@ -46,7 +46,6 @@ import org.l2jmobius.gameserver.instancemanager.games.Lottery;
|
||||
import org.l2jmobius.gameserver.model.DropCategory;
|
||||
import org.l2jmobius.gameserver.model.DropData;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.CastleTeleporter;
|
||||
@@ -78,6 +77,7 @@ import org.l2jmobius.gameserver.model.sevensigns.SevenSigns;
|
||||
import org.l2jmobius.gameserver.model.sevensigns.SevenSignsFestival;
|
||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||
import org.l2jmobius.gameserver.model.siege.Fort;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||
import org.l2jmobius.gameserver.model.zone.type.TownZone;
|
||||
|
@@ -97,8 +97,6 @@ import org.l2jmobius.gameserver.model.Request;
|
||||
import org.l2jmobius.gameserver.model.ShortCut;
|
||||
import org.l2jmobius.gameserver.model.ShortCuts;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
import org.l2jmobius.gameserver.model.SubClass;
|
||||
import org.l2jmobius.gameserver.model.Timestamp;
|
||||
@@ -161,6 +159,8 @@ import org.l2jmobius.gameserver.model.siege.Siege;
|
||||
import org.l2jmobius.gameserver.model.siege.clanhalls.DevastatedCastle;
|
||||
import org.l2jmobius.gameserver.model.skill.BaseStat;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSummon;
|
||||
@@ -649,7 +649,7 @@ public class Player extends Playable
|
||||
// Like L2OFF you can use cupid bow skills on peace zone
|
||||
// Like L2OFF players can use TARGET_AURA skills on peace zone, all targets will be ignored.
|
||||
// Check limited to active target.
|
||||
if (skill.isOffensive() && (isInsidePeaceZone(Player.this, getTarget()) && (skill.getTargetType() != SkillTargetType.TARGET_AURA)) && ((skill.getId() != 3260 /* Forgiveness */) && (skill.getId() != 3261 /* Heart Shot */) && (skill.getId() != 3262/* Double Heart Shot */)))
|
||||
if (skill.isOffensive() && (isInsidePeaceZone(Player.this, getTarget()) && (skill.getTargetType() != SkillTargetType.AURA)) && ((skill.getId() != 3260 /* Forgiveness */) && (skill.getId() != 3261 /* Heart Shot */) && (skill.getId() != 3262/* Double Heart Shot */)))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
@@ -664,7 +664,7 @@ public class Player extends Playable
|
||||
|
||||
switch (skill.getTargetType())
|
||||
{
|
||||
case TARGET_GROUND:
|
||||
case GROUND:
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2435,7 +2435,7 @@ public class Player extends Playable
|
||||
final Skill effectSkill = currenteffect.getSkill();
|
||||
// Ignore all buff skills that are party related (ie. songs, dances) while still remaining weapon dependant on cast though.
|
||||
// Check to rest to assure current effect meets weapon requirements.
|
||||
if (!effectSkill.isOffensive() && ((effectSkill.getTargetType() != SkillTargetType.TARGET_PARTY) || (effectSkill.getSkillType() != SkillType.BUFF)) && !effectSkill.getWeaponDependancy(this))
|
||||
if (!effectSkill.isOffensive() && ((effectSkill.getTargetType() != SkillTargetType.PARTY) || (effectSkill.getSkillType() != SkillType.BUFF)) && !effectSkill.getWeaponDependancy(this))
|
||||
{
|
||||
sendMessage(effectSkill.getName() + " cannot be used with this weapon.");
|
||||
currenteffect.exit();
|
||||
@@ -9231,7 +9231,7 @@ public class Player extends Playable
|
||||
switch (skillTargetType)
|
||||
{
|
||||
// Target the player if skill type is AURA, PARTY, CLAN or SELF
|
||||
case TARGET_AURA:
|
||||
case AURA:
|
||||
{
|
||||
if (isInOlympiadMode() && !isOlympiadStart())
|
||||
{
|
||||
@@ -9239,16 +9239,16 @@ public class Player extends Playable
|
||||
}
|
||||
// fallthough?
|
||||
}
|
||||
case TARGET_PARTY:
|
||||
case TARGET_ALLY:
|
||||
case TARGET_CLAN:
|
||||
case TARGET_GROUND:
|
||||
case TARGET_SELF:
|
||||
case PARTY:
|
||||
case ALLY:
|
||||
case CLAN:
|
||||
case GROUND:
|
||||
case SELF:
|
||||
{
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
case TARGET_PET:
|
||||
case PET:
|
||||
{
|
||||
target = getPet();
|
||||
break;
|
||||
@@ -9461,14 +9461,14 @@ public class Player extends Playable
|
||||
{
|
||||
if (isInsidePeaceZone(this, target) // Like L2OFF you can use cupid bow skills on peace zone
|
||||
&& ((skill.getId() != 3260 /* Forgiveness */) && (skill.getId() != 3261 /* Heart Shot */) && (skill.getId() != 3262 /* Double Heart Shot */) //
|
||||
&& (skillTargetType != SkillTargetType.TARGET_AURA))) // Like L2OFF people can use TARGET_AURE skills on peace zone
|
||||
&& (skillTargetType != SkillTargetType.AURA))) // Like L2OFF people can use TARGET_AURE skills on peace zone
|
||||
{
|
||||
// If Creature or target is in a peace zone, send a system message TARGET_IN_PEACEZONE a Server->Client packet ActionFailed
|
||||
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_THIS_TARGET_IN_A_PEACEFUL_ZONE);
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
if (isInOlympiadMode() && !isOlympiadStart() && (skillTargetType != SkillTargetType.TARGET_AURA))
|
||||
if (isInOlympiadMode() && !isOlympiadStart() && (skillTargetType != SkillTargetType.AURA))
|
||||
{
|
||||
// if Player is in Olympia and the match isn't already start, send a Server->Client packet ActionFailed
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
@@ -9484,12 +9484,12 @@ public class Player extends Playable
|
||||
// Check if a Forced ATTACK is in progress on non-attackable target
|
||||
if (!target.isAutoAttackable(this) //
|
||||
&& (!forceUse && ((skill.getId() != 3260 /* Forgiveness */) && (skill.getId() != 3261 /* Heart Shot */) && (skill.getId() != 3262 /* Double Heart Shot */))) //
|
||||
&& (skillTargetType != SkillTargetType.TARGET_AURA) //
|
||||
&& (skillTargetType != SkillTargetType.TARGET_CLAN) //
|
||||
&& (skillTargetType != SkillTargetType.TARGET_ALLY) //
|
||||
&& (skillTargetType != SkillTargetType.TARGET_PARTY) //
|
||||
&& (skillTargetType != SkillTargetType.TARGET_SELF) //
|
||||
&& (skillTargetType != SkillTargetType.TARGET_GROUND))
|
||||
&& (skillTargetType != SkillTargetType.AURA) //
|
||||
&& (skillTargetType != SkillTargetType.CLAN) //
|
||||
&& (skillTargetType != SkillTargetType.ALLY) //
|
||||
&& (skillTargetType != SkillTargetType.PARTY) //
|
||||
&& (skillTargetType != SkillTargetType.SELF) //
|
||||
&& (skillTargetType != SkillTargetType.GROUND))
|
||||
{
|
||||
// Send a Server->Client packet ActionFailed to the Player
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
@@ -9500,7 +9500,7 @@ public class Player extends Playable
|
||||
if (dontMove)
|
||||
{
|
||||
// Calculate the distance between the Player and the target
|
||||
if (skillTargetType == SkillTargetType.TARGET_GROUND)
|
||||
if (skillTargetType == SkillTargetType.GROUND)
|
||||
{
|
||||
if (!isInsideRadius2D(getCurrentSkillWorldPosition().getX(), getCurrentSkillWorldPosition().getY(), getCurrentSkillWorldPosition().getZ(), skill.getCastRange() + getTemplate().getCollisionRadius()))
|
||||
{
|
||||
@@ -9534,7 +9534,7 @@ public class Player extends Playable
|
||||
}
|
||||
}
|
||||
// Check if the skill is defensive and if the target is a monster and if force attack is set.. if not then we don't want to cast.
|
||||
if (!skill.isOffensive() && (target instanceof Monster) && !forceUse && (skillTargetType != SkillTargetType.TARGET_PET) && (skillTargetType != SkillTargetType.TARGET_AURA) && (skillTargetType != SkillTargetType.TARGET_CLAN) && (skillTargetType != SkillTargetType.TARGET_SELF) && (skillTargetType != SkillTargetType.TARGET_PARTY) && (skillTargetType != SkillTargetType.TARGET_ALLY) && (skillTargetType != SkillTargetType.TARGET_CORPSE_MOB) && (skillTargetType != SkillTargetType.TARGET_AREA_CORPSE_MOB) && (skillTargetType != SkillTargetType.TARGET_GROUND) && (skillType != SkillType.BEAST_FEED) && (skillType != SkillType.DELUXE_KEY_UNLOCK) && (skillType != SkillType.UNLOCK))
|
||||
if (!skill.isOffensive() && (target instanceof Monster) && !forceUse && (skillTargetType != SkillTargetType.PET) && (skillTargetType != SkillTargetType.AURA) && (skillTargetType != SkillTargetType.CLAN) && (skillTargetType != SkillTargetType.SELF) && (skillTargetType != SkillTargetType.PARTY) && (skillTargetType != SkillTargetType.ALLY) && (skillTargetType != SkillTargetType.CORPSE_MOB) && (skillTargetType != SkillTargetType.AREA_CORPSE_MOB) && (skillTargetType != SkillTargetType.GROUND) && (skillType != SkillType.BEAST_FEED) && (skillType != SkillType.DELUXE_KEY_UNLOCK) && (skillType != SkillType.UNLOCK))
|
||||
{
|
||||
// send the action failed so that the skill doens't go off.
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
@@ -9591,7 +9591,7 @@ public class Player extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if ((skillTargetType == SkillTargetType.TARGET_GROUND) && (getCurrentSkillWorldPosition() == null))
|
||||
if ((skillTargetType == SkillTargetType.GROUND) && (getCurrentSkillWorldPosition() == null))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
@@ -9600,12 +9600,12 @@ public class Player extends Playable
|
||||
// Check if this is a Pvp skill and target isn't a non-flagged/non-karma player
|
||||
switch (skillTargetType)
|
||||
{
|
||||
case TARGET_PARTY:
|
||||
case TARGET_ALLY: // For such skills, checkPvpSkill() is called from Skill.getTargetList()
|
||||
case TARGET_CLAN: // For such skills, checkPvpSkill() is called from Skill.getTargetList()
|
||||
case TARGET_AURA:
|
||||
case TARGET_SELF:
|
||||
case TARGET_GROUND:
|
||||
case PARTY:
|
||||
case ALLY: // For such skills, checkPvpSkill() is called from Skill.getTargetList()
|
||||
case CLAN: // For such skills, checkPvpSkill() is called from Skill.getTargetList()
|
||||
case AURA:
|
||||
case SELF:
|
||||
case GROUND:
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -9625,7 +9625,7 @@ public class Player extends Playable
|
||||
}
|
||||
}
|
||||
|
||||
if ((skillTargetType == SkillTargetType.TARGET_HOLY) && !TakeCastle.checkIfOkToCastSealOfRule(this, false))
|
||||
if ((skillTargetType == SkillTargetType.HOLY) && !TakeCastle.checkIfOkToCastSealOfRule(this, false))
|
||||
{
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
abortCast();
|
||||
|
@@ -27,8 +27,6 @@ import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Door;
|
||||
@@ -40,6 +38,8 @@ import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.item.Weapon;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.PetInventory;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
|
||||
@@ -595,15 +595,15 @@ public abstract class Summon extends Playable
|
||||
switch (skill.getTargetType())
|
||||
{
|
||||
// OWNER_PET should be cast even if no target has been found
|
||||
case TARGET_OWNER_PET:
|
||||
case OWNER_PET:
|
||||
{
|
||||
target = _owner;
|
||||
break;
|
||||
}
|
||||
// PARTY, AURA, SELF should be cast even if no target has been found
|
||||
case TARGET_PARTY:
|
||||
case TARGET_AURA:
|
||||
case TARGET_SELF:
|
||||
case PARTY:
|
||||
case AURA:
|
||||
case SELF:
|
||||
{
|
||||
target = this;
|
||||
break;
|
||||
@@ -704,7 +704,7 @@ public abstract class Summon extends Playable
|
||||
}
|
||||
|
||||
// Check if a Forced ATTACK is in progress on non-attackable target
|
||||
if (!target.isAutoAttackable(this) && !forceUse && (skill.getTargetType() != SkillTargetType.TARGET_AURA) && (skill.getTargetType() != SkillTargetType.TARGET_CLAN) && (skill.getTargetType() != SkillTargetType.TARGET_ALLY) && (skill.getTargetType() != SkillTargetType.TARGET_PARTY) && (skill.getTargetType() != SkillTargetType.TARGET_SELF))
|
||||
if (!target.isAutoAttackable(this) && !forceUse && (skill.getTargetType() != SkillTargetType.AURA) && (skill.getTargetType() != SkillTargetType.CLAN) && (skill.getTargetType() != SkillTargetType.ALLY) && (skill.getTargetType() != SkillTargetType.PARTY) && (skill.getTargetType() != SkillTargetType.SELF))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -25,6 +25,8 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.15.2.10.2.16 $ $Date: 2005/04/06 16:13:40 $
|
||||
@@ -45,7 +47,7 @@ public class BabyPet extends Pet
|
||||
for (Skill skill : getTemplate().getSkills().values())
|
||||
{
|
||||
// just in case, also allow cp heal and mp recharges to be considered here...you never know ;)
|
||||
if (skill.isActive() && (skill.getTargetType() == Skill.SkillTargetType.TARGET_OWNER_PET) && ((skill.getSkillType() == Skill.SkillType.HEAL) || (skill.getSkillType() == Skill.SkillType.HOT) || (skill.getSkillType() == Skill.SkillType.BALANCE_LIFE) || (skill.getSkillType() == Skill.SkillType.HEAL_PERCENT) || (skill.getSkillType() == Skill.SkillType.HEAL_STATIC) || (skill.getSkillType() == Skill.SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == Skill.SkillType.COMBATPOINTPERCENTHEAL) || (skill.getSkillType() == Skill.SkillType.CPHOT) || (skill.getSkillType() == Skill.SkillType.MANAHEAL) || (skill.getSkillType() == Skill.SkillType.MANA_BY_LEVEL) || (skill.getSkillType() == Skill.SkillType.MANAHEAL_PERCENT) || (skill.getSkillType() == Skill.SkillType.MANARECHARGE) || (skill.getSkillType() == Skill.SkillType.MPHOT)))
|
||||
if (skill.isActive() && (skill.getTargetType() == SkillTargetType.OWNER_PET) && ((skill.getSkillType() == SkillType.HEAL) || (skill.getSkillType() == SkillType.HOT) || (skill.getSkillType() == SkillType.BALANCE_LIFE) || (skill.getSkillType() == SkillType.HEAL_PERCENT) || (skill.getSkillType() == SkillType.HEAL_STATIC) || (skill.getSkillType() == SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == SkillType.COMBATPOINTPERCENTHEAL) || (skill.getSkillType() == SkillType.CPHOT) || (skill.getSkillType() == SkillType.MANAHEAL) || (skill.getSkillType() == SkillType.MANA_BY_LEVEL) || (skill.getSkillType() == SkillType.MANAHEAL_PERCENT) || (skill.getSkillType() == SkillType.MANARECHARGE) || (skill.getSkillType() == SkillType.MPHOT)))
|
||||
{
|
||||
// only consider two skills. If the pet has more, too bad...they won't be used by its AI.
|
||||
// for now assign the first two skills in the order they come. Once we have both skills, re-arrange them
|
||||
|
@@ -26,13 +26,13 @@ import org.l2jmobius.gameserver.data.sql.TeleportLocationTable;
|
||||
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.TradeManager;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.StoreTradeList;
|
||||
import org.l2jmobius.gameserver.model.TeleportLocation;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||
import org.l2jmobius.gameserver.model.residences.ClanHall;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.BuyList;
|
||||
|
@@ -31,13 +31,13 @@ import org.l2jmobius.gameserver.handler.SkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillDrain;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
|
@@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
|
||||
@@ -255,7 +256,7 @@ public class TamedBeast extends FeedableBeast
|
||||
for (Skill skill : getTemplate().getSkills().values())
|
||||
{
|
||||
// if the skill is a buff, check if the owner has it already [ owner.getEffect(Skill skill) ]
|
||||
if (skill.getSkillType() == Skill.SkillType.BUFF)
|
||||
if (skill.getSkillType() == SkillType.BUFF)
|
||||
{
|
||||
totalBuffsAvailable++;
|
||||
}
|
||||
@@ -339,7 +340,7 @@ public class TamedBeast extends FeedableBeast
|
||||
for (Skill skill : getTemplate().getSkills().values())
|
||||
{
|
||||
// if the skill is a debuff, check if the attacker has it already [ attacker.getEffect(Skill skill) ]
|
||||
if ((skill.getSkillType() == Skill.SkillType.DEBUFF) && (Rnd.get(3) < 1) && (attacker.getFirstEffect(skill) != null))
|
||||
if ((skill.getSkillType() == SkillType.DEBUFF) && (Rnd.get(3) < 1) && (attacker.getFirstEffect(skill) != null))
|
||||
{
|
||||
sitCastAndFollow(skill, attacker);
|
||||
}
|
||||
@@ -359,7 +360,7 @@ public class TamedBeast extends FeedableBeast
|
||||
for (Skill skill : getTemplate().getSkills().values())
|
||||
{
|
||||
// if the skill is a buff, check if the owner has it already [ owner.getEffect(Skill skill) ]
|
||||
if ((Rnd.get(5) < chance) && ((skill.getSkillType() == Skill.SkillType.HEAL) || (skill.getSkillType() == Skill.SkillType.HOT) || (skill.getSkillType() == Skill.SkillType.BALANCE_LIFE) || (skill.getSkillType() == Skill.SkillType.HEAL_PERCENT) || (skill.getSkillType() == Skill.SkillType.HEAL_STATIC) || (skill.getSkillType() == Skill.SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == Skill.SkillType.COMBATPOINTPERCENTHEAL) || (skill.getSkillType() == Skill.SkillType.CPHOT) || (skill.getSkillType() == Skill.SkillType.MANAHEAL) || (skill.getSkillType() == Skill.SkillType.MANA_BY_LEVEL) || (skill.getSkillType() == Skill.SkillType.MANAHEAL_PERCENT) || (skill.getSkillType() == Skill.SkillType.MANARECHARGE) || (skill.getSkillType() == Skill.SkillType.MPHOT)))
|
||||
if ((Rnd.get(5) < chance) && ((skill.getSkillType() == SkillType.HEAL) || (skill.getSkillType() == SkillType.HOT) || (skill.getSkillType() == SkillType.BALANCE_LIFE) || (skill.getSkillType() == SkillType.HEAL_PERCENT) || (skill.getSkillType() == SkillType.HEAL_STATIC) || (skill.getSkillType() == SkillType.COMBATPOINTHEAL) || (skill.getSkillType() == SkillType.COMBATPOINTPERCENTHEAL) || (skill.getSkillType() == SkillType.CPHOT) || (skill.getSkillType() == SkillType.MANAHEAL) || (skill.getSkillType() == SkillType.MANA_BY_LEVEL) || (skill.getSkillType() == SkillType.MANAHEAL_PERCENT) || (skill.getSkillType() == SkillType.MANARECHARGE) || (skill.getSkillType() == SkillType.MPHOT)))
|
||||
{
|
||||
sitCastAndFollow(skill, _owner);
|
||||
return;
|
||||
@@ -498,7 +499,7 @@ public class TamedBeast extends FeedableBeast
|
||||
for (Skill skill : _tamedBeast.getTemplate().getSkills().values())
|
||||
{
|
||||
// if the skill is a buff, check if the owner has it already [ owner.getEffect(Skill skill) ]
|
||||
if (skill.getSkillType() == Skill.SkillType.BUFF)
|
||||
if (skill.getSkillType() == SkillType.BUFF)
|
||||
{
|
||||
if (i == rand)
|
||||
{
|
||||
|
@@ -25,7 +25,6 @@ import org.l2jmobius.gameserver.handler.ISkillHandler;
|
||||
import org.l2jmobius.gameserver.handler.SkillHandler;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
@@ -35,6 +34,7 @@ import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.quest.EventType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionGameChance;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.Func;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.FuncTemplate;
|
||||
|
@@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.instancemanager.SiegeManager;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.SiegeClan;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.skill;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public enum SkillOperateType
|
||||
{
|
||||
PASSIVE,
|
||||
ACTIVE,
|
||||
TOGGLE,
|
||||
CHANCE
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.skill;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public enum SkillTargetType
|
||||
{
|
||||
NONE,
|
||||
SELF,
|
||||
ONE,
|
||||
PARTY,
|
||||
ALLY,
|
||||
CLAN,
|
||||
PET,
|
||||
AREA,
|
||||
AURA,
|
||||
CORPSE,
|
||||
UNDEAD,
|
||||
AREA_UNDEAD,
|
||||
MULTIFACE,
|
||||
CORPSE_ALLY,
|
||||
CORPSE_CLAN,
|
||||
CORPSE_PLAYER,
|
||||
CORPSE_PET,
|
||||
ITEM,
|
||||
AREA_CORPSE_MOB,
|
||||
CORPSE_MOB,
|
||||
UNLOCKABLE,
|
||||
HOLY,
|
||||
PARTY_MEMBER,
|
||||
PARTY_OTHER,
|
||||
ENEMY_SUMMON,
|
||||
OWNER_PET,
|
||||
GROUND,
|
||||
SIEGE,
|
||||
TYRANNOSAURUS,
|
||||
AREA_AIM_CORPSE,
|
||||
CLAN_MEMBER
|
||||
}
|
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.skill;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillCharge;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillChargeDmg;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillChargeEffect;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillCreateItem;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillDefault;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillDrain;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSeed;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSignet;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSignetCasttime;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSummon;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public enum SkillType
|
||||
{
|
||||
// Damage
|
||||
PDAM,
|
||||
MDAM,
|
||||
CPDAM,
|
||||
MANADAM,
|
||||
DOT,
|
||||
MDOT,
|
||||
DRAIN_SOUL,
|
||||
DRAIN(SkillDrain.class),
|
||||
DEATHLINK,
|
||||
FATALCOUNTER,
|
||||
BLOW,
|
||||
|
||||
// Disablers
|
||||
BLEED,
|
||||
POISON,
|
||||
STUN,
|
||||
ROOT,
|
||||
CONFUSION,
|
||||
FEAR,
|
||||
SLEEP,
|
||||
CONFUSE_MOB_ONLY,
|
||||
MUTE,
|
||||
PARALYZE,
|
||||
WEAKNESS,
|
||||
|
||||
// HP, MP, CP
|
||||
HEAL,
|
||||
HOT,
|
||||
BALANCE_LIFE,
|
||||
HEAL_PERCENT,
|
||||
HEAL_STATIC,
|
||||
COMBATPOINTHEAL,
|
||||
COMBATPOINTPERCENTHEAL,
|
||||
CPHOT,
|
||||
MANAHEAL,
|
||||
MANA_BY_LEVEL,
|
||||
MANAHEAL_PERCENT,
|
||||
MANARECHARGE,
|
||||
MPHOT,
|
||||
|
||||
// Aggro
|
||||
AGGDAMAGE,
|
||||
AGGREDUCE,
|
||||
AGGREMOVE,
|
||||
AGGREDUCE_CHAR,
|
||||
AGGDEBUFF,
|
||||
|
||||
// Fishing
|
||||
FISHING,
|
||||
PUMPING,
|
||||
REELING,
|
||||
|
||||
// Misc
|
||||
UNLOCK,
|
||||
ENCHANT_ARMOR,
|
||||
ENCHANT_WEAPON,
|
||||
SOULSHOT,
|
||||
SPIRITSHOT,
|
||||
SIEGEFLAG,
|
||||
TAKECASTLE,
|
||||
DELUXE_KEY_UNLOCK,
|
||||
SOW,
|
||||
HARVEST,
|
||||
GET_PLAYER,
|
||||
|
||||
// Creation
|
||||
COMMON_CRAFT,
|
||||
DWARVEN_CRAFT,
|
||||
CREATE_ITEM(SkillCreateItem.class),
|
||||
SUMMON_TREASURE_KEY,
|
||||
|
||||
// Summons
|
||||
SUMMON(SkillSummon.class),
|
||||
FEED_PET,
|
||||
DEATHLINK_PET,
|
||||
STRSIEGEASSAULT,
|
||||
ERASE,
|
||||
BETRAY,
|
||||
|
||||
// Cancel
|
||||
CANCEL,
|
||||
MAGE_BANE,
|
||||
WARRIOR_BANE,
|
||||
NEGATE,
|
||||
|
||||
BUFF,
|
||||
DEBUFF,
|
||||
PASSIVE,
|
||||
CONT,
|
||||
SIGNET(SkillSignet.class),
|
||||
SIGNET_CASTTIME(SkillSignetCasttime.class),
|
||||
|
||||
RESURRECT,
|
||||
CHARGE(SkillCharge.class),
|
||||
CHARGE_EFFECT(SkillChargeEffect.class),
|
||||
CHARGEDAM(SkillChargeDmg.class),
|
||||
MHOT,
|
||||
DETECT_WEAKNESS,
|
||||
LUCK,
|
||||
RECALL,
|
||||
SUMMON_FRIEND,
|
||||
REFLECT,
|
||||
SPOIL,
|
||||
SWEEP,
|
||||
FAKE_DEATH,
|
||||
UNBLEED,
|
||||
UNPOISON,
|
||||
UNDEAD_DEFENSE,
|
||||
SEED(SkillSeed.class),
|
||||
BEAST_FEED,
|
||||
FORCE_BUFF,
|
||||
CLAN_GATE,
|
||||
GIVE_SP,
|
||||
CORE_DONE,
|
||||
ZAKEN_PLAYER,
|
||||
ZAKEN_SELF,
|
||||
|
||||
// Unimplemented
|
||||
NOT_DONE;
|
||||
|
||||
private final Class<? extends Skill> _class;
|
||||
|
||||
public Skill makeSkill(StatSet set)
|
||||
{
|
||||
try
|
||||
{
|
||||
final Constructor<? extends Skill> c = _class.getConstructor(StatSet.class);
|
||||
return c.newInstance(set);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private SkillType()
|
||||
{
|
||||
_class = SkillDefault.class;
|
||||
}
|
||||
|
||||
private SkillType(Class<? extends Skill> classType)
|
||||
{
|
||||
_class = classType;
|
||||
}
|
||||
}
|
@@ -18,9 +18,9 @@ package org.l2jmobius.gameserver.model.skill.effects;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
@@ -18,10 +18,10 @@ package org.l2jmobius.gameserver.model.skill.effects;
|
||||
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
|
@@ -17,9 +17,9 @@
|
||||
package org.l2jmobius.gameserver.model.skill.effects;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
@@ -66,7 +66,7 @@ class EffectDamOverTime extends Effect
|
||||
}
|
||||
}
|
||||
|
||||
final boolean awake = !(getEffected() instanceof Attackable) && ((getSkill().getTargetType() != SkillTargetType.TARGET_SELF) || !getSkill().isToggle());
|
||||
final boolean awake = !(getEffected() instanceof Attackable) && ((getSkill().getTargetType() != SkillTargetType.SELF) || !getSkill().isToggle());
|
||||
getEffected().reduceCurrentHpByDamOverTime(damage, getEffector(), awake, getPeriod());
|
||||
return true;
|
||||
}
|
||||
|
@@ -17,8 +17,8 @@
|
||||
package org.l2jmobius.gameserver.model.skill.effects;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
|
@@ -20,8 +20,8 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
|
||||
/**
|
||||
* @author Gnat
|
||||
|
@@ -24,7 +24,6 @@ import org.l2jmobius.gameserver.data.sql.NpcTable;
|
||||
import org.l2jmobius.gameserver.instancemanager.IdManager;
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@@ -35,6 +34,7 @@ import org.l2jmobius.gameserver.model.actor.instance.EffectPoint;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.handlers.SkillSignetCasttime;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillLaunched;
|
||||
@@ -81,7 +81,7 @@ public class EffectSignetMDam extends Effect
|
||||
int x = getEffector().getX();
|
||||
int y = getEffector().getY();
|
||||
int z = getEffector().getZ();
|
||||
if ((getEffector() instanceof Player) && (getSkill().getTargetType() == Skill.SkillTargetType.TARGET_GROUND))
|
||||
if ((getEffector() instanceof Player) && (getSkill().getTargetType() == SkillTargetType.GROUND))
|
||||
{
|
||||
final Location wordPosition = ((Player) getEffector()).getCurrentSkillWorldPosition();
|
||||
if (wordPosition != null)
|
||||
|
@@ -17,10 +17,10 @@
|
||||
package org.l2jmobius.gameserver.model.skill.effects;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
|
@@ -21,8 +21,8 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Effect;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.Condition;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.FuncTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.Lambda;
|
||||
|
@@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.skill.BaseStat;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectCharge;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@@ -80,7 +81,7 @@ public class SkillChargeDmg extends Skill
|
||||
|
||||
double modifier = 0;
|
||||
modifier = (effect.getLevel() - getNumCharges()) * 0.33;
|
||||
if ((getTargetType() != SkillTargetType.TARGET_AREA) && (getTargetType() != SkillTargetType.TARGET_MULTIFACE))
|
||||
if ((getTargetType() != SkillTargetType.AREA) && (getTargetType() != SkillTargetType.MULTIFACE))
|
||||
{
|
||||
effect.numCharges -= getNumCharges();
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Cubic;
|
||||
import org.l2jmobius.gameserver.model.skill.Formulas;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@@ -62,7 +63,7 @@ public class SkillDrain extends Skill
|
||||
continue;
|
||||
}
|
||||
|
||||
if (target.isAlikeDead() && (getTargetType() != SkillTargetType.TARGET_CORPSE_MOB))
|
||||
if (target.isAlikeDead() && (getTargetType() != SkillTargetType.CORPSE_MOB))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -107,7 +108,7 @@ public class SkillDrain extends Skill
|
||||
creature.sendPacket(suhp);
|
||||
|
||||
// Check to see if we should damage the target
|
||||
if ((damage > 0) && (!target.isDead() || (getTargetType() != SkillTargetType.TARGET_CORPSE_MOB)))
|
||||
if ((damage > 0) && (!target.isDead() || (getTargetType() != SkillTargetType.CORPSE_MOB)))
|
||||
{
|
||||
// Manage attack or cast break of the target (calculating rate, sending message...)
|
||||
if (!target.isRaid() && Formulas.calcAtkBreak(target, damage))
|
||||
@@ -117,7 +118,7 @@ public class SkillDrain extends Skill
|
||||
}
|
||||
|
||||
creature.sendDamageMessage(target, damage, mcrit, false, false);
|
||||
if (hasEffects() && (getTargetType() != SkillTargetType.TARGET_CORPSE_MOB))
|
||||
if (hasEffects() && (getTargetType() != SkillTargetType.CORPSE_MOB))
|
||||
{
|
||||
if (target.reflectSkill(this))
|
||||
{
|
||||
@@ -149,7 +150,7 @@ public class SkillDrain extends Skill
|
||||
}
|
||||
|
||||
// Check to see if we should do the decay right after the cast
|
||||
if (target.isDead() && (getTargetType() == SkillTargetType.TARGET_CORPSE_MOB) && (target instanceof Npc))
|
||||
if (target.isDead() && (getTargetType() == SkillTargetType.CORPSE_MOB) && (target instanceof Npc))
|
||||
{
|
||||
((Npc) target).endDecayTask();
|
||||
}
|
||||
@@ -179,7 +180,7 @@ public class SkillDrain extends Skill
|
||||
{
|
||||
for (Creature target : targets)
|
||||
{
|
||||
if (target.isAlikeDead() && (getTargetType() != SkillTargetType.TARGET_CORPSE_MOB))
|
||||
if (target.isAlikeDead() && (getTargetType() != SkillTargetType.CORPSE_MOB))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -196,7 +197,7 @@ public class SkillDrain extends Skill
|
||||
owner.sendPacket(suhp);
|
||||
|
||||
// Check to see if we should damage the target
|
||||
if ((damage > 0) && (!target.isDead() || (getTargetType() != SkillTargetType.TARGET_CORPSE_MOB)))
|
||||
if ((damage > 0) && (!target.isDead() || (getTargetType() != SkillTargetType.CORPSE_MOB)))
|
||||
{
|
||||
target.reduceCurrentHp(damage, activeCubic.getOwner());
|
||||
|
||||
|
@@ -23,6 +23,7 @@ import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectSeed;
|
||||
|
||||
public class SkillSeed extends Skill
|
||||
@@ -44,7 +45,7 @@ public class SkillSeed extends Skill
|
||||
for (WorldObject target2 : targets)
|
||||
{
|
||||
final Creature target = (Creature) target2;
|
||||
if (target.isAlikeDead() && (getTargetType() != SkillTargetType.TARGET_CORPSE_MOB))
|
||||
if (target.isAlikeDead() && (getTargetType() != SkillTargetType.CORPSE_MOB))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.EffectPoint;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
|
||||
public class SkillSignet extends Skill
|
||||
{
|
||||
@@ -58,7 +59,7 @@ public class SkillSignet extends Skill
|
||||
int x = caster.getX();
|
||||
int y = caster.getY();
|
||||
int z = caster.getZ();
|
||||
if ((caster instanceof Player) && (getTargetType() == Skill.SkillTargetType.TARGET_GROUND))
|
||||
if ((caster instanceof Player) && (getTargetType() == SkillTargetType.GROUND))
|
||||
{
|
||||
final Location wordPosition = ((Player) caster).getCurrentSkillWorldPosition();
|
||||
if (wordPosition != null)
|
||||
|
@@ -30,9 +30,10 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Cubic;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.SiegeSummon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Servitor;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.SiegeSummon;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillTargetType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@@ -79,10 +80,11 @@ public class SkillSummon extends Skill
|
||||
final Player player = (Player) creature;
|
||||
if (_isCubic)
|
||||
{
|
||||
if (getTargetType() != Skill.SkillTargetType.TARGET_SELF)
|
||||
if (getTargetType() != SkillTargetType.SELF)
|
||||
{
|
||||
return true; // Player is always able to cast mass cubic skill
|
||||
}
|
||||
|
||||
final int mastery = player.getSkillLevel(SKILL_CUBIC_MASTERY);
|
||||
final int count = player.getCubics().size();
|
||||
if (count > mastery)
|
||||
@@ -97,6 +99,7 @@ public class SkillSummon extends Skill
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player.getPet() != null)
|
||||
{
|
||||
creature.sendPacket(new SystemMessage(SystemMessageId.YOU_ALREADY_HAVE_A_PET));
|
||||
@@ -236,7 +239,7 @@ public class SkillSummon extends Skill
|
||||
World.getInstance().storeObject(summon);
|
||||
|
||||
// Check to see if we should do the decay right after the cast
|
||||
if (getTargetType() == SkillTargetType.TARGET_CORPSE_MOB)
|
||||
if (getTargetType() == SkillTargetType.CORPSE_MOB)
|
||||
{
|
||||
final Creature target = targets.get(0);
|
||||
if (target.isDead() && (target instanceof Npc))
|
||||
|
@@ -20,8 +20,8 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
|
@@ -34,7 +34,6 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.SkillTable;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||
@@ -42,12 +41,14 @@ import org.l2jmobius.gameserver.model.item.Weapon;
|
||||
import org.l2jmobius.gameserver.model.item.type.ArmorType;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.skill.Env;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.Stat;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.Condition;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionElementSeed;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionForceBuff;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionGameChance;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionGameTime;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionGameTime.CheckGameTime;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionLogicAnd;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionLogicNot;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionLogicOr;
|
||||
@@ -58,6 +59,7 @@ import org.l2jmobius.gameserver.model.skill.conditions.ConditionPlayerLevel;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionPlayerMp;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionPlayerRace;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionPlayerState;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionPlayerState.CheckPlayerState;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionSkillStats;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionSlotItemId;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionTargetAggro;
|
||||
@@ -68,8 +70,6 @@ import org.l2jmobius.gameserver.model.skill.conditions.ConditionTargetUsesWeapon
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionUsingItemType;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionUsingSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionWithSkill;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionGameTime.CheckGameTime;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.ConditionPlayerState.CheckPlayerState;
|
||||
import org.l2jmobius.gameserver.model.skill.effects.EffectTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.FuncTemplate;
|
||||
import org.l2jmobius.gameserver.model.skill.funcs.Lambda;
|
||||
|
@@ -25,9 +25,9 @@ import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.Condition;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.conditions.Condition;
|
||||
|
||||
/**
|
||||
* @author mkizub
|
||||
|
Reference in New Issue
Block a user