Jump to content
  • 0

Itens ++ Shoping L2jacis


l2jkain

Question

Hello, I'm testing here but it does not work on Ingredient.java
has this _enchantmentLevel but is incomplete more when I add the error!

 

5xqSEtk.png

 

 

 


package net.sf.l2j.gameserver.model.multisell;

import net.sf.l2j.gameserver.data.ItemTable;
import net.sf.l2j.gameserver.model.item.kind.Armor;
import net.sf.l2j.gameserver.model.item.kind.Item;
import net.sf.l2j.gameserver.model.item.kind.Weapon;
import net.sf.l2j.gameserver.templates.StatsSet;

/**
 * A datatype which is part of multisell system. It is either the "result" or the "required part" of a multisell action.
 */
public class Ingredient
{
    private int _itemId;
    private int _itemCount;
    private int _enchantmentLevel;
    
    private boolean _isTaxIngredient;
    private boolean _maintainIngredient;
    
    private Item _template = null;
    
    public Ingredient(StatsSet set)
    {
        this(set.getInteger("id"), set.getInteger("count"),  set.getInteger("enchantmentLevel"), set.getBool("isTaxIngredient", false), set.getBool("maintainIngredient", false));
    }
    
    public Ingredient(int itemId, int itemCount, int enchantmentLevel, boolean isTaxIngredient, boolean maintainIngredient)
    {
        _itemId = itemId;
        _itemCount = itemCount;
        _enchantmentLevel = enchantmentLevel;
        _isTaxIngredient = isTaxIngredient;
        _maintainIngredient = maintainIngredient;
        
        if (_itemId > 0)
            _template = ItemTable.getInstance().getTemplate(_itemId);
    }
    
    /**
     * @return a new Ingredient instance with the same values as this.
     */
    public Ingredient getCopy()
    {
        return new Ingredient(_itemId, _itemCount, _enchantmentLevel, _isTaxIngredient, _maintainIngredient);
    }
    
    public final int getItemId()
    {
        return _itemId;
    }
    
    public final void setItemId(int itemId)
    {
        _itemId = itemId;
    }
    
    public final int getItemCount()
    {
        return _itemCount;
    }
    
    public final void setItemCount(int itemCount)
    {
        _itemCount = itemCount;
    }
    
    public final int getEnchantLevel()
    {
        return _enchantmentLevel;
    }
    
    public final void setEnchantLevel(int enchantmentLevel)
    {
        _enchantmentLevel = enchantmentLevel;
    }
    
    public final boolean isTaxIngredient()
    {
        return _isTaxIngredient;
    }
    
    public final void setIsTaxIngredient(boolean isTaxIngredient)
    {
        _isTaxIngredient = isTaxIngredient;
    }
    
    public final boolean getMaintainIngredient()
    {
        return _maintainIngredient;
    }
    
    public final void setMaintainIngredient(boolean maintainIngredient)
    {
        _maintainIngredient = maintainIngredient;
    }
    
    public final Item getTemplate()
    {
        return _template;
    }
    
    public final boolean isStackable()
    {
        return (_template == null) ? true : _template.isStackable();
    }
    
    public final boolean isArmorOrWeapon()
    {
        return (_template == null) ? false : (_template instanceof Armor) || (_template instanceof Weapon);
    }
    
    public final int getWeight()
    {
        return (_template == null) ? 0 : _template.getWeight();
    }
}

 

Edited by l2jkain
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

You didn't get the point. Like set.getInteger("enchantmentLevel", 0); Second parameter is the default value. So, you add the enchantmentLevel value where you need.

  • Like 1
Link to comment
Share on other sites

  • 0
2 minutes ago, SweeTs said:

Xml está faltando linha de nível de encantamento. Você pode adicionar o código padrão 0 no código. 

 

I already tried to change it

 

set.getInteger("enchantmentLevel")

 

for

 

0

 

When I go to buy the item, do not come ++

Link to comment
Share on other sites

  • 0

set.getInteger("enchantmentLevel")

 

so that this part is what makes the option to add in the xml in MultisellData it calls it so


// Feed with a new ingredient.
entry.addIngredient (new Ingredient (set));

Link to comment
Share on other sites

  • 0
53 minutes ago, SweeTs said:

You didn't get the point. Like set.getInteger("enchantmentLevel", 0); Second parameter is the default value. So, you add the enchantmentLevel value where you need.

 

and you're right I did not know the null parameter he quoted could close the resoved topic thank you.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • 💸 New discount coupon 5% 😎 boosti 😎
    • 💸 New discount coupon 5% 😎 boosti 😎
    • to my store : https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11 Whatsapp ; +212614849119
    • This is my first and last topic created on a Lineage Forum, because if there's one thing that causes headaches for a lot of people, it's the critical error, that's why I decided to share it...   I'm creating a server again and before starting configurations I started collecting dozens of customs, without realizing my system folder had 950MB of files, so I started to enter the game, every 1 to 2 hours my client was reaching the maximum limit of virtual memory of the game due to the absurd amount of customs inside the system folder, reaching the maximum limit of 2047MB virtual ram, automatically we get critical, regardless of the error that appears on your screen, "THE WORDS ARE IRRELEVANT, unless it is a critical error before the ram memory limit reaches its limit", if you are seeing "2047 MB", it means that the game's virtual memory has reached its limit, and this memory is not configurable due to the game being created on 32-bit architecture, so I significantly reduced the amount of customs within the system from 950MB to 625MB, so my client started to reach the maximum memory limit every 10 to 12h, a huge progress, but my goal was at least 24h before reaching the virtual memory limit (playing frantically), so I reduced the system's custom files from 625MB to 267MB, the result was a first virtual memory limit critical error appearing after 41h.   My client is H5, the only types of customs I added to the game were focused only on equipment, one of the main causes were these skins and cloaks, they consume a huge amount of MB's within the "system", the problem is not adding customs to the client, the problem is adapting a custom and adding it inside the system folder, the system folder was not created with the intention of storing a huge amount of files.   Adding customs to the system folder means significantly reducing the time your client can remain open before reaching the virtual ram limit and make no mistake, there are hundreds of different critical errors with a small summary of the cause of the error, but if the critical table shows 2047MB of RAM, the problem is only 1. Example: I can see 3, 5, 9 critical error with different messages, but if this table is showing 2047MB ram, the reason was the virtual memory limit, an important detail is that this 2047MB ram is not a "fixed message or information from your computer", this 2047MB only appear when the cause is the virtual ram limit, it means that when you get a critical error with random numbers of ram memory appearing, such as 358MB ram, 715MB ram, it means that the cause of this error has no connection with ram virtual memory.
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products  https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
  • Topics

×
×
  • Create New...