mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 06:15:32 +00:00
Fix issue where mandatory effects field was allowed to be empty (and vice versa)
(cherry picked from commit 972193c7eb
)
This commit is contained in:
parent
bb1a959c88
commit
b595f2641c
5 changed files with 20 additions and 9 deletions
|
@ -86,6 +86,10 @@ bool CSMWorld::ColumnBase::isId (Display display)
|
|||
Display_InfoCondVar,
|
||||
Display_InfoCondComp,
|
||||
|
||||
Display_EffectSkill,
|
||||
Display_EffectAttribute,
|
||||
Display_IngredEffectId,
|
||||
|
||||
Display_None
|
||||
};
|
||||
|
||||
|
|
|
@ -124,6 +124,10 @@ namespace CSMWorld
|
|||
Display_String32,
|
||||
Display_LongString256,
|
||||
|
||||
Display_EffectSkill, // must display at least one, unlike Display_Skill
|
||||
Display_EffectAttribute, // must display at least one, unlike Display_Attribute
|
||||
Display_IngredEffectId, // display none allowed, unlike Display_EffectId
|
||||
|
||||
//top level columns that nest other columns
|
||||
Display_NestedHeader
|
||||
};
|
||||
|
|
|
@ -282,9 +282,9 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
|
|||
mSpells.getNestableColumn(index)->addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_EffectId));
|
||||
mSpells.getNestableColumn(index)->addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_SkillId));
|
||||
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_EffectSkill));
|
||||
mSpells.getNestableColumn(index)->addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_Attribute));
|
||||
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_EffectAttribute));
|
||||
mSpells.getNestableColumn(index)->addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_EffectRange, ColumnBase::Display_EffectRange));
|
||||
mSpells.getNestableColumn(index)->addColumn(
|
||||
|
@ -398,9 +398,9 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
|
|||
mEnchantments.getNestableColumn(index)->addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_EffectId));
|
||||
mEnchantments.getNestableColumn(index)->addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_SkillId));
|
||||
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_EffectSkill));
|
||||
mEnchantments.getNestableColumn(index)->addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_Attribute));
|
||||
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_EffectAttribute));
|
||||
mEnchantments.getNestableColumn(index)->addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_EffectRange, ColumnBase::Display_EffectRange));
|
||||
mEnchantments.getNestableColumn(index)->addColumn(
|
||||
|
|
|
@ -81,11 +81,11 @@ CSMWorld::RefIdCollection::RefIdCollection(const CSMWorld::Data& data)
|
|||
new IngredEffectRefIdAdapter ()));
|
||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), ingredientEffectsMap));
|
||||
mColumns.back().addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_EffectId));
|
||||
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_IngredEffectId));
|
||||
mColumns.back().addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_SkillId));
|
||||
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_EffectSkill));
|
||||
mColumns.back().addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_Attribute));
|
||||
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_EffectAttribute));
|
||||
|
||||
// nested table
|
||||
PotionColumns potionColumns (inventoryColumns);
|
||||
|
@ -99,9 +99,9 @@ CSMWorld::RefIdCollection::RefIdCollection(const CSMWorld::Data& data)
|
|||
mColumns.back().addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_EffectId));
|
||||
mColumns.back().addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_SkillId));
|
||||
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_EffectSkill));
|
||||
mColumns.back().addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_Attribute));
|
||||
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_EffectAttribute));
|
||||
mColumns.back().addColumn(
|
||||
new NestedChildColumn (Columns::ColumnId_EffectRange, ColumnBase::Display_EffectRange));
|
||||
mColumns.back().addColumn(
|
||||
|
|
|
@ -104,6 +104,9 @@ CSVDoc::ViewManager::ViewManager (CSMDoc::DocumentManager& documentManager)
|
|||
{ CSMWorld::ColumnBase::Display_AiPackageType, CSMWorld::Columns::ColumnId_AiPackageType, false },
|
||||
{ CSMWorld::ColumnBase::Display_InfoCondFunc, CSMWorld::Columns::ColumnId_InfoCondFunc, false },
|
||||
{ CSMWorld::ColumnBase::Display_InfoCondComp, CSMWorld::Columns::ColumnId_InfoCondComp, false },
|
||||
{ CSMWorld::ColumnBase::Display_IngredEffectId, CSMWorld::Columns::ColumnId_EffectId, true },
|
||||
{ CSMWorld::ColumnBase::Display_EffectSkill, CSMWorld::Columns::ColumnId_Skill, false },
|
||||
{ CSMWorld::ColumnBase::Display_EffectAttribute, CSMWorld::Columns::ColumnId_Attribute, false },
|
||||
};
|
||||
|
||||
for (std::size_t i=0; i<sizeof (sMapping)/sizeof (Mapping); ++i)
|
||||
|
|
Loading…
Reference in a new issue