I still have my own hash algorithm, too. I'm just fairly sure it's slower than the natives are.Well if you don't want to use a JASS native hashtable there, I still have my old hashich system and my doublehashing algorithms lying around = )
>With the N Dimensional Array, I could even detect Stacks(instances).
Do tell?
Actually, if people have a use for it, I can submit...
Just because it does actually work. Lol.
struct Data
unit Caster
integer Stacks = 0
static method create takes unit u returns thistype
local Data this = Data.allocate()
set .Caster = u
set .Stacks = .Stacks + 1
set GLOBALUNITDATA[GetUnitTypeId(.Caster)] = this
return this
endmethod
static method Blabla takes nothing returns nothing
local Data this = GLOBALUNITDATA[GetUnitTypeId(GetTriggerUnit())]
if this == 0 then
call Data.create(GetTriggerUnit())
else
set .Stacks = .Stacks + 1
endif
endmethod
enstruct