Frikx
Computer Science
Hey yo!!
I'm actually working on a script to sort spells and I really need to access to the spell group (Attack, healing, etc) :
I've checked the spell metatable and it has confirmed the worst of my theories...
Any idea?
I'm actually working on a script to sort spells and I really need to access to the spell group (Attack, healing, etc) :
XML:
<instant group="healing" spellid="144" name="Cure Bleeding" words="exana kor" lvl="45" mana="30" prem="1" aggressive="0" selftarget="1" cooldown="6000" groupcooldown="1000" needlearn="0" script="healing/cure_bleeding.lua">
<vocation name="Druid" />
<vocation name="Knight" />
<vocation name="Elder Druid" />
<vocation name="Elite Knight" />
</instant>
I've checked the spell metatable and it has confirmed the worst of my theories...
C++:
void LuaScriptInterface::pushInstantSpell(lua_State* L, const InstantSpell& spell)
{
lua_createtable(L, 0, 6);
setField(L, "name", spell.getName());
setField(L, "words", spell.getWords());
setField(L, "level", spell.getLevel());
setField(L, "mlevel", spell.getMagicLevel());
setField(L, "mana", spell.getMana());
setField(L, "manapercent", spell.getManaPercent());
setMetatable(L, -1, "Spell");
}
Any idea?