This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Really weird Code behaviour?
Post Reply
Return to board index
Post by
janniie
function MyEvents:PLAYER_DEAD()
emote = Kills
total = total + Kills
Deaths = Deaths + 1
Kills = 0
if NewRec and inBattle then
ChatFrame1:AddMessage("New Record! "..PersonalRecord.." kills without dying!",1,0.4,0.8,1)
NewRec = false
end
if Deaths == 1 and inBattle then
ChatFrame1:AddMessage("You died! No Wrecking Ball this time...",1,0.4,0.8,1)
end
if inBattle then
ChatFrame1:AddMessage("Killstreak reset.",1,0.4,0.8,1)
end
end
This is part of my AddOn, BattlegroundKS
I noticed while playing on my hunter (and only on my hunter) that this part executes twice everytime I die... I have no clue why it would do that, and on top of all only on the hunter.
Post by
HighFive
Looks like a game-side bug.
Post by
janniie
So basically I can't fix this? Should I make a ticket about it?
Post by
GTMistral
Hmmm... is your hunter the only char that has a pet? Maybe the death of your pet is also raising the event.
Post by
pelf
Documentation doesn't seem to indicate that's the case.
You could save a dead flag that you set to true the first time you hit that function. Wrap the contents of the function in
if not dead then ... end
. Then, set it back to false on
PLAYER_ALIVE
or whatever indicates you're not dead anymore.
EDIT
: Looking at Recount's death code, it's using a few things to record various deaths.
= Recount.UnitDied, -- Elsia: Unit died
= Recount.UnitDied,
= Recount.UnitDied, -- Post 3.2
Those are all
EventType
of
COMBAT_LOG_EVENT_UNFILTERED
.
Recount:AddDeathData
processes the parameters of those events on line 2014 of Tracker.lua, if you want to check that out.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.