- Joined
- Jul 6, 2009
- Messages
- 1,885
I'm wondering what are the ways of attaching a unit to a struct.
The spell i'm making has a struct that represents spell instance and has a member of unit type.
Now, the problem is i want to destroy the instance once the unit stops channeling the spell, however i don't know how would i, given the unit on event, know which instance to destroy.
I thought about using a hashtable to attach the struct instance as integer, but...i don't really want to use a hashtable if i'm already using a struct for spell instances (I don't like mixing hashtables with structs). So any other way except with a hashtable?
The spell i'm making has a struct that represents spell instance and has a member of unit type.
Now, the problem is i want to destroy the instance once the unit stops channeling the spell, however i don't know how would i, given the unit on event, know which instance to destroy.
I thought about using a hashtable to attach the struct instance as integer, but...i don't really want to use a hashtable if i'm already using a struct for spell instances (I don't like mixing hashtables with structs). So any other way except with a hashtable?