SpencerMycek / KineticistExpandedElements

Mod for Pathfinder: WoTR by OwlCat Games -- Expands the choices of Kineticist Element Choices
Other
20 stars 7 forks source link

[Bug] Vampiric infusion doesn't reduce burn cost of void healer, while also making the game hell laggy #72

Closed NosVladimir closed 3 weeks ago

NosVladimir commented 1 year ago

Did a bit of testing and found out that when the trigger condition of vampiric infusion is met (i.e. attack hits or enemy doesn't pass a saving throw), then immediately the game becomes sooooo laggy. For me it was like from 100 fps down to 15. Then the next void healer still costs 1 burn, despite there being a small icon in the character's buff list saying the next one should be free. All these do not happen if the attack misses or the save is checked.

I checked the log file and there seems to be a repeating exception as follows: InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Generic.Dictionary`2+ValueCollection+Enumerator[TKey,TValue].MoveNext () [0x00013] in <695d1cc93cca45069c528c15c9fdd749>:0 at Kingmaker.UI.Selection.UnitMarkManager.LateUpdate () [0x00095] in <3623e56ac4454960943975752737f87d>:0

SpencerMycek commented 1 year ago

Hmmm, interesting, I'll have to look into that

Truinto commented 1 year ago

Sounds like an infinite loop or a thrown exception. You probably know this, but you cannot edit a collection from inside a foreach loop (because it calls the enumerator and it checks the collection is not modified). In that case you either use a for loop, make a copy of the collection (like ToArray()), or make the edits after the foreach loop (if that makes sense).

SpencerMycek commented 3 weeks ago

Just fixed it, should be working and not laggy in the next update