From b1f1cb856898424fc34b569c6cd1d9f276589151 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 5 Feb 2019 05:13:22 +0000 Subject: [PATCH] Summons should not PvP flag after getting stunned. --- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../data/scripts/handlers/effecthandlers/Stun.java | 9 ++++++++- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- .../scripts/handlers/effecthandlers/BlockActions.java | 11 +++++++++-- 11 files changed, 98 insertions(+), 21 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Stun.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Stun.java index a411e90011..ffec1506c7 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Stun.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Stun.java @@ -59,7 +59,14 @@ public final class Stun extends AbstractEffect final L2Character effector = info.getEffector(); if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doSummonAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + } + else + { + ((L2Summon) effected).doSummonAttack(effector); + } } else { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 4bb9a53dca..8b1abf9de5 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -73,11 +73,18 @@ public final class BlockActions extends AbstractEffect { if ((effector != null) && !effector.isDead()) { - ((L2Summon) effected).doAutoAttack(effector); + if (effector.isPlayable() && (effected.getActingPlayer().getPvpFlag() == 0)) + { + effected.disableCoreAI(false); + } + else + { + ((L2Summon) effected).doAutoAttack(effector); + } } else { - effected.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, effected.getActingPlayer()); + effected.disableCoreAI(false); } } else