diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
index b47874c818..ac83409248 100644
--- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
+++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
@@ -41,6 +41,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import org.l2jmobius.gameserver.util.Broadcast;
import org.l2jmobius.gameserver.util.Util;
public class RequestEnchantItem implements IClientIncomingPacket
@@ -237,7 +238,7 @@ public class RequestEnchantItem implements IClientIncomingPacket
sm.addInt(item.getEnchantLevel());
sm.addItemName(item);
player.broadcastPacket(sm);
- player.broadcastPacket(new ExItemAnnounce(item, player));
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(item, player));
final Skill skill = CommonSkill.FIREWORK.getSkill();
if (skill != null)
diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
index 7f3717e7ad..17ed155844 100644
--- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
+++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
@@ -41,6 +41,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import org.l2jmobius.gameserver.util.Broadcast;
import org.l2jmobius.gameserver.util.Util;
public class RequestEnchantItem implements IClientIncomingPacket
@@ -237,7 +238,7 @@ public class RequestEnchantItem implements IClientIncomingPacket
sm.addInt(item.getEnchantLevel());
sm.addItemName(item);
player.broadcastPacket(sm);
- player.broadcastPacket(new ExItemAnnounce(item, player));
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(item, player));
final Skill skill = CommonSkill.FIREWORK.getSkill();
if (skill != null)
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Character.ini b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Character.ini
index d644fe204e..97c3eb9c26 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Character.ini
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Character.ini
@@ -356,6 +356,22 @@ EnchantBlackList = 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7
# Default: True
DisableOverEnchanting = True
+# Minimum armor enchant announce.
+# Default: 6
+MinimumArmorEnchantAnnounce = 6
+
+# Minimum weapon enchant announce.
+# Default: 7
+MinimumWeaponEnchantAnnounce = 7
+
+# Maximum armor enchant announce.
+# Default: 30
+MaximumArmorEnchantAnnounce = 30
+
+# Maximum weapon enchant announce.
+# Default: 30
+MaximumWeaponEnchantAnnounce = 30
+
# ---------------------------------------------------------------------------
# Augmenting
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java
index 82f6effa13..8151eabad9 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java
@@ -788,6 +788,11 @@ public class Config
public static int[] ENCHANT_BLACKLIST;
public static boolean DISABLE_OVER_ENCHANTING;
+ public static int MIN_ARMOR_ENCHANT_ANNOUNCE;
+ public static int MIN_WEAPON_ENCHANT_ANNOUNCE;
+ public static int MAX_ARMOR_ENCHANT_ANNOUNCE;
+ public static int MAX_WEAPON_ENCHANT_ANNOUNCE;
+
public static int[] AUGMENTATION_BLACKLIST;
public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS;
public static boolean ALT_ALLOW_AUGMENT_TRADE;
@@ -1681,14 +1686,17 @@ public class Config
}
Arrays.sort(ENCHANT_BLACKLIST);
DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true);
+ MIN_ARMOR_ENCHANT_ANNOUNCE = Character.getInt("MinimumArmorEnchantAnnounce", 6);
+ MIN_WEAPON_ENCHANT_ANNOUNCE = Character.getInt("MinimumWeaponEnchantAnnounce", 7);
+ MAX_ARMOR_ENCHANT_ANNOUNCE = Character.getInt("MaximumArmorEnchantAnnounce", 30);
+ MAX_WEAPON_ENCHANT_ANNOUNCE = Character.getInt("MaximumWeaponEnchantAnnounce", 30);
+
String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(",");
AUGMENTATION_BLACKLIST = new int[array.length];
-
for (int i = 0; i < array.length; i++)
{
AUGMENTATION_BLACKLIST[i] = Integer.parseInt(array[i]);
}
-
Arrays.sort(AUGMENTATION_BLACKLIST);
ALT_ALLOW_AUGMENT_PVP_ITEMS = Character.getBoolean("AltAllowAugmentPvPItems", false);
ALT_ALLOW_AUGMENT_TRADE = Character.getBoolean("AltAllowAugmentTrade", false);
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
index 7138deab67..17ed155844 100644
--- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
@@ -37,9 +37,11 @@ import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.EnchantResult;
+import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import org.l2jmobius.gameserver.util.Broadcast;
import org.l2jmobius.gameserver.util.Util;
public class RequestEnchantItem implements IClientIncomingPacket
@@ -228,15 +230,15 @@ public class RequestEnchantItem implements IClientIncomingPacket
}
// announce the success
- final int minEnchantAnnounce = item.isArmor() ? 6 : 7;
- final int maxEnchantAnnounce = item.isArmor() ? 0 : 15;
- if ((item.getEnchantLevel() == minEnchantAnnounce) || (item.getEnchantLevel() == maxEnchantAnnounce))
+ if ((item.getEnchantLevel() >= (item.isArmor() ? Config.MIN_ARMOR_ENCHANT_ANNOUNCE : Config.MIN_WEAPON_ENCHANT_ANNOUNCE)) //
+ && (item.getEnchantLevel() <= (item.isArmor() ? Config.MAX_ARMOR_ENCHANT_ANNOUNCE : Config.MAX_WEAPON_ENCHANT_ANNOUNCE)))
{
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_HAS_SUCCESSFULLY_ENCHANTED_A_S2_S3);
sm.addString(player.getName());
sm.addInt(item.getEnchantLevel());
sm.addItemName(item);
player.broadcastPacket(sm);
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(item, player));
final Skill skill = CommonSkill.FIREWORK.getSkill();
if (skill != null)
diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
new file mode 100644
index 0000000000..dfca262784
--- /dev/null
+++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import org.l2jmobius.commons.network.PacketWriter;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import org.l2jmobius.gameserver.network.OutgoingPackets;
+
+/**
+ * @author NviX
+ */
+public class ExItemAnnounce implements IClientOutgoingPacket
+{
+ private final ItemInstance _item;
+ private final PlayerInstance _player;
+
+ public ExItemAnnounce(ItemInstance item, PlayerInstance player)
+ {
+ _item = item;
+ _player = player;
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_ITEM_ANNOUNCE.writeId(packet);
+ packet.writeC(0x00); // item icon
+ packet.writeString(_player.getName()); // name of player
+ packet.writeD(_item.getId()); // item id
+ packet.writeD(_item.getEnchantLevel()); // enchant level
+ packet.writeC(0x00); // name of item
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Character.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Character.ini
index 6a3b536ee9..6982df2694 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Character.ini
+++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Character.ini
@@ -356,6 +356,22 @@ EnchantBlackList = 7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7
# Default: True
DisableOverEnchanting = True
+# Minimum armor enchant announce.
+# Default: 6
+MinimumArmorEnchantAnnounce = 6
+
+# Minimum weapon enchant announce.
+# Default: 7
+MinimumWeaponEnchantAnnounce = 7
+
+# Maximum armor enchant announce.
+# Default: 30
+MaximumArmorEnchantAnnounce = 30
+
+# Maximum weapon enchant announce.
+# Default: 30
+MaximumWeaponEnchantAnnounce = 30
+
# ---------------------------------------------------------------------------
# Augmenting
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java
index 9f5a81302c..cbd8aa4114 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java
@@ -787,6 +787,11 @@ public class Config
public static int[] ENCHANT_BLACKLIST;
public static boolean DISABLE_OVER_ENCHANTING;
+ public static int MIN_ARMOR_ENCHANT_ANNOUNCE;
+ public static int MIN_WEAPON_ENCHANT_ANNOUNCE;
+ public static int MAX_ARMOR_ENCHANT_ANNOUNCE;
+ public static int MAX_WEAPON_ENCHANT_ANNOUNCE;
+
public static int[] AUGMENTATION_BLACKLIST;
public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS;
public static boolean ALT_ALLOW_AUGMENT_TRADE;
@@ -1680,14 +1685,17 @@ public class Config
}
Arrays.sort(ENCHANT_BLACKLIST);
DISABLE_OVER_ENCHANTING = Character.getBoolean("DisableOverEnchanting", true);
+ MIN_ARMOR_ENCHANT_ANNOUNCE = Character.getInt("MinimumArmorEnchantAnnounce", 6);
+ MIN_WEAPON_ENCHANT_ANNOUNCE = Character.getInt("MinimumWeaponEnchantAnnounce", 7);
+ MAX_ARMOR_ENCHANT_ANNOUNCE = Character.getInt("MaximumArmorEnchantAnnounce", 30);
+ MAX_WEAPON_ENCHANT_ANNOUNCE = Character.getInt("MaximumWeaponEnchantAnnounce", 30);
+
String[] array = Character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(",");
AUGMENTATION_BLACKLIST = new int[array.length];
-
for (int i = 0; i < array.length; i++)
{
AUGMENTATION_BLACKLIST[i] = Integer.parseInt(array[i]);
}
-
Arrays.sort(AUGMENTATION_BLACKLIST);
ALT_ALLOW_AUGMENT_PVP_ITEMS = Character.getBoolean("AltAllowAugmentPvPItems", false);
ALT_ALLOW_AUGMENT_TRADE = Character.getBoolean("AltAllowAugmentTrade", false);
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
index 7138deab67..17ed155844 100644
--- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java
@@ -37,9 +37,11 @@ import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.EnchantResult;
+import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
+import org.l2jmobius.gameserver.util.Broadcast;
import org.l2jmobius.gameserver.util.Util;
public class RequestEnchantItem implements IClientIncomingPacket
@@ -228,15 +230,15 @@ public class RequestEnchantItem implements IClientIncomingPacket
}
// announce the success
- final int minEnchantAnnounce = item.isArmor() ? 6 : 7;
- final int maxEnchantAnnounce = item.isArmor() ? 0 : 15;
- if ((item.getEnchantLevel() == minEnchantAnnounce) || (item.getEnchantLevel() == maxEnchantAnnounce))
+ if ((item.getEnchantLevel() >= (item.isArmor() ? Config.MIN_ARMOR_ENCHANT_ANNOUNCE : Config.MIN_WEAPON_ENCHANT_ANNOUNCE)) //
+ && (item.getEnchantLevel() <= (item.isArmor() ? Config.MAX_ARMOR_ENCHANT_ANNOUNCE : Config.MAX_WEAPON_ENCHANT_ANNOUNCE)))
{
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_HAS_SUCCESSFULLY_ENCHANTED_A_S2_S3);
sm.addString(player.getName());
sm.addInt(item.getEnchantLevel());
sm.addItemName(item);
player.broadcastPacket(sm);
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(item, player));
final Skill skill = CommonSkill.FIREWORK.getSkill();
if (skill != null)
diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
new file mode 100644
index 0000000000..dfca262784
--- /dev/null
+++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package org.l2jmobius.gameserver.network.serverpackets;
+
+import org.l2jmobius.commons.network.PacketWriter;
+import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
+import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
+import org.l2jmobius.gameserver.network.OutgoingPackets;
+
+/**
+ * @author NviX
+ */
+public class ExItemAnnounce implements IClientOutgoingPacket
+{
+ private final ItemInstance _item;
+ private final PlayerInstance _player;
+
+ public ExItemAnnounce(ItemInstance item, PlayerInstance player)
+ {
+ _item = item;
+ _player = player;
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_ITEM_ANNOUNCE.writeId(packet);
+ packet.writeC(0x00); // item icon
+ packet.writeString(_player.getName()); // name of player
+ packet.writeD(_item.getId()); // item id
+ packet.writeD(_item.getEnchantLevel()); // enchant level
+ packet.writeC(0x00); // name of item
+ return true;
+ }
+}
\ No newline at end of file