diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 09653b612b..809d714921 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-112574,256057,-1449,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 09653b612b..809d714921 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-112574,256057,-1449,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 09653b612b..809d714921 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-112574,256057,-1449,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 09653b612b..809d714921 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-112574,256057,-1449,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 09653b612b..809d714921 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-112574,256057,-1449,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 09653b612b..809d714921 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-112574,256057,-1449,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 09653b612b..809d714921 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-112574,256057,-1449,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 09653b612b..809d714921 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-112574,256057,-1449,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 46949eed2a..cccc2565e4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-83246,242118,-3730,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 46949eed2a..cccc2565e4 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-83246,242118,-3730,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 46949eed2a..cccc2565e4 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-83246,242118,-3730,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 46949eed2a..cccc2565e4 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-83246,242118,-3730,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 46949eed2a..cccc2565e4 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-83246,242118,-3730,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java index 46949eed2a..cccc2565e4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/ai/others/ProvisionalHalls/ProvisionalHalls.java @@ -81,11 +81,6 @@ public class ProvisionalHalls extends AbstractNpcAI @Override public String onAdvEvent(String event, Npc npc, PlayerInstance player) { - if ((npc.getId() != KERRY) && (npc.getId() != MAID)) - { - return null; - } - String htmltext = null; if (event.equals("33359-01.html") || event.equals("33359-02.html") || event.equals("33359-03.html")) { @@ -93,6 +88,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("buy")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + synchronized (LOCK) { final Calendar calendar = Calendar.getInstance(); @@ -147,6 +147,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("enter")) { + if ((npc == null) || (npc.getId() != KERRY)) + { + return null; + } + final int playerClanId = player.getClanId(); for (Entry hall : CLAN_HALLS.entrySet()) { @@ -161,6 +166,11 @@ public class ProvisionalHalls extends AbstractNpcAI } else if (event.equals("leave")) { + if ((npc == null) || (npc.getId() != MAID)) + { + return null; + } + final String[] location = player.getVariables().getString(HALL_RETURN_VAR, "-83246,242118,-3730,-1").split(","); player.teleToLocation(Integer.parseInt(location[0]), Integer.parseInt(location[1]), Integer.parseInt(location[2]), Integer.parseInt(location[3])); }