- Joined
- Feb 2, 2006
- Messages
- 1,595
I am just wondering if there are still no natives to retrieve the icon path of units, items, abilities etc. with the new natives from Reforged. Currently, I am using a hashtable in my map storing all icons I need: wowr/Systems.j at master · tdauth/wowr
Something like this:
Did I miss some natives?
I was wondering if there is a system if they do not exist yet which automatically provides the paths for standard Warcraft unit types/abilities/item types. Otherwise, I will have to register a lot by myself but I guess it wouldn't make much sense since you could change the icons of some standard object data.
Or maybe there is a tool which extracts the icons from the object data and generates the paths or function calls?
Something like this:
JASS:
function AddUnitTypeIcon takes integer unitTypeId, string icon returns nothing
call SaveStr(ObjectIdIconsHashTable, unitTypeId, 0, icon)
endfunction
function AddItemTypeIcon takes integer itemTypeId, string icon returns nothing
call SaveStr(ObjectIdIconsHashTable, itemTypeId, 0, icon)
endfunction
function GetIconByUnitType takes integer unitTypeId returns string
local string result = LoadStr(ObjectIdIconsHashTable, unitTypeId, 0)
if (result == null or result == "") then
return "ReplaceableTextures\\WorldEditUI\\Editor-Random-Unit.blp"
endif
return result
endfunction
function GetIconByItemType takes integer itemTypeId returns string
local string result = LoadStr(ObjectIdIconsHashTable, itemTypeId, 0)
if (result == null or result == "") then
return "ReplaceableTextures\\WorldEditUI\\Editor-Random-Item.blp"
endif
return result
endfunction
Did I miss some natives?
I was wondering if there is a system if they do not exist yet which automatically provides the paths for standard Warcraft unit types/abilities/item types. Otherwise, I will have to register a lot by myself but I guess it wouldn't make much sense since you could change the icons of some standard object data.
Or maybe there is a tool which extracts the icons from the object data and generates the paths or function calls?