forked from teamnwah/openmw-tes3coop
Increase fight rating when being the victim of a crime
This commit is contained in:
parent
727aa30347
commit
d4a98ffc27
1 changed files with 19 additions and 0 deletions
|
@ -840,6 +840,25 @@ namespace MWMechanics
|
||||||
ptr.getClass().getNpcStats(ptr).setBounty(ptr.getClass().getNpcStats(ptr).getBounty()
|
ptr.getClass().getNpcStats(ptr).setBounty(ptr.getClass().getNpcStats(ptr).getBounty()
|
||||||
+ arg);
|
+ arg);
|
||||||
|
|
||||||
|
if (!victim.isEmpty())
|
||||||
|
{
|
||||||
|
int fight = 0;
|
||||||
|
// Increase in fight rating for each type of crime
|
||||||
|
if (type == OT_Trespassing || type == OT_SleepingInOwnedBed)
|
||||||
|
fight = store.find("iFightTrespass")->getFloat();
|
||||||
|
else if (type == OT_Pickpocket)
|
||||||
|
fight = store.find("iFightPickpocket")->getInt();
|
||||||
|
else if (type == OT_Assault)
|
||||||
|
fight = store.find("iFightAttack")->getInt();
|
||||||
|
else if (type == OT_Murder)
|
||||||
|
fight = store.find("iFightKilling")->getInt();
|
||||||
|
else if (type == OT_Theft)
|
||||||
|
fight = store.find("fFightStealing")->getFloat();
|
||||||
|
// Not sure if this should be permanent?
|
||||||
|
fight = victim.getClass().getCreatureStats(victim).getAiSetting(CreatureStats::AI_Fight).getBase() + fight;
|
||||||
|
victim.getClass().getCreatureStats(victim).setAiSetting(CreatureStats::AI_Fight, fight);
|
||||||
|
}
|
||||||
|
|
||||||
// If committing a crime against a faction member, expell from the faction
|
// If committing a crime against a faction member, expell from the faction
|
||||||
if (!victim.isEmpty() && victim.getClass().isNpc())
|
if (!victim.isEmpty() && victim.getClass().isNpc())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue