- Joined
- Apr 6, 2008
- Messages
- 760
Hi, i have a question about interfaces first time im working with them and i realised one thing.
look here
So as you can see in the spell there is no real 'HP', what will happen when i try to mix with that in the system (Check the callback function)?
look here
JASS:
interface Interfaces
real HP
endinterface
JASS:
struct SomeSystem
Interfaces F
static method create takes Interfaces F returns thistype
local thistype this = thistype.allocate()
set this.F = F
return this
endmethod
static method callback takes nothing returns nothing
//Stuff to get the correct Struct instance
set this.F.HP = this.F.HP - 1 //What will happen if the Spell dont have the real HP?
if this.F.HP <= 0 then //What will happen here?
else
endif
endstruct
JASS:
struct SomeSpell extends Interfaces
SomeSystem SS
static method create takes nothing returns thistype
local thistype this = thistype.allocate()
set this.SS = SomeSystem.create(this)
return this
endmethod
endstruct
So as you can see in the spell there is no real 'HP', what will happen when i try to mix with that in the system (Check the callback function)?