1. @compiletime function compileGen()
  2. callFunctionsWithAnnotation( "objgen" )
  3. init
  4. callFunctionsWithAnnotation( "objgen" )
  5. public int TEST_BUFF_ID
  6. @objgen function genBuff()
  7. TEST_BUFF_ID = createBuffObject( "Test", "for testing", "ReplaceableTextures\\CommandButtons\\BTNUnbroken.blp" )
  8. / * * Creates an ability based on Tornado aura that allows to display a buff without side effects * /
  9. public function createBuffObject( string name, string tooltip, string iconpath ) returns int
  10. let abilId = ABIL_ID_GEN.next()
  11. let buffId = BUFF_ID_GEN.next()
  12. if compiletime
  13. new BuffDefinition( buffId, 'Basl' )
  14. ..setName( 1, name )
  15. ..setTooltipNormal( 1, name )
  16. ..setTooltipNormalExtended( 1, tooltip )
  17. ..setIcon( iconpath )
  18. new AbilityDefinitionAuraSlow( abilId )
  19. ..setName( "Aura Dummy: " + name )
  20. ..setMovementSpeedFactor( 1, 0 )
  21. ..setBuffs( 1, int2fourchar( buffId ))
  22. ..presetIcon( iconpath )
  23. return abilId

Diesen Code in Original-Formatierung anzeigen
goto line:
Compare with:
text copy window edit this code post new code