• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] JASS unknown problem 3 (it will go unitl 9999 =P)

Status
Not open for further replies.
JASS leak problem and buff question

Guys i have a question, does my spell leak ??? How do i know if a spell leaks ???
Anyway here it is:

JASS:
function FinalStrike_Conds takes nothing returns boolean
   return GetSpellAbilityId() == 'AUfn'
endfunction
//============================================
function FinalStrike_Acts takes nothing returns nothing
        local unit caster = GetTriggerUnit()
        local unit target = GetSpellTargetUnit()
        local unit dummy = CreateUnit( GetOwningPlayer(caster), 'h000', GetUnitX(target), GetUnitY(target), 0)
        local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl", target, "origin")
        local integer damage = GetHeroAgi(caster, true) * 5
        local texttag n = CreateTextTag() 
        call UnitDamageTarget(caster, target, damage, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null) 
        call UnitAddAbility(dummy, 'Aslo') 
        call IssueTargetOrder(dummy, "slow", target)
        call UnitApplyTimedLife(dummy, 'BTLF', 2)
        call SetTextTagText(n, I2S(damage), .023 )   
        call SetTextTagPosUnit( n, target, 0 )
        call SetTextTagColor(n, 255, 0, 0, 255 )   
        call SetTextTagPermanent(n, false)
        call SetTextTagVelocity( n, 0, .0277 )
        call TriggerSleepAction(2.00)
        call DestroyTextTag(n)
        call DestroyEffect(e)
        set caster = null
        set target = null
        set dummy = null
        set e = null
        set n = null        
endfunction
//===========================================================================
function InitTrig_Final_Strike takes nothing returns nothing
    local trigger FinalStrike = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( FinalStrike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( FinalStrike, Condition( function FinalStrike_Conds ) )
    call TriggerAddAction( FinalStrike, function FinalStrike_Acts )
endfunction

The objective of this spell is to deal 500% of agility in damage to an enemy unit and after that slow the enemy unit...
Does my spell leaks in locations ?? and other stuff ?

Another problem i have is, how do i create a buff, that can't be dispelled ??
Example WindWalk, or immolation they have a buff that can't be dispelled... if i slow the target, the buff will be able to be dispelled, and i don't want that, what do i do ?
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
First question: no, it doesn't leak. To check, just see if you have nulled all your local handles at the end of the trigger (except in very certain cases), and that you have destroyed all temp handles (texttags with DestroyTextTag or a fading texttag, effects with DestroyEffect, locations with RemoveLocation, etc, etc)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Errm.... well....

Solution one; trigger all dispel abilities

Solution two; trigger the 'buff' and skip the icon at the bottom

Solution three; spend alot of time looking for some dummy ability that, in some way, shape, or form, creates a buff that can't be dispelled and is a unit-target ability (so you can cast it with a dummy)
 
I think solution 3 is out because i don't know any buff in game that can't be dispelled ...

About solution 2, i make no idea about what you mean ... trigger a buff !' what is that !??! what do you have in mind !?

And finally suggestion 1 triggers all dispel abilities ... How am i supposed to do that !? like i tell the ability which spells and which not it can dispel ?! i don't think that can be done and i don't know a way do it... besides warcraft has so many dispel spells that that idea would be lunatic (no offense)...

What do i do than !?
Anyone never asked this ?
 
Status
Not open for further replies.
Top