Skip to content

Commit

Permalink
Merge pull request #57 from midraal/feature/target-indicator
Browse files Browse the repository at this point in the history
add target indicator
  • Loading branch information
Crowdedlight committed Aug 14, 2014
2 parents 7bc9a03 + 5d0072c commit 8c685af
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions VikingNameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ function VikingNameplates:OnUnitCreated(unitNew) -- build main options here
self:UpdateNameplateRewardInfo(tNameplate)
self:DrawRewards(tNameplate)
self:DrawThreatIndicator(tNameplate)
self:DrawTargeting(tNameplate)
self:DrawInterrupt(tNameplate)
end

Expand Down Expand Up @@ -566,6 +567,7 @@ function VikingNameplates:DrawNameplate(tNameplate)
self:DrawVulnerable(tNameplate)
self:ColorNameplate(tNameplate)
self:DrawThreatIndicator(tNameplate)
self:DrawTargeting(tNameplate)
self:DrawInterrupt(tNameplate)
end

Expand Down Expand Up @@ -811,13 +813,17 @@ function VikingNameplates:DrawRewards(tNameplate)
end
end

function VikingNameplates:DrawTargeting(tVikingNameplates)
function VikingNameplates:DrawTargeting(tNameplate)
if tNameplate == nil then
return
end

local wndNameplate = tNameplate.wndNameplate
local unitOwner = tNameplate.unitOwner

local bUseTarget = tNameplate.bIsTarget

local bShowTargetMarkerArrow = bUseTarget and self.bShowMarkerTarget and not tVikingNameplates.wnd.health:IsShown()
local bShowTargetMarkerArrow = bUseTarget and self.bShowMarkerTarget
tNameplate.wnd.targetMarkerArrow:SetSprite(karDisposition.tTargetSecondary[tNameplate.eDisposition])
tNameplate.wnd.targetMarkerArrow:Show(bShowTargetMarkerArrow, not bShowTargetMarkerArrow)
end
Expand Down

0 comments on commit 8c685af

Please sign in to comment.