FG-Unofficial-Developers-Guild / FG-Aura-Effect

This extension accommodates auras and AoE buffs/debuffs by adding/removing effects to other characters based on proximity.
https://www.fantasygrounds.com/forums/showthread.php?57417-5E-Aura-Effects
Other
13 stars 2 forks source link

Client side distance calculation #7

Closed SoxMax closed 3 years ago

SoxMax commented 3 years ago

Because of the change to EffectManager.addEffect the bShowMsg flag is now suppressing error messaging when applying effects. I've switch back from the OOB to directly calculating aura effects on the client and it seems to pretty reliably add/remove effects without any messaging when Silent Auras is on.

I tested on PFRPG and 4E.

SoxMax commented 3 years ago

@bmos do you think we should do a 1.0 release after this?

bmos commented 3 years ago

I think so! Great work on this!

SoxMax commented 3 years ago

I've got a session tonight and if everything goes well I'll squash and merge this.

SoxMax commented 3 years ago

OK something really odd was happening with Locked Movement & the auras. I'm going to see if its possible to detect if locked movement is on and if so use the OOB otherwise let the clients calculate.

SoxMax commented 3 years ago

I added a check for token movement locking to use OOB. That said I'm not super thrilled about having the if check on every onMove event. I'm going to see about re-registering the onMove event depending on the state of the Token Movement Locking.

bmos commented 3 years ago

Here is Moon Wizard's advice: https://www.fantasygrounds.com/forums/showthread.php?68078-Issue-with-getTokensWithinDistance/page2

SoxMax commented 3 years ago

Oh man a bug fix and a code simplification? This is awesome. I'm much more comfortable with this hack then until 4.1 comes out.

SoxMax commented 3 years ago

Apparently Token.onMove exists currently as well its just not documented. I updated to use that as Moon Wizard recommended. Even with that though we still need the OOB & raw calculation based on movement locking mode until 4.1 comes out.

SoxMax commented 3 years ago

I'll merge this afternoon