Skip to content

Commit

Permalink
Update YaHT.lua
Browse files Browse the repository at this point in the history
Close #34 
Close #31 
Close #32 
Close #33 
Close #29
  • Loading branch information
Aviana authored Sep 19, 2019
1 parent ef4d0fa commit 5ffaba3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions YaHT.lua
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ function YaHT:Load()
self.mainFrame.lastshot = GetTime()
self.mainFrame.swingtime = UnitRangedDamage("player") - SWING_TIME
self.mainFrame:SetScript("OnUpdate", OnUpdate)
CastingBarFrame.maxValue = 0

self.mainFrame.background = self.mainFrame:CreateTexture("YaHTMainFrameBackground", "BACKGROUND")
self.mainFrame.background:SetAllPoints(self.mainFrame)
Expand Down Expand Up @@ -247,15 +248,15 @@ function YaHT:COMBAT_LOG_EVENT_UNFILTERED()
end
end
return
elseif event == "SPELL_CAST_SUCCESS" and spellID == 19801 then
elseif event == "SPELL_CAST_SUCCESS" and spellID == 19801 and casterID == UnitGUID("player") then
if YaHT.db.profile.tranqannounce then
local num
if YaHT.db.profile.announcetype == "CHANNEL" then
num = GetChannelName(YaHT.db.profile.targetchannel)
end
SendChatMessage(string.format(YaHT.db.profile.announcemsg,targetName), YaHT.db.profile.announcetype, nil, num or YaHT.db.profile.targetchannel)
end
elseif event == "SPELL_MISSED" and spellID == 19801 then
elseif event == "SPELL_MISSED" and spellID == 19801 and casterID == UnitGUID("player") then
if YaHT.db.profile.tranqannouncefail then
local num
if YaHT.db.profile.announcetype == "CHANNEL" then
Expand All @@ -265,7 +266,7 @@ function YaHT:COMBAT_LOG_EVENT_UNFILTERED()
end
end
if (name ~= AimedShot and name ~= MultiShot) or (not YaHT.db.profile.showaimed and name == AimedShot) or (not YaHT.db.profile.showmulti and name == MultiShot) then return end
if event == "SPELL_CAST_START" then
if event == "SPELL_CAST_START" and casterID == UnitGUID("player") then
self.mainFrame.casting = true

if name == AimedShot then
Expand Down

0 comments on commit 5ffaba3

Please sign in to comment.