mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-12 23:11:27 +00:00
record crime ID
This commit is contained in:
parent
b859fc10e2
commit
e549490bb1
1 changed files with 2 additions and 0 deletions
|
@ -192,6 +192,8 @@ namespace MWLua
|
||||||
throw std::runtime_error("Only global scripts can change crime level");
|
throw std::runtime_error("Only global scripts can change crime level");
|
||||||
const MWWorld::Class& cls = o.ptr().getClass();
|
const MWWorld::Class& cls = o.ptr().getClass();
|
||||||
cls.getNpcStats(o.ptr()).setBounty(amount);
|
cls.getNpcStats(o.ptr()).setBounty(amount);
|
||||||
|
if (amount == 0)
|
||||||
|
MWBase::Environment::get().getWorld()->getPlayer().recordCrimeId();
|
||||||
};
|
};
|
||||||
player["isCharGenFinished"] = [](const Object&) -> bool {
|
player["isCharGenFinished"] = [](const Object&) -> bool {
|
||||||
return MWBase::Environment::get().getWorld()->getGlobalFloat(MWWorld::Globals::sCharGenState) == -1;
|
return MWBase::Environment::get().getWorld()->getGlobalFloat(MWWorld::Globals::sCharGenState) == -1;
|
||||||
|
|
Loading…
Reference in a new issue