I'm trying to make a passive ability for an item to, when someone gets damaged, 10% of that amount of damage is redirected to the owner of that item. I'm using a damage engine. Below is the trigger i have.
But now the problem is, it crashes my Warcraft 3 everytime someone gets damaged. Where is the leak? or is there any other ways of doing it?
-
IE Streayro Proc 1
-
Events
- Game - GDD_Event becomes Equal to 0.00
-
Conditions
- (GDD_DamagedUnit is in Heroes) Equal to True
-
Actions
-
Unit Group - Pick every unit in Heroes and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) has an item of type |cffff8c00Streayro, the Blazing Brothehood) Equal to True
-
Then - Actions
- Set SPS_D_Causer = GDD_DamageSource
- Set SPS_D_Target = (Picked unit)
- Set SPS_G_Event = 1
- Set SPS_D_BaseDmg = (GDD_Damage x 0.10)
- Set SPS_D_SpMultiplier = 0.00
- Set SPS_D_Bonus1 = (Load 0 of (Key (Triggering unit)) from SPS_G_Hash)
- Set SPS_D_Bonus2 = (Load 1 of (Key (Target unit of ability being cast)) from SPS_G_Hash)
- Set SPS_D_AttType = Spells
- Set SPS_D_DmgType = Normal
- Trigger - Run SPS Event <gen> (ignoring conditions)
- Set GDD_Damage = (GDD_Damage x 0.90)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in Heroes and do (Actions)
-
Events