Hekili Priority Helper

Hekili Priority Helper

44M Downloads

state.spell_targets is wrong

zhao-y-b opened this issue ยท 1 comments

commented

Before You Begin

  • I confirm that I have downloaded the latest version of the addon.
  • I am not playing on a private server.
  • I checked for an existing, open ticket for this issue and was not able to find one.
  • I edited the title of this bug report (above) so that it describes the issue I am reporting.

WoW Version

Retail (Dragonflight)

Describe the Issue

test use spell:warroir's revenge, always return 2.
SO: execute never be recommanded, because execute's condition is "if spell_targets.revenge = 1"

"state.active_enemies" even "state.true_active_enemies" can't make it work correctly.
i guess need select(2, ns.GetNumTarges())

How to Reproduce

use protect warrior

Player Information (Link)

build: v10.0.2-2.0.5a
level: 70 (70)
class: WARRIOR
spec: protection

talents: anger_management
    armored_to_the_teeth = 2/2
    avatar = 1/1
    barbaric_training = 1/1
    battle_stance = 1/1
    best_served_cold = 1/1
    bitter_immunity = 1/1
    blood_and_thunder = 1/1
    bloodsurge = 1/1
    booming_voice = 1/1
    bounding_stride = 1/1
    brace_for_impact = 1/1
    brutal_vitality = 1/1
    challenging_shout = 1/1
    champions_bulwark = 1/1
    crushing_force = 1/2
    defenders_aegis = 1/1
    defensive_stance = 1/1
    demoralizing_shout = 1/1
    devastator = 1/1
    double_time = 1/1
    endurance_training = 1/1
    enduring_defenses = 1/1
    fast_footwork = 1/1
    focused_vigor = 1/1
    frothing_berserker = 1/1
    furious_blows = 1/1
    heroic_leap = 1/1
    ignore_pain = 1/1
    impending_victory = 1/1
    indomitable = 1/1
    into_the_fray = 1/1
    last_stand = 1/1
    leeching_strikes = 1/1
    onehanded_weapon_specialization = 1/1
    pain_and_gain = 1/1
    punish = 1/1
    rallying_cry = 1/1
    ravager = 1/1
    reinforced_plates = 1/1
    rend = 1/1
    revenge = 1/1
    seismic_reverberation = 1/1
    shield_charge = 1/1
    shield_specialization = 2/2
    shield_wall = 1/1
    shockwave = 1/1
    show_of_force = 1/1
    spell_reflection = 1/1
    storm_bolt = 1/1
    strategist = 1/1
    thunder_clap = 1/1
    thunderlord = 1/1
    thunderous_roar = 1/1
    thunderous_words = 1/1
    tough_as_nails = 1/1
    unstoppable_force = 1/1
    violent_outburst = 1/1
    war_machine = 1/1
    wild_strikes = 2/2

pvptalents: none

covenant: none

conduits: none

soulbinds: []

sets: none

gear:  = 1
    shield = 1

legendaries: none

itemIDs: 133767, 144116, 189537, 192005, 192006, 193477, 193633, 193645, 193657, 193686, 193700, 193712, 198542, 198584, 201954, 202119

settings: aoe = 2
    buffPadding = 0
    combatRefresh = 0.1
    custom1Name = Custom 1
    custom2Name = Custom 2
    cycle = false
    cycle_min = 6
    damage = true
    damageDots = false
    damageExpiration = 8
    damageOnScreen = true
    damagePets = false
    damageRange = 0
    debuffPadding = 0
    enabled = true
    enhancedRecheck = false
    gcdSync = true
    maxRefresh = 10
    maxTime = 33
    nameplateRange = 8
    nameplates = true
    noFeignedCooldown = false
    package = Protection Warrior
    petbased = false
    potion = potion_of_phantom_fire
    potionsReset = 20180919.1
    regularRefresh = 0.5
    throttleRefresh = false
    throttleTime = false
    free_revenge = false
    heroic_charge = false
    last_stand_amount = 50
    last_stand_condition = false
    last_stand_health = 50
    last_stand_offensively = false
    overlap_ignore_pain = false
    rallying_cry_amount = 50
    rallying_cry_condition = false
    rallying_cry_health = 50
    reserve_rage = 35
    shield_wall_amount = 50
    shield_wall_condition = false
    shield_wall_health = 50
    shockwave_interrupt = true
    stack_shield_block = false
    stance_weaving = false

toggles: cooldowns = false 
    custom1 = false 
    custom2 = false 
    defensives = false 
    essences = true 
    interrupts = false 
    mode = dual 
    potions = false 

keybinds: 
    avatar             = 1   [06]
    bitter_immunity    = SS  [06]
    challenging_shout  = G   [01]
    charge             = SA  [06]
    demoralizing_shout = H   [01], SR  [06]
    execute            = V   [01]
    hamstring          = S4  [05]
    healthstone        = 4   [05]
    heroic_leap        = A   [01]
    heroic_throw       = R   [01], R   [11]
    ignore_pain        = F6  [03], SE  [05]
    impending_victory  = F9  [03], SG  [06]
    last_stand         = 2   [06]
    pummel             = F2  [03], ST  [06]
    rallying_cry       = X   [01]
    ravager            = SV  [05]
    revenge            = C   [01], F3  [03]
    shield_block       = B   [01]
    shield_charge      = SQ  [06]
    shield_slam        = Z   [01]
    shield_wall        = T   [01]
    shockwave          = SW  [06]
    spell_reflection   = F8  [03], SC  [06]
    storm_bolt         = F7  [03], 5   [05]
    taunt              = W   [01]
    thunder_clap       = F5  [03], SD  [06]
    thunderous_roar    = Q   [01]
    will_to_survive    = 3   [06]

warnings: [#1] Unable to find potion / unknown / Potion in the itemlist.

Error Messages (Link)

-- Spell Targets, so I don't have to convert it in APLs any more.
-- This will also factor in target caps and TTD restrictions.
state.spell_targets = setmetatable( {}, {
    __index = function( t, k )
        if state.active_enemies == 1 then return 1 end
        if k == "any" then return state.active_enemies end

        local ability = class.abilities[ k ]
        if not ability then return state.active_enemies end

        local n = state.active_enemies
        if ability.max_ttd then n = min( n, Hekili:GetNumTTDsBefore( ability.max_ttd + state.offset + state.delay ) ) end
        if ability.min_ttd then n = min( n, Hekili:GetNumTTDsAfter( ability.min_ttd + state.offset + state.delay ) ) end
        if ability.max_targets then n = min( n, ability.max_targets ) end
        return n
    end
} )


in state.lua 1214 line

Additional Information

No response

Contact Information

No response

commented

Whatever you're trying to solve for is fundamentally an issue with recommendations. Provide a snapshot.

A snapshot is required to diagnose this issue.

Snapshot

Please supply a Snapshot of the addon's decision-making when you are seeing this issue in-game. This is not a screenshot. To generate a Snapshot, please complete the following steps.

  • Log into your WoW character.
  • Recreate the issue you are reporting (i.e., generate 5 Holy Power).
  • When you see the recommendation you disagree with, press ALT-SHIFT-P to Pause and Snapshot (or use ALT-SHIFT-[ to Snapshot without pausing).
    • You can change these keybindings in /hekili > Toggles if needed.
    • If you take the snapshot at a different time, it will not be useful and you'll be asked to submit a new one.
  • Type /hekili and press Enter.
  • Open the Snapshots section on the left side.
  • Select the snapshot that shows the recommendation that you disagree with.
    • Snapshots are labeled with your specialization, the display in question (usually, you'll choose Primary), and the recommendations the addon made with their timings.
  • Click in the Export Snapshot box, press CTRL+A to select all text including hidden text and press CTRL+C to copy.
  • Open https://pastebin.com, use CTRL+V to paste the snapshot text, then click Create New Paste.
  • Provide the Pastebin link in a new comment.

This step is essential, as most issues are related to specific classes, specializations, gear, talent choices, or other game systems. If you do not provide this information, I cannot triage your problem.