L2JMobius

Return of the Queen Ant Admin UI & Enchant Improvements

Oreiudo · 5 · 2557

Offline Oreiudo

  • Vassal
  • *
    • Posts: 9

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


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16114
Try this.
Code: [Select]
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)
  {


Offline Oreiudo

  • Vassal
  • *
    • Posts: 9
It works! Everyone have the same problem or just me?


Offline nasseka

  • Distinguished King
  • *****
    • Posts: 1729
    • L2Unknown
Seems like some items are missing icons and that's the reason.
P.S. Can't find the icons on etcitemgrp.dat :/