From f0a5c34c5ff65ba0c22f09bb1a703181eec0813f Mon Sep 17 00:00:00 2001 From: Cekis Date: Mon, 30 Jan 2017 03:19:42 +0000 Subject: [PATCH] Added check to make sure the trader participating in the city invasions and is trying to build defenses that they have the crafting tool required for building. --- .../compiled/game/script/systems/gcw/gcw_city_pylon.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/systems/gcw/gcw_city_pylon.java diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/gcw_city_pylon.java b/sku.0/sys.server/compiled/game/script/systems/gcw/gcw_city_pylon.java old mode 100644 new mode 100755 index e06a15d53..4fadd1968 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/gcw_city_pylon.java +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/gcw_city_pylon.java @@ -373,13 +373,18 @@ public class gcw_city_pylon extends script.base_script } desiredTemplate = getStringObjVar(self, gcw.GCW_TOOL_TEMPLATE_OBJVAR); obj_id[] toolList = utils.getAllItemsPlayerHasByTemplate(player, desiredTemplate); + if(toolList == null) + { + return SCRIPT_CONTINUE; + } int bestToolValue = 0; int toolValue = 0; obj_id bestTool = null; for (int i = 0; i < toolList.length; i++) { + toolValue = 0; String itemTemplate = getTemplateName(toolList[i]); - if (itemTemplate.equals(desiredTemplate)) + if (itemTemplate != null && itemTemplate.equals(desiredTemplate)) { if (hasObjVar(toolList[i], "crafting_components.power")) {