1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-28 15:39:41 +00:00

[Client] Add doesNpcExist() method to RecordHelper

This commit is contained in:
David Cernat 2018-07-26 23:57:42 +03:00
parent 7995466e3c
commit 25fcd09780
2 changed files with 8 additions and 0 deletions

View file

@ -13,6 +13,13 @@ bool RecordHelper::doesCreatureExist(const std::string& refId)
return world->getStore().get<ESM::Creature>().search(refId); return world->getStore().get<ESM::Creature>().search(refId);
} }
bool RecordHelper::doesNpcExist(const std::string& refId)
{
MWBase::World *world = MWBase::Environment::get().getWorld();
return world->getStore().get<ESM::NPC>().search(refId);
}
bool RecordHelper::doesRaceExist(const std::string& raceId) bool RecordHelper::doesRaceExist(const std::string& raceId)
{ {
MWBase::World *world = MWBase::Environment::get().getWorld(); MWBase::World *world = MWBase::Environment::get().getWorld();

View file

@ -7,6 +7,7 @@
namespace RecordHelper namespace RecordHelper
{ {
bool doesCreatureExist(const std::string& refId); bool doesCreatureExist(const std::string& refId);
bool doesNpcExist(const std::string& refId);
bool doesRaceExist(const std::string& raceId); bool doesRaceExist(const std::string& raceId);
std::string createCreatureRecord(const ESM::Creature& creature); std::string createCreatureRecord(const ESM::Creature& creature);