From 223c1d5a389c03f4f483d6d6ed90798cc37d2041 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 9 Jan 2014 01:55:49 +0100 Subject: [PATCH] Use GMSTs for crime bounty --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index 2a613b7ff..511fe6544 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -803,6 +803,7 @@ namespace MWMechanics ) { // TODO: stats.setAlarmed(true) on NPCs within earshot + // fAlarmRadius ? reported=true; break; } @@ -816,15 +817,18 @@ namespace MWMechanics void MechanicsManager::reportCrime(const MWWorld::Ptr &ptr, const MWWorld::Ptr &victim, OffenseType type, int arg) { + const MWWorld::Store& store = MWBase::Environment::get().getWorld()->getStore().get(); // Bounty for each type of crime if (type == OT_Trespassing || type == OT_SleepingInOwnedBed) - arg = 5; + arg = store.find("iCrimeTresspass")->getInt(); else if (type == OT_Pickpocket) - arg = 25; + arg = store.find("iCrimePickPocket")->getInt(); else if (type == OT_Assault) - arg = 40; + arg = store.find("iCrimeAttack")->getInt(); else if (type == OT_Murder) - arg = 1000; + arg = store.find("iCrimeKilling")->getInt(); + else if (type == OT_Theft) + arg *= store.find("fCrimeStealing")->getFloat(); MWBase::Environment::get().getWindowManager()->messageBox("#{sCrimeMessage}"); ptr.getClass().getNpcStats(ptr).setBounty(ptr.getClass().getNpcStats(ptr).getBounty()