HomeWildfire Games

[PetraAI] - Fix resources (dead animals) coming in the defense army.

Description

[PetraAI] - Fix resources (dead animals) coming in the defense army.

When a wild animal was in a defenseArmy and it was killed, its resource got into the army as well. This caused a call to GetUnitAIOrder data which was undefined for the resource.
Fixed by checking for UnitAI-ness and also for attack-ability whilst at it.

Reported by @seregadushka at the forums: https://wildfiregames.com/forum/topic/110098-petra-error-winter-is-coming5/.

Investigated and MWE by @Norse_Harold.
Fixes #6899