Created
September 29, 2024 21:46
-
-
Save Williams0ff/695f69e70d844fb4e0641595db8d79c0 to your computer and use it in GitHub Desktop.
L2jOne - Effect Teleport aCis 409
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Npc.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Npc.java | |
index 0b89f2d..03ffaea 100644 | |
--- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Npc.java | |
+++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Npc.java | |
@@ -1424,7 +1424,10 @@ | |
} | |
if (Config.FREE_TELEPORT || teleport.getPriceCount() == 0 || player.destroyItemByItemId(teleport.getPriceId(), teleport.getCalculatedPriceCount(player), true)) | |
+ { | |
+ Config.TELEPORT_EFFECT.entrySet().stream().filter(entry -> entry.getKey() == getNpcId()).findFirst().ifPresent(entry -> player.sendPacket(new MagicSkillUse(player, player, entry.getValue(), 1, 1, 0))); | |
player.teleportTo(teleport, 20); | |
+ } | |
player.sendPacket(ActionFailed.STATIC_PACKET); | |
} | |
diff --git a/aCis_gameserver/java/net/sf/l2j/Config.java b/aCis_gameserver/java/net/sf/l2j/Config.java | |
index 4cf096e..1ce5dbb 100644 | |
--- a/aCis_gameserver/java/net/sf/l2j/Config.java | |
+++ b/aCis_gameserver/java/net/sf/l2j/Config.java | |
@@ -293,6 +293,7 @@ | |
public static boolean DEEPBLUE_DROP_RULES; | |
public static boolean ALLOW_DELEVEL; | |
public static int DEATH_PENALTY_CHANCE; | |
+ public static Map<Integer, Integer> TELEPORT_EFFECT; | |
/** Inventory & WH */ | |
public static int INVENTORY_MAXIMUM_NO_DWARF; | |
@@ -884,6 +885,13 @@ | |
ALLOW_DELEVEL = players.getProperty("AllowDelevel", true); | |
DEATH_PENALTY_CHANCE = players.getProperty("DeathPenaltyChance", 20); | |
+ TELEPORT_EFFECT = new HashMap<>(); | |
+ for (String entry : players.getProperty("TeleportEffect", "").split(";")) | |
+ { | |
+ String[] entrySplit = entry.split("-"); | |
+ TELEPORT_EFFECT.put(Integer.valueOf(Integer.parseInt(entrySplit[0])), Integer.valueOf(Integer.parseInt(entrySplit[1]))); | |
+ } | |
+ | |
INVENTORY_MAXIMUM_NO_DWARF = players.getProperty("MaximumSlotsForNoDwarf", 80); | |
INVENTORY_MAXIMUM_DWARF = players.getProperty("MaximumSlotsForDwarf", 100); | |
INVENTORY_MAXIMUM_PET = players.getProperty("MaximumSlotsForPet", 12); | |
diff --git a/aCis_gameserver/config/players.properties b/aCis_gameserver/config/players.properties | |
index 85d5414..93e718b 100644 | |
--- a/aCis_gameserver/config/players.properties | |
+++ b/aCis_gameserver/config/players.properties | |
@@ -42,6 +42,9 @@ | |
# Death Penalty chance if killed by mob (in %), 20 by default | |
DeathPenaltyChance = 20 | |
+# List for effect teleport. Example: NpcId-EffectId;NpcId-EffectId; | |
+TeleportEffectList = 30080-2036;30006-2037; | |
+ | |
#============================================================= | |
# Inventory / Warehouse | |
#============================================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment