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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
Lacustat
2026-11-02 00:11:08 +01:00
co-authored by Claude Sonnet 5.5
parent f1a73c831a
commit 8d27728dac
3 changed files with 31 additions and 13 deletions
+13 -2
View File
@@ -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
+1 -1
View File
@@ -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
+17 -10
View File
@@ -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)