From 64faaeb3ccbfcbbdb0cb2ad9eb95f538e7fde712 Mon Sep 17 00:00:00 2001 From: Cekis Date: Sun, 29 Jan 2017 00:07:18 +0000 Subject: [PATCH] Added logging for issue where a creature killed does not have a social group assigned. --- sku.0/sys.server/compiled/game/script/library/xp.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sku.0/sys.server/compiled/game/script/library/xp.java b/sku.0/sys.server/compiled/game/script/library/xp.java index 7804b1870..63dddfa92 100755 --- a/sku.0/sys.server/compiled/game/script/library/xp.java +++ b/sku.0/sys.server/compiled/game/script/library/xp.java @@ -908,7 +908,11 @@ public class xp extends script.base_script } params.put("creatureName", creatureName); params.put("location", getLocation(target)); - params.put("socialGroup", ai_lib.getSocialGroup(target)); + // only put a value in socialGroup if one can be derived from the target. + if(ai_lib.getSocialGroup(target) != null) + params.put("socialGroup", ai_lib.getSocialGroup(target)); + else + LOG("DESIGNER_FATAL", "WARNING: target (" + target + ":" + creatureName + ") with tempate (" + getTemplateName(target) + ") does not have a social group!!"); // only put a value in col_faction if one is found in the datatable. if(dataTableGetString(CREATURES_TABLE, creatureName, "col_faction") != null) params.put("col_faction", dataTableGetString(CREATURES_TABLE, creatureName, "col_faction"));