diff --git a/TemplePlus/python/python_object.cpp b/TemplePlus/python/python_object.cpp index 58f445e62..ff124f72b 100644 --- a/TemplePlus/python/python_object.cpp +++ b/TemplePlus/python/python_object.cpp @@ -2497,9 +2497,7 @@ static PyObject* PyObjHandle_D20SendSignalEx(PyObject* obj, PyObject* args) { auto args2 = Py_BuildValue("(O)", pytarget); Py_DECREF(pytarget); auto pytaResult = PyObjHandle_PerformTouchAttack(obj, args2); - auto taResult = PyInt_AsLong(pytaResult); - if (!taResult) - d20a.d20Caf = D20CAF_NONE; + d20a.d20Caf = PyInt_AsLong(pytaResult); } d20Sys.d20SendSignal(self->handle, dispKey, &d20a, 0); diff --git a/TemplePlus/ui/ui_picker.cpp b/TemplePlus/ui/ui_picker.cpp index 1310691da..c63406510 100644 --- a/TemplePlus/ui/ui_picker.cpp +++ b/TemplePlus/ui/ui_picker.cpp @@ -94,6 +94,21 @@ class UiPickerHooks : TempleFix if (args.IsBaseModeTarget(UiPickerType::Area)){ spPkt.aoeCenter.location = args.result.location; spPkt.aoeCenter.off_z = args.result.offsetz; + + auto objNode = args.result.objList.objects; + auto handle = objHndl::null; + + if (!objNode) { + if (args.result.handle) { + spPkt.targetListHandles[spPkt.targetCount++] = args.result.handle; + } + } + else { + for (spPkt.targetCount = 0; objNode && spPkt.targetCount < MAX_SPELL_TARGETS; ++spPkt.targetCount) { + spPkt.targetListHandles[spPkt.targetCount] = objNode->handle; + objNode = objNode->next; + } + } } else { spPkt.aoeCenter.location.location.locx = 0; @@ -112,7 +127,7 @@ class UiPickerHooks : TempleFix if (!objNode) { if (args.result.handle) { - spPkt.targetListHandles[spPkt.targetCount] = args.result.handle; + spPkt.targetListHandles[spPkt.targetCount++] = args.result.handle; } } else{ diff --git a/tpdata/co8fixes.dat b/tpdata/co8fixes.dat index 153316685..47c616cbc 100644 Binary files a/tpdata/co8fixes.dat and b/tpdata/co8fixes.dat differ diff --git a/tpdata/tpgamefiles.dat b/tpdata/tpgamefiles.dat index 8d33097f3..fdebc8146 100644 Binary files a/tpdata/tpgamefiles.dat and b/tpdata/tpgamefiles.dat differ