|
|
|
@ -838,7 +838,7 @@ namespace MWMechanics
|
|
|
|
|
if (ptr.getClass().isClass(ptr, "Guard") && creatureStats.getAiSequence().getTypeId() != AiPackage::TypeIdPursue && !creatureStats.getAiSequence().isInCombat())
|
|
|
|
|
{
|
|
|
|
|
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
|
|
|
|
|
int cutoff = esmStore.get<ESM::GameSetting>().find("iCrimeThreshold")->getInt();
|
|
|
|
|
static const int cutoff = esmStore.get<ESM::GameSetting>().find("iCrimeThreshold")->getInt();
|
|
|
|
|
// Force dialogue on sight if bounty is greater than the cutoff
|
|
|
|
|
// In vanilla morrowind, the greeting dialogue is scripted to either arrest the player (< 5000 bounty) or attack (>= 5000 bounty)
|
|
|
|
|
if ( player.getClass().getNpcStats(player).getBounty() >= cutoff
|
|
|
|
@ -846,7 +846,7 @@ namespace MWMechanics
|
|
|
|
|
&& MWBase::Environment::get().getWorld()->getLOS(ptr, player)
|
|
|
|
|
&& MWBase::Environment::get().getMechanicsManager()->awarenessCheck(player, ptr))
|
|
|
|
|
{
|
|
|
|
|
static int iCrimeThresholdMultiplier = esmStore.get<ESM::GameSetting>().find("iCrimeThresholdMultiplier")->getInt();
|
|
|
|
|
static const int iCrimeThresholdMultiplier = esmStore.get<ESM::GameSetting>().find("iCrimeThresholdMultiplier")->getInt();
|
|
|
|
|
if (player.getClass().getNpcStats(player).getBounty() >= cutoff * iCrimeThresholdMultiplier)
|
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->startCombat(ptr, player);
|
|
|
|
|
else
|
|
|
|
|