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

    • I’ve worked with a web designer Tacoma before, and it really reminded me how much smoother projects run when design and development stay in sync. Your setup looks solid, and pairing clean UI work with steady backend support can save a ton of back‑and‑forth later. If you ever decide to push harder on conversions or need outside perspective on structure, that mix helped me spot gaps early on.
    • If you’re juggling mixed payment methods and tricky setups, I’ve found that easing the pressure on the subscription side can make the whole flow smoother. I started using Subscription Revenue Growth for handling my own recurring payments, upgrades, and all that messy churn stuff, and it took a big weight off. Pairing something stable for subs with your gateway setup can keep cashflow from going off the rails.
    • L2Avalon launches February 20 High Five project (Salvation client) focused on classic world progression — not instance spam and not “twink” metas. What is L2Avalon? L2Avalon is built around real Lineage 2 gameplay: farming spots, open world conflict, raids, epics, economy and competition. No Kamael Reduced instanced content **Discord:** https://discord.gg/NbM2cXmAem 🌐 **Website:** https://l2avalon.net Balance & Economy Every class is tuned to be viable in PvE and PvP Off-meta classes get buffed instead of adding power-creep garbage Adena-based economy Farming matters: boosted Drop/Spoil for each stage of progression Rates & Settings Dynamic XP: 50x (Lv 1–40) → 1x (Lv 78+) Staged progression with new content unlocking weekly Adena / Drop / Spoil: 3x / 5x / 5x NPC Buffer: 2 hours (Premium: 3 hours) Box limit: 2+1 windows per PC MP potion: 1000 MP, 10s cooldown Free2Play System (earn Donate Coins by playing) You don’t have to donate to progress. Donate Coins drop in-game, so everything is achievable through playtime and activity. Where Donate Coins drop: Mobs Lv 76+, Raid Bosses Lv 70+, Epic Bosses Auto-farm (controlled) Limit: only 1 window can use auto-farm at the same time Daily time: 1 hour/day without Premium Extra tickets: purchasable with PC Bang points (earned by being online) Disabled zones: CC / IT / FOG / VARKA / KETRA Equipment Changes Reworked set bonuses Reworked SA system Enchanted set bonuses Enchanted shirt bonuses Fake Epic jewelry (weakened alternative) Skills (High Five mechanics) New skills added Old skills updated New enchant branches + updated existing ones Subclass skills Clan skills Daily Activities (solo-friendly) Events / Missions / Instances Stages Soon — stage schedule and weekly unlocks will be published February 20 — we start. **Discord:** https://discord.gg/NbM2cXmAem 🌐 **Website:** https://l2avalon.net
    • Hello MxC community, i want to buy client dev / patch maker services for the client of salvation. Im using L2jeternity multiprotocol (h5-salvation 140). I want a Patch full optimized for the h5 content. Everything that is not needed must be removed, as well as some textures like maps for example should be also adjusted to h5 content. If you know anyone that can take the job feel free to contact me here or in Discord. Only professional work.   Discord: ch4osroxas   Thank you very much!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..

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