1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-06 07:45:36 +00:00

Do not copy the whole attributes store

This commit is contained in:
Andrei Kortunov 2024-02-23 17:02:40 +04:00
parent fc1f244627
commit 1126f38a1e

View file

@ -476,7 +476,7 @@ namespace MWLua
auto skillIncreasesForAttributeStatsT
= context.mLua->sol().new_usertype<SkillIncreasesForAttributeStats>("SkillIncreasesForAttributeStats");
for (auto attribute : MWBase::Environment::get().getESMStore()->get<ESM::Attribute>())
for (const auto& attribute : MWBase::Environment::get().getESMStore()->get<ESM::Attribute>())
{
skillIncreasesForAttributeStatsT[ESM::RefId(attribute.mId).serializeText()] = sol::property(
[=](const SkillIncreasesForAttributeStats& stat) { return stat.get(context, attribute.mId); },