mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 22:45:34 +00:00
Merge remote-tracking branch 'jeffreyhaines/master'
This commit is contained in:
commit
a91b386381
3 changed files with 6 additions and 4 deletions
|
@ -1305,7 +1305,7 @@ namespace MWClass
|
|||
|
||||
bool Npc::isClass(const MWWorld::Ptr& ptr, const std::string &className) const
|
||||
{
|
||||
return ptr.get<ESM::NPC>()->mBase->mClass == className;
|
||||
return Misc::StringUtils::ciEqual(ptr.get<ESM::NPC>()->mBase->mClass, className);
|
||||
}
|
||||
|
||||
const ESM::GameSetting *Npc::fMinWalkSpeed;
|
||||
|
|
|
@ -806,8 +806,8 @@ namespace MWMechanics
|
|||
// NOTE: int arg can be from itemTaken() so DON'T modify it, since it is
|
||||
// passed to reportCrime later on in this function.
|
||||
|
||||
// Only player can commit crime and no victimless crimes
|
||||
if (ptr.getRefData().getHandle() != "player" || victim.isEmpty())
|
||||
// Only player can commit crime
|
||||
if (ptr.getRefData().getHandle() != "player")
|
||||
return false;
|
||||
|
||||
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
|
||||
|
@ -824,6 +824,8 @@ namespace MWMechanics
|
|||
alarm = esmStore.get<ESM::GameSetting>().find("iAlarmKilling")->getInt();
|
||||
else if (type == OT_Theft)
|
||||
alarm = esmStore.get<ESM::GameSetting>().find("iAlarmStealing")->getInt();
|
||||
else
|
||||
return false;
|
||||
|
||||
// Innocent until proven guilty
|
||||
bool reported = false;
|
||||
|
|
|
@ -814,6 +814,7 @@ namespace MWScript
|
|||
{
|
||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
player.getClass().getNpcStats(player).setBounty(0);
|
||||
MWBase::Environment::get().getWorld()->confiscateStolenItems(player);
|
||||
MWBase::Environment::get().getWorld()->getPlayer().recordCrimeId();
|
||||
}
|
||||
};
|
||||
|
@ -825,7 +826,6 @@ namespace MWScript
|
|||
{
|
||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
player.getClass().getNpcStats(player).setBounty(0);
|
||||
MWBase::Environment::get().getWorld()->confiscateStolenItems(player);
|
||||
MWBase::Environment::get().getWorld()->getPlayer().recordCrimeId();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue