From 8d27728dac93ebd3d8bdaa8af5831fd3104e7d10 Mon Sep 17 00:00:00 2001 From: Lacustat Date: Mon, 2 Nov 2026 00:11:08 +0100 Subject: [PATCH] 0.1.231: Kanaele: Klassenbilder als Zaubersymbole statt Bildtafel, Ersatz fuer fehlende Kanalsymbole, /who-Rueckmeldung im Chat [ungeprueft] Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9 --- Core/ChatLog.lua | 15 +++++++++++++-- Freewood-OctoWoW-Core.toc | 2 +- UI/ChannelsTab.lua | 27 +++++++++++++++++---------- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Core/ChatLog.lua b/Core/ChatLog.lua index d1fa580..92ac5d9 100644 --- a/Core/ChatLog.lua +++ b/Core/ChatLog.lua @@ -177,8 +177,10 @@ local whoQueue, whoTried, whoCur = {}, {}, nil local whoSent, whoLast = 0, 0 local WHO_GAP, WHO_TIMEOUT, WHO_RETRY = 6, 5, 600 +local forced = {} function CL.Ask(name, force) if type(name) ~= "string" or name == "" then return end + if force then forced[name] = true end local c, l = CL.Info(name) if c and l and not force then return end local now = Now() @@ -213,7 +215,10 @@ end local pump = CreateFrame("Frame") pump:SetScript("OnUpdate", function() local now = (G.GetTime and G.GetTime()) or 0 - if whoCur and now - whoSent > WHO_TIMEOUT then WhoDone() end + if whoCur and now - whoSent > WHO_TIMEOUT then + if forced[whoCur] then forced[whoCur] = nil; FW:Print(whoCur .. ": ?") end + WhoDone() + end if not whoCur and table.getn(whoQueue) > 0 and now - whoLast >= WHO_GAP then local name = whoQueue[1] local n = table.getn(whoQueue) @@ -229,7 +234,13 @@ local function OnWho() local i = 1 while i <= n do local name, guild, level, race, class = G.GetWhoInfo(i) - if name then CL.Note(name, class, level) end + if name then + CL.Note(name, class, level) + if forced[name] then + forced[name] = nil + FW:Print(name .. ": " .. tostring(level) .. " " .. tostring(class) .. (guild and guild ~= "" and (" <" .. guild .. ">") or "")) + end + end i = i + 1 end if whoCur then WhoDone() end diff --git a/Freewood-OctoWoW-Core.toc b/Freewood-OctoWoW-Core.toc index 55a7e27..a75dfc8 100644 --- a/Freewood-OctoWoW-Core.toc +++ b/Freewood-OctoWoW-Core.toc @@ -3,7 +3,7 @@ ## Notes: Base addon of the Freewood family: data storage, UI kit, export/import and the main window. ## Notes-deDE: Basis-Addon der Freewood-Familie: Datenspeicher, UI-Bausteine, Export/Import und Hauptfenster. ## Author: Lacustat -## Version: 0.1.230 +## Version: 0.1.231 ## SavedVariables: FreewoodDB ## SavedVariablesPerCharacter: FreewoodCharDB diff --git a/UI/ChannelsTab.lua b/UI/ChannelsTab.lua index e659dee..9b19de2 100644 --- a/UI/ChannelsTab.lua +++ b/UI/ChannelsTab.lua @@ -18,8 +18,8 @@ local ICONS = { general = "Interface\\Icons\\INV_Misc_Note_01", localdefense = "Interface\\Icons\\INV_Shield_06", world = "Interface\\Icons\\INV_Misc_Map_01", - lookingforgroup = "Interface\\Icons\\INV_Misc_GroupLooking", - lft = "Interface\\Icons\\INV_Misc_GroupNeedMore", + lookingforgroup = "Interface\\Icons\\INV_Misc_Eye_01", + lft = "Interface\\Icons\\INV_Misc_Bell_01", } local ICON_GUILD = "Interface\\Icons\\INV_Shirt_GuildTabard_01" local ICON_GROUP = "Interface\\Icons\\Spell_Holy_PrayerOfHealing" @@ -32,15 +32,22 @@ local function Hex(r, g, b) return string.format("|cff%02x%02x%02x", math.floor(r * 255 + 0.5), math.floor(g * 255 + 0.5), math.floor(b * 255 + 0.5)) end +-- Klassenbilder: normale Zaubersymbole (die Klassen-Bildtafel des Clients ist hier nicht brauchbar) +local CLASS_ICONS = { + WARRIOR = "Interface\\Icons\\Ability_Warrior_OffensiveStance", + MAGE = "Interface\\Icons\\Spell_Frost_FrostBolt02", + ROGUE = "Interface\\Icons\\Ability_Stealth", + DRUID = "Interface\\Icons\\Spell_Nature_HealingTouch", + HUNTER = "Interface\\Icons\\Ability_Marksmanship", + SHAMAN = "Interface\\Icons\\Spell_Nature_BloodLust", + PRIEST = "Interface\\Icons\\Spell_Holy_PowerWordShield", + WARLOCK = "Interface\\Icons\\Spell_Shadow_ShadowBolt", + PALADIN = "Interface\\Icons\\Spell_Holy_HolyBolt", +} + local function SetClassIcon(tex, token) - local c = token and CL.ICON_COORDS[token] - if c then - tex:SetTexture(CL.ICON_FILE) - tex:SetTexCoord(c[1], c[2], c[3], c[4]) - else - tex:SetTexture(QMARK) - tex:SetTexCoord(0.08, 0.92, 0.08, 0.92) - end + tex:SetTexture((token and CLASS_ICONS[token]) or QMARK) + tex:SetTexCoord(0.08, 0.92, 0.08, 0.92) end local function SetIcon(tex, path)