Jump to content
  • 0

Tradable Augmented Items


Question

8 answers to this question

Recommended Posts

  • 0
Posted
8 hours ago, KejbL said:

need edit client side >>> interface.

 

 

Can someone give me more info? which file do i have to edit in interface and which in source? 

  • 0
Posted
24 minutes ago, Eleven said:

 

Can someone give me more info? which file do i have to edit in interface and which in source? 

If you read the replies on the topic he posted for you there's all the info you need to do that.

  • 0
Posted

I managed to do it so i can see augments in trade in my inventory (TradeStart). at the rest packets im not able to do it. Also i think i need to add something in Tradelist. Im using aCis 401 and im still newbie so any help will be very helpfull. 

  • 0
Posted

Guys can someone guide me on this? this is the packet Tradestart and its working perfect:

 

package net.sf.l2j.gameserver.network.serverpackets;

import net.sf.l2j.gameserver.model.actor.Player;
import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
import net.sf.l2j.gameserver.model.item.kind.Item;
import net.sf.l2j.gameserver.model.trade.TradeList;

public class TradeStart extends L2GameServerPacket
{
    private final ItemInstance[] _items;
    private final TradeList _tradeList;
    
    public TradeStart(Player player)
    {
        _items = player.getInventory().getAvailableItems(true, false, false);
        _tradeList = player.getActiveTradeList();
    }
    
    @Override
    protected final void writeImpl()
    {
        if (_tradeList == null || _tradeList.getPartner() == null)
            return;
        
        writeC(0x1E);
        writeD(_tradeList.getPartner().getObjectId());
        writeH(_items.length);
        
        for (ItemInstance temp : _items)
        {
            final Item item = temp.getItem();
            
            writeH(item.getType1());
            writeD(temp.getObjectId());
            writeD(temp.getItemId());
            writeD(temp.getCount());
            writeH(item.getType2());
            int _augorg = 0;
            int _aug = 0;
            int _aug2 = 0;
            int _aug3 = 0;
            if (temp.isAugmented()) 
            {
                _augorg = temp.getAugmentation().getId();    
                _aug = _augorg>>16;
                _aug2 = _aug;
                _aug3 = _augorg-(_aug<<16);
            }                
                writeH(_aug2);
                writeD(item.getBodyPart());
                writeH(temp.getEnchantLevel());
                writeH(0x00);
                writeH(_aug3);
        }
    }
}

 

How can i do the same on TradeOwnAdd ? Check how it is bellow:

 

package net.sf.l2j.gameserver.network.serverpackets;

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

public class TradeOwnAdd extends L2GameServerPacket
{
    private final TradeItem _item;
    
    public TradeOwnAdd(TradeItem item)
    {
        _item = item;
    }
    
    @Override
    protected final void writeImpl()
    {
        writeC(0x20);
        
        writeH(1); // item count
        
        writeH(_item.getItem().getType1());
        writeD(_item.getObjectId());
        writeD(_item.getItem().getItemId());
        writeD(_item.getCount());
        writeH(_item.getItem().getType2());
        writeH(0x00); // ?
        
        writeD(_item.getItem().getBodyPart());
        writeH(_item.getEnchant());
        writeH(0x00); // ?
        writeH(0x00);
    }
}

Guest
This topic is now closed to further replies.


×
×
  • Create New...