I only set out to fix the first problem and kept stumbling upon more issues and that is the purpose of this post, if you know of any more issues with spells post them here and I will look into them, the only other issue I am aware of right now is the casting bar can get stuck open and prevent the player from casting anymore and not sure how to fix that.
Now for the details.
When a spell is cast, if it has a duration it is added to a MutexList, in the main loop for the spell process it goes through that list and cast that spell again if it was time for a tick, and it would always call the cast() function in the lua script, the fix was actually simple all I had to do was change
Code: Select all
if(!ProcessSpell(spell))Code: Select all
if(!ProcessSpell(spell, false))I also verified tick() was never called by modifying soulrot.lua (necro DoT) and added Say(Caster, "Cast!!!") in the cast function, Say(Caster, "Tick!!!") in the tick function and Say(Caster, "Remove!!!") in the remove function, cast was said on every tick and remove when it was finished.