From e89b02392ae19c0578d6fadf34c5b4b68b393605 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 2 Nov 2022 23:53:03 +0000 Subject: [PATCH] PC Cafe Items moved to Einhasad Store. Contributed by Fakee. --- .../dist/game/data/LimitShop.xml | 271 ++++++++---------- .../dist/game/data/LimitShopCraft.xml | 12 +- .../dist/game/data/html/pccafe.htm | 11 +- .../RequestPurchaseLimitShopItemBuy.java | 16 ++ .../RequestPurchaseLimitShopItemBuy.java | 16 ++ 5 files changed, 170 insertions(+), 156 deletions(-) diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/LimitShop.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/LimitShop.xml index ecccd148d8..e67efebb6f 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/LimitShop.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/LimitShop.xml @@ -1,6 +1,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -17,23 +37,27 @@ - - - + + + - - - + + + - - - + + + - - - + + + - + + + + + @@ -69,20 +93,36 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -91,10 +131,6 @@ - - - - @@ -115,36 +151,60 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -161,128 +221,49 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - PA Points - PA Talisman - INT/M. Atk. + + - PA Points - PA Talisman - DEX/Atk. Spd. + + - PA Points - PA Talisman - WIT/Casting Spd. + + - PA Points - PA Talisman - CON/HP + + - PA Points - PA Talisman - MEN/MP + + - PA Points - PA Talisman - Attribute Attack + + - PA Points - PA Talisman - Attribute Resistance + + - PA Points - Firecracker + + - PA Points - Large Firecracker + + + + + + - - PA Points - Homunculus' Hourglass - --> \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/LimitShopCraft.xml b/L2J_Mobius_10.3_MasterClass/dist/game/data/LimitShopCraft.xml index 53fd83e09b..745fd5d623 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/LimitShopCraft.xml +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/LimitShopCraft.xml @@ -878,7 +878,15 @@ - - + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/html/pccafe.htm b/L2J_Mobius_10.3_MasterClass/dist/game/data/html/pccafe.htm index 8441fb38c0..116a83de50 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/html/pccafe.htm +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/html/pccafe.htm @@ -1,10 +1,3 @@ -Player Commendation SystemPlayer Commendation Points:
-You can use PC points to buy items.
-It is possible to buy several General Items, like hair accessories or even time-limited Commendation Weapons.
-Take a look on the current rewards.
-
- - - - +ChatGuild of Travelers Member:
+The PA Shop assortment is now available in the Einhasad Shop. \ No newline at end of file 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 4895470a30..f1d587d4fa 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 @@ -36,6 +36,7 @@ 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.IClientIncomingPacket; +import org.l2jmobius.gameserver.network.serverpackets.ExPCCafePointInfo; import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExPurchaseLimitShopItemResult; import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct; @@ -166,6 +167,15 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket return; } } + else if (_product.getIngredientIds()[i] == SpecialItemType.PC_CAFE_POINTS.getClientId()) + { + if (player.getPcCafePoints() < (_product.getIngredientQuantities()[i] * _amount)) + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + player.removeRequest(PrimeShopRequest.class); + return; + } + } else if (player.getInventory().getInventoryItemCount(_product.getIngredientIds()[i], _product.getIngredientEnchants()[i] == 0 ? -1 : _product.getIngredientEnchants()[i], true) < (_product.getIngredientQuantities()[i] * _amount)) { player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); @@ -189,6 +199,12 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket { player.setHonorCoins(player.getHonorCoins() - (_product.getIngredientQuantities()[i] * _amount)); } + else if (_product.getIngredientIds()[i] == SpecialItemType.PC_CAFE_POINTS.getClientId()) + { + final int newPoints = (int) (player.getPcCafePoints() - (_product.getIngredientQuantities()[i] * _amount)); + player.setPcCafePoints(newPoints); + player.sendPacket(new ExPCCafePointInfo(player.getPcCafePoints(), (int) (-(_product.getIngredientQuantities()[i] * _amount)), 1)); + } else { if (_product.getIngredientEnchants()[i] > 0) 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 5fbcd00cc6..b9e6209303 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 @@ -38,6 +38,7 @@ 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.IClientIncomingPacket; +import org.l2jmobius.gameserver.network.serverpackets.ExPCCafePointInfo; import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExPurchaseLimitShopItemResult; import org.l2jmobius.gameserver.network.serverpackets.primeshop.ExBRBuyProduct; @@ -173,6 +174,15 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket return; } } + else if (_product.getIngredientIds()[i] == SpecialItemType.PC_CAFE_POINTS.getClientId()) + { + if (player.getPcCafePoints() < (_product.getIngredientQuantities()[i] * _amount)) + { + player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); + player.removeRequest(PrimeShopRequest.class); + return; + } + } else if (player.getInventory().getInventoryItemCount(_product.getIngredientIds()[i], _product.getIngredientEnchants()[i] == 0 ? -1 : _product.getIngredientEnchants()[i], true) < (_product.getIngredientQuantities()[i] * _amount)) { player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2); @@ -196,6 +206,12 @@ public class RequestPurchaseLimitShopItemBuy implements IClientIncomingPacket { player.setHonorCoins(player.getHonorCoins() - (_product.getIngredientQuantities()[i] * _amount)); } + else if (_product.getIngredientIds()[i] == SpecialItemType.PC_CAFE_POINTS.getClientId()) + { + final int newPoints = (int) (player.getPcCafePoints() - (_product.getIngredientQuantities()[i] * _amount)); + player.setPcCafePoints(newPoints); + player.sendPacket(new ExPCCafePointInfo(player.getPcCafePoints(), (int) (-(_product.getIngredientQuantities()[i] * _amount)), 1)); + } else { if (_product.getIngredientEnchants()[i] > 0)