mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-04 10:43:10 +00:00
Reuse factionId
This commit is contained in:
parent
87e41425bb
commit
11947286d9
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue