forked from teamnwah/openmw-tes3coop
fix for objects other than Miscellaneous.
This commit is contained in:
parent
5875ce5128
commit
178ad876d7
1 changed files with 11 additions and 11 deletions
|
@ -336,68 +336,68 @@ namespace MWWorld
|
||||||
if (type == typeid(ESM::Potion).name())
|
if (type == typeid(ESM::Potion).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData>* ref = ptr.get<ESM::Potion>();
|
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData>* ref = ptr.get<ESM::Potion>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->potions.list.push_back( *ref );
|
cell->potions.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->potions.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Apparatus).name())
|
else if (type == typeid(ESM::Apparatus).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData>* ref = ptr.get<ESM::Apparatus>();
|
ESMS::LiveCellRef<ESM::Apparatus, MWWorld::RefData>* ref = ptr.get<ESM::Apparatus>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->appas.list.push_back( *ref );
|
cell->appas.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->appas.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Armor).name())
|
else if (type == typeid(ESM::Armor).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData>* ref = ptr.get<ESM::Armor>();
|
ESMS::LiveCellRef<ESM::Armor, MWWorld::RefData>* ref = ptr.get<ESM::Armor>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->armors.list.push_back( *ref );
|
cell->armors.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->armors.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Book).name())
|
else if (type == typeid(ESM::Book).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData>* ref = ptr.get<ESM::Book>();
|
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData>* ref = ptr.get<ESM::Book>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->books.list.push_back( *ref );
|
cell->books.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->books.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Clothing).name())
|
else if (type == typeid(ESM::Clothing).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData>* ref = ptr.get<ESM::Clothing>();
|
ESMS::LiveCellRef<ESM::Clothing, MWWorld::RefData>* ref = ptr.get<ESM::Clothing>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->clothes.list.push_back( *ref );
|
cell->clothes.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->clothes.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Ingredient).name())
|
else if (type == typeid(ESM::Ingredient).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData>* ref = ptr.get<ESM::Ingredient>();
|
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData>* ref = ptr.get<ESM::Ingredient>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->ingreds.list.push_back( *ref );
|
cell->ingreds.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->ingreds.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Light).name())
|
else if (type == typeid(ESM::Light).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData>* ref = ptr.get<ESM::Light>();
|
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData>* ref = ptr.get<ESM::Light>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->lights.list.push_back( *ref );
|
cell->lights.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->lights.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Tool).name())
|
else if (type == typeid(ESM::Tool).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData>* ref = ptr.get<ESM::Tool>();
|
ESMS::LiveCellRef<ESM::Tool, MWWorld::RefData>* ref = ptr.get<ESM::Tool>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->lockpicks.list.push_back( *ref );
|
cell->lockpicks.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->lockpicks.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Repair).name())
|
else if (type == typeid(ESM::Repair).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData>* ref = ptr.get<ESM::Repair>();
|
ESMS::LiveCellRef<ESM::Repair, MWWorld::RefData>* ref = ptr.get<ESM::Repair>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->repairs.list.push_back( *ref );
|
cell->repairs.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->repairs.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Probe).name())
|
else if (type == typeid(ESM::Probe).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData>* ref = ptr.get<ESM::Probe>();
|
ESMS::LiveCellRef<ESM::Probe, MWWorld::RefData>* ref = ptr.get<ESM::Probe>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->probes.list.push_back( *ref );
|
cell->probes.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->probes.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Weapon).name())
|
else if (type == typeid(ESM::Weapon).name())
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData>* ref = ptr.get<ESM::Weapon>();
|
ESMS::LiveCellRef<ESM::Weapon, MWWorld::RefData>* ref = ptr.get<ESM::Weapon>();
|
||||||
newPtr = MWWorld::Ptr(ref, cell);
|
|
||||||
cell->weapons.list.push_back( *ref );
|
cell->weapons.list.push_back( *ref );
|
||||||
|
newPtr = MWWorld::Ptr(&cell->weapons.list.back(), cell);
|
||||||
}
|
}
|
||||||
else if (type == typeid(ESM::Miscellaneous).name())
|
else if (type == typeid(ESM::Miscellaneous).name())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue