Added logging for exceptions thrown on tcg pets when pet is requested to spawn next to its owner (from tcg barn?)

This commit is contained in:
Cekis
2017-01-29 03:42:47 +00:00
parent 6335af416c
commit 02ccf97acf
+4
View File
@@ -422,6 +422,10 @@ public class tcg_pet_controller extends script.base_script
return false;
}
obj_id pet = create.object(petCreatureName, spawnLoc);
if(!isIdValid(pet)){
LOG("tcg-pet","Unable to spawn pet (" + pet + ") with template (" + petCreatureName + ") near the owner (" + owner + ") in building (" + objBuilding + ") at location (" + spawnLoc.toString() + ").");
return false;
}
setOwner(pet, owner);
ai_lib.setDefaultCalmBehavior(pet, ai_lib.BEHAVIOR_WANDER);
setObjVar(controller, house_pet.CHILD_OBJ_ID, pet);