mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
remove redundant argument
This commit is contained in:
parent
09373a757d
commit
f62905eb0a
2 changed files with 8 additions and 8 deletions
|
@ -550,7 +550,7 @@ void MWWorld::ContainerStore::fillNonRandom (const ESM::InventoryList& items, co
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWWorld::ContainerStore::addInitialItem (const std::string& id, const std::string& owner, int count,
|
void MWWorld::ContainerStore::addInitialItem (const std::string& id, const std::string& owner, int count,
|
||||||
Misc::Rng::Seed* seed, bool topLevel, const std::string& levItem)
|
Misc::Rng::Seed* seed, bool topLevel)
|
||||||
{
|
{
|
||||||
if (count == 0) return; //Don't restock with nothing.
|
if (count == 0) return; //Don't restock with nothing.
|
||||||
try
|
try
|
||||||
|
@ -558,13 +558,13 @@ void MWWorld::ContainerStore::addInitialItem (const std::string& id, const std::
|
||||||
ManualRef ref (MWBase::Environment::get().getWorld()->getStore(), id, count);
|
ManualRef ref (MWBase::Environment::get().getWorld()->getStore(), id, count);
|
||||||
if (ref.getPtr().getClass().getScript(ref.getPtr()).empty())
|
if (ref.getPtr().getClass().getScript(ref.getPtr()).empty())
|
||||||
{
|
{
|
||||||
addInitialItemImp(ref.getPtr(), owner, count, seed, topLevel, levItem);
|
addInitialItemImp(ref.getPtr(), owner, count, seed, topLevel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Adding just one item per time to make sure there isn't a stack of scripted items
|
// Adding just one item per time to make sure there isn't a stack of scripted items
|
||||||
for (int i = 0; i < std::abs(count); i++)
|
for (int i = 0; i < std::abs(count); i++)
|
||||||
addInitialItemImp(ref.getPtr(), owner, count < 0 ? -1 : 1, seed, topLevel, levItem);
|
addInitialItemImp(ref.getPtr(), owner, count < 0 ? -1 : 1, seed, topLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
|
@ -574,7 +574,7 @@ void MWWorld::ContainerStore::addInitialItem (const std::string& id, const std::
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWWorld::ContainerStore::addInitialItemImp(const MWWorld::Ptr& ptr, const std::string& owner, int count,
|
void MWWorld::ContainerStore::addInitialItemImp(const MWWorld::Ptr& ptr, const std::string& owner, int count,
|
||||||
Misc::Rng::Seed* seed, bool topLevel, const std::string& levItem)
|
Misc::Rng::Seed* seed, bool topLevel)
|
||||||
{
|
{
|
||||||
if (ptr.getTypeName()==typeid (ESM::ItemLevList).name())
|
if (ptr.getTypeName()==typeid (ESM::ItemLevList).name())
|
||||||
{
|
{
|
||||||
|
@ -585,7 +585,7 @@ void MWWorld::ContainerStore::addInitialItemImp(const MWWorld::Ptr& ptr, const s
|
||||||
if (topLevel && std::abs(count) > 1 && levItemList->mFlags & ESM::ItemLevList::Each)
|
if (topLevel && std::abs(count) > 1 && levItemList->mFlags & ESM::ItemLevList::Each)
|
||||||
{
|
{
|
||||||
for (int i=0; i<std::abs(count); ++i)
|
for (int i=0; i<std::abs(count); ++i)
|
||||||
addInitialItem(ptr.getCellRef().getRefId(), owner, count > 0 ? 1 : -1, seed, true, levItemList->mId);
|
addInitialItem(ptr.getCellRef().getRefId(), owner, count > 0 ? 1 : -1, seed, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -593,7 +593,7 @@ void MWWorld::ContainerStore::addInitialItemImp(const MWWorld::Ptr& ptr, const s
|
||||||
std::string itemId = MWMechanics::getLevelledItem(ptr.get<ESM::ItemLevList>()->mBase, false, *seed);
|
std::string itemId = MWMechanics::getLevelledItem(ptr.get<ESM::ItemLevList>()->mBase, false, *seed);
|
||||||
if (itemId.empty())
|
if (itemId.empty())
|
||||||
return;
|
return;
|
||||||
addInitialItem(itemId, owner, count, seed, false, levItemList->mId);
|
addInitialItem(itemId, owner, count, seed, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -126,8 +126,8 @@ namespace MWWorld
|
||||||
std::weak_ptr<ResolutionListener> mResolutionListener;
|
std::weak_ptr<ResolutionListener> mResolutionListener;
|
||||||
|
|
||||||
ContainerStoreIterator addImp (const Ptr& ptr, int count, bool markModified = true);
|
ContainerStoreIterator addImp (const Ptr& ptr, int count, bool markModified = true);
|
||||||
void addInitialItem (const std::string& id, const std::string& owner, int count, Misc::Rng::Seed* seed, bool topLevel=true, const std::string& levItem = "");
|
void addInitialItem (const std::string& id, const std::string& owner, int count, Misc::Rng::Seed* seed, bool topLevel=true);
|
||||||
void addInitialItemImp (const MWWorld::Ptr& ptr, const std::string& owner, int count, Misc::Rng::Seed* seed, bool topLevel=true, const std::string& levItem = "");
|
void addInitialItemImp (const MWWorld::Ptr& ptr, const std::string& owner, int count, Misc::Rng::Seed* seed, bool topLevel=true);
|
||||||
|
|
||||||
int removeImp(const Ptr& item, int count, const Ptr& actor);
|
int removeImp(const Ptr& item, int count, const Ptr& actor);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue