Specifically in world.spell_custom_attr you need to set SPELL_ATTR0_CU_CONE_LINE for the spell
https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130057/spell+custom+attr
The downside is that you can't aim a cone up or down. For me, the holy grail would be something like Divine Star, but apparently that's bugged on later versions of TrinityCore too.