Say, I have the following:
Now, my question is, which of these operators will be called (they're both array get, the first one is static while the second one is non-static) under certain circumstances?
JASS:
static method operator [] takes unit whichUnit returns boolean
call BJDebugMsg(GetUnitName(whichUnit))
return false
endmethod
method operator [] takes unit whichUnit returns boolean
call SetUnitX(whichUnit, this.newX)
call SetUnitY(whichUnit, this.newY)
/* newX and newY are struct members. */
return true
endmethod
Now, my question is, which of these operators will be called (they're both array get, the first one is static while the second one is non-static) under certain circumstances?