ModernUO icon indicating copy to clipboard operation
ModernUO copied to clipboard

BloodOath timing is inaccurate

Open kamronbatman opened this issue 1 year ago • 3 comments

Since BloodOauth uses a 1s interval, it is sometimes late. We should use OnDeath and OnDelete to look up the Caster (or the target), and call RemoveCurse appropriately instead. This way the ExpireTimer can just cleanly call RemoveCurse too instead of being an interval.

kamronbatman avatar Feb 19 '24 19:02 kamronbatman

line 70; _oathTable[Caster] = Caster;

I believe the table value should be updated for m not Caster

Bohicatv avatar Dec 17 '24 08:12 Bohicatv

@mark1145 can you take a look too?

kamronbatman avatar Dec 17 '24 16:12 kamronbatman

For example, (if I'm reading this right) m is technically not being calculated correctly on the oath table, because Caster is getting both the key and the value as Caster.

_oathTable[Caster] = Caster; _oathTable[m] = Caster;

to (stores value to m)

_oathTable[Caster] = m; _oathTable[m] = Caster;

Also, line 83; should not be fixed point; var duration = TimeSpan.FromSeconds((GetDamageSkill(Caster) - GetResistSkill(m)) / 8 + 8); if we are going for era behavior accuracy.

Bohicatv avatar Dec 17 '24 21:12 Bohicatv