Server icon indicating copy to clipboard operation
Server copied to clipboard

#scribespells isn't aware of ranked spells

Open mackal opened this issue 6 years ago • 6 comments

This command doesn't handle this correctly.

mackal avatar Mar 12 '18 01:03 mackal

Could we fix this by adding a spell_rank_groups table and at least putting the default ranked spells groups in there so we can have a way to separate the ranks? Or is there something in the spell itself that links it to the next/previous spell? I know there’s a rank column, but doesn’t seem to be anything other than an indicator.

Table would be id, rank, spell_group_id, spell_id or something.

Kinglykrab avatar Aug 31 '22 11:08 Kinglykrab

I think this could be fixed by not adding a new table. Just need to check if the spell has a rank and find the previous already mem'd rank and overwrite it.

mackal avatar Aug 31 '22 14:08 mackal

I think this could be fixed by not adding a new table. Just need to check if the spell has a rank and find the previous already mem'd rank and overwrite it.

How do you know the previous memorized rank’s spell ID?

Kinglykrab avatar Aug 31 '22 15:08 Kinglykrab

SPDat_Spell_Struct::spell_group

Can probably add a helper function that searches over the spell book and returns the slot the spell_group is in.

mackal avatar Aug 31 '22 16:08 mackal

Ah gotcha, wasn’t aware that column was used for that. Sounds like something easy to fix though.

Kinglykrab avatar Aug 31 '22 16:08 Kinglykrab

Ah gotcha, wasn’t aware that column was used for that. Sounds like something easy to fix though.

I would double check with actual data, but they do match for each spell in the series, didn't check much further than that ... But I don't think they use anything else to decide ...

edit: fired up my DB, data looked as I expected. (it's also used for AAs, but since those aren't on scrolls we should be fine)

mackal avatar Aug 31 '22 16:08 mackal