HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Possible or not?

06-13-2009, 04:57 AM#1
wraithseeker
Collapse JASS:
private function test takes unit target returns nothing
call KillUnit(target) // just a testing hmmmm...
endfunction

private function Init takes nothing returns nothing
    local bonus d
    set DataTable = Table.create()
    set d = bonus.Itemtype('I000')
    set d.Damage = 100
    set d.Agi = 200
    set d.Armor = 50
    set d.OnTake = function test // ontake will call the function test when the bonuses are applied
endfunction

Basically I am trying to do some things to avoid interfaces as they need to extend a struct and then you have to create another struct that extends that struct which is a pain so I was thinking whether something like this will be possible or not?
06-13-2009, 10:35 AM#2
Opossum
What you need are not interfaces but function interfaces.
http://www.wc3c.net/vexorian/jasshel...tml#funcinterf