From 864b93e745fd9072b9810c82c866e7fb3e1210b4 Mon Sep 17 00:00:00 2001 From: Marek Kochanowicz Date: Fri, 25 Jul 2014 11:25:36 +0200 Subject: [PATCH] added enums for spells --- apps/opencs/model/world/columns.cpp | 1 + apps/opencs/model/world/columns.hpp | 2 ++ apps/opencs/model/world/refidadapterimp.hpp | 1 + apps/opencs/model/world/refidcollection.cpp | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/apps/opencs/model/world/columns.cpp b/apps/opencs/model/world/columns.cpp index 83d0ccc79f..1f13645da1 100644 --- a/apps/opencs/model/world/columns.cpp +++ b/apps/opencs/model/world/columns.cpp @@ -175,6 +175,7 @@ namespace CSMWorld { ColumnId_Scope, "Scope" }, { ColumnId_ReferenceableId, "Referenceable ID" }, { ColumnId_InventoryItemId, "ID"}, + { ColumnId_SpellId, "ID"}, { ColumnId_ItemCount, "Count"}, { ColumnId_CombatState, "Combat" }, { ColumnId_MagicState, "Magic" }, diff --git a/apps/opencs/model/world/columns.hpp b/apps/opencs/model/world/columns.hpp index 6812bbae97..908165e9d9 100644 --- a/apps/opencs/model/world/columns.hpp +++ b/apps/opencs/model/world/columns.hpp @@ -180,6 +180,8 @@ namespace CSMWorld ColumnId_BodyPartType = 165, ColumnId_MeshType = 166, ColumnId_ActorInventory = 167, + ColumnId_ActorSpells = 168, + ColumnId_SpellId = 169, // Allocated to a separate value range, so we don't get a collision should we ever need // to extend the number of use values. diff --git a/apps/opencs/model/world/refidadapterimp.hpp b/apps/opencs/model/world/refidadapterimp.hpp index 6fe479150b..ee2a586243 100644 --- a/apps/opencs/model/world/refidadapterimp.hpp +++ b/apps/opencs/model/world/refidadapterimp.hpp @@ -446,6 +446,7 @@ namespace CSMWorld const RefIdColumn *mFight; const RefIdColumn *mAlarm; const RefIdColumn *mInventory; + const RefIdColumn *mSpells; std::map mServices; ActorColumns (const NameColumns& base) : NameColumns (base) {} diff --git a/apps/opencs/model/world/refidcollection.cpp b/apps/opencs/model/world/refidcollection.cpp index 493b716eb3..89469feac3 100644 --- a/apps/opencs/model/world/refidcollection.cpp +++ b/apps/opencs/model/world/refidcollection.cpp @@ -104,6 +104,10 @@ CSMWorld::RefIdCollection::RefIdCollection() mColumns.back().addNestedColumn(Columns::ColumnId_InventoryItemId, CSMWorld::ColumnBase::Display_String); mColumns.back().addNestedColumn(Columns::ColumnId_ItemCount, CSMWorld::ColumnBase::Display_Integer); + mColumns.push_back(RefIdColumn (Columns::ColumnId_ActorSpells, ColumnBase::Display_NestedSpellList, ColumnBase::Flag_Dialogue, true, true, true)); + actorsColumns.mSpells = &mColumns.back(); + mColumns.back().addNestedColumn(Columns::ColumnId_SpellId, CSMWorld::ColumnBase::Display_String); + static const struct { int mName;