mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
Merge remote-tracking branch 'scrawl/item' into next
This commit is contained in:
commit
71fc8f5830
@ -193,6 +193,8 @@ void MWWorld::ContainerStore::addInitialItem (const std::string& id, const std::
|
|||||||
{
|
{
|
||||||
count = std::abs(count); /// \todo implement item restocking (indicated by negative count)
|
count = std::abs(count); /// \todo implement item restocking (indicated by negative count)
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
ManualRef ref (MWBase::Environment::get().getWorld()->getStore(), id);
|
ManualRef ref (MWBase::Environment::get().getWorld()->getStore(), id);
|
||||||
|
|
||||||
if (ref.getPtr().getTypeName()==typeid (ESM::ItemLevList).name())
|
if (ref.getPtr().getTypeName()==typeid (ESM::ItemLevList).name())
|
||||||
@ -248,6 +250,13 @@ void MWWorld::ContainerStore::addInitialItem (const std::string& id, const std::
|
|||||||
addImp (ref.getPtr());
|
addImp (ref.getPtr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (std::logic_error& e)
|
||||||
|
{
|
||||||
|
// Vanilla doesn't fail on nonexistent items in levelled lists
|
||||||
|
std::cerr << "Warning: ignoring nonexistent item '" << id << "'" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MWWorld::ContainerStore::clear()
|
void MWWorld::ContainerStore::clear()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user