• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Special Effects at Hashtables: leak?

Status
Not open for further replies.
Level 5
Joined
Dec 12, 2011
Messages
116
This is my first use of hashtables.
1. I used hashtables correctly here?
2. Are there any leaks?

  • MySkill Hashtable Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set MySkillHashTable = (Last created hashtable)
  • MySkill Activate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to MySkill Turn On
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Other\Drain\DrainCaster.mdl
      • Hashtable - Save Handle Of(Last created special effect) as 0 of (Key (Triggering unit)) in MySkillHashTable
  • MySkill Deactivate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to MySkill Turn Off
    • Actions
      • Special Effect - Destroy (Load 0 of (Key (Triggering unit)) in MySkillHashTable)
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in MySkillHashTable
PS: Obviously, my triggers do other things, not only adding / removing a special effect, but I removed them because they're not part of the discussion here...

hamsterpellet
 
Level 5
Joined
Dec 12, 2011
Messages
116
Yeah, but at the moment I cast my Turn On skill, it is removed and the Turn Off is added... Also, both abilities have cooldown to avoid possible problems due to double-clicks.
So, nothing is leaking, right ?
 
Status
Not open for further replies.
Top