[Client] Add doesNpcExist() method to RecordHelper

remotes/1728160796594174844/tmp_0.7.0-alpha
David Cernat 7 years ago
parent 7995466e3c
commit 25fcd09780

@ -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();

@ -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);

Loading…
Cancel
Save