Jump to content
  • 0

Itens ++ Shoping L2jacis


Question

Posted (edited)

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

5 answers to this question

Recommended Posts

  • 0
Posted

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
  • 0
Posted
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 ++

  • 0
Posted

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));

  • 0
Posted
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.

Guest
This topic is now closed to further replies.


  • Posts

    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click   🚀 Promo code: MEDIUM5 (5% Discount)   ➡️ Online Store: Click ✅ ➡️ Telegram Bot: Click ✅ ➡️ SMM Panel: Click ✅   Regular customers receive additional discounts and promo codes!   Support: ➡️ Telegram: https://t.me/solomon_bog ✅ ➡️ Discord: https://discord.gg/y9AStFFsrh ✅ ➡️ WhatsApp: https://wa.me/79051904467 ✅ ➡️ Email: solomonbog@socnet.store ✅   ➡️ Telegram Channel: https://t.me/accsforyou_shop ✅   You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners )  — Becoming a supplier   SocNet — your store for digital goods and premium subscriptions ✅
    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click Promo code: MEDIUM5 (5% Discount) Online Store: Click Telegram Bot: Click SMM Panel: Click Regular customers receive additional discounts and promo codes! Support: Telegram: https://t.me/solomon_bog Discord: https://discord.gg/y9AStFFsrh WhatsApp: https://wa.me/79051904467 Email: solomonbog@socnet.store  Telegram Channel: https://t.me/accsforyou_shop You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners ) — Becoming a supplier SocNet — your store for digital goods and premium subscriptions  Want to expand your business network or promote services through the largest B2B platform? LinkedIn accounts are your tool for marketing, recruiting, and outreach automation. Perfect for SMM, hiring, lead generation, and business scaling. ➡ Ready-made accounts — fast, convenient, no hassle. Promo code: LINKEDIN5 (5% discount) Payment: Bank cards · Cryptocurrency · Other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Product range: ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM USA IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM EUROPE IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM MIX IP | Price from: $2.5 ➡ LinkedIn Old Brute Account with Real Connections (0 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $10 ➡ LinkedIn Premium Brute Account (Premium) with active 1-month Premium subscription | Geo: MIX | Registered on real device | Full account access | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (50 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (100+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $39 ➡ LinkedIn Old Brute Account with Real Connections (500+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $69 ➡ LinkedIn Verified Brute Account with verified documents | Geo: MIX | Registered on real device | Full account access | Price from: $89 Loyal customers — additional discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop Also via these contacts you can: — Consult about wholesale purchases — Set up a partnership (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — Digital Goods and Premium Subscriptions Store
    • SocNet is now on Medium! Check out our new article showcasing the full potential of our store and SMM Panel! Article: Click Promo code: MEDIUM5 (5% Discount) Online Store: Click Telegram Bot: Click SMM Panel: Click Regular customers receive additional discounts and promo codes! Support: Telegram: https://t.me/solomon_bog Discord: https://discord.gg/y9AStFFsrh WhatsApp: https://wa.me/79051904467 Email: solomonbog@socnet.store  Telegram Channel: https://t.me/accsforyou_shop You can also contact us for: — Wholesale inquiries — Partnership opportunities (Current partners: https://socnet.bgng.io/partners ) — Becoming a supplier SocNet — your store for digital goods and premium subscriptions  Want to expand your business network or promote services through the largest B2B platform? LinkedIn accounts are your tool for marketing, recruiting, and outreach automation. Perfect for SMM, hiring, lead generation, and business scaling. ➡ Ready-made accounts — fast, convenient, no hassle. Promo code: LINKEDIN5 (5% discount) Payment: Bank cards · Cryptocurrency · Other popular methods How to buy: ➡ Online Store: Click ➡ Telegram Bot: Click Other services: ➡ SMM Panel: Click Product range: ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM USA IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM EUROPE IP | Price from: $2.5 ➡ LINKEDIN.COM ACCOUNTS | EMAIL INCLUDED @OUTLOOK.COM / @HOTMAIL.COM / @FIRSTMAIL.COM, MALE OR FEMALE, PARTIALLY FILLED PROFILES, REGISTERED FROM MIX IP | Price from: $2.5 ➡ LinkedIn Old Brute Account with Real Connections (0 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $10 ➡ LinkedIn Premium Brute Account (Premium) with active 1-month Premium subscription | Geo: MIX | Registered on real device | Full account access | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (50 connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $20 ➡ LinkedIn Old Brute Account with Real Connections (100+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $39 ➡ LinkedIn Old Brute Account with Real Connections (500+ connections) | Mix Geo | Filled Profile | Registered on real device | Price from: $69 ➡ LinkedIn Verified Brute Account with verified documents | Geo: MIX | Registered on real device | Full account access | Price from: $89 Loyal customers — additional discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop Also via these contacts you can: — Consult about wholesale purchases — Set up a partnership (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — Digital Goods and Premium Subscriptions Store
    • Buying & Selling Torn City Cash
  • 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