Closed jzy-chitong56 closed 2 weeks ago
That is there to ensure amai town num is in sync with the hardcoded town numbering, yes when everything is working correctly its unnecessary. But if there is a mismatch it won't sync the towns up and future checks will hopefully fix up the mismatch.
exitwhen IsUnitType(u, UNIT_TYPE_STRUCTURE) and GetTownUnitCount(GetUnitTypeId(u), num, true) > 0
if u != null , then GetTownUnitCount(id, num, true)
must> 0
, so no need check this or check> 1