|
|
|
@ -542,7 +542,7 @@ namespace MWScript
|
|
|
|
|
factionID = runtime.getStringLiteral (runtime[0].mInteger);
|
|
|
|
|
runtime.pop();
|
|
|
|
|
}
|
|
|
|
|
::Misc::StringUtils::toLower(factionID);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace(factionID);
|
|
|
|
|
// Make sure this faction exists
|
|
|
|
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(factionID);
|
|
|
|
|
|
|
|
|
@ -574,7 +574,7 @@ namespace MWScript
|
|
|
|
|
factionID = runtime.getStringLiteral (runtime[0].mInteger);
|
|
|
|
|
runtime.pop();
|
|
|
|
|
}
|
|
|
|
|
::Misc::StringUtils::toLower(factionID);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace(factionID);
|
|
|
|
|
// Make sure this faction exists
|
|
|
|
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(factionID);
|
|
|
|
|
|
|
|
|
@ -613,7 +613,7 @@ namespace MWScript
|
|
|
|
|
factionID = runtime.getStringLiteral (runtime[0].mInteger);
|
|
|
|
|
runtime.pop();
|
|
|
|
|
}
|
|
|
|
|
::Misc::StringUtils::toLower(factionID);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace(factionID);
|
|
|
|
|
// Make sure this faction exists
|
|
|
|
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(factionID);
|
|
|
|
|
|
|
|
|
@ -644,7 +644,7 @@ namespace MWScript
|
|
|
|
|
{
|
|
|
|
|
factionID = ptr.getClass().getPrimaryFaction(ptr);
|
|
|
|
|
}
|
|
|
|
|
::Misc::StringUtils::toLower(factionID);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace(factionID);
|
|
|
|
|
// Make sure this faction exists
|
|
|
|
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(factionID);
|
|
|
|
|
|
|
|
|
@ -755,7 +755,7 @@ namespace MWScript
|
|
|
|
|
if (factionId.empty())
|
|
|
|
|
throw std::runtime_error ("failed to determine faction");
|
|
|
|
|
|
|
|
|
|
::Misc::StringUtils::toLower (factionId);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace (factionId);
|
|
|
|
|
|
|
|
|
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
|
|
|
|
runtime.push (
|
|
|
|
@ -790,7 +790,7 @@ namespace MWScript
|
|
|
|
|
if (factionId.empty())
|
|
|
|
|
throw std::runtime_error ("failed to determine faction");
|
|
|
|
|
|
|
|
|
|
::Misc::StringUtils::toLower (factionId);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace (factionId);
|
|
|
|
|
|
|
|
|
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
|
|
|
|
player.getClass().getNpcStats (player).setFactionReputation (factionId, value);
|
|
|
|
@ -824,7 +824,7 @@ namespace MWScript
|
|
|
|
|
if (factionId.empty())
|
|
|
|
|
throw std::runtime_error ("failed to determine faction");
|
|
|
|
|
|
|
|
|
|
::Misc::StringUtils::toLower (factionId);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace (factionId);
|
|
|
|
|
|
|
|
|
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
|
|
|
|
player.getClass().getNpcStats (player).setFactionReputation (factionId,
|
|
|
|
@ -869,11 +869,11 @@ namespace MWScript
|
|
|
|
|
MWWorld::Ptr ptr = R()(runtime);
|
|
|
|
|
|
|
|
|
|
std::string race = runtime.getStringLiteral(runtime[0].mInteger);
|
|
|
|
|
::Misc::StringUtils::toLower(race);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace(race);
|
|
|
|
|
runtime.pop();
|
|
|
|
|
|
|
|
|
|
std::string npcRace = ptr.get<ESM::NPC>()->mBase->mRace;
|
|
|
|
|
::Misc::StringUtils::toLower(npcRace);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace(npcRace);
|
|
|
|
|
|
|
|
|
|
runtime.push (npcRace == race);
|
|
|
|
|
}
|
|
|
|
@ -910,7 +910,7 @@ namespace MWScript
|
|
|
|
|
{
|
|
|
|
|
factionID = ptr.getClass().getPrimaryFaction(ptr);
|
|
|
|
|
}
|
|
|
|
|
::Misc::StringUtils::toLower(factionID);
|
|
|
|
|
::Misc::StringUtils::lowerCaseInPlace(factionID);
|
|
|
|
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
|
|
|
|
if(factionID!="")
|
|
|
|
|
{
|
|
|
|
|