mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
PcJoinFaction and friends: make sure the given faction exists
This commit is contained in:
parent
9e21da9636
commit
578adb4ef6
1 changed files with 12 additions and 0 deletions
|
@ -541,6 +541,9 @@ namespace MWScript
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
}
|
}
|
||||||
::Misc::StringUtils::toLower(factionID);
|
::Misc::StringUtils::toLower(factionID);
|
||||||
|
// Make sure this faction exists
|
||||||
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(factionID);
|
||||||
|
|
||||||
if(factionID != "")
|
if(factionID != "")
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
|
@ -572,6 +575,9 @@ namespace MWScript
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
}
|
}
|
||||||
::Misc::StringUtils::toLower(factionID);
|
::Misc::StringUtils::toLower(factionID);
|
||||||
|
// Make sure this faction exists
|
||||||
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(factionID);
|
||||||
|
|
||||||
if(factionID != "")
|
if(factionID != "")
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
|
@ -607,6 +613,9 @@ namespace MWScript
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
}
|
}
|
||||||
::Misc::StringUtils::toLower(factionID);
|
::Misc::StringUtils::toLower(factionID);
|
||||||
|
// Make sure this faction exists
|
||||||
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(factionID);
|
||||||
|
|
||||||
if(factionID != "")
|
if(factionID != "")
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
|
@ -645,6 +654,9 @@ namespace MWScript
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::Misc::StringUtils::toLower(factionID);
|
::Misc::StringUtils::toLower(factionID);
|
||||||
|
// Make sure this faction exists
|
||||||
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(factionID);
|
||||||
|
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
if(factionID!="")
|
if(factionID!="")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue