[BUG] OnPlayerUpdatedEffect doesn't accurately give duration
This is very similar to another bug report I made, but this is a separate bug
When an effect is changed, it calls StatusEffectBase::ServerSetState which in turn does
this.Intensity = intensity;this.ServerChangeDuration(duration, addDuration);
The actual event for updating an effect is called in StatusEffectBase::ForceIntensity which is invoked by the Intensity setter
The UpdatedEffect event called in ForceIntensity grabs this.Duration for ev.Duration which gives a stale duration as StatusEffectBase::ServerChangeDuration has not been called yet.
The fix is quite simple, just change the order of the code in StatusEffectBase::ServerSetState and it'll work as intended.
This is very similar to another bug report I made, but this is a separate bug
When an effect is changed, it calls
StatusEffectBase::ServerSetStatewhich in turn does1. `this.Intensity = intensity;` 2. `this.ServerChangeDuration(duration, addDuration);`The actual event for updating an effect is called in
StatusEffectBase::ForceIntensitywhich is invoked by theIntensitysetter The UpdatedEffect event called inForceIntensitygrabsthis.Durationforev.Durationwhich gives a stale duration asStatusEffectBase::ServerChangeDurationhas not been called yet.The fix is quite simple, just change the order of the code in
StatusEffectBase::ServerSetStateand it'll work as intended.
That not the only things they should use TimeLeft instead of Duration