Closed DigitalBox98 closed 3 years ago
The message was put there to warn developers to add templates because there are functional drawbacks to not using NPCTemplate. The proper course of action would be to add the templates and loot lists.
The message was put there to warn developers to add templates because there are functional drawbacks to not using NPCTemplate. The proper course of action would be to add the templates and loot lists.
I would tend to agree that assigning an invalid key is not an actual fix, but this does appear to be what is being done in other existing records follow this paradigm. To be honest, there should be a DOL PR to allow this field to be nullable.
I think instead of wiping out these referenced template ids, we should instead create empty template ids for these referenced values .. this would keep the metadata that we'd be removing. Basically these mobs are somehow related being as they have the same template ids.
The foreign key references to NPCTemplate have informational value. They are grouping 'mob' entities together that can be edited using a single template. Removing them is NOT improving data quality, quite the opposite. It leads to information loss in both the DB and the logs. Plus it is breaking existing mob editing functionality.
The foreign key references to NPCTemplate have informational value. They are grouping 'mob' entities together that can be edited using a single template. Removing them is NOT improving data quality, quite the opposite. It leads to information loss in both the DB and the logs. Plus it is breaking existing mob editing functionality.
Yeah, that's basically what I said. We're in agreement.
I'm closing this PR as the correct behavior is to create the corresponding Templates : should be done on another PR
NPCTemplateID is replaced by -1 to be consistent : it will reduce the number of errors entries in the log during the server's launch