• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

at least some blz natives doesn't work, patch 1.31.1

Status
Not open for further replies.
Level 3
Joined
Oct 9, 2012
Messages
28
Code:
private function learned2 takes nothing returns boolean
        local integer lvl = GetUnitAbilityLevel(GetTriggerUnit(), 'AEfk')
        local ability ab = BlzGetUnitAbility(GetTriggerUnit(), 'AEfk')
        local integer i = 0
        call BlzSetAbilityStringField(ab, ABILITY_SF_NAME, "test")
      
        if not did then
            loop
                exitwhen i == 10
                call BlzSetAbilityStringLevelField(ab, ABILITY_SLF_TOOLTIP_LEARN_EXTENDED, i, "ABILITY_SLF_TOOLTIP_LEARN_EXTENDED")
                call BlzSetAbilityStringLevelField(ab, ABILITY_SLF_TOOLTIP_LEARN, i, "ABILITY_SLF_TOOLTIP_LEARN")
                call BlzSetAbilityStringLevelField(ab, ABILITY_SLF_TOOLTIP_NORMAL, i, "ABILITY_SLF_TOOLTIP_NORMAL")
                call BlzSetAbilityStringLevelField(ab, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, i, "ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED")
              
                call BlzSetAbilityRealLevelField(ab, ABILITY_RLF_MAXIMUM_TOTAL_DAMAGE, i, 0.0)
                call BlzSetAbilityRealLevelField(ab, ABILITY_RLF_DAMAGE_PER_TARGET_EFK1, i, 100.0 * (i + 1))
                call BlzSetAbilityRealLevelField(ab, ABILITY_RLF_AREA_OF_EFFECT, i, 1000.0 * (i + 1))
                call BlzSetAbilityRealLevelField(ab, ABILITY_RLF_COOLDOWN, i, 10 / (i + 1))
                call BlzSetAbilityIntegerLevelField(ab, ABILITY_ILF_MANA_COST, i, 100 / (i + 1))

                set i = i + 1
            endloop
            set did = true
        endif

I tested the ability of "Fan of Knives" and demon hunter's "evade". BlzSetAbilityStringField and BlzSetAbilityStringLevelField doesn't work. BlzSetAbilityRealLevelField, BlzSetAbilityIntegerLevelField in the above case works.

Is it a bug?

// edit: the following works

call BlzSetAbilityTooltip('AEfk', "ability tooltip", i)
call BlzSetAbilityExtendedTooltip('AEfk', "ability extended tooltip", i)
call BlzSetAbilityResearchTooltip('AEfk', "ability research tooltip", i)
call BlzSetAbilityResearchExtendedTooltip('AEfk', "ability research extended tooltip", i)
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Most of the new natives that I tried didn't end up working. I wanted to edit the Sentinel ability so I could have an ability with charges (the only ability I know of that uses charges) but unfortunately it didn't work. And I still have issues with the UI when using the set cooldown functions, sometimes the button doesn't play it's cooldown animation. Guess we just have to wait for them to sort it all out.
 
Level 3
Joined
Oct 9, 2012
Messages
28
Most of the new natives that I tried didn't end up working. I wanted to edit the Sentinel ability so I could have an ability with charges (the only ability I know of that uses charges) but unfortunately it didn't work. And I still have issues with the UI when using the set cooldown functions, sometimes the button doesn't play it's cooldown animation. Guess we just have to wait for them to sort it all out.

sigh. Hope it works in some recent update.
 
Status
Not open for further replies.
Top