Tempfix for the delayed TriggerSkillByDualRange effect skill.

Thanks to marciox25.
This commit is contained in:
MobiusDevelopment
2022-08-05 13:04:51 +00:00
parent 9fc619d24f
commit b3c55bd00d
18 changed files with 144 additions and 78 deletions

View File

@@ -62,5 +62,6 @@ public enum EffectType
SUMMON_NPC,
TELEPORT,
TELEPORT_TO_TARGET,
ABNORMAL_SHIELD
ABNORMAL_SHIELD,
DUAL_RANGE
}

View File

@@ -50,6 +50,7 @@ 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.clan.Clan;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.effects.EffectType;
import org.l2jmobius.gameserver.model.events.EventDispatcher;
import org.l2jmobius.gameserver.model.events.impl.creature.OnCreatureSkillFinishCast;
@@ -411,6 +412,19 @@ public class SkillCaster implements Runnable
// Trigger any skill cast start effects.
if (target.isCreature())
{
// Tempfix for the delayed TriggerSkillByDualRange effect skill.
final List<AbstractEffect> effects = _skill.getEffects(EffectScope.GENERAL);
if ((effects != null) && !effects.isEmpty())
{
for (AbstractEffect effect : effects)
{
if (effect.getEffectType() == EffectType.DUAL_RANGE)
{
effect.instant(caster, (Creature) target, _skill, null);
return false;
}
}
}
_skill.applyEffectScope(EffectScope.START, new BuffInfo(caster, (Creature) target, _skill, false, _item, null), true, false);
}