Closed nikolads closed 2 years ago
Question: does the range extension work on the lightning weapon?
Sorry, but I don't know. I don't know anything about the inner workings of either mod. I just saw the exception in the log and managed to track it to this function. And I thought it is better to fix it on the VFE side.
The lightning weapon is a natural/builtin ranged weapon of harpies. Normally they cannot wield other weapons, so it is not supposed to be dropped ever.
The check is added now
When a harpy from [SYR] Harpies is downed, trying to rescue it causes a null reference exception (which prevents it from being rescued).
The issue is that the Harpies mod patches
Pawn_EquipmentTracker::TryDropEquipment
. If the equipment is its lightning weapon the original method is skipped. https://github.com/Syrchalis/Harpy/blob/5b2942830b3b81054f2bf4a118e2cd3a33445728/Source/HarmonyPatches.cs#L386-L399When the original method is skipped the output variable
out ThingWithComps resultingEq
is left uninitialized. Then the postfix patch in VFECoreTryDropEquipment_Patch
is called withresultingEq
=null
.