diff -ruN Ikarus_v2.1.9/lang/ikarus_lang_ENEU.lua Ikarus_v2.1.9-bard/lang/ikarus_lang_ENEU.lua --- Ikarus_v2.1.9/lang/ikarus_lang_ENEU.lua 2012-06-17 14:39:30.000000000 +0200 +++ Ikarus_v2.1.9-bard/lang/ikarus_lang_ENEU.lua 2022-05-12 21:14:49.301952800 +0200 @@ -388,6 +388,7 @@ SHOW_DRUID = "Show the castbar if $unit is of class druid. If main class filter is deactivated the $unit's subclass will be checked as well.", SHOW_HARPSYN = "Show the castbar if $unit is of class warlock. If main class filter is deactivated the $unit's subclass will be checked as well.", SHOW_PSYRON = "Show the castbar if $unit is of class champion. If main class filter is deactivated the $unit's subclass will be checked as well.", + SHOW_BARD = "Show the castbar if $unit is of class bard. If main class filter is deactivated the $unit's subclass will be checked as well.", UNIT_TARGET_CHANGED = "The $unit's target has changed, i.e. a new one was selected or the old one got deselected. Careful use of this value is recommended in case you are using other AddOns or macros that perform multiple re-targeting operations in a row.", UNIT_CLASS_CHANGED = "The $unit's class has changed", @@ -436,6 +437,7 @@ DRUID = "Color used for units of class Druid", HARPSYN = "Color used for units of class Warlock", PSYRON = "Color used for units of class Champion", + BARD = "Color used for units of class Bard", MANATYPE1 = "Color used for mana-or skillbars whose manatype is 'Mana'", MANATYPE2 = "Color used for mana-or skillbars whose manatype is 'Rage'", @@ -704,6 +706,7 @@ SHOW_DRUID = "Show for Druid", SHOW_HARPSYN = "Show for Warlock", SHOW_PSYRON = "Show for Champion", + SHOW_BARD = "Show for Bard", UNIT_TARGET_CHANGED = "Unit Target", UNIT_CLASS_CHANGED = "Unit Class", @@ -768,6 +771,7 @@ DRUID = "Druid", HARPSYN = "Warlock", PSYRON = "Champion", + BARD = "Bard", USE_CUSTOM_COLORS = "Use Custom Colors", SCREEN_ANCHOR = "Screen Anchor", @@ -939,6 +943,7 @@ DRUID = "Druid", HARPSYN = "Warlock", PSYRON = "Champion", + BARD = "Bard", }, -- Unit types diff -ruN Ikarus_v2.1.9/libs/Classes.lua Ikarus_v2.1.9-bard/libs/Classes.lua --- Ikarus_v2.1.9/libs/Classes.lua 2012-06-21 15:44:52.000000000 +0200 +++ Ikarus_v2.1.9-bard/libs/Classes.lua 2022-05-12 21:14:41.465156900 +0200 @@ -1001,6 +1001,7 @@ DRUID = {"druid64_default"}, HARPSYN = {"harpsyn64_default"}, PSYRON = {"psyron64_default"}, + BARD = {"knight64_default"}, -- for now reuse _index = { RAIDTARGET = 1, PVPSTATE = 2, @@ -1020,7 +1021,8 @@ WARDEN = 16, DRUID = 17, HARPSYN = 18, - PSYRON = 19, + PSYRON = 19, + BARD = 20, }; }; @@ -2996,7 +2998,9 @@ local config = delegate:Profile(); if config.GENERAL.VISIBLE and config.HEALTHBAR.VISIBLE then local frame = delegate.RootFrame.HealthBar.ForegroundTexture; - local width, hp, mhp = delegate.RootFrame:GetWidth(), tonumber(UnitHealth(delegate.unit)), tonumber(UnitMaxHealth(delegate.unit)); + local _,hp = UnitHealth(delegate.unit) + local _,maxhp = UnitMaxHealth(delegate.unit) + local width, hp, mhp = delegate.RootFrame:GetWidth(), tonumber(hp), tonumber(maxhp); if mhp > 0 and hp > 0 then if config.HEALTHBAR.COLORIZER and config.HEALTHBAR.COLORIZER ~= "NONE" then local color = ikarus.colorizers:Colorize(config.HEALTHBAR.COLORIZER, delegate, "health"); @@ -3229,8 +3233,12 @@ if frame then local class, _ = UnitClassToken(delegate.unit); if class ~= "" and delegate:SubProfile("ICONS").MAINCLASS.VISIBLE then - delegate:SetFile("mainclassicon_file", frame, ADDON_DIR.."graphics/icons/"..delegate.iconSet[class]); - delegate:ShowFrame(frame); + if delegate.iconSet[class] then + delegate:SetFile("mainclassicon_file", frame, ADDON_DIR.."graphics/icons/"..delegate.iconSet[class]); + delegate:ShowFrame(frame); + else + delegate:HideFrame(frame); + end else delegate:HideFrame(frame); end; @@ -4755,6 +4763,7 @@ SHOW_DRUID = true, SHOW_HARPSYN = true, SHOW_PSYRON = true, + SHOW_BARD = true, }, }; @@ -4791,6 +4800,7 @@ SHOW_DRUID = _optc(17,"TOGGLE"), SHOW_HARPSYN = _optc(18,"TOGGLE"), SHOW_PSYRON = _optc(19,"TOGGLE"), + SHOW_BARD = _optc(20,"TOGGLE"), }); }); @@ -6079,6 +6089,7 @@ DRUID = { r = 1.00 , g = 0.49 , b = 0.04 }, HARPSYN = { r = 0.58 , g = 0.51 , b = 0.79 }, PSYRON = { r = 0.96 , g = 0.55 , b = 0.73 }, + BARD = { r = 0.5 , g = 0.5 , b = 0.5 }, MANATYPE1 = { r = 0.30 , g = 0.50 , b = 0.85 }, MANATYPE2 = { r = 1.00 , g = 0.00 , b = 0.00 }, MANATYPE3 = { r = 0.55 , g = 0.95 , b = 0.00 }, @@ -6139,6 +6150,7 @@ DRUID = _optc(27,"COLOR"), HARPSYN = _optc(28,"COLOR"), PSYRON = _optc(29,"COLOR"), + BARD = _optc(30,"COLOR"), -- not sure if 30 is not used for something else? MANATYPE1 = _optc(40,"COLOR"), MANATYPE2 = _optc(41,"COLOR"), MANATYPE3 = _optc(42,"COLOR"), diff -ruN Ikarus_v2.1.9/libs/IUCode.lua Ikarus_v2.1.9-bard/libs/IUCode.lua --- Ikarus_v2.1.9/libs/IUCode.lua 2012-06-13 18:00:10.000000000 +0200 +++ Ikarus_v2.1.9-bard/libs/IUCode.lua 2022-05-12 20:46:49.184493400 +0200 @@ -342,7 +342,8 @@ if delegate:UnitIsPlayerOrPet() then return formatNumber(UnitHealth(delegate:Unit()), delegate, options); else - local hpMax, hpRel = PW.units.GetMobMaxHealth(delegate:Unit(), true), UnitHealth(delegate:Unit()); + local hpMax = PW.units.GetMobMaxHealth(delegate:Unit(), true) + local hpRel = UnitHealth(delegate:Unit()); return formatNumber(floor(hpRel/100 * hpMax), delegate, options); end; end; @@ -361,7 +362,8 @@ ikarus.iuc.HP_REL = function(delegate, options) if delegate:IsUnit() then if delegate:UnitIsPlayerOrPet() then - local hp, hpMax = UnitHealth(delegate:Unit()), UnitMaxHealth(delegate:Unit()); + local hp = UnitHealth(delegate:Unit()) + local hpMax = UnitMaxHealth(delegate:Unit()); return tostring(floor(hp/hpMax * 100)); else return tostring(UnitHealth(delegate:Unit())); @@ -396,7 +398,8 @@ if delegate:UnitIsPlayerOrPet() then return formatNumber(UnitMaxHealth(delegate:Unit()) - UnitHealth(delegate:Unit()), delegate, options); else - local hpRel, hpMax = 100 - UnitHealth(delegate:Unit()), PW.units.GetMobMaxHealth(delegate:Unit(), true); + local unitHP = UnitHealth(delegate:Unit()) + local hpRel, hpMax = 100 - unitHP, PW.units.GetMobMaxHealth(delegate:Unit(), true); return formatNumber(floor(hpMax/100 * hpRel), delegate, options); end; end; @@ -425,7 +428,8 @@ ikarus.iuc.MP_REL = function(delegate, options) if delegate:IsUnit() then if delegate:UnitIsPlayerOrPet() then - local mp, mpMax = UnitMana(delegate:Unit()), UnitMaxMana(delegate:Unit()); + local mp = UnitMana(delegate:Unit()) + local mpMax = UnitMaxMana(delegate:Unit()); if mp == 0 then return "0"; else @@ -440,7 +444,9 @@ ikarus.iuc.MANA = function(delegate, options) if delegate:IsUnit() then if delegate:UnitIsPlayerOrPet() then - local mp, mpMax, mpRel = UnitMana(delegate:Unit()), UnitMaxMana(delegate:Unit()); + local mp = UnitMana(delegate:Unit()) + local mpMax = UnitMaxMana(delegate:Unit()) + local mpRel if mpMax == 0 then return ""; elseif mp == 0 then @@ -484,7 +490,9 @@ ikarus.iuc.SKILL = function(delegate, options) if delegate:IsUnit() then if delegate:UnitIsPlayerOrPet() then - local sp, spMax, spRel= UnitSkill(delegate:Unit()), UnitMaxSkill(delegate:Unit()); + local sp = UnitSkill(delegate:Unit()) + local spMax = UnitMaxSkill(delegate:Unit()) + local spRel if spMax == 0 then return ""; elseif sp == 0 then