mirror of
https://github.com/brues-code/Vanilla_MikScrollingBattleText.git
synced 2026-10-17 10:50:50 +00:00
update
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: AceLocale-2.2
|
||||
Revision: $Rev: 15291 $
|
||||
Revision: $Rev: 17638 $
|
||||
Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team)
|
||||
Inspired By: Ace 1.x by Turan (turan@gryphon.com)
|
||||
Website: http://www.wowace.com/
|
||||
@@ -12,11 +12,12 @@ Dependencies: AceLibrary
|
||||
]]
|
||||
|
||||
local MAJOR_VERSION = "AceLocale-2.2"
|
||||
local MINOR_VERSION = "$Revision: 15291 $"
|
||||
local MINOR_VERSION = "$Revision: 17638 $"
|
||||
|
||||
if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary.") end
|
||||
if not AceLibrary:IsNewVersion(MAJOR_VERSION, MINOR_VERSION) then return end
|
||||
|
||||
if loadstring("return function(...) return ... end") and AceLibrary:HasInstance(MAJOR_VERSION) then return end -- lua51 check
|
||||
local AceLocale = {}
|
||||
|
||||
local DEFAULT_LOCALE = "enUS"
|
||||
@@ -388,7 +389,7 @@ function AceLocale.prototype:Debug()
|
||||
return
|
||||
end
|
||||
local words = {}
|
||||
local locales = {"enUS", "deDE", "frFR", "koKR", "zhCN", "zhTW", "esES"}
|
||||
local locales = {"enUS", "ruRU", "deDE", "frFR", "koKR", "zhCN", "zhTW", "esES"}
|
||||
local localizations = {}
|
||||
DEFAULT_CHAT_FRAME:AddMessage("--- AceLocale Debug ---")
|
||||
for _,locale in ipairs(locales) do
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3555,7 +3555,7 @@ function MikCEH.GetHealEventData(directionType, healType, amount, effectName, na
|
||||
-- Erase the combat event data table.
|
||||
MikCEH.EraseTable(eventData);
|
||||
|
||||
-- Populate the event data fields.
|
||||
-- Populate the event data fields.
|
||||
eventData.EventType = MikCEH.EVENTTYPE_HEAL;
|
||||
eventData.DirectionType = directionType;
|
||||
eventData.HealType = healType;
|
||||
@@ -3599,7 +3599,16 @@ end
|
||||
-- Gets a unit id for the name.
|
||||
-- **********************************************************************************
|
||||
function MikCEH.GetUnitIDFromName(uName)
|
||||
local unitID;
|
||||
local unitID, unitName;
|
||||
|
||||
|
||||
if LoggingCombat and LoggingCombat("RAW") == 1 then
|
||||
local _, exist, unitID = pcall(UnitExists, uName)
|
||||
if _ and exist then
|
||||
unitName = UnitName(unitID)
|
||||
return unitID, unitName
|
||||
end
|
||||
end
|
||||
|
||||
-- Check if the name is the player.
|
||||
if (uName == playerName) then
|
||||
@@ -3647,9 +3656,13 @@ function MikCEH.GetUnitIDFromName(uName)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- Return the unit id.
|
||||
return unitID;
|
||||
if unitID then
|
||||
unitName = UnitName(unitID)
|
||||
-- Return the unit id.
|
||||
return unitID, unitName
|
||||
else
|
||||
return nil, nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -3659,7 +3672,7 @@ end
|
||||
function MikCEH.PopulateOverhealData(eventData)
|
||||
-- Get the appropriate unit id for the unit being checked for overheals.
|
||||
|
||||
local unitID = MikCEH.GetUnitIDFromName(eventData.Name);
|
||||
local unitID, uName = MikCEH.GetUnitIDFromName(eventData.Name);
|
||||
|
||||
if not unitID then
|
||||
if UnitName("target") == eventData.Name then
|
||||
|
||||
@@ -1090,9 +1090,10 @@ function MikSBT.FormatEventText(animationEvent)
|
||||
end
|
||||
|
||||
-- Substitute enemy/player names.
|
||||
if (animationEvent.Name ~= nil) and (animationEvent.Name ~= UnitName("player")) then
|
||||
outputString = string.gsub(outputString, "%%n", animationEvent.Name);
|
||||
else
|
||||
local unitID, unitName = MikCEH.GetUnitIDFromName(animationEvent.Name)
|
||||
if unitName and unitID and not UnitIsUnit(unitID, "player") then
|
||||
outputString = string.gsub(outputString, "%%n", unitName);
|
||||
else
|
||||
outputString = string.gsub(outputString, "%(%%n%)", "");
|
||||
outputString = string.gsub(outputString, "%%n", "");
|
||||
end
|
||||
@@ -1619,27 +1620,27 @@ function MikSBT.AddAnimation(animationEvent)
|
||||
end
|
||||
|
||||
-- Color UnitName by class
|
||||
local UnitID = MikCEH.GetUnitIDFromName(animationEvent.Name)
|
||||
if UnitID then
|
||||
local _, Class = UnitClass(UnitID)
|
||||
local unitID, uName = MikCEH.GetUnitIDFromName(animationEvent.Name)
|
||||
if unitID then
|
||||
local _, Class = UnitClass(unitID)
|
||||
if Class and Class == "PALADIN" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffF58CBA|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffF58CBA|h"..uName.."|h|r")
|
||||
elseif Class and Class == "DRUID" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffFF7D0A|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffFF7D0A|h"..uName.."|h|r")
|
||||
elseif Class and Class == "HUNTER" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffABD473|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffABD473|h"..uName.."|h|r")
|
||||
elseif Class and Class == "MAGE" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cff69CCF0|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cff69CCF0|h"..uName.."|h|r")
|
||||
elseif Class and Class == "PRIEST" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffFFFFFF|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffFFFFFF|h"..uName.."|h|r")
|
||||
elseif Class and Class == "ROGUE" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffFFF569|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffFFF569|h"..uName.."|h|r")
|
||||
elseif Class and Class == "SHAMAN" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cff0070DE|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cff0070DE|h"..uName.."|h|r")
|
||||
elseif Class and Class == "WARLOCK" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cff9482C9|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cff9482C9|h"..uName.."|h|r")
|
||||
elseif Class and Class == "WARRIOR" then
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffC79C6E|h"..animationEvent.Name.."|h|r")
|
||||
animationEvent.Text = string.gsub(animationEvent.Text, animationEvent.Name, "|cffC79C6E|h"..uName.."|h|r")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ MikSBT.AVAILABLE_FONTS = {
|
||||
[3] = {Name="Friz", Path="Fonts\\FRIZQT__.TTF"},
|
||||
[4] = {Name="Morpheus", Path="Fonts\\MORPHEUS.TTF"},
|
||||
[5] = {Name="Skurri", Path="Fonts\\SKURRI.TTF"},
|
||||
[6] = {Name="Archangelsk", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\archangelsk.ttf"},
|
||||
};
|
||||
else
|
||||
MikSBT.AVAILABLE_FONTS = {
|
||||
@@ -124,6 +125,7 @@ MikSBT.AVAILABLE_FONTS = {
|
||||
[29] = {Name="PT-Sans-Narrow-Bold", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\PT-Sans-Narrow-Bold.ttf"},
|
||||
[30] = {Name="PT-Sans-Narrow-Regular", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\PT-Sans-Narrow-Regular.ttf"},
|
||||
[31] = {Name="Simhei", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\simhei.ttf"},
|
||||
[32] = {Name="Archangelsk", Path="Interface\\Addons\\MikScrollingBattleText\\Fonts\\archangelsk.ttf"},
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user