Ability (named "Exploder") applies an AoE buff ("Exploder buff"), that lasts 5 sec. If an affected unit dies in any way during this time, it damages area of 200 around itself.
It would have been easy to make in GUI if not for one sore fact: Dying units are purged of all buffs, hence the condition "Dying unit has buff "Exploder buff" equals yes" will never be satisfied.
Currently i have a set of triggers to implement the ability:
It goes without saying, that this is a very bulky method (especially the hashtable cleanup and management). Is there another way to detect if dying unit has (had) a specific buff? Preferably, without damage detection systems involvement...
It would have been easy to make in GUI if not for one sore fact: Dying units are purged of all buffs, hence the condition "Dying unit has buff "Exploder buff" equals yes" will never be satisfied.
Currently i have a set of triggers to implement the ability:
First trigger writes all affected units to free space in a hashtable when ability is cast, along with integer 5
Second trigger checks hashtable every 1 second and decrements integers by 1. If value reaches zero, it is purged, along with the associated unit handle.
Third trigger has an Event "Unit dies". Then it checks if the dying unit was present in the aforementioned hash. If positive, then it creates an explosion effect and damage at the position of dying unit and clears its data (handle, integer) from the hash.
It goes without saying, that this is a very bulky method (especially the hashtable cleanup and management). Is there another way to detect if dying unit has (had) a specific buff? Preferably, without damage detection systems involvement...