L2JMobius
Public Development => Solved/Invalid Bug Reports => Topic started by: Oreiudo on January 19, 2022, 11:30:37 PM
-
When I try to use the artifact enchant button, this error appears for me, I already tried to change some things but I didn't get results, could anyone help me?
"Exception during execution of admin_artifact
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "replacement" is null
at java.base/java.lang.String.replace(String.java:2956)
at handlers.admincommandhandlers.AdminEnchant.showMainPage(AdminEnchant.java:419)
at handlers.admincommandhandlers.AdminEnchant.useAdminCommand(AdminEnchant.java:108)
at org.l2jmobius.gameserver.handler.AdminCommandHandler.lambda$useAdminCommand$0(AdminCommandHandler.java:128)
at org.l2jmobius.commons.threads.RunnableWrapper.run(RunnableWrapper.java:35)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)"
-
Try this.
Index: dist/game/data/scripts/handlers/admincommandhandlers/AdminEnchant.java
===================================================================
--- dist/game/data/scripts/handlers/admincommandhandlers/AdminEnchant.java (revision 9736)
+++ dist/game/data/scripts/handlers/admincommandhandlers/AdminEnchant.java (working copy)
@@ -416,7 +416,7 @@
}
else
{
- getVars = getVars.replace("%ar" + i + "_icon%", item.getIcon());
+ getVars = getVars.replace("%ar" + i + "_icon%", item.getIcon() == null ? "icon.etc_question_mark_i00" : item.getIcon());
// if enchant value is 0 - show "blank instead of 0
if (currentEnch != 0)
{
@@ -454,7 +454,7 @@
}
else
{
- getVars = getVars.replace("%ag" + i + "_icon%", item.getIcon());
+ getVars = getVars.replace("%ag" + i + "_icon%", item.getIcon() == null ? "icon.etc_question_mark_i00" : item.getIcon());
// if enchant value is 0 - show "blank instead of 0
if (currentEnch != 0)
{
-
It works! Everyone have the same problem or just me?
-
Seems like some items are missing icons and that's the reason.
P.S. Can't find the icons on etcitemgrp.dat :/
-
Fixed with https://bitbucket.org/MobiusDev/l2j_mobius/commits/84834da550e3fb1eb7f42266002de9b3d1167479