fix: Fixes honor check crash on target killed (#1987)
This commit is contained in:
parent
cc6d029add
commit
dabaa1eb5a
1 changed files with 2 additions and 2 deletions
|
|
@ -186,7 +186,7 @@ public class HonorContext
|
||||||
Source.Mana += restore;
|
Source.Mana += restore;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VirtueSystem.GetVirtues(Source).Honor > targetFame)
|
if (VirtueSystem.GetVirtues(Source)?.Honor > targetFame)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -194,7 +194,7 @@ public class HonorContext
|
||||||
// Initial honor gain is 100th of the monsters honor
|
// Initial honor gain is 100th of the monsters honor
|
||||||
var dGain = targetFame / 100.0 * (_honorDamage / _totalDamage);
|
var dGain = targetFame / 100.0 * (_honorDamage / _totalDamage);
|
||||||
|
|
||||||
if (_honorDamage == _totalDamage && _firstHit == FirstHit.Granted)
|
if (Math.Abs(_honorDamage - _totalDamage) < 0.01 && _firstHit == FirstHit.Granted)
|
||||||
{
|
{
|
||||||
dGain *= 1.5; // honor gain is increased a lot more if the combat was fully honorable
|
dGain *= 1.5; // honor gain is increased a lot more if the combat was fully honorable
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue