Proper limit shop packet structure.
This commit is contained in:
@@ -35,21 +35,14 @@ public class ExPurchaseLimitShopItemListNew implements IClientOutgoingPacket
|
|||||||
{
|
{
|
||||||
private final int _shopType; // 3 = Lcoin Shop - 4 = Special Craft
|
private final int _shopType; // 3 = Lcoin Shop - 4 = Special Craft
|
||||||
private final PlayerInstance _player;
|
private final PlayerInstance _player;
|
||||||
private Collection<LCoinShopProductHolder> _products;
|
private final Collection<LCoinShopProductHolder> _products;
|
||||||
|
|
||||||
public ExPurchaseLimitShopItemListNew(int shopType, PlayerInstance player)
|
public ExPurchaseLimitShopItemListNew(int shopType, PlayerInstance player)
|
||||||
{
|
{
|
||||||
_shopType = shopType;
|
_shopType = shopType;
|
||||||
_player = player;
|
_player = player;
|
||||||
_products = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
switch (shopType) // 3 = Lcoin Shop - 4 = Special Craft
|
||||||
public boolean write(PacketWriter packet)
|
|
||||||
{
|
|
||||||
OutgoingPackets.EX_PURCHASE_LIMIT_SHOP_ITEM_LIST_NEW.writeId(packet);
|
|
||||||
|
|
||||||
switch (_shopType)
|
|
||||||
{
|
{
|
||||||
case 3: // Normal Lcoin Shop
|
case 3: // Normal Lcoin Shop
|
||||||
{
|
{
|
||||||
@@ -66,10 +59,15 @@ public class ExPurchaseLimitShopItemListNew implements IClientOutgoingPacket
|
|||||||
_products = LCoinShopData.getInstance().getProducts();
|
_products = LCoinShopData.getInstance().getProducts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean write(PacketWriter packet)
|
||||||
|
{
|
||||||
|
OutgoingPackets.EX_PURCHASE_LIMIT_SHOP_ITEM_LIST_NEW.writeId(packet);
|
||||||
|
|
||||||
packet.writeC(_shopType); //
|
packet.writeC(_shopType); //
|
||||||
packet.writeD(_products.size());
|
packet.writeD(_products.size());
|
||||||
|
|
||||||
for (LCoinShopProductHolder product : _products)
|
for (LCoinShopProductHolder product : _products)
|
||||||
{
|
{
|
||||||
packet.writeD(product.getId());
|
packet.writeD(product.getId());
|
||||||
@@ -81,13 +79,9 @@ public class ExPurchaseLimitShopItemListNew implements IClientOutgoingPacket
|
|||||||
packet.writeQ(product.getIngredientQuantities()[1]);
|
packet.writeQ(product.getIngredientQuantities()[1]);
|
||||||
packet.writeQ(product.getIngredientQuantities()[2]);
|
packet.writeQ(product.getIngredientQuantities()[2]);
|
||||||
|
|
||||||
packet.writeH(0x00); // ?
|
packet.writeH(0x00); // sCostItemEnchant 1
|
||||||
|
packet.writeH(0x00); // sCostItemEnchant 2
|
||||||
packet.writeC(-1); // remaining amount?
|
packet.writeH(0x00); // sCostItemEnchant 3
|
||||||
packet.writeC(-1); // remaining time?
|
|
||||||
|
|
||||||
packet.writeC(-1); // ?
|
|
||||||
packet.writeC(-1); // ?
|
|
||||||
|
|
||||||
// Check limits.
|
// Check limits.
|
||||||
if (product.getAccountDailyLimit() > 0) // Sale period.
|
if (product.getAccountDailyLimit() > 0) // Sale period.
|
||||||
@@ -124,8 +118,8 @@ public class ExPurchaseLimitShopItemListNew implements IClientOutgoingPacket
|
|||||||
{
|
{
|
||||||
packet.writeD(0x01);
|
packet.writeD(0x01);
|
||||||
}
|
}
|
||||||
packet.writeD(0x00);
|
packet.writeD(0x00); // nRemainSec
|
||||||
packet.writeD(0x00);
|
packet.writeD(0x00); // nRemainServerItemAmount
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -35,21 +35,14 @@ public class ExPurchaseLimitShopItemListNew implements IClientOutgoingPacket
|
|||||||
{
|
{
|
||||||
private final int _shopType; // 3 = Lcoin Shop - 4 = Special Craft
|
private final int _shopType; // 3 = Lcoin Shop - 4 = Special Craft
|
||||||
private final PlayerInstance _player;
|
private final PlayerInstance _player;
|
||||||
private Collection<LCoinShopProductHolder> _products;
|
private final Collection<LCoinShopProductHolder> _products;
|
||||||
|
|
||||||
public ExPurchaseLimitShopItemListNew(int shopType, PlayerInstance player)
|
public ExPurchaseLimitShopItemListNew(int shopType, PlayerInstance player)
|
||||||
{
|
{
|
||||||
_shopType = shopType;
|
_shopType = shopType;
|
||||||
_player = player;
|
_player = player;
|
||||||
_products = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
switch (shopType) // 3 = Lcoin Shop - 4 = Special Craft
|
||||||
public boolean write(PacketWriter packet)
|
|
||||||
{
|
|
||||||
OutgoingPackets.EX_PURCHASE_LIMIT_SHOP_ITEM_LIST_NEW.writeId(packet);
|
|
||||||
|
|
||||||
switch (_shopType)
|
|
||||||
{
|
{
|
||||||
case 3: // Normal Lcoin Shop
|
case 3: // Normal Lcoin Shop
|
||||||
{
|
{
|
||||||
@@ -66,10 +59,15 @@ public class ExPurchaseLimitShopItemListNew implements IClientOutgoingPacket
|
|||||||
_products = LCoinShopData.getInstance().getProducts();
|
_products = LCoinShopData.getInstance().getProducts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean write(PacketWriter packet)
|
||||||
|
{
|
||||||
|
OutgoingPackets.EX_PURCHASE_LIMIT_SHOP_ITEM_LIST_NEW.writeId(packet);
|
||||||
|
|
||||||
packet.writeC(_shopType); //
|
packet.writeC(_shopType); //
|
||||||
packet.writeD(_products.size());
|
packet.writeD(_products.size());
|
||||||
|
|
||||||
for (LCoinShopProductHolder product : _products)
|
for (LCoinShopProductHolder product : _products)
|
||||||
{
|
{
|
||||||
packet.writeD(product.getId());
|
packet.writeD(product.getId());
|
||||||
@@ -85,15 +83,11 @@ public class ExPurchaseLimitShopItemListNew implements IClientOutgoingPacket
|
|||||||
packet.writeQ(product.getIngredientQuantities()[3]); // 306
|
packet.writeQ(product.getIngredientQuantities()[3]); // 306
|
||||||
packet.writeQ(product.getIngredientQuantities()[4]); // 306
|
packet.writeQ(product.getIngredientQuantities()[4]); // 306
|
||||||
|
|
||||||
packet.writeH(0x00); // ?
|
packet.writeH(0x00); // sCostItemEnchant 1
|
||||||
packet.writeH(0x00); // ? 306
|
packet.writeH(0x00); // sCostItemEnchant 2
|
||||||
packet.writeH(0x00); // ? 306
|
packet.writeH(0x00); // sCostItemEnchant 3
|
||||||
|
packet.writeH(0x00); // sCostItemEnchant 4 (306)
|
||||||
packet.writeC(-1); // remaining amount?
|
packet.writeH(0x00); // sCostItemEnchant 5 (306)
|
||||||
packet.writeC(-1); // remaining time?
|
|
||||||
|
|
||||||
packet.writeC(-1); // ?
|
|
||||||
packet.writeC(-1); // ?
|
|
||||||
|
|
||||||
// Check limits.
|
// Check limits.
|
||||||
if (product.getAccountDailyLimit() > 0) // Sale period.
|
if (product.getAccountDailyLimit() > 0) // Sale period.
|
||||||
@@ -130,8 +124,8 @@ public class ExPurchaseLimitShopItemListNew implements IClientOutgoingPacket
|
|||||||
{
|
{
|
||||||
packet.writeD(0x01);
|
packet.writeD(0x01);
|
||||||
}
|
}
|
||||||
packet.writeD(0x00);
|
packet.writeD(0x00); // nRemainSec
|
||||||
packet.writeD(0x00);
|
packet.writeD(0x00); // nRemainServerItemAmount
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user