- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
I noticed that
seems pretty useful, since you can set the unit point value in the object editor and make a 1-1 correspondence with a unit and its point value.
But the parameter it asks for is a unit, not the unitTypeId. Is there a way around this, or would I have to create a unit based on the unitId, then call GetUnitPointValue to get the unit's point value, and then destroy the unit to avoid leak? That would be two native function calls, plus a destroy call and a setting variable.
The other way I was doing it was using a hash table to map the unitTypeIds to unique integer values (e.g. 0 - 150, each is a unique int for each unique hero type).
What is best to do?
I noticed that
JASS:
GetUnitPointValue
But the parameter it asks for is a unit, not the unitTypeId. Is there a way around this, or would I have to create a unit based on the unitId, then call GetUnitPointValue to get the unit's point value, and then destroy the unit to avoid leak? That would be two native function calls, plus a destroy call and a setting variable.
The other way I was doing it was using a hash table to map the unitTypeIds to unique integer values (e.g. 0 - 150, each is a unique int for each unique hero type).
What is best to do?