I've been thinking...
(oh no, not again!)
What's the performance cost of GroupEnumUnitsOfTypeCounted
? You are using it for acquiring a unit from heaven of type X.
Let's say we have a group with 20 units * 20 types = 400 units. Will Warcraft manually check unit 1, unit 2, unit 3, etc...? If that's the case, wouldn't Hashing + (Linked lists OR groups) be a good alternative?