Jump to content

Recommended Posts

Posted

Hello guys i don't know if everybody already have it so.. this java fix be the trade in game retail

 

"IF i put 1 db in trade it remove auto from my bag and stay just in trade window...

 

sorry for my bad english and for my bad and first topic ^^

 

 

In net.sf.l2j.gameserver.clientpackets; ---> AddTradeItem.java

 

find -> import net.sf.l2j.gameserver.serverpackets.TradeOwnAdd;

 

after  import net.sf.l2j.gameserver.serverpackets.TradeOwnAdd;

 

--> +import net.sf.l2j.gameserver.serverpackets.TradeUpdate;

 

find -> player.sendPacket(new TradeOwnAdd(item));

 

after  player.sendPacket(new TradeOwnAdd(item));

 

+player.sendPacket(new TradeUpdate(trade, player));

 

 

 

Create TradeUpdate.java file in net.sf.l2j.gameserver.serverpackets; or network.serverpackets;  

 

package net.sf.l2j.gameserver.serverpackets;

 

import net.sf.l2j.gameserver.model.L2ItemInstance;

import net.sf.l2j.gameserver.model.TradeList;

import net.sf.l2j.gameserver.model.TradeList.TradeItem;

import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

 

public class TradeUpdate extends L2GameServerPacket

{

   private static final String _S__74_TRADEUPDATE = " 74 TradeUpdate";

   private final L2ItemInstance[] _items;

   private final TradeItem[] _trade_items;

 

   public TradeUpdate(final TradeList trade, final L2PcInstance activeChar)

   {

       _items = activeChar.getInventory().getItems();

       _trade_items = trade.getItems();

   }

 

   private int getItemCount(final int objectId)

   {

       for (final L2ItemInstance item : _items)

           if (item.getObjectId() == objectId)

               return item.getCount();

       return 0;

   }

 

   @Override

   public String getType()

   {

       return _S__74_TRADEUPDATE;

   }

 

   @Override

   protected final void writeImpl()

   {

       writeC(0x74);

 

       writeH(_trade_items.length);

       for (final TradeItem _item : _trade_items)

       {

           int _aveable_count = getItemCount(_item.getObjectId())

                   - _item.getCount();

           boolean _stackable = _item.getItem().isStackable();

           if (_aveable_count == 0)

           {

               _aveable_count = 1;

               _stackable = false;

           }

           writeH(_stackable ? 3 : 2);

           writeH(_item.getItem().getType1()); // item type1

           writeD(_item.getObjectId());

           writeD(_item.getItem().getItemId());

           writeD(_aveable_count);

           writeH(_item.getItem().getType2()); // item type2

           writeH(0x00); // ?

           writeD(_item.getItem().getBodyPart()); // rev 415  slot    0006-lr.ear  0008-neck  0030-lr.finger  0040-head  0080-??  0100-l.hand  0200-gloves  0400-chest  0800-pants  1000-feet  2000-??  4000-r.hand  8000-r.hand

           writeH(_item.getEnchant()); // enchant level

           writeH(0x00); // ?

           writeH(0x00);

       }

   }

}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • 10-17-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
    • Tell a Škoda 1.4 driver that a Škoda 1.8 is faster — and suddenly, you’re riding a mini race car. On the way, they might share random stories — gas prices, the perfect BBQ recipe, or how passengers once called them “just for a minute.” Maybe even how someone left a suitcase full of money in their car once.     The important part? You’ll get there on time, no delays.     Vibe SMS works just as fast — messages fly like that driver who just heard their 1.8 isn’t the fastest.     🌐 https://vibe-sms.net/ 📲 https://t.me/vibe_sms  
    • ⚔️ The Grand Opening Has Arrived! ⚔️ In just a few hours the gate to the eternal battlefield will be open and the war between Order and Chaos will be set once again ! Its time to claim your destiny 🔥 👉 Register now and join the fight today! 🌐 https://l2ovc.com register now : https://l2ovc.com The gates are open the war between Order and Chaos has officially started! 🔥 Join the battlefield NOW and claim your destiny in Order vs Chaos! 💥 Don’t fall behind your faction needs you. ➡️ https://l2ovc.com  
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock