diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_10.2_MasterClass/dist/game/data/xsd/LimitShop.xsd
index c0e0fe5fc3..ec4911da5a 100644
--- a/L2J_Mobius_10.2_MasterClass/dist/game/data/xsd/LimitShop.xsd
+++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/xsd/LimitShop.xsd
@@ -45,6 +45,7 @@
+
diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
index 9644699cc0..314b6e3503 100644
--- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
+++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
@@ -90,6 +90,7 @@ public class LimitShopCraftData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -232,7 +233,7 @@ public class LimitShopCraftData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
index 26856b6d4e..e80fe5a67a 100644
--- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
+++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
@@ -90,6 +90,7 @@ public class LimitShopData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -209,7 +210,7 @@ public class LimitShopData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
index 6f103dedaa..9e0f7fc4d8 100644
--- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
+++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
@@ -44,8 +44,9 @@ public class LimitShopProductHolder
private final long _count5;
private final int _accountDailyLimit;
private final int _accountBuyLimit;
+ private final boolean _announce;
- public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit)
+ public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit, boolean announce)
{
_id = id;
_category = category;
@@ -70,6 +71,7 @@ public class LimitShopProductHolder
_count5 = count5;
_accountDailyLimit = accountDailyLimit;
_accountBuyLimit = accountBuyLimit;
+ _announce = announce;
}
public int getId()
@@ -186,4 +188,9 @@ public class LimitShopProductHolder
{
return _accountBuyLimit;
}
+
+ public boolean isAnnounce()
+ {
+ return _announce;
+ }
}
diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
index 2847fff813..a9e633e5d0 100644
--- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
+++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
@@ -37,8 +37,10 @@ import org.l2jmobius.gameserver.model.variables.AccountVariables;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
+import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExPurchaseLimitShopItemResult;
import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct;
+import org.l2jmobius.gameserver.util.Broadcast;
/**
* @author Mobius
@@ -227,34 +229,58 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket
if (Rnd.get(100) < _product.getChance())
{
rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount());
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance2()) || (_product.getProductionId3() == 0))
{
rewards.computeIfAbsent(1, k -> new LimitShopRandomCraftReward(_product.getProductionId2(), 0, 1)).getCount().addAndGet((int) _product.getCount2());
- player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance3()) || (_product.getProductionId4() == 0))
{
rewards.computeIfAbsent(2, k -> new LimitShopRandomCraftReward(_product.getProductionId3(), 0, 2)).getCount().addAndGet((int) _product.getCount3());
- player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance4()) || (_product.getProductionId5() == 0))
{
rewards.computeIfAbsent(3, k -> new LimitShopRandomCraftReward(_product.getProductionId4(), 0, 3)).getCount().addAndGet((int) _product.getCount4());
- player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if (_product.getProductionId5() > 0)
{
rewards.computeIfAbsent(4, k -> new LimitShopRandomCraftReward(_product.getProductionId5(), 0, 4)).getCount().addAndGet((int) _product.getCount5());
- player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
}
}
else if (Rnd.get(100) < _product.getChance())
{
rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0));
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
// Update account variables.
diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
index 20ff0fed15..1aa06c7668 100644
--- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
+++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
@@ -27,6 +27,7 @@ public class ExItemAnnounce extends ServerPacket
{
public static final int ENCHANT = 0;
public static final int RANDOM_CRAFT = 2;
+ public static final int SPECIAL_CREATION = 3;
private final Item _item;
private final int _type;
diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/LimitShop.xsd
index c0e0fe5fc3..ec4911da5a 100644
--- a/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/LimitShop.xsd
+++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/xsd/LimitShop.xsd
@@ -45,6 +45,7 @@
+
diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
index 9644699cc0..314b6e3503 100644
--- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
+++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
@@ -90,6 +90,7 @@ public class LimitShopCraftData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -232,7 +233,7 @@ public class LimitShopCraftData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
index 26856b6d4e..e80fe5a67a 100644
--- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
+++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
@@ -90,6 +90,7 @@ public class LimitShopData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -209,7 +210,7 @@ public class LimitShopData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
index 6f103dedaa..9e0f7fc4d8 100644
--- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
+++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
@@ -44,8 +44,9 @@ public class LimitShopProductHolder
private final long _count5;
private final int _accountDailyLimit;
private final int _accountBuyLimit;
+ private final boolean _announce;
- public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit)
+ public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit, boolean announce)
{
_id = id;
_category = category;
@@ -70,6 +71,7 @@ public class LimitShopProductHolder
_count5 = count5;
_accountDailyLimit = accountDailyLimit;
_accountBuyLimit = accountBuyLimit;
+ _announce = announce;
}
public int getId()
@@ -186,4 +188,9 @@ public class LimitShopProductHolder
{
return _accountBuyLimit;
}
+
+ public boolean isAnnounce()
+ {
+ return _announce;
+ }
}
diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
index 879b72c309..6a32785f7c 100644
--- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
+++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
@@ -37,9 +37,11 @@ import org.l2jmobius.gameserver.model.variables.AccountVariables;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
+import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.ExPCCafePointInfo;
import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExPurchaseLimitShopItemResult;
import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct;
+import org.l2jmobius.gameserver.util.Broadcast;
/**
* @author Mobius
@@ -247,34 +249,58 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket
if (Rnd.get(100) < _product.getChance())
{
rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount());
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance2()) || (_product.getProductionId3() == 0))
{
rewards.computeIfAbsent(1, k -> new LimitShopRandomCraftReward(_product.getProductionId2(), 0, 1)).getCount().addAndGet((int) _product.getCount2());
- player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance3()) || (_product.getProductionId4() == 0))
{
rewards.computeIfAbsent(2, k -> new LimitShopRandomCraftReward(_product.getProductionId3(), 0, 2)).getCount().addAndGet((int) _product.getCount3());
- player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance4()) || (_product.getProductionId5() == 0))
{
rewards.computeIfAbsent(3, k -> new LimitShopRandomCraftReward(_product.getProductionId4(), 0, 3)).getCount().addAndGet((int) _product.getCount4());
- player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if (_product.getProductionId5() > 0)
{
rewards.computeIfAbsent(4, k -> new LimitShopRandomCraftReward(_product.getProductionId5(), 0, 4)).getCount().addAndGet((int) _product.getCount5());
- player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
}
}
else if (Rnd.get(100) < _product.getChance())
{
rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0));
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
// Update account variables.
diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
index 20ff0fed15..1aa06c7668 100644
--- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
+++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
@@ -27,6 +27,7 @@ public class ExItemAnnounce extends ServerPacket
{
public static final int ENCHANT = 0;
public static final int RANDOM_CRAFT = 2;
+ public static final int SPECIAL_CREATION = 3;
private final Item _item;
private final int _type;
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/LimitShop.xsd
index 4aae79a14a..caf5afdafe 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/LimitShop.xsd
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/xsd/LimitShop.xsd
@@ -45,6 +45,7 @@
+
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
index 7097281f21..4ef4ee9ceb 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
@@ -90,6 +90,7 @@ public class LimitShopCraftData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[3];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -202,7 +203,7 @@ public class LimitShopCraftData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
index 5d53365d61..594c990142 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
@@ -90,6 +90,7 @@ public class LimitShopData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[3];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -179,7 +180,7 @@ public class LimitShopData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
index 6f103dedaa..9e0f7fc4d8 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
@@ -44,8 +44,9 @@ public class LimitShopProductHolder
private final long _count5;
private final int _accountDailyLimit;
private final int _accountBuyLimit;
+ private final boolean _announce;
- public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit)
+ public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit, boolean announce)
{
_id = id;
_category = category;
@@ -70,6 +71,7 @@ public class LimitShopProductHolder
_count5 = count5;
_accountDailyLimit = accountDailyLimit;
_accountBuyLimit = accountBuyLimit;
+ _announce = announce;
}
public int getId()
@@ -186,4 +188,9 @@ public class LimitShopProductHolder
{
return _accountBuyLimit;
}
+
+ public boolean isAnnounce()
+ {
+ return _announce;
+ }
}
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
index 41b6c730c6..6110a7f3f9 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
@@ -37,8 +37,10 @@ import org.l2jmobius.gameserver.model.variables.AccountVariables;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
+import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExPurchaseLimitShopItemResult;
import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct;
+import org.l2jmobius.gameserver.util.Broadcast;
/**
* @author Mobius
@@ -217,34 +219,58 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket
if (Rnd.get(100) < _product.getChance())
{
rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount());
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance2()) || (_product.getProductionId3() == 0))
{
rewards.computeIfAbsent(1, k -> new LimitShopRandomCraftReward(_product.getProductionId2(), 0, 1)).getCount().addAndGet((int) _product.getCount2());
- player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance3()) || (_product.getProductionId4() == 0))
{
rewards.computeIfAbsent(2, k -> new LimitShopRandomCraftReward(_product.getProductionId3(), 0, 2)).getCount().addAndGet((int) _product.getCount3());
- player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance4()) || (_product.getProductionId5() == 0))
{
rewards.computeIfAbsent(3, k -> new LimitShopRandomCraftReward(_product.getProductionId4(), 0, 3)).getCount().addAndGet((int) _product.getCount4());
- player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if (_product.getProductionId5() > 0)
{
rewards.computeIfAbsent(4, k -> new LimitShopRandomCraftReward(_product.getProductionId5(), 0, 4)).getCount().addAndGet((int) _product.getCount5());
- player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
}
}
else if (Rnd.get(100) < _product.getChance())
{
rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0));
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
// Update account variables.
diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
index 20ff0fed15..1aa06c7668 100644
--- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
+++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
@@ -27,6 +27,7 @@ public class ExItemAnnounce extends ServerPacket
{
public static final int ENCHANT = 0;
public static final int RANDOM_CRAFT = 2;
+ public static final int SPECIAL_CREATION = 3;
private final Item _item;
private final int _type;
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/LimitShop.xsd
index c0e0fe5fc3..ec4911da5a 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/LimitShop.xsd
+++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/xsd/LimitShop.xsd
@@ -45,6 +45,7 @@
+
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
index d45f909bdb..f818c9dfd5 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
@@ -88,6 +88,7 @@ public class LimitShopClanData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -190,7 +191,7 @@ public class LimitShopClanData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
index 9644699cc0..314b6e3503 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
@@ -90,6 +90,7 @@ public class LimitShopCraftData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -232,7 +233,7 @@ public class LimitShopCraftData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
index 26856b6d4e..e80fe5a67a 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
@@ -90,6 +90,7 @@ public class LimitShopData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -209,7 +210,7 @@ public class LimitShopData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
index 6f103dedaa..9e0f7fc4d8 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
@@ -44,8 +44,9 @@ public class LimitShopProductHolder
private final long _count5;
private final int _accountDailyLimit;
private final int _accountBuyLimit;
+ private final boolean _announce;
- public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit)
+ public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit, boolean announce)
{
_id = id;
_category = category;
@@ -70,6 +71,7 @@ public class LimitShopProductHolder
_count5 = count5;
_accountDailyLimit = accountDailyLimit;
_accountBuyLimit = accountBuyLimit;
+ _announce = announce;
}
public int getId()
@@ -186,4 +188,9 @@ public class LimitShopProductHolder
{
return _accountBuyLimit;
}
+
+ public boolean isAnnounce()
+ {
+ return _announce;
+ }
}
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
index 09dc41511d..0bce2422e1 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
@@ -39,8 +39,10 @@ import org.l2jmobius.gameserver.model.variables.AccountVariables;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
+import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExPurchaseLimitShopItemResult;
import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct;
+import org.l2jmobius.gameserver.util.Broadcast;
/**
* @author Mobius
@@ -238,34 +240,58 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket
if (Rnd.get(100) < _product.getChance())
{
rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount());
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance2()) || (_product.getProductionId3() == 0))
{
rewards.computeIfAbsent(1, k -> new LimitShopRandomCraftReward(_product.getProductionId2(), 0, 1)).getCount().addAndGet((int) _product.getCount2());
- player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance3()) || (_product.getProductionId4() == 0))
{
rewards.computeIfAbsent(2, k -> new LimitShopRandomCraftReward(_product.getProductionId3(), 0, 2)).getCount().addAndGet((int) _product.getCount3());
- player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance4()) || (_product.getProductionId5() == 0))
{
rewards.computeIfAbsent(3, k -> new LimitShopRandomCraftReward(_product.getProductionId4(), 0, 3)).getCount().addAndGet((int) _product.getCount4());
- player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if (_product.getProductionId5() > 0)
{
rewards.computeIfAbsent(4, k -> new LimitShopRandomCraftReward(_product.getProductionId5(), 0, 4)).getCount().addAndGet((int) _product.getCount5());
- player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
}
}
else if (Rnd.get(100) < _product.getChance())
{
rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0));
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
// Update account variables.
diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
index 20ff0fed15..1aa06c7668 100644
--- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
+++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
@@ -27,6 +27,7 @@ public class ExItemAnnounce extends ServerPacket
{
public static final int ENCHANT = 0;
public static final int RANDOM_CRAFT = 2;
+ public static final int SPECIAL_CREATION = 3;
private final Item _item;
private final int _type;
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/xsd/LimitShop.xsd
index c0e0fe5fc3..ec4911da5a 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/xsd/LimitShop.xsd
+++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/xsd/LimitShop.xsd
@@ -45,6 +45,7 @@
+
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
index d45f909bdb..f818c9dfd5 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
@@ -88,6 +88,7 @@ public class LimitShopClanData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -190,7 +191,7 @@ public class LimitShopClanData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
index 9644699cc0..314b6e3503 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
@@ -90,6 +90,7 @@ public class LimitShopCraftData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -232,7 +233,7 @@ public class LimitShopCraftData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
index 26856b6d4e..e80fe5a67a 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
@@ -90,6 +90,7 @@ public class LimitShopData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -209,7 +210,7 @@ public class LimitShopData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
index 6f103dedaa..9e0f7fc4d8 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
@@ -44,8 +44,9 @@ public class LimitShopProductHolder
private final long _count5;
private final int _accountDailyLimit;
private final int _accountBuyLimit;
+ private final boolean _announce;
- public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit)
+ public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit, boolean announce)
{
_id = id;
_category = category;
@@ -70,6 +71,7 @@ public class LimitShopProductHolder
_count5 = count5;
_accountDailyLimit = accountDailyLimit;
_accountBuyLimit = accountBuyLimit;
+ _announce = announce;
}
public int getId()
@@ -186,4 +188,9 @@ public class LimitShopProductHolder
{
return _accountBuyLimit;
}
+
+ public boolean isAnnounce()
+ {
+ return _announce;
+ }
}
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
index 09dc41511d..0bce2422e1 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
@@ -39,8 +39,10 @@ import org.l2jmobius.gameserver.model.variables.AccountVariables;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
+import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExPurchaseLimitShopItemResult;
import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct;
+import org.l2jmobius.gameserver.util.Broadcast;
/**
* @author Mobius
@@ -238,34 +240,58 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket
if (Rnd.get(100) < _product.getChance())
{
rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount());
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance2()) || (_product.getProductionId3() == 0))
{
rewards.computeIfAbsent(1, k -> new LimitShopRandomCraftReward(_product.getProductionId2(), 0, 1)).getCount().addAndGet((int) _product.getCount2());
- player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance3()) || (_product.getProductionId4() == 0))
{
rewards.computeIfAbsent(2, k -> new LimitShopRandomCraftReward(_product.getProductionId3(), 0, 2)).getCount().addAndGet((int) _product.getCount3());
- player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance4()) || (_product.getProductionId5() == 0))
{
rewards.computeIfAbsent(3, k -> new LimitShopRandomCraftReward(_product.getProductionId4(), 0, 3)).getCount().addAndGet((int) _product.getCount4());
- player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if (_product.getProductionId5() > 0)
{
rewards.computeIfAbsent(4, k -> new LimitShopRandomCraftReward(_product.getProductionId5(), 0, 4)).getCount().addAndGet((int) _product.getCount5());
- player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
}
}
else if (Rnd.get(100) < _product.getChance())
{
rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0));
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
// Update account variables.
diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
index 20ff0fed15..1aa06c7668 100644
--- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
+++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
@@ -27,6 +27,7 @@ public class ExItemAnnounce extends ServerPacket
{
public static final int ENCHANT = 0;
public static final int RANDOM_CRAFT = 2;
+ public static final int SPECIAL_CREATION = 3;
private final Item _item;
private final int _type;
diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/LimitShop.xsd b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/LimitShop.xsd
index c0e0fe5fc3..ec4911da5a 100644
--- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/LimitShop.xsd
+++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/xsd/LimitShop.xsd
@@ -45,6 +45,7 @@
+
diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
index d45f909bdb..f818c9dfd5 100644
--- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
+++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopClanData.java
@@ -88,6 +88,7 @@ public class LimitShopClanData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -190,7 +191,7 @@ public class LimitShopClanData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
index 9644699cc0..314b6e3503 100644
--- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
+++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopCraftData.java
@@ -90,6 +90,7 @@ public class LimitShopCraftData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -232,7 +233,7 @@ public class LimitShopCraftData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, count, chance, productionId2, count2, chance2, productionId3, count3, chance3, productionId4, count4, chance4, productionId5, count5, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
index 26856b6d4e..e80fe5a67a 100644
--- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
+++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/LimitShopData.java
@@ -90,6 +90,7 @@ public class LimitShopData implements IXmlReader
final int category = parseInteger(attrs, "category");
final int minLevel = parseInteger(attrs, "minLevel", 1);
final int maxLevel = parseInteger(attrs, "maxLevel", 999);
+ final boolean announce = parseBoolean(attrs, "announce", false);
final int[] ingredientIds = new int[5];
ingredientIds[0] = 0;
ingredientIds[1] = 0;
@@ -209,7 +210,7 @@ public class LimitShopData implements IXmlReader
}
}
- _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit));
+ _products.add(new LimitShopProductHolder(id, category, minLevel, maxLevel, ingredientIds, ingredientQuantities, ingredientEnchants, productionId, 1, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, accountDailyLimit, accountBuyLimit, announce));
}
}
}
diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
index 6f103dedaa..9e0f7fc4d8 100644
--- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
+++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/holders/LimitShopProductHolder.java
@@ -44,8 +44,9 @@ public class LimitShopProductHolder
private final long _count5;
private final int _accountDailyLimit;
private final int _accountBuyLimit;
+ private final boolean _announce;
- public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit)
+ public LimitShopProductHolder(int id, int category, int minLevel, int maxLevel, int[] ingredientIds, long[] ingredientQuantities, int[] ingredientEnchants, int productionId, long count, float chance, int productionId2, long count2, float chance2, int productionId3, long count3, float chance3, int productionId4, long count4, float chance4, int productionId5, long count5, int accountDailyLimit, int accountBuyLimit, boolean announce)
{
_id = id;
_category = category;
@@ -70,6 +71,7 @@ public class LimitShopProductHolder
_count5 = count5;
_accountDailyLimit = accountDailyLimit;
_accountBuyLimit = accountBuyLimit;
+ _announce = announce;
}
public int getId()
@@ -186,4 +188,9 @@ public class LimitShopProductHolder
{
return _accountBuyLimit;
}
+
+ public boolean isAnnounce()
+ {
+ return _announce;
+ }
}
diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
index 36948b0480..3141fca8d0 100644
--- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
+++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/clientpackets/limitshop/RequestPurchaseLimitShopItemBuy.java
@@ -39,9 +39,11 @@ import org.l2jmobius.gameserver.model.variables.AccountVariables;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
+import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce;
import org.l2jmobius.gameserver.network.serverpackets.ExPCCafePointInfo;
import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExPurchaseLimitShopItemResult;
import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct;
+import org.l2jmobius.gameserver.util.Broadcast;
/**
* @author Mobius
@@ -258,34 +260,58 @@ public class RequestPurchaseLimitShopItemBuy implements ClientPacket
if (Rnd.get(100) < _product.getChance())
{
rewards.computeIfAbsent(0, k -> new LimitShopRandomCraftReward(_product.getProductionId(), 0, 0)).getCount().addAndGet((int) _product.getCount());
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance2()) || (_product.getProductionId3() == 0))
{
rewards.computeIfAbsent(1, k -> new LimitShopRandomCraftReward(_product.getProductionId2(), 0, 1)).getCount().addAndGet((int) _product.getCount2());
- player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId2(), _product.getCount2(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance3()) || (_product.getProductionId4() == 0))
{
rewards.computeIfAbsent(2, k -> new LimitShopRandomCraftReward(_product.getProductionId3(), 0, 2)).getCount().addAndGet((int) _product.getCount3());
- player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId3(), _product.getCount3(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if ((Rnd.get(100) < _product.getChance4()) || (_product.getProductionId5() == 0))
{
rewards.computeIfAbsent(3, k -> new LimitShopRandomCraftReward(_product.getProductionId4(), 0, 3)).getCount().addAndGet((int) _product.getCount4());
- player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId4(), _product.getCount4(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
else if (_product.getProductionId5() > 0)
{
rewards.computeIfAbsent(4, k -> new LimitShopRandomCraftReward(_product.getProductionId5(), 0, 4)).getCount().addAndGet((int) _product.getCount5());
- player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId5(), _product.getCount5(), player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
}
}
else if (Rnd.get(100) < _product.getChance())
{
rewards.put(0, new LimitShopRandomCraftReward(_product.getProductionId(), (int) (_product.getCount() * _amount), 0));
- player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ final Item item = player.addItem("LCoinShop", _product.getProductionId(), _product.getCount() * _amount, player, true);
+ if (_product.isAnnounce())
+ {
+ Broadcast.toAllOnlinePlayers(new ExItemAnnounce(player, item, ExItemAnnounce.SPECIAL_CREATION));
+ }
}
// Update account variables.
diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
index 20ff0fed15..1aa06c7668 100644
--- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
+++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java
@@ -27,6 +27,7 @@ public class ExItemAnnounce extends ServerPacket
{
public static final int ENCHANT = 0;
public static final int RANDOM_CRAFT = 2;
+ public static final int SPECIAL_CREATION = 3;
private final Item _item;
private final int _type;