Fixed issue resulting in error if killed creature was not part of a collection.

This commit is contained in:
Cekis
2017-01-19 19:07:01 +00:00
parent ae33d27a13
commit 51a9d02b8e
@@ -909,7 +909,9 @@ public class xp extends script.base_script
params.put("creatureName", creatureName);
params.put("location", getLocation(target));
params.put("socialGroup", ai_lib.getSocialGroup(target));
params.put("col_faction", dataTableGetString(CREATURES_TABLE, creatureName, "col_faction"));
// 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"));
params.put("difficultyClass", dataTableGetInt(CREATURES_TABLE, creatureName, "difficultyClass"));
params.put("target", target);
if (hasObjVar(target, "quest_spawner.spawned_by"))