Go Back   Shestak UI > Interface Forums > English Community > Bugs Reports

Bugs Reports Report any bugs or issues you come across with ShestakUI.

Advertising

 
Thread Tools
Old 05.12.2012, 10:13   #1
 Senior Member User Information

Oz's Avatar
Bug Healer Icon on nameplates

It's me or ["healer_icon"] setting does not work?
I don't get any error, but after several BGs I've never seen an icon, never, even on players clearly busy to heal.
It's the same for you? It's a known issue?

Thanks in advance.
Old 05.12.2012, 10:13   #1.5 - Disable Ads

Advertise on this site

Old 06.12.2012, 00:54   #2
Shestak
 Junior Member User Information

Shestak's Avatar
Yes, I know about it.


Try replace this code in Modules\Misc\HealerIconNameplate.lua
lua Code [Select]:
local T, C, L, _ = unpack(select(2, ...))
if C.nameplate.enable ~= true or C.nameplate.healer_icon ~= true then return end

----------------------------------------------------------------------------------------
--  Show icon above enemy healers nameplate in battlegrounds(KillTheHealer by Kraftman)
----------------------------------------------------------------------------------------
local heallist = {}
local exclass = {}
local testing = false

exclass.WARRIOR = true
exclass.DEATHKNIGHT = true
exclass.MAGE = true
exclass.WARLOCK = true
exclass.ROGUE = true

local function UpdatePlate(self)
    if testing then
        self.HPHeal:Show()
    else
        if heallist[self.HPname:GetText()] then
            if exclass[heallist[self.HPname:GetText()]] then
                self.HPHeal:Hide()
            else
                self.HPHeal:Show()
            end
        else
            self.HPHeal:Hide()
        end
    end
end

local function CreatePlate(frame, nameFrame)
    if frame.HPHeal then
        return
    end

    local nameTextRegion = nameFrame:GetRegions()

    frame.HPname = nameTextRegion

    frame.HPHeal = frame:CreateFontString(nil, "OVERLAY")
    frame.HPHeal:SetFont(C.font.nameplates_font, 32, C.font.nameplates_font_style)
    frame.HPHeal:SetText("|cFFD53333+|r")
    if C.nameplate.track_auras == true then
        frame.HPHeal:SetPoint("BOTTOM", frame, "TOP", 0, 13)
    else
        frame.HPHeal:SetPoint("BOTTOM", frame, "TOP", 0, 0)
    end

    UpdatePlate(frame)
    frame:HookScript("OnShow", UpdatePlate)
end

local lastUpdate = 0

local function HookFrames(...)
    for index = 1, select("#", ...) do
        local frame = select(index, ...)

        if frame:GetName() and frame:GetName():find("NamePlate%d") then
            local child1, child2 = frame:GetChildren()
            CreatePlate(child1, child2)
        end
    end
end

local f = CreateFrame("Frame")
f:SetScript("OnUpdate", function(self, elapsed)
    lastUpdate = lastUpdate + elapsed

    if lastUpdate > 5 then
        lastUpdate = 0
        if WorldFrame:GetNumChildren() ~= numChildren then
            numChildren = WorldFrame:GetNumChildren()
            HookFrames(WorldFrame:GetChildren())
        end
    end
end)

local lastcheck = 0
local t = CreateFrame("Frame")
t.factionOpposites = {
    ["Horde"] = 1,
    ["Alliance"] = 0,
}
t.Healers = {
    [L_PLANNER_PALADIN_1] = true,
    [L_PLANNER_PRIEST_1] = true,
    [L_PLANNER_DRUID_4] = true,
    [L_PLANNER_MONK_2] = true,
}

local function CheckHealers(self, elapsed)
    lastcheck = lastcheck + elapsed
    if lastcheck > 30 then
        lastcheck = 0
        heallist = {}
        for i = 1, GetNumBattlefieldScores() do
            local name, _, _, _, _, faction, _, _, _, _, _, _, _, _, _, talentSpec = GetBattlefieldScore(i)
            name = name:match("(.+)%-.+") or name
            if name and t.Healers[talentSpec] and t.factionOpposites[UnitFactionGroup("player")] == faction then
                heallist[name] = talentSpec
            end
        end
    end
end

local function CheckLoc(self, event)
    if event == "PLAYER_ENTERING_WORLD" or event == "PLAYER_ENTERING_BATTLEGROUND" then
        local inInstance, instanceType = IsInInstance()
        if inInstance and instanceType == "pvp" then
            t:SetScript("OnUpdate", CheckHealers)
        else
            heallist = {}
            t:SetScript("OnUpdate", nil)
        end
    end
end

t:RegisterEvent("PLAYER_ENTERING_WORLD")
t:RegisterEvent("PLAYER_ENTERING_BATTLEGROUND")
t:SetScript("OnEvent", CheckLoc)
Say Thank:
Oz (06.12.2012)
Old 06.12.2012, 21:02   #3
Oz
 Senior Member User Information

Oz's Avatar
Ok, I'll try ^^

Добавлено через 8 часов 10 минут
Sadly...nothing
Old 06.12.2012, 22:43   #4
Shestak
 Junior Member User Information

Shestak's Avatar
https://github.com/Shestak/ShestakUI...55eb3b0f6e6ad8

http://i.imgur.com/T0BL0.jpg


Remember:
lua Code [Select]:
t.healers = {
    [L_PLANNER_PALADIN_1] = true,
    [L_PLANNER_PRIEST_1] = true,
    [L_PLANNER_DRUID_4] = true,
    [L_PLANNER_MONK_2] = true,
}
and https://github.com/Shestak/ShestakUI...alian.lua#L215
Must be correct translate(same as with Blizzard).
Old 07.12.2012, 09:48   #5
Oz
 Senior Member User Information

Oz's Avatar
Thank you.

Quote:
Originally Posted by Shestak View Post
...
and https://github.com/Shestak/ShestakUI...alian.lua#L215
Must be correct translate(same as with Blizzard).
I don't understand...this is the DK page on Italian battle.net, the translation is the same.
Old 07.12.2012, 10:11   #6
Shestak
 Junior Member User Information

Shestak's Avatar
Important only those rows:
L_PLANNER_PALADIN_1
L_PLANNER_PRIEST_1
L_PLANNER_DRUID_4
L_PLANNER_MONK_2

DK not healer.
Old 07.12.2012, 10:46   #7
Oz
 Senior Member User Information

Oz's Avatar

You said "Must be correct translate"...what?
:-)
Old 07.12.2012, 10:48   #8
Shestak
 Junior Member User Information

Shestak's Avatar
If the latest fixed code you are still not working display healers. Then the only variant is not a correct translation of healers specs.
Old 07.12.2012, 10:52   #9
Wetxius
 Assistant User Information

Wetxius's Avatar
L_PLANNER_DRUID_4 = "Rigenerazione"
L_PLANNER_PALADIN_1 = "Sacro"
L_PLANNER_MONK_2 = "Misticismo"
L_PLANNER_SHAMAN_3 = "Rigenerazione"
Specializations name as Blizzard defaults name. I checked it, alright. Good translate
Says Thank:
Oz (07.12.2012), Shestak (07.12.2012)
Old 07.12.2012, 13:13   #10
Oz
 Senior Member User Information

Oz's Avatar
Ahhhhhh ooookkkk, I've made a bit of confusione because of above link (line 215 = DK spec.) XD

Tags
healer, healericonnameplate.lua, healer_icon

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nameplates (дебаффы и прочее) Wetxius Spell/Item Filters 31 12.11.2013 11:58
Debuffs on nameplates rkw Technical Support 4 11.11.2012 00:39
[4.0] Some small healer modifications Ente Modified Versions 0 14.10.2012 09:30
[Fixed] Nameplates own Debuffs Sticky Bugs Reports 2 08.01.2012 17:59
Placement of Raid groups (Healer Mode) Tekzehtool Technical Support 2 30.04.2011 16:45


Mobile Style Русский English Deutsch Italian Chinese