jp-ganis / JPS

Protected LUA DPS Addon
32 stars 46 forks source link

Update PriestDisc - jps.UnitTimeToDie(unit) - jps_round(num, idp) #343

Closed htordeux closed 11 years ago

htordeux commented 11 years ago

add a jps.UnitTimeToDie(unit) to know the jps.LowestTimetoDie() in RaidStatus with jps.RaidTimeToDie Table change the jps_round in jpglobal Comment JPSEXTInfoFrame:Hide lines in fct leaveCombat() that hides the timetodie frame when in combat, don't understand why because must be called only when PLAYER_REGEN_ENABLED or PLAYER_UNGHOST fire

htordeux commented 11 years ago

add local latency = math.max(jps.CastBar.latency,jps.Lag) in jps.lua change the infos order in timetodie frame first timetodie, second latency and next healing stuff

all changes have been checked in game, works fine

in PRIEST DISC add a small line to avoid stop casting when channeling

ghost commented 11 years ago

JPSEXTInfoFrame

LeaveCombat fct is called by the Regen enabled event Handler. ^^

Am 19.07.2013 um 07:32 schrieb htordeux notifications@github.com:

add a jps.UnitTimeToDie(unit) to know the jps.LowestTimetoDie() in RaidStatus with jps.RaidTimeToDie Table change the jps_round in jpglobal Comment JPSEXTInfoFrame:Hide lines in fct leaveCombat() that hides the timetodie frame when in combat, don't understand why because must be called only when PLAYER_REGEN_ENABLED or PLAYER_UNGHOST fire

You can merge this Pull Request by running

git pull https://github.com/htordeux/JPS-1 master Or view, comment on, or merge it at:

https://github.com/jp-ganis/JPS/pull/343

Commit Summary

Update PriestDisc - jps.UnitTimeToDie(unit) - jps_round(num, idp) File Changes

M Rotations/priest_disc_pve.lua (9) M Rotations/priest_disc_pvp.lua (9) M jpevents.lua (9) M jps.lua (48) M jputils.lua (4) M lib/jpconfig.lua (3) M modules/jpauras.lua (2) M modules/jpglobal.lua (10) M modules/jphealing.lua (23) M modules/jpitems.lua (6) M modules/jpraid.lua (23) M modules/jptimetodie.lua (46) Patch Links:

https://github.com/jp-ganis/JPS/pull/343.patch https://github.com/jp-ganis/JPS/pull/343.diff

ghost commented 11 years ago

jps.registerEvent("UNIT_SPELLCAST_INTERRUPTED", leaveCombat)

is the reason while the time to die frame is hidden. You added this in your last pull request.

Now every time a cast is interrupted you fire the following:

local function leaveCombat()
    TurnLeftStop()
    TurnRightStop()
    CameraOrSelectOrMoveStop()
    jps.Opening = true
    jps.Combat = false
    jps.gui_toggleCombat(false)
    jps.EnemyTable = {}
    jps.clearTimeToLive()
    jps.SortRaidStatus() -- wipe jps.RaidTarget and jps.RaidStatus
    -- these lines hide the timetodie frame when in Combat
    -- if jps.getConfigVal("timetodie frame visible") == 1 then
        -- JPSEXTInfoFrame:Hide()
    -- end
    jps.combatStart = 0
end

is this really necessary?^^ (new tables = memory leaks, jps turned off after spell is interrupted)

ghost commented 11 years ago

fix it please, beacuse I don't know which function should be called when UNIT_SPELLCAST_INTERRUPTED triggers.

htordeux commented 11 years ago

fuck me ^^ must be

-- "UNIT_SPELLCAST_INTERRUPTED" -- "UNIT_SPELLCAST_STOP" local function latencySpell ()
jps.CastBar.startTime = nil
jps.CastBar.latency = 0 end

jps.registerEvent("UNIT_SPELLCAST_INTERRUPTED", latencySpell ) jps.registerEvent("UNIT_SPELLCAST_STOP", latencySpell )