whitevo
Feeling good, thats what I do.
Code:
function onThink()
local bonus = player:getData()
player:addMana(bonus)
end
OR
Code:
function onThink()
local bonus = table[cid]
player:addMana(bonus)
end
Which is is better to use?
a table which takes a little memory. or every time take the information out of metatable?
What im asking is, for performance is its easier to get information from tables or trough functions?
These above codes are simplified versions.
What I'm thinking between is to either create a table with appropriate information and let the creaturescript use the table the execute effects.
or every time onthink interval executes it generates the correct data with trough different functions.