GetSpellCatalog

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

getSpellCatalog

Returns every spell definition known by the authoritative magic system.

Syntax

table getSpellCatalog()

Parameters

This function does not accept parameters.

Returns

Returns a 1-indexed array of spell definition tables plus catalog version/hash metadata.

Examples

Print all implemented spells:

for _, spell in ipairs(getSpellCatalog()) do
    if spell.implemented then
        print(spell.id, spell.key, spell.requiredCircle)
    end
end

Notes

  • Available only in server-side resource scripts.