diff --git a/apps/opencs/model/world/data.cpp b/apps/opencs/model/world/data.cpp index 87ba44001..74b418b30 100644 --- a/apps/opencs/model/world/data.cpp +++ b/apps/opencs/model/world/data.cpp @@ -172,6 +172,13 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc mBirthsigns.addColumn (new NameColumn); mBirthsigns.addColumn (new TextureColumn); mBirthsigns.addColumn (new DescriptionColumn); + // Birthsign spells + NestedParentColumn *birthSpells = + new NestedParentColumn (Columns::ColumnId_SpellList); + mBirthsigns.addColumn (birthSpells); + mBirthsigns.addAdapter (std::make_pair(birthSpells, new SpellListAdapter ())); + mBirthsigns.getNestableColumn(mBirthsigns.getColumns()-1)->addColumn( + new NestedStringColumn (Columns::ColumnId_SpellId)); mSpells.addColumn (new StringIdColumn); mSpells.addColumn (new RecordStateColumn); @@ -365,7 +372,7 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc addModel (new IdTable (&mSounds), UniversalId::Type_Sound); addModel (new IdTable (&mScripts), UniversalId::Type_Script); addModel (new IdTree (&mRegions, &mRegions), UniversalId::Type_Region); - addModel (new IdTable (&mBirthsigns), UniversalId::Type_Birthsign); + addModel (new IdTree (&mBirthsigns, &mBirthsigns), UniversalId::Type_Birthsign); addModel (new IdTable (&mSpells), UniversalId::Type_Spell); addModel (new IdTable (&mTopics), UniversalId::Type_Topic); addModel (new IdTable (&mJournals), UniversalId::Type_Journal); diff --git a/apps/opencs/model/world/data.hpp b/apps/opencs/model/world/data.hpp index 172a194be..2d2fd974c 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -74,7 +74,7 @@ namespace CSMWorld IdCollection mSounds; IdCollection mScripts; NestedIdCollection mRegions; - IdCollection mBirthsigns; + NestedIdCollection mBirthsigns; IdCollection mSpells; IdCollection mTopics; IdCollection mJournals;