|
|
|
@ -860,7 +860,7 @@ namespace MWMechanics
|
|
|
|
|
if (ptr.getClass().isClass(ptr, "Guard") && creatureStats.getAiSequence().getTypeId() != AiPackage::TypeIdPursue && !creatureStats.isHostile())
|
|
|
|
|
{
|
|
|
|
|
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
|
|
|
|
|
float cutoff = float(esmStore.get<ESM::GameSetting>().find("iCrimeThreshold")->getInt());
|
|
|
|
|
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
|
|
|
|
@ -868,7 +868,11 @@ namespace MWMechanics
|
|
|
|
|
&& MWBase::Environment::get().getWorld()->getLOS(ptr, player)
|
|
|
|
|
&& MWBase::Environment::get().getMechanicsManager()->awarenessCheck(player, ptr))
|
|
|
|
|
{
|
|
|
|
|
creatureStats.getAiSequence().stack(AiPursue(player), ptr);
|
|
|
|
|
static 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
|
|
|
|
|
creatureStats.getAiSequence().stack(AiPursue(player), ptr);
|
|
|
|
|
creatureStats.setAlarmed(true);
|
|
|
|
|
npcStats.setCrimeId(MWBase::Environment::get().getWorld()->getPlayer().getNewCrimeId());
|
|
|
|
|
}
|
|
|
|
|