when i got to shop and try to buy weapon please help
java.lang.NullPointerException
at com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance.showBuyWindow(L2MerchantInstance.java:107)
at com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance.showBuyWindow(L2MerchantInstance.java:87)
at handlers.bypasshandlers.Buy.useBypass(Buy.java:54)
at com.l2jserver.gameserver.model.actor.L2Npc.onBypassFeedback(L2Npc.java:776)
at com.l2jserver.gameserver.model.actor.instance.L2PetManagerInstance.onBypassFeedback(L2PetManagerInstance.java:164)
at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:197)
at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
/*
* Copyright (C) 2004-2016 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.model.actor.instance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.l2jserver.gameserver.data.xml.impl.BuyListData;
import com.l2jserver.gameserver.datatables.MerchantPriceConfigTable;
import com.l2jserver.gameserver.datatables.MerchantPriceConfigTable.MerchantPriceConfig;
import com.l2jserver.gameserver.enums.InstanceType;
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
import com.l2jserver.gameserver.model.buylist.L2BuyList;
import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
import com.l2jserver.gameserver.network.serverpackets.BuyList;
import com.l2jserver.gameserver.network.serverpackets.ExBuySellList;
/**
* This class ...
* @version $Revision: 1.10.4.9 $ $Date: 2005/04/11 10:06:08 $
*/
public class L2MerchantInstance extends L2NpcInstance
{
private static final Logger LOG = LoggerFactory.getLogger(L2MerchantInstance.class);
private MerchantPriceConfig _mpc;
/**
* Creates a merchant,
* @param template the merchant NPC template
*/
public L2MerchantInstance(L2NpcTemplate template)
{
super(template);
setInstanceType(InstanceType.L2MerchantInstance);
}
@Override
public void onSpawn()
{
super.onSpawn();
_mpc = MerchantPriceConfigTable.getInstance().getMerchantPriceConfig(this);
}
@Override
public String getHtmlPath(int npcId, int val)
{
String pom = "";
if (val == 0)
{
pom = "" + npcId;
}
else
{
pom = npcId + "-" + val;
}
return "data/html/merchant/" + pom + ".htm";
}
/**
* @return Returns the mpc.
*/
public MerchantPriceConfig getMpc()
{
return _mpc;
}
public final void showBuyWindow(L2PcInstance player, int val)
{
showBuyWindow(player, val, true);
}
public final void showBuyWindow(L2PcInstance player, int val, boolean applyTax)
{
final L2BuyList buyList = BuyListData.getInstance().getBuyList(val);
if (buyList == null)
{
LOG.warn("BuyList not found! BuyListId: {}", val);
player.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
if (!buyList.isNpcAllowed(getId()))
{
LOG.warn("Npc not allowed in BuyList! BuyListId: {} NpcId: {}", val, getId());
player.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
final double taxRate = (applyTax) ? getMpc().getTotalTaxRate() : 0;
player.setInventoryBlockingStatus(true);
if (player.isGM())
{
player.sendMessage("Buy List [" + buyList.getListId() + "]");
}
player.sendPacket(new BuyList(buyList, player.getAdena(), taxRate));
player.sendPacket(new ExBuySellList(player, taxRate, false));
player.sendPacket(ActionFailed.STATIC_PACKET);
}
}
You don’t always have to say a lot - sometimes silence speaks louder.
Sometimes it’s enough just to work steadily, fast, and without unnecessary noise.
No loud words, no promises - only results.
Website: https://vibe-sms.net/
📱 Telegram channel: https://t.me/vibe_sms
SELLING EMPTY TELEGRAM BOTS WITH AGE
Registration date: November 2024
High-quality & clean bots — no subscribers, no bans, created on fresh IPs.
y rested and reliable — perfect for:
— Telegram search ranking
— any technical or marketing tasks
Delivery options:
tdata, by phone number, ownership transfer, or via tokens.
Current price list:
From 3 pcs — $3 each
From 20 pcs — $2.5 each
From 60 pcs — $2.3 each
From 100 pcs — $2.2 each
From 400 pcs — $1.9 each
Over 15,000+ bots available — ready for instant delivery.
Contact on Telegram: @SMMTG6
Telegram Bot TOP Search Promotion | SEO Optimization for Bots |
SMMTG.PRO
We promote Telegram bots to the TOP of search results — by keywords, topics, and countries.
What’s included:
• Promotion to the TOP of Telegram search
• Bot optimization for Telegram algorithms
• Competitor analysis and keyword selection
• Testing and securing stable ranking
Delivery time:
2–3 days per bot
Pricing:
Starts from $40 per bot
(final cost depends on competition level and target country)
We work with 50+ countries:
Russia • Ukraine • USA • Israel • Uzbekistan • Turkey • China • Thailand • Europe • India
Training is also available:
Telegram bot SEO optimization
Techniques & insights for reaching TOP search positions
Real-world cases and recommendations
Contact:
Telegram — @SMMTG6
Our SMM panel: SMMTG.PRO
Question
GoldenNightmare
when i got to shop and try to buy weapon please help
java.lang.NullPointerException
at com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance.showBuyWindow(L2MerchantInstance.java:107)
at com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance.showBuyWindow(L2MerchantInstance.java:87)
at handlers.bypasshandlers.Buy.useBypass(Buy.java:54)
at com.l2jserver.gameserver.model.actor.L2Npc.onBypassFeedback(L2Npc.java:776)
at com.l2jserver.gameserver.model.actor.instance.L2PetManagerInstance.onBypassFeedback(L2PetManagerInstance.java:164)
at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:197)
at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
6 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now