View Full Version : CombatManager.addAllCombatantEffectFieldChangeHand ler getting triggered twice
SilentRuin
May 12th, 2026, 22:15
In this case just by switching the CT effect button from VSBL to GM - any click of it - or the button above it - will result in a double trigger of this handler.
CombatManager.addAllCombatantEffectFieldChangeHand ler("isgmonly", "onUpdate", checkGMOnlyFlagEffectField);
The code needs to be checked to see why it was doing this. Details with campaign and directions to duplicate using the GAL extension with its debug option turned on are in a DM to Moon Wizard.
Moon Wizard
May 12th, 2026, 23:00
It's technically being updated twice. Once when the effect is created by the CT window with the default value of zero; and then set again shortly after by the code that translates the effect record in the Lua script to the database. I have no way to differentiate this at this point, so you will receive two updates for certain fields.
JPG
SilentRuin
May 13th, 2026, 00:27
It's technically being updated twice. Once when the effect is created by the CT window with the default value of zero; and then set again shortly after by the code that translates the effect record in the Lua script to the database. I have no way to differentiate this at this point, so you will receive two updates for certain fields.
JPG
That's not good. So is that only an artifact of the buttons changing effects? Or is there more duplication going on with other triggers?
Oh crap its everywhere not just buttons but dropping effects on CT or map.
Moon Wizard
May 13th, 2026, 00:35
I've added some client code that will go in with the next client update (may be a month or more) that will reduce the frequency in some scenarios such as that.
Regards,
JPG
SilentRuin
May 13th, 2026, 00:43
I've added some client code that will go in with the next client update (may be a month or more) that will reduce the frequency in some scenarios such as that.
Regards,
JPG
Its happening everywhere not just effect button. I drop a token on map and I get hit twice with onTokenDragEnd - this did not used to happen. I had that debug put in to insure I had no duplications. Its like every trigger I have is always being double tapped.
SilentRuin
May 13th, 2026, 00:51
I think this is a GAL rewrite specific thing for the double tap at least with the token drag end because its only being hit once yet I place asset twice - I need to investigate/fix this myself.
SilentRuin
May 13th, 2026, 01:20
I found the reason its duping GAL assets - code was rewritten where it is trying to parse effect to get all the named things an asset could be with. Logic was pulled out and changed so I'll have to figure out why it was doing what it was doing then figure out how to do it in the new world order. But its a legit bug in GAL. Not sure if it applies to the gmonly stuff (maybe separate issue as you said you knew it was triggered twice and my printstack showed it triggering twice) - but the parsing effects to match assets for sure is not doing it right anymore and that is the cause of the duplicate asset creation. Should be easy to figure out and I'll put out a fix for that aspect myself.
SilentRuin
May 13th, 2026, 01:39
Fixed - pure GAL coding problem. No more duplicates anywhere - consider this closed. No need to do what you were going to do as it does not impact me (or I had guards against it buried in code - not sure - not going to care as it works now).
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.