mirror of
https://github.com/brues-code/Vanilla_MikScrollingBattleText.git
synced 2026-10-26 14:50:50 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4931b1ba7 | ||
|
|
73fd6803ab |
File diff suppressed because it is too large
Load Diff
@@ -133,9 +133,6 @@ NO_ICON_CACHE = {}
|
|||||||
-- Cache for spellId-based icon lookups (bypasses Babble-Spell and tooltip scanning).
|
-- Cache for spellId-based icon lookups (bypasses Babble-Spell and tooltip scanning).
|
||||||
local spellIdIconCache = {}
|
local spellIdIconCache = {}
|
||||||
|
|
||||||
-- Babble-Spell pour les icones des spells de classe
|
|
||||||
local BS = AceLibrary("Babble-Spell-2.2")
|
|
||||||
|
|
||||||
-- Damage type → color prefix lookup (lazily initialized after globals are available).
|
-- Damage type → color prefix lookup (lazily initialized after globals are available).
|
||||||
local damageTypeColors
|
local damageTypeColors
|
||||||
local function GetDamageTypeColor(dt)
|
local function GetDamageTypeColor(dt)
|
||||||
@@ -1343,7 +1340,7 @@ function MikSBT.UpdateProfiles()
|
|||||||
if (profile.CreationVersion < 4.1) then
|
if (profile.CreationVersion < 4.1) then
|
||||||
|
|
||||||
if profile.Triggers.MSBT_TRIGGER_WINDFURY then -- Fix Windfury Trigger
|
if profile.Triggers.MSBT_TRIGGER_WINDFURY then -- Fix Windfury Trigger
|
||||||
profile.Triggers.MSBT_TRIGGER_WINDFURY.TriggerSettings.SearchPatterns[1] = string.format(AURAADDEDSELFHELPFUL, string_gsub(BS["Windfury Totem"], "-", "%%-"))
|
profile.Triggers.MSBT_TRIGGER_WINDFURY.TriggerSettings.SearchPatterns[1] = string.format(AURAADDEDSELFHELPFUL, string_gsub(MikSBT.SpellName(8512, "Windfury Totem"), "-", "%%-"))
|
||||||
end
|
end
|
||||||
|
|
||||||
if profile.Triggers.MSBT_TRIGGER_HAND_OF_JUSTICE then -- Delete Hand of Justice Trigger
|
if profile.Triggers.MSBT_TRIGGER_HAND_OF_JUSTICE then -- Delete Hand of Justice Trigger
|
||||||
@@ -1870,7 +1867,6 @@ function MikSBT.AddAnimation(animationEvent)
|
|||||||
local name = string_gsub(animationEvent.EffectName, " %(%d+%)", "")
|
local name = string_gsub(animationEvent.EffectName, " %(%d+%)", "")
|
||||||
-- DEFAULT_CHAT_FRAME:AddMessage(animationEvent.EffectName)
|
-- DEFAULT_CHAT_FRAME:AddMessage(animationEvent.EffectName)
|
||||||
-- DEFAULT_CHAT_FRAME:AddMessage(name)
|
-- DEFAULT_CHAT_FRAME:AddMessage(name)
|
||||||
-- texture = BS:GetSpellIcon(name)
|
|
||||||
if ICON_CACHE[strlower(name)] then
|
if ICON_CACHE[strlower(name)] then
|
||||||
texture = ICON_CACHE[strlower(name)]
|
texture = ICON_CACHE[strlower(name)]
|
||||||
elseif not texture and MikSBT.FindBuff(name) then
|
elseif not texture and MikSBT.FindBuff(name) then
|
||||||
@@ -1897,8 +1893,6 @@ function MikSBT.AddAnimation(animationEvent)
|
|||||||
if ok3 and tex then texture = tex; ICON_CACHE[strlower(name)] = tex end
|
if ok3 and tex then texture = tex; ICON_CACHE[strlower(name)] = tex end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif not texture and BS and BS.GetSpellIcon and BS:GetSpellIcon(name) then
|
|
||||||
texture = BS:GetSpellIcon(name)
|
|
||||||
elseif not texture and MikSBT.FindItemIcon(name) then
|
elseif not texture and MikSBT.FindItemIcon(name) then
|
||||||
texture = MikSBT.FindItemIcon(name)
|
texture = MikSBT.FindItemIcon(name)
|
||||||
ICON_CACHE[strlower(name)] = MikSBT.FindItemIcon(name)
|
ICON_CACHE[strlower(name)] = MikSBT.FindItemIcon(name)
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
Libs\AceLibrary\AceLibrary.lua
|
Libs\AceLibrary\AceLibrary.lua
|
||||||
Libs\AceLocale-2.2\AceLocale-2.2.lua
|
Libs\AceLocale-2.2\AceLocale-2.2.lua
|
||||||
Libs\BabbleSpell-2.2\Babble-Spell-2.2.lua
|
|
||||||
|
|
||||||
MikScrollingBattleText-enUS.lua
|
MikScrollingBattleText-enUS.lua
|
||||||
MikScrollingBattleText-frFR.lua
|
MikScrollingBattleText-frFR.lua
|
||||||
|
|||||||
@@ -18,9 +18,20 @@ MikSBT.WINDOW_TITLE = "Mik's Scrolling Battle Text " .. MikSBT.VERSION_STRING ..
|
|||||||
|
|
||||||
MikSBT.COMMAND = "/msbt";
|
MikSBT.COMMAND = "/msbt";
|
||||||
|
|
||||||
local BS = AceLibrary("Babble-Spell-2.2")
|
|
||||||
local L = AceLibrary("AceLocale-2.2"):new(MikSBT.MOD_NAME)
|
local L = AceLibrary("AceLocale-2.2"):new(MikSBT.MOD_NAME)
|
||||||
|
|
||||||
|
-- Resolves a spell's localized name from its ID via Nampower's GetSpellRecField,
|
||||||
|
-- replacing the old Babble-Spell library. Falls back to the given English name when
|
||||||
|
-- Nampower is absent (vanilla has no built-in spellId->name lookup). Shared across
|
||||||
|
-- files via the MikSBT namespace; localization.lua loads first per the .toc.
|
||||||
|
function MikSBT.SpellName(id, fallback)
|
||||||
|
if GetSpellRecField then
|
||||||
|
local ok, n = pcall(GetSpellRecField, id, "name")
|
||||||
|
if ok and n and n ~= "" then return n end
|
||||||
|
end
|
||||||
|
return fallback
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- English (Default)
|
-- English (Default)
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@@ -205,7 +216,7 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
CreationVersion = MikSBT.VERSION_NUMBER,
|
CreationVersion = MikSBT.VERSION_NUMBER,
|
||||||
ShowPartialEffects = true,
|
ShowPartialEffects = true,
|
||||||
ShowOverheals = true,
|
ShowOverheals = true,
|
||||||
ShowGameDamage = true,
|
ShowGameDamage = false,
|
||||||
UseStickyCrits = true,
|
UseStickyCrits = true,
|
||||||
ShowAllManaGains = false,
|
ShowAllManaGains = false,
|
||||||
LowHealthSound = true,
|
LowHealthSound = true,
|
||||||
@@ -1134,7 +1145,7 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
MSBT_TRIGGER_EXECUTE = {
|
MSBT_TRIGGER_EXECUTE = {
|
||||||
EventSettings = {
|
EventSettings = {
|
||||||
Show = true,
|
Show = true,
|
||||||
Message = BS["Execute"].."!",
|
Message = MikSBT.SpellName(5308, "Execute").."!",
|
||||||
IsSticky = true,
|
IsSticky = true,
|
||||||
FontSettings = {
|
FontSettings = {
|
||||||
Color = {r=1, g=1, b=0},
|
Color = {r=1, g=1, b=0},
|
||||||
@@ -1151,7 +1162,7 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
MSBT_TRIGGER_HAMMER_OF_WRATH = {
|
MSBT_TRIGGER_HAMMER_OF_WRATH = {
|
||||||
EventSettings = {
|
EventSettings = {
|
||||||
Show = true,
|
Show = true,
|
||||||
Message = BS["Hammer of Wrath"].."!",
|
Message = MikSBT.SpellName(24275, "Hammer of Wrath").."!",
|
||||||
IsSticky = true,
|
IsSticky = true,
|
||||||
FontSettings = {
|
FontSettings = {
|
||||||
Color = {r=1, g=1, b=0},
|
Color = {r=1, g=1, b=0},
|
||||||
@@ -1168,7 +1179,7 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
MSBT_TRIGGER_COUNTER_ATTACK = {
|
MSBT_TRIGGER_COUNTER_ATTACK = {
|
||||||
EventSettings = {
|
EventSettings = {
|
||||||
Show = true,
|
Show = true,
|
||||||
Message = BS["Counterattack"].."!",
|
Message = MikSBT.SpellName(19306, "Counterattack").."!",
|
||||||
IsSticky = true,
|
IsSticky = true,
|
||||||
FontSettings = {
|
FontSettings = {
|
||||||
Color = {r=1, g=1, b=0},
|
Color = {r=1, g=1, b=0},
|
||||||
@@ -1187,7 +1198,7 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
MSBT_TRIGGER_MONGOOSE_BITE = {
|
MSBT_TRIGGER_MONGOOSE_BITE = {
|
||||||
EventSettings = {
|
EventSettings = {
|
||||||
Show = true,
|
Show = true,
|
||||||
Message = BS["Mongoose Bite"].."!",
|
Message = MikSBT.SpellName(1495, "Mongoose Bite").."!",
|
||||||
IsSticky = true,
|
IsSticky = true,
|
||||||
FontSettings = {
|
FontSettings = {
|
||||||
Color = {r=1, g=1, b=0},
|
Color = {r=1, g=1, b=0},
|
||||||
@@ -1206,7 +1217,7 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
MSBT_TRIGGER_CLEARCAST = {
|
MSBT_TRIGGER_CLEARCAST = {
|
||||||
EventSettings = {
|
EventSettings = {
|
||||||
Show = true,
|
Show = true,
|
||||||
Message = BS["Clearcasting"].."!",
|
Message = MikSBT.SpellName(16246, "Clearcasting").."!",
|
||||||
IsSticky = true,
|
IsSticky = true,
|
||||||
FontSettings = {
|
FontSettings = {
|
||||||
Color = {r=1, g=1, b=0},
|
Color = {r=1, g=1, b=0},
|
||||||
@@ -1217,14 +1228,14 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
Classes = {MAGE=true,SHAMAN=true},
|
Classes = {MAGE=true,SHAMAN=true},
|
||||||
TriggerType = 6,
|
TriggerType = 6,
|
||||||
TriggerEvents = {"CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS"},
|
TriggerEvents = {"CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS"},
|
||||||
SearchPatterns = {string.format(AURAADDEDSELFHELPFUL, BS["Clearcasting"])},
|
SearchPatterns = {string.format(AURAADDEDSELFHELPFUL, MikSBT.SpellName(16246, "Clearcasting"))},
|
||||||
},
|
},
|
||||||
Texture = "Interface\\Icons\\spell_shadow_manaburn"
|
Texture = "Interface\\Icons\\spell_shadow_manaburn"
|
||||||
},
|
},
|
||||||
MSBT_TRIGGER_RIPOSTE = {
|
MSBT_TRIGGER_RIPOSTE = {
|
||||||
EventSettings = {
|
EventSettings = {
|
||||||
Show = true,
|
Show = true,
|
||||||
Message = BS["Riposte"].."!",
|
Message = MikSBT.SpellName(14251, "Riposte").."!",
|
||||||
IsSticky = true,
|
IsSticky = true,
|
||||||
FontSettings = {
|
FontSettings = {
|
||||||
Color = {r=1, g=1, b=0},
|
Color = {r=1, g=1, b=0},
|
||||||
@@ -1253,14 +1264,14 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
TriggerSettings = {
|
TriggerSettings = {
|
||||||
TriggerType = 6,
|
TriggerType = 6,
|
||||||
TriggerEvents = {"CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS"},
|
TriggerEvents = {"CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS"},
|
||||||
SearchPatterns = {string.format(AURAADDEDSELFHELPFUL, string.gsub(BS["Windfury Totem"], "-", "%%-"))}, --"Vous gagnez Totem Furie-des-vents" -- escape char !
|
SearchPatterns = {string.format(AURAADDEDSELFHELPFUL, string.gsub(MikSBT.SpellName(8512, "Windfury Totem"), "-", "%%-"))}, --"Vous gagnez Totem Furie-des-vents" -- escape char !
|
||||||
},
|
},
|
||||||
Texture = "Interface\\Icons\\spell_nature_cyclone"
|
Texture = "Interface\\Icons\\spell_nature_cyclone"
|
||||||
},
|
},
|
||||||
MSBT_TRIGGER_NIGHTFALL = {
|
MSBT_TRIGGER_NIGHTFALL = {
|
||||||
EventSettings = {
|
EventSettings = {
|
||||||
Show = true,
|
Show = true,
|
||||||
Message = BS["Nightfall"].."!",
|
Message = MikSBT.SpellName(18094, "Nightfall").."!",
|
||||||
IsSticky = true,
|
IsSticky = true,
|
||||||
FontSettings = {
|
FontSettings = {
|
||||||
Color = {r=0.709, g=0, b=0.709},
|
Color = {r=0.709, g=0, b=0.709},
|
||||||
@@ -1271,14 +1282,14 @@ MikSBT.DEFAULT_CONFIG = {
|
|||||||
Classes = {WARLOCK=true},
|
Classes = {WARLOCK=true},
|
||||||
TriggerType = 6,
|
TriggerType = 6,
|
||||||
TriggerEvents = {"CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS"},
|
TriggerEvents = {"CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS"},
|
||||||
SearchPatterns = {string.format(AURAADDEDSELFHELPFUL, BS["Shadow Trance"])},
|
SearchPatterns = {string.format(AURAADDEDSELFHELPFUL, MikSBT.SpellName(17941, "Shadow Trance"))},
|
||||||
},
|
},
|
||||||
Texture = "Interface\\Icons\\spell_shadow_twilight"
|
Texture = "Interface\\Icons\\spell_shadow_twilight"
|
||||||
},
|
},
|
||||||
MSBT_TRIGGER_OVERPOWER = {
|
MSBT_TRIGGER_OVERPOWER = {
|
||||||
EventSettings = {
|
EventSettings = {
|
||||||
Show = true,
|
Show = true,
|
||||||
Message = BS["Overpower"].."!",
|
Message = MikSBT.SpellName(7384, "Overpower").."!",
|
||||||
IsSticky = true,
|
IsSticky = true,
|
||||||
FontSettings = {
|
FontSettings = {
|
||||||
Color = {r=1, g=1, b=0},
|
Color = {r=1, g=1, b=0},
|
||||||
|
|||||||
Reference in New Issue
Block a user