1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-04 10:43:10 +00:00

Reuse factionId

This commit is contained in:
Aussiemon 2025-07-13 02:36:59 -06:00
parent 87e41425bb
commit 11947286d9

View file

@ -309,8 +309,9 @@ namespace MWScript
return "%";
}
const ESM::NPC* npc = ptr.get<ESM::NPC>()->mBase;
const ESM::Faction* faction = MWBase::Environment::get().getESMStore()->get<ESM::Faction>().find(npc->mFaction);
MWBase::World* world = MWBase::Environment::get().getWorld();
const MWWorld::ESMStore& store = world->getStore();
const ESM::Faction* faction = store.get<ESM::Faction>().find(factionId);
return faction->mName;
}