1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 03:53:54 +00:00

fix for objects other than Miscellaneous.

This commit is contained in:
scrawl 2012-05-16 22:17:13 +02:00
parent 5875ce5128
commit 178ad876d7

View file

@ -336,68 +336,68 @@ namespace MWWorld
if (type == typeid(ESM::Potion).name())
{
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData>* ref = ptr.get<ESM::Potion>();
newPtr = MWWorld::Ptr(ref, cell);
cell->potions.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->potions.list.back(), cell);
}
else if (type == typeid(ESM::Apparatus).name())
{
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData>* ref = ptr.get<ESM::Apparatus>();
newPtr = MWWorld::Ptr(ref, cell);
cell->appas.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->appas.list.back(), cell);
}
else if (type == typeid(ESM::Armor).name())
{
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData>* ref = ptr.get<ESM::Armor>();
newPtr = MWWorld::Ptr(ref, cell);
cell->armors.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->armors.list.back(), cell);
}
else if (type == typeid(ESM::Book).name())
{
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData>* ref = ptr.get<ESM::Book>();
newPtr = MWWorld::Ptr(ref, cell);
cell->books.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->books.list.back(), cell);
}
else if (type == typeid(ESM::Clothing).name())
{
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData>* ref = ptr.get<ESM::Clothing>();
newPtr = MWWorld::Ptr(ref, cell);
cell->clothes.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->clothes.list.back(), cell);
}
else if (type == typeid(ESM::Ingredient).name())
{
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData>* ref = ptr.get<ESM::Ingredient>();
newPtr = MWWorld::Ptr(ref, cell);
cell->ingreds.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->ingreds.list.back(), cell);
}
else if (type == typeid(ESM::Light).name())
{
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData>* ref = ptr.get<ESM::Light>();
newPtr = MWWorld::Ptr(ref, cell);
cell->lights.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->lights.list.back(), cell);
}
else if (type == typeid(ESM::Tool).name())
{
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData>* ref = ptr.get<ESM::Tool>();
newPtr = MWWorld::Ptr(ref, cell);
cell->lockpicks.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->lockpicks.list.back(), cell);
}
else if (type == typeid(ESM::Repair).name())
{
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData>* ref = ptr.get<ESM::Repair>();
newPtr = MWWorld::Ptr(ref, cell);
cell->repairs.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->repairs.list.back(), cell);
}
else if (type == typeid(ESM::Probe).name())
{
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData>* ref = ptr.get<ESM::Probe>();
newPtr = MWWorld::Ptr(ref, cell);
cell->probes.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->probes.list.back(), cell);
}
else if (type == typeid(ESM::Weapon).name())
{
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData>* ref = ptr.get<ESM::Weapon>();
newPtr = MWWorld::Ptr(ref, cell);
cell->weapons.list.push_back( *ref );
newPtr = MWWorld::Ptr(&cell->weapons.list.back(), cell);
}
else if (type == typeid(ESM::Miscellaneous).name())
{