Skip to content
Home
Post Code
Jass (Warcraft III)
Wurst
GUI (Warcraft III)
Galaxy (StarCraft II)
GUI (StarCraft II)
C++
Java
Delphi
Text
Search Code
Compare Code
Uploads
Draw
Create New Drawing
View Drawings
Graph
Log in
<pre class="jasscode">@compiletime function compileGen() callFunctionsWithAnnotation("objgen") init callFunctionsWithAnnotation("objgen") public int TEST_BUFF_ID @objgen function genBuff() TEST_BUFF_ID = createBuffObject("Test", "for testing", "ReplaceableTextures\\CommandButtons\\BTNUnbroken.blp") /** Creates an ability based on Tornado aura that allows to display a buff without side effects */ public function createBuffObject(string name, string tooltip, string iconpath) returns int let abilId = ABIL_ID_GEN.next() let buffId = BUFF_ID_GEN.next() if compiletime new BuffDefinition(buffId, 'Basl') ..setName(1, name) ..setTooltipNormal(1, name) ..setTooltipNormalExtended(1, tooltip) ..setIcon(iconpath) new AbilityDefinitionAuraSlow(abilId) ..setName("Aura Dummy: " + name) ..setMovementSpeedFactor(1, 0) ..setBuffs(1, int2fourchar(buffId)) ..presetIcon(iconpath) return abilId </pre>
select language
jass
java
delphi
C++
php
GSL
galaxy
visualBasic
wurst
> Text
Markdown
select style
default
bbcode - default
Jasscraft
> jasscraft html
visual
lightweight
lightweightNr
goto line:
Compare with:
text copy window
edit this code
post new code
@compiletime function compileGen() callFunctionsWithAnnotation("objgen") init callFunctionsWithAnnotation("objgen") public int TEST_BUFF_ID @objgen function genBuff() TEST_BUFF_ID = createBuffObject("Test", "for testing", "ReplaceableTextures\\CommandButtons\\BTNUnbroken.blp") /** Creates an ability based on Tornado aura that allows to display a buff without side effects */ public function createBuffObject(string name, string tooltip, string iconpath) returns int let abilId = ABIL_ID_GEN.next() let buffId = BUFF_ID_GEN.next() if compiletime new BuffDefinition(buffId, 'Basl') ..setName(1, name) ..setTooltipNormal(1, name) ..setTooltipNormalExtended(1, tooltip) ..setIcon(iconpath) new AbilityDefinitionAuraSlow(abilId) ..setName("Aura Dummy: " + name) ..setMovementSpeedFactor(1, 0) ..setBuffs(1, int2fourchar(buffId)) ..presetIcon(iconpath) return abilId