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
2018-03-23 16:00:25 -07:00
committed by CekisSWG
parent 0ec761a6fa
commit 70b3d4203e
+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);