Adding these fields to the editor today, need to know what the options for control_effect_type are. I thought it was a toggle because you made it a tinyint(1) which is usually only 0 or 1, but your det_type is also a tinyint(1) and is definitely > 1.thefoof wrote:*You may also assign a control effect so the det may be cured by special spells that only handle control spells, use the same control effect types used when adding an effect
I would prefer data types be tinyint(1) for bool, and tinyint(3) for anything not true/false but <= 255. For future reference.
Do not be afraid to be descriptive. `det_type` makes sense to you, but `detriment_type` is clearer if that's what it truly is.thefoof wrote:I added 3 new values to the spells table for this: det_type, control_effect_type and uncurable. Set det_type and control_effect_type to the desired types when needed, uncurable to 1 if you want the spell to be uncurable. Also note detriments will ONLY be applied if a det_type is set AND the spell's duration is > 0.
Also, I am not sure what I am seeing in code, where you load the `det_type` data -
Code: Select all
data->det_type = (result.GetInt8Str("det_type") == 1);`uncurable`? That ranks right up there with casted_on
Our schema is pretty old, so lots of stuff is typed wrong only because we had no idea originally what the data would involve. When in doubt, ask your data guy... aka, me.
I will fix a few of these issues today, because I needed a commit for 73000 anyway.