|
@@ -24,7 +24,9 @@ import net.sf.l2j.gameserver.model.L2Object;
|
|
import net.sf.l2j.gameserver.model.L2Skill;
|
|
import net.sf.l2j.gameserver.model.L2Skill;
|
|
import net.sf.l2j.gameserver.model.L2Summon;
|
|
import net.sf.l2j.gameserver.model.L2Summon;
|
|
import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
|
|
import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
|
|
|
|
+import net.sf.l2j.gameserver.network.SystemMessageId;
|
|
import net.sf.l2j.gameserver.serverpackets.StatusUpdate;
|
|
import net.sf.l2j.gameserver.serverpackets.StatusUpdate;
|
|
|
|
+import net.sf.l2j.gameserver.serverpackets.SystemMessage;
|
|
import net.sf.l2j.gameserver.skills.Formulas;
|
|
import net.sf.l2j.gameserver.skills.Formulas;
|
|
import net.sf.l2j.gameserver.templates.StatsSet;
|
|
import net.sf.l2j.gameserver.templates.StatsSet;
|
|
|
|
|
|
@@ -107,8 +109,6 @@ public class L2SkillDrain extends L2Skill {
|
|
// Check to see if we should damage the target
|
|
// 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.TARGET_CORPSE_MOB))
|
|
{
|
|
{
|
|
- target.reduceCurrentHp(damage, activeChar);
|
|
|
|
-
|
|
|
|
// Manage attack or cast break of the target (calculating rate, sending message...)
|
|
// Manage attack or cast break of the target (calculating rate, sending message...)
|
|
if (!target.isRaid() && Formulas.getInstance().calcAtkBreak(target, damage))
|
|
if (!target.isRaid() && Formulas.getInstance().calcAtkBreak(target, damage))
|
|
{
|
|
{
|
|
@@ -117,6 +117,34 @@ public class L2SkillDrain extends L2Skill {
|
|
}
|
|
}
|
|
|
|
|
|
activeChar.sendDamageMessage(target, damage, mcrit, false, false);
|
|
activeChar.sendDamageMessage(target, damage, mcrit, false, false);
|
|
|
|
+
|
|
|
|
+ if (hasEffects() && getTargetType() != SkillTargetType.TARGET_CORPSE_MOB)
|
|
|
|
+ {
|
|
|
|
+ if (target.reflectSkill(this))
|
|
|
|
+ {
|
|
|
|
+ activeChar.stopSkillEffects(getId());
|
|
|
|
+ getEffects(null, activeChar);
|
|
|
|
+ SystemMessage sm = new SystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
|
|
|
|
+ sm.addSkillName(getId());
|
|
|
|
+ activeChar.sendPacket(sm);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ // activate attacked effects, if any
|
|
|
|
+ target.stopSkillEffects(getId());
|
|
|
|
+ if (Formulas.getInstance().calcSkillSuccess(activeChar, target, this, false, ss, bss))
|
|
|
|
+ getEffects(activeChar, target);
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ SystemMessage sm = new SystemMessage(SystemMessageId.S1_WAS_UNAFFECTED_BY_S2);
|
|
|
|
+ sm.addString(target.getName());
|
|
|
|
+ sm.addSkillName(getDisplayId());
|
|
|
|
+ activeChar.sendPacket(sm);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ target.reduceCurrentHp(damage, activeChar);
|
|
}
|
|
}
|
|
|
|
|
|
// Check to see if we should do the decay right after the cast
|
|
// Check to see if we should do the decay right after the cast
|