Merge remote-tracking branch 'jeffreyhaines/master'

actorid
Marc Zinnschlag 11 years ago
commit a91b386381

@ -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…
Cancel
Save