Resurrection Status Icon not behaving as expected #1088


Closed
  • NubPub created this issue Jun 26, 2022

    What version of Grid2 and game type (classic or retail) are you using ?

     2.0.44 BC Classic

    What game client version (windows or mac) and language are you using ?

     Windows English

    What steps will reproduce the problem?

      Using the resurrection status Icon
    Did you try having Grid2 as the only enabled addon and everything else disabled?

      Yes

    Was it working in a previous version? If yes, which was the last good one?

      Unsure

    Do you have an error log of what happened? If you don't see any errors, make sure that error reporting is enabled (`/console scriptErrors 1`) or install [BugSack](https://mods.curse.com/addons/wow/BugSack).

      N/A

    Please provide any additional information below.

     The Resurrection icon appears to get stuck if the res is cancelled. It does not seem to update that there is no longer a res being cast on the dead player, and that the icon should therefore be removed. Furthermore, it would appear that the res pending indicator shows up even when the target does not have a res pending ( in the case of a cancelled res).

     

  • NubPub posted a comment Jun 26, 2022

    I can fix the text resurrection indicator to match the expected behavior as it appears to be a simple logic error in the code:

    line 72 in StatusRes.lua:

    function Resurrection:GetText(unit) 

                    return res_cache[unit]==1 and resText1 or resText2

    end

    to 

    return res_cache[unit]==1 and (resText1 or resText2)

    Making the resurrect icon work correctly however is currently beyond me.


    Edited Jun 26, 2022
  • NubPub posted a comment Jun 26, 2022

    Modifying the GetIcon() in StatusRes.lua to:

    local resIcon = "Interface\\RaidFrame\\Raid-Icon-Rez"

    function Resurrection:GetIcon(unit)

    return res_cache[unit] == 1 and resIcon

    end

    Seems to fix it for the icon. UnitHasIncomingResurrection does not return a value relating to a pending res, so it would seem changes would need to be made in order to make a "unit has pending resurrection" icon work?

  • michaelsp posted a comment Jun 27, 2022

    The game API does not provide enough info to know if a unit has a pending resurrection or if the spell has been cancelled, so the addon was coded assuming that resurrections are not cancelled, its not perfect but i think it is the more useful way.


    Edited Jun 27, 2022
  • michaelsp closed issue Jul 10, 2022

To post a comment, please login or register a new account.