I'm still figuring out vJass and OOP and want to create a simple system that handles custom unit values, such as:
I want to be able to access and manipulate these values easily.
What would be the best approach? Arrays+AIDS? Structs? ...
JASS:
library MyUnitSystem initializer OnInit
globals
public integer array Strenght
public integer array Agility
public integer array Intelligence
public integer array Defense
public integer array MagicResist
public real array Damage
public real array AttackSpeed
//ect...
endglobals
function GetDamagePhysical takes integer id returns real
local real r
set r = I2R(Strenght[id]) * 2.5
return r
endfunction
//...
private function OnInit takes nothing returns nothing
local trigger trig = CreateTrigger()
endfunction
endlibrary
I want to be able to access and manipulate these values easily.
What would be the best approach? Arrays+AIDS? Structs? ...