@ -45,10 +45,16 @@ namespace MWWorld
{
assert ( cell ) ;
if ( cell - > mContext . filename . empty ( ) )
if ( cell - > mContext List. size ( ) = = 0 )
return ; // this is a dynamically generated cell -> skipping.
// Load references from all plugins that do something with this cell.
// HACK: only use first entry for now, full support requires some more work
//for (int i = 0; i < cell->mContextList.size(); i++)
for ( int i = 0 ; i < 1 ; i + + )
{
// Reopen the ESM reader and seek to the right position.
// TODO: we will need to intoduce separate "esm"s, one per plugin!
cell - > restore ( esm ) ;
ESM : : CellRef ref ;
@ -61,8 +67,11 @@ namespace MWWorld
std : : transform ( ref . mRefID . begin ( ) , ref . mRefID . end ( ) , std : : back_inserter ( lowerCase ) ,
( int ( * ) ( int ) ) std : : tolower ) ;
// TODO: support deletion / moving references out of the cell. no simple "push_back",
// but see what the plugin wants to do.
mIds . push_back ( lowerCase ) ;
}
}
std : : sort ( mIds . begin ( ) , mIds . end ( ) ) ;
}
@ -71,10 +80,16 @@ namespace MWWorld
{
assert ( cell ) ;
if ( cell - > mContext . filename . empty ( ) )
if ( cell - > mContext List. size ( ) = = 0 )
return ; // this is a dynamically generated cell -> skipping.
// Load references from all plugins that do something with this cell.
// HACK: only use first entry for now, full support requires some more work
//for (int i = 0; i < cell->mContextList.size(); i++)
for ( int i = 0 ; i < 1 ; i + + )
{
// Reopen the ESM reader and seek to the right position.
// TODO: we will need to intoduce separate "esm"s, one per plugin!
cell - > restore ( esm ) ;
ESM : : CellRef ref ;
@ -126,3 +141,4 @@ namespace MWWorld
}
}
}
}