From 7465c7bcf78098babcb75792d34120030421c1cc Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 26 Sep 2023 23:13:03 -0700 Subject: [PATCH] Replace calls to deprecated LuaArrayHelper.toArray --- .../stendhal/server/core/scripting/lua/LuaActionHelper.java | 2 +- .../stendhal/server/core/scripting/lua/LuaConditionHelper.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/games/stendhal/server/core/scripting/lua/LuaActionHelper.java b/src/games/stendhal/server/core/scripting/lua/LuaActionHelper.java index 63621cb0bda..87d1f0a5ace 100644 --- a/src/games/stendhal/server/core/scripting/lua/LuaActionHelper.java +++ b/src/games/stendhal/server/core/scripting/lua/LuaActionHelper.java @@ -93,7 +93,7 @@ public ChatAction create(String className, final LuaTable args) { className = "games.stendhal.server.entity.npc.action." + className; Object[] objects = null; if (args != null && !args.isnil()) { - objects = LuaArrayHelper.get().toArray(args); + objects = LuaArrayHelper.get().fromTable(args); } final boolean noArgs = objects == null || objects.length == 0; diff --git a/src/games/stendhal/server/core/scripting/lua/LuaConditionHelper.java b/src/games/stendhal/server/core/scripting/lua/LuaConditionHelper.java index a18eb059f44..15420fe41ef 100644 --- a/src/games/stendhal/server/core/scripting/lua/LuaConditionHelper.java +++ b/src/games/stendhal/server/core/scripting/lua/LuaConditionHelper.java @@ -102,7 +102,7 @@ public ChatCondition create(String className, final LuaTable args) { className = "games.stendhal.server.entity.npc.condition." + className; Object[] objects = null; if (args != null && !args.isnil()) { - objects = LuaArrayHelper.get().toArray(args); + objects = LuaArrayHelper.get().fromTable(args); } final boolean noArgs = objects == null || objects.length == 0;