Thread: SpellEvent
View Single Post
Old 07-29-2009, 12:10 PM   #42
Themerion
Brahms-fan
 
Themerion's Avatar
 
Join Date: Jan 2006
Posts: 642

Submissions (2)

Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)

Default

I'm not sure if this is something which should belong to this system or not, but perhaps it could be a good idea to implement some kind of Get/SetSpellData function (for convenience).

Collapse JASS:
private struct MyData
    unit myUnit
// constructor... blah, blah...
endstruct

function OnChannel
    call SetSpellData( MyData.create(CreateUnit(...)) )
endfunction

function OnFinish
    call RemoveUnit( MyData(GetSpellData()).myUnit )
endfunction
__________________
Submissions::
(v)JASS Tutorial
Covers how to make fast and safe coding for common tasks in vJASS/JASS.
Creep Respawn System
It has never been easier to respawn creep groups...
Themerion is offline   Reply With Quote