from retail
This commit is contained in:
@@ -112,7 +112,6 @@ function Private.TextureBase.create(frame)
|
||||
return base
|
||||
end
|
||||
|
||||
-- TODO better type for options
|
||||
function Private.TextureBase.modify(base, options)
|
||||
base.canRotate = options.canRotate
|
||||
base.mirror = options.mirror
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Bindings>
|
||||
<Binding name="WEAKAURASTOGGLE" Category="BINDING_HEADER_WEAKAURAS">
|
||||
<Binding name="WEAKAURASTOGGLE" header="WEAKAURAS" Category="ADDONS">
|
||||
WeakAuras.OpenOptions()
|
||||
</Binding>
|
||||
<Binding name="WEAKAURASPROFILINGTOGGLE" Category="BINDING_HEADER_WEAKAURAS">
|
||||
<Binding name="WEAKAURASPROFILINGTOGGLE" Category="ADDONS">
|
||||
WeakAuras.RealTimeProfilingWindow:Toggle()
|
||||
</Binding>
|
||||
<Binding name="WEAKAURASPRINTPROFILING" Category="BINDING_HEADER_WEAKAURAS">
|
||||
<Binding name="WEAKAURASPRINTPROFILING" Category="ADDONS">
|
||||
WeakAuras.PrintProfile()
|
||||
</Binding>
|
||||
</Bindings>
|
||||
|
||||
+638
-630
File diff suppressed because it is too large
Load Diff
+27
-14
@@ -2335,19 +2335,32 @@ local function createScanFunc(trigger)
|
||||
end
|
||||
end
|
||||
|
||||
local function highestExpirationTime(bestMatch, auraMatch)
|
||||
if bestMatch.expirationTime and auraMatch.expirationTime then
|
||||
return auraMatch.expirationTime > bestMatch.expirationTime
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
local function lowestExpirationTime(bestMatch, auraMatch)
|
||||
if bestMatch.expirationTime and auraMatch.expirationTime then
|
||||
return auraMatch.expirationTime < bestMatch.expirationTime
|
||||
end
|
||||
return false
|
||||
end
|
||||
local matchCombineFunctions = {
|
||||
showHighest = function(bestMatch, auraMatch)
|
||||
if bestMatch.expirationTime and auraMatch.expirationTime then
|
||||
return auraMatch.expirationTime > bestMatch.expirationTime
|
||||
end
|
||||
return true
|
||||
end,
|
||||
showLowest = function(bestMatch, auraMatch)
|
||||
if bestMatch.expirationTime and auraMatch.expirationTime then
|
||||
return auraMatch.expirationTime < bestMatch.expirationTime
|
||||
end
|
||||
return false
|
||||
end,
|
||||
showLowestSpellId = function(bestMatch, auraMatch)
|
||||
if bestMatch.spellId and auraMatch.spellId then
|
||||
return auraMatch.spellId < bestMatch.spellId
|
||||
end
|
||||
return false
|
||||
end,
|
||||
showHighestSpellId = function(bestMatch, auraMatch)
|
||||
if bestMatch.spellId and auraMatch.spellId then
|
||||
return auraMatch.spellId > bestMatch.spellId
|
||||
end
|
||||
return false
|
||||
end,
|
||||
}
|
||||
|
||||
local function GreaterEqualOne(x)
|
||||
return x >= 1
|
||||
@@ -2503,7 +2516,7 @@ function BuffTrigger.Add(data)
|
||||
remainingCheck = trigger.unit ~= "multi" and CanHaveMatchCheck(trigger) and trigger.useRem and tonumber(trigger.rem) or 0,
|
||||
id = id,
|
||||
triggernum = triggernum,
|
||||
compareFunc = trigger.combineMode == "showHighest" and highestExpirationTime or lowestExpirationTime,
|
||||
compareFunc = matchCombineFunctions[trigger.combineMode] or matchCombineFunctions["showLowest"],
|
||||
unitExists = showIfInvalidUnit,
|
||||
fetchTooltip = not IsSingleMissing(trigger) and trigger.unit ~= "multi" and trigger.fetchTooltip,
|
||||
fetchRaidMark = trigger.unit ~= "multi" and trigger.fetchRaidMark,
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# [2.17.4](https://github.com/WeakAuras/WeakAuras2/tree/2.17.4) (2020-04-22)
|
||||
|
||||
[Full Changelog](https://github.com/WeakAuras/WeakAuras2/compare/2.17.3...2.17.4)
|
||||
|
||||
## Highlights
|
||||
|
||||
- fix a buff tracking and nameplates regression
|
||||
|
||||
## Commits
|
||||
|
||||
InfusOnWoW (3):
|
||||
|
||||
- BT2 Fix Multi by adjusting it to recent changes (#2139)
|
||||
- Clean up match data if a unit ceases to exists
|
||||
- Fix nameplates auras sometimes not being applied if in a raid group
|
||||
|
||||
@@ -896,13 +896,6 @@ function Private.ScanEvents(event, arg1, arg2, ...)
|
||||
return;
|
||||
end
|
||||
Private.ScanEventsInternal(event_list, event, arg1, arg2, ...);
|
||||
|
||||
elseif (event == "COMBAT_LOG_EVENT_UNFILTERED_CUSTOM") then
|
||||
-- This reverts the COMBAT_LOG_EVENT_UNFILTERED_CUSTOM workaround so that custom triggers that check the event argument will work as expected
|
||||
if(event == "COMBAT_LOG_EVENT_UNFILTERED_CUSTOM") then
|
||||
event = "COMBAT_LOG_EVENT_UNFILTERED";
|
||||
end
|
||||
Private.ScanEventsInternal(event_list, event, arg1, arg2, ...);
|
||||
else
|
||||
Private.ScanEventsInternal(event_list, event, arg1, arg2, ...);
|
||||
end
|
||||
@@ -1148,9 +1141,6 @@ function GenericTrigger.ScanWithFakeEvent(id, fake)
|
||||
end
|
||||
elseif (type(event.force_events) == "boolean" and event.force_events) then
|
||||
for i, eventName in pairs(event.events) do
|
||||
if eventName == "COMBAT_LOG_EVENT_UNFILTERED_CUSTOM" then
|
||||
eventName = "COMBAT_LOG_EVENT_UNFILTERED"
|
||||
end
|
||||
updateTriggerState = RunTriggerFunc(allStates, events[id][triggernum], id, triggernum, eventName) or updateTriggerState;
|
||||
end
|
||||
for unit, unitData in pairs(event.unit_events) do
|
||||
@@ -1179,9 +1169,6 @@ function HandleEvent(frame, event, arg1, arg2, ...)
|
||||
if not(WeakAuras.IsPaused()) then
|
||||
if(event == "COMBAT_LOG_EVENT_UNFILTERED") then
|
||||
Private.ScanEvents(event, arg1, arg2, ...);
|
||||
-- This triggers the scanning of "hacked" COMBAT_LOG_EVENT_UNFILTERED events that were renamed in order to circumvent
|
||||
-- the "proper" COMBAT_LOG_EVENT_UNFILTERED checks
|
||||
Private.ScanEvents("COMBAT_LOG_EVENT_UNFILTERED_CUSTOM", arg1, arg2, ...);
|
||||
else
|
||||
Private.ScanEvents(event, arg1, arg2, ...);
|
||||
end
|
||||
@@ -1429,18 +1416,10 @@ function GenericTrigger.LoadDisplays(toLoad, loadEvent, ...)
|
||||
for triggernum, data in pairs(events[id]) do
|
||||
if data.events then
|
||||
for index, event in pairs(data.events) do
|
||||
if (event == "COMBAT_LOG_EVENT_UNFILTERED_CUSTOM") then
|
||||
if not genericTriggerRegisteredEvents["COMBAT_LOG_EVENT_UNFILTERED"] then
|
||||
eventsToRegister["COMBAT_LOG_EVENT_UNFILTERED"] = true;
|
||||
end
|
||||
elseif (event == "FRAME_UPDATE") then
|
||||
if (event == "FRAME_UPDATE") then
|
||||
register_for_frame_updates = true;
|
||||
else
|
||||
if (genericTriggerRegisteredEvents[event]) then
|
||||
-- Already registered event
|
||||
else
|
||||
eventsToRegister[event] = true;
|
||||
end
|
||||
elseif not genericTriggerRegisteredEvents[event] then
|
||||
eventsToRegister[event] = true;
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1818,12 +1797,7 @@ function GenericTrigger.Add(data, region)
|
||||
if isCLEU then
|
||||
if hasParam then
|
||||
tinsert(trigger_events, "COMBAT_LOG_EVENT_UNFILTERED")
|
||||
else
|
||||
-- This is a dirty, lazy, dirty hack. "Proper" COMBAT_LOG_EVENT_UNFILTERED events are indexed by their sub-event types (e.g. SPELL_PERIODIC_DAMAGE),
|
||||
-- but custom COMBAT_LOG_EVENT_UNFILTERED events are not guaranteed to have sub-event types. Thus, if the user specifies that they want to use
|
||||
-- COMBAT_LOG_EVENT_UNFILTERED, this hack renames the event to COMBAT_LOG_EVENT_UNFILTERED_CUSTOM to circumvent the COMBAT_LOG_EVENT_UNFILTERED checks
|
||||
-- that are already in place. Replacing all those checks would be a pain in the ass.
|
||||
tinsert(trigger_events, "COMBAT_LOG_EVENT_UNFILTERED_CUSTOM")
|
||||
-- We don't register CLEU events without parameters anymore
|
||||
end
|
||||
elseif isUnitEvent then
|
||||
-- not added to trigger_events
|
||||
@@ -1884,7 +1858,7 @@ function GenericTrigger.Add(data, region)
|
||||
|
||||
if warnAboutCLEUEvents then
|
||||
Private.AuraWarnings.UpdateWarning(data.uid, "spammy_event_warning", "error",
|
||||
L["COMBAT_LOG_EVENT_UNFILTERED with no filter can trigger frame drops in raid environment. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Deprecated-CLEU"])
|
||||
L["|cFFFF0000Support for unfiltered COMBAT_LOG_EVENT_UNFILTERED is deprecated|r\nCOMBAT_LOG_EVENT_UNFILTERED without a filter are disabled as it’s very performance costly.\nFind more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers#events"])
|
||||
else
|
||||
Private.AuraWarnings.UpdateWarning(data.uid, "spammy_event_warning")
|
||||
end
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2
|
||||
WeakAuras.doubleWidth = WeakAuras.normalWidth * 2
|
||||
|
||||
local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version")
|
||||
local versionString = "5.13.2"
|
||||
local buildTime = "20240701180000"
|
||||
local versionString = "5.19.0"
|
||||
local buildTime = "20250127040000"
|
||||
local isAwesomeEnabled = C_NamePlate and C_NamePlate.GetNamePlateForUnit or false
|
||||
|
||||
WeakAuras.versionString = versionStringFromToc
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
@@ -9,6 +9,7 @@ Creative Commons - Sampling Plus 1.0
|
||||
|
||||
Overview:
|
||||
|
||||
HeartbeatSingle - Creative Commons CC0 1.0 - original by: bart (https://opengameart.org/content/heartbeat-sounds), modified by: Jieiku (https://github.com/Jieiku)
|
||||
BatmanPunch - Sampling Plus 1.0 - CGEffex (http://www.freesound.org/people/CGEffex/)
|
||||
BikeHorn - Sampling Plus 1.0 - StickInTheMud
|
||||
BoxingArenaSound - Attribution 3.0 - Samantha Enrico
|
||||
@@ -31,4 +32,4 @@ Shotgun - Attribution 3.0 - Mike Koenig
|
||||
SquishFart - Sampling Plus 1.0 - timtube
|
||||
TempleBellHuge - Attribution 3.0 - Mike Koenig
|
||||
Torch - Attribution 3.0 - Mike Koenig
|
||||
WarningSiren - Attribution 3.0 - snottyboy
|
||||
WarningSiren - Attribution 3.0 - snottyboy
|
||||
|
||||
Binary file not shown.
@@ -1751,6 +1751,42 @@ function Private.Modernize(data, oldSnapshot)
|
||||
end
|
||||
end
|
||||
|
||||
if data.internalVersion < 81 then
|
||||
-- Rename 'progressSources' to 'progressSource' for Linear/CircularProgressTexture/StopMotion sub elements
|
||||
local conversions = {
|
||||
sublineartexture = {
|
||||
progressSources = "progressSource",
|
||||
},
|
||||
subcirculartexture = {
|
||||
progressSources = "progressSource",
|
||||
},
|
||||
substopmotion = {
|
||||
progressSources = "progressSource",
|
||||
}
|
||||
}
|
||||
if data.subRegions then
|
||||
for index, subRegionData in ipairs(data.subRegions) do
|
||||
if conversions[subRegionData.type] then
|
||||
for oldKey, newKey in pairs(conversions[subRegionData.type]) do
|
||||
subRegionData[newKey] = subRegionData[oldKey]
|
||||
subRegionData[oldKey] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if data.internalVersion < 82 then
|
||||
-- noMerge for separator custom option doesn't make sense,
|
||||
-- and groups achieve the desired effect better,
|
||||
-- so drop the feature
|
||||
for _, optionData in ipairs(data.authorOptions) do
|
||||
if optionData.type == "header" then
|
||||
optionData.noMerge = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
data.internalVersion = max(data.internalVersion or 0, WeakAuras.InternalVersion())
|
||||
end
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ local UnitClass = UnitClass
|
||||
local GetSpellInfo, GetItemInfo, GetItemCount, GetItemIcon = GetSpellInfo, GetItemInfo, GetItemCount, GetItemIcon
|
||||
local GetShapeshiftFormInfo, GetShapeshiftForm = GetShapeshiftFormInfo, GetShapeshiftForm
|
||||
local UnitDetailedThreatSituation = UnitDetailedThreatSituation
|
||||
local MONEY = MONEY
|
||||
|
||||
local WeakAuras = WeakAuras
|
||||
local L = WeakAuras.L
|
||||
@@ -5362,6 +5363,32 @@ Private.event_prototypes = {
|
||||
store = true,
|
||||
conditionType = "string",
|
||||
},
|
||||
{
|
||||
-- flags
|
||||
},
|
||||
{
|
||||
-- zone Channel id
|
||||
},
|
||||
{
|
||||
-- channel index
|
||||
},
|
||||
{
|
||||
-- channel base name
|
||||
},
|
||||
{
|
||||
-- language id
|
||||
},
|
||||
{
|
||||
-- line id
|
||||
},
|
||||
{
|
||||
name = "sourceGUID",
|
||||
display = L["Source GUID"],
|
||||
init = "arg",
|
||||
store = true,
|
||||
hidden = true,
|
||||
test = "true",
|
||||
},
|
||||
{
|
||||
name = "cloneId",
|
||||
display = L["Clone per Event"],
|
||||
@@ -7530,6 +7557,75 @@ Private.event_prototypes = {
|
||||
automaticrequired = true,
|
||||
progressType = "none"
|
||||
},
|
||||
["Money"] = {
|
||||
type = "unit",
|
||||
statesParameter = "one",
|
||||
progressType = "none",
|
||||
automaticrequired = true,
|
||||
events = {
|
||||
["events"] = {"PLAYER_MONEY"}
|
||||
},
|
||||
internal_events = {"WA_DELAYED_PLAYER_ENTERING_WORLD"},
|
||||
force_events = "WA_DELAYED_PLAYER_ENTERING_WORLD",
|
||||
name = WeakAuras.newFeatureString..L["Player Money"],
|
||||
init = function()
|
||||
return [=[
|
||||
local money = GetMoney()
|
||||
local gold = floor(money / 1e4)
|
||||
local silver = floor(money / 100 % 100)
|
||||
local copper = money % 100
|
||||
|
||||
local icon = "interface/moneyframe/ui-goldicon"
|
||||
]=]
|
||||
end,
|
||||
args = {
|
||||
{
|
||||
name = "money",
|
||||
init = "money",
|
||||
type = "number",
|
||||
display = L["Money"],
|
||||
store = true,
|
||||
hidden = true,
|
||||
test = "true",
|
||||
},
|
||||
{
|
||||
name = "gold",
|
||||
init = "gold",
|
||||
type = "number",
|
||||
display = Private.coin_icons.gold .. L["Gold"],
|
||||
store = true,
|
||||
conditionType = "number",
|
||||
},
|
||||
{
|
||||
name = "silver",
|
||||
init = "silver",
|
||||
type = "number",
|
||||
display = Private.coin_icons.silver .. L["Silver"],
|
||||
store = true,
|
||||
hidden = true,
|
||||
test = "true",
|
||||
},
|
||||
{
|
||||
name = "copper",
|
||||
init = "copper",
|
||||
type = "number",
|
||||
display = Private.coin_icons.copper .. L["Copper"],
|
||||
store = true,
|
||||
hidden = true,
|
||||
test = "true",
|
||||
},
|
||||
{
|
||||
name = "icon",
|
||||
init = "icon",
|
||||
store = true,
|
||||
hidden = true,
|
||||
test = "true",
|
||||
},
|
||||
},
|
||||
GetNameAndIcon = function(trigger)
|
||||
return MONEY, "interface/moneyframe/ui-goldicon"
|
||||
end,
|
||||
},
|
||||
--[[ Some day i will finish this, soonTM
|
||||
["Currency"] = {
|
||||
type = "unit",
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
if not WeakAuras.IsLibsOK() then return end
|
||||
|
||||
local AddonName, Private = ...
|
||||
|
||||
local L = WeakAuras.L
|
||||
|
||||
local default = {
|
||||
width = 200,
|
||||
height = 200,
|
||||
selfPoint = "CENTER",
|
||||
anchorPoint = "CENTER",
|
||||
anchorFrameType = "SCREEN",
|
||||
xOffset = 0,
|
||||
yOffset = 0,
|
||||
frameStrata = 1
|
||||
}
|
||||
|
||||
Private.regionPrototype.AddAlphaToDefault(default)
|
||||
|
||||
local properties = {
|
||||
}
|
||||
|
||||
|
||||
Private.regionPrototype.AddProperties(properties, default);
|
||||
|
||||
local function create(parent)
|
||||
local region = CreateFrame("Frame", nil, UIParent)
|
||||
region.regionType = "empty"
|
||||
region:SetMovable(true)
|
||||
region:SetResizable(true)
|
||||
region:SetMinResize(1, 1)
|
||||
|
||||
region.Update = function() end
|
||||
|
||||
Private.regionPrototype.create(region)
|
||||
return region
|
||||
end
|
||||
|
||||
local function modify(parent, region, data)
|
||||
Private.regionPrototype.modify(parent, region, data)
|
||||
region:SetWidth(data.width)
|
||||
region:SetHeight(data.height)
|
||||
region.width = data.width
|
||||
region.height = data.height
|
||||
region.scalex = 1
|
||||
region.scaley = 1
|
||||
Private.regionPrototype.modifyFinish(parent, region, data)
|
||||
end
|
||||
|
||||
Private.RegisterRegionType("empty", create, modify, default, properties)
|
||||
@@ -713,20 +713,7 @@ function Private.regionPrototype.create(region)
|
||||
region:SetPoint("CENTER", UIParent, "CENTER")
|
||||
end
|
||||
|
||||
function Private.regionPrototype.modify(parent, region, data)
|
||||
region.state = nil
|
||||
region.states = nil
|
||||
region.subRegionEvents:ClearSubscribers()
|
||||
region.subRegionEvents:ClearCallbacks()
|
||||
Private.FrameTick:RemoveSubscriber("Tick", region)
|
||||
|
||||
local defaultsForRegion = Private.regionTypes[data.regionType] and Private.regionTypes[data.regionType].default;
|
||||
|
||||
if region.SetRegionAlpha then
|
||||
region:SetRegionAlpha(data.alpha)
|
||||
end
|
||||
|
||||
local hasProgressSource = defaultsForRegion and defaultsForRegion.progressSource
|
||||
function Private.regionPrototype.AddMinMaxProgressSource(hasProgressSource, region, parentData, data)
|
||||
local hasAdjustedMin = hasProgressSource and data.useAdjustededMin and data.adjustedMin
|
||||
local hasAdjustedMax = hasProgressSource and data.useAdjustededMax and data.adjustedMax
|
||||
|
||||
@@ -737,7 +724,7 @@ function Private.regionPrototype.modify(parent, region, data)
|
||||
region.adjustedMaxRelPercent = nil
|
||||
|
||||
if hasProgressSource then
|
||||
region.progressSource = Private.AddProgressSourceMetaData(data, data.progressSource)
|
||||
region.progressSource = Private.AddProgressSourceMetaData(parentData, data.progressSource)
|
||||
end
|
||||
|
||||
if (hasAdjustedMin) then
|
||||
@@ -756,6 +743,19 @@ function Private.regionPrototype.modify(parent, region, data)
|
||||
region.adjustedMax = tonumber(data.adjustedMax)
|
||||
end
|
||||
end
|
||||
end
|
||||
function Private.regionPrototype.modify(parent, region, data)
|
||||
region.state = nil
|
||||
region.states = nil
|
||||
region.subRegionEvents:ClearSubscribers()
|
||||
region.subRegionEvents:ClearCallbacks()
|
||||
Private.FrameTick:RemoveSubscriber("Tick", region)
|
||||
local defaultsForRegion = Private.regionTypes[data.regionType] and Private.regionTypes[data.regionType].default;
|
||||
if region.SetRegionAlpha then
|
||||
region:SetRegionAlpha(data.alpha)
|
||||
end
|
||||
local hasProgressSource = defaultsForRegion and defaultsForRegion.progressSource
|
||||
Private.regionPrototype.AddMinMaxProgressSource(hasProgressSource, region, data, data)
|
||||
|
||||
region:SetOffset(data.xOffset or 0, data.yOffset or 0);
|
||||
region:SetOffsetRelative(0, 0)
|
||||
|
||||
@@ -150,6 +150,10 @@ local function modify(parent, region, data)
|
||||
self:UpdateProgress()
|
||||
end
|
||||
|
||||
function region:SetTexture(texture)
|
||||
self.texture:SetTexture(texture)
|
||||
end
|
||||
|
||||
region.texture:SetTexture(data.texture)
|
||||
|
||||
function region:Color(r, g, b, a)
|
||||
|
||||
@@ -83,9 +83,10 @@ end
|
||||
|
||||
local function supports(regionType)
|
||||
return regionType == "texture"
|
||||
or regionType == "progresstexture"
|
||||
or regionType == "icon"
|
||||
or regionType == "aurabar"
|
||||
or regionType == "progresstexture"
|
||||
or regionType == "icon"
|
||||
or regionType == "aurabar"
|
||||
or regionType == "empty"
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subborder", L["Border"], supports, create, modify, onAcquire, onRelease, default, nil, properties);
|
||||
|
||||
@@ -384,7 +384,8 @@ local supportedRegion = {
|
||||
icon = true,
|
||||
aurabar = true,
|
||||
texture = true,
|
||||
progresstexture = true
|
||||
progresstexture = true,
|
||||
empty = true,
|
||||
}
|
||||
local function supports(regionType)
|
||||
return supportedRegion[regionType]
|
||||
|
||||
@@ -221,6 +221,7 @@ local function supports(regionType)
|
||||
or regionType == "icon"
|
||||
or regionType == "aurabar"
|
||||
or regionType == "text"
|
||||
or regionType == "empty"
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("submodel", L["Model"], supports, create, modify, onAcquire, onRelease, default, nil, properties);
|
||||
|
||||
@@ -34,7 +34,7 @@ local default = function(parentType)
|
||||
height = 32,
|
||||
scale = 1,
|
||||
|
||||
progressSources = {-2, ""},
|
||||
progressSource = {-2, ""},
|
||||
}
|
||||
|
||||
if IsAddOnLoaded("WeakAurasStopMotion") then
|
||||
@@ -153,7 +153,7 @@ local ProgressFuncs = {
|
||||
end
|
||||
end,
|
||||
Update = function(self, state, states)
|
||||
Private.UpdateProgressFrom(self.progressData, self.progressSource, {}, state, states, self.parent)
|
||||
Private.UpdateProgressFrom(self.progressData, self.progressSource, self, state, states, self.parent)
|
||||
self:UpdateFrame()
|
||||
self:UpdateFrameTick()
|
||||
end,
|
||||
@@ -243,7 +243,9 @@ local function modify(parent, region, parentData, data, first)
|
||||
customFrameHeight = data.customFrameHeight,
|
||||
})
|
||||
|
||||
region.progressSource = Private.AddProgressSourceMetaData(parentData, data.progressSources or {-2, ""})
|
||||
region.stopMotion:SetColor(unpack(data.stopmotionColor))
|
||||
|
||||
Private.regionPrototype.AddMinMaxProgressSource(true, region, parentData, data)
|
||||
|
||||
region.FrameTick = nil
|
||||
if data.animationType == "loop" or data.animationType == "bounce" or data.animationType == "once" then
|
||||
@@ -272,6 +274,7 @@ local function supports(regionType)
|
||||
or regionType == "icon"
|
||||
or regionType == "aurabar"
|
||||
or regionType == "text"
|
||||
or regionType == "empty"
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("substopmotion", L["Stop Motion"], supports, create, modify, onAcquire, onRelease, default, nil, properties)
|
||||
|
||||
@@ -486,6 +486,7 @@ local function supports(regionType)
|
||||
or regionType == "progresstexture"
|
||||
or regionType == "icon"
|
||||
or regionType == "aurabar"
|
||||
or regionType == "empty"
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subtext", L["Text"], supports, create, modify, onAcquire, onRelease,
|
||||
|
||||
@@ -66,10 +66,6 @@ local properties = {
|
||||
bigStep = 1,
|
||||
default = 0
|
||||
}
|
||||
|
||||
-- TODO width?
|
||||
-- TODO height?
|
||||
--
|
||||
}
|
||||
|
||||
local funcs = {
|
||||
@@ -156,6 +152,7 @@ local function supports(regionType)
|
||||
or regionType == "icon"
|
||||
or regionType == "aurabar"
|
||||
or regionType == "text"
|
||||
or regionType == "empty"
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subtexture", L["Texture"], supports, create, modify, onAcquire, onRelease, default, nil, properties)
|
||||
|
||||
+77
-2
@@ -101,6 +101,9 @@ Private.big_number_types = {
|
||||
["AbbreviateLargeNumbers"] = L["AbbreviateLargeNumbers (Blizzard)"]
|
||||
}
|
||||
|
||||
Private.big_number_types_with_disable = CopyTable(Private.big_number_types)
|
||||
Private.big_number_types_with_disable["disable"] = L["Disabled"]
|
||||
|
||||
Private.round_types = {
|
||||
floor = L["Floor"],
|
||||
ceil = L["Ceil"],
|
||||
@@ -282,6 +285,58 @@ Private.format_types = {
|
||||
end
|
||||
},
|
||||
--[[
|
||||
Money = {
|
||||
display = L["Money"],
|
||||
AddOptions = function(symbol, hidden, addOption)
|
||||
addOption(symbol .. "_money_format", {
|
||||
type = "select",
|
||||
name = L["Format Gold"],
|
||||
width = WeakAuras.normalWidth,
|
||||
values = Private.big_number_types_with_disable,
|
||||
hidden = hidden
|
||||
})
|
||||
addOption(symbol .. "_money_precision", {
|
||||
type = "select",
|
||||
name = L["Coin Precision"],
|
||||
width = WeakAuras.normalWidth,
|
||||
values = Private.money_precision_types,
|
||||
hidden = hidden
|
||||
})
|
||||
end,
|
||||
CreateFormatter = function(symbol, get)
|
||||
local format = get(symbol .. "_money_format", "AbbreviateNumbers")
|
||||
local precision = get(symbol .. "_money_precision", 3)
|
||||
|
||||
return function(value)
|
||||
local gold = floor(value / 1e4)
|
||||
local silver = floor(value / 100 % 100)
|
||||
local copper = value % 100
|
||||
|
||||
if (format == "AbbreviateNumbers") then
|
||||
gold = simpleFormatters.AbbreviateNumbers(gold)
|
||||
elseif (format == "BreakUpLargeNumbers") then
|
||||
gold = simpleFormatters.BreakUpLargeNumbers(gold)
|
||||
elseif (format == "AbbreviateLargeNumbers") then
|
||||
gold = simpleFormatters.AbbreviateLargeNumbers(gold)
|
||||
end
|
||||
|
||||
local formatCode
|
||||
if precision == 1 then
|
||||
formatCode = "%s%s"
|
||||
elseif precision == 2 then
|
||||
formatCode = "%s%s %d%s"
|
||||
else
|
||||
formatCode = "%s%s %d%s %d%s"
|
||||
end
|
||||
|
||||
return string.format(formatCode,
|
||||
tostring(gold), Private.coin_icons.gold,
|
||||
silver, Private.coin_icons.silver,
|
||||
copper, Private.coin_icons.copper
|
||||
)
|
||||
end
|
||||
end
|
||||
},
|
||||
BigNumber = {
|
||||
display = L["Big Number"],
|
||||
AddOptions = function(symbol, hidden, addOption)
|
||||
@@ -1170,6 +1225,24 @@ for id, str in pairs(Private.combatlog_spell_school_types) do
|
||||
Private.combatlog_spell_school_types_for_ui[id] = ("%.3d - %s"):format(id, str)
|
||||
end
|
||||
|
||||
Private.money_icons = {
|
||||
["gold"] = "interface/moneyframe/ui-goldicon",
|
||||
["silver"] = "interface/moneyframe/ui-silvericon",
|
||||
["copper"] = "interface/moneyframe/ui-coppericon"
|
||||
}
|
||||
|
||||
Private.coin_icons = {
|
||||
["gold"] = "|Tinterface/moneyframe/ui-goldicon:0|t",
|
||||
["silver"] = "|Tinterface/moneyframe/ui-silvericon:0|t",
|
||||
["copper"] = "|Tinterface/moneyframe/ui-coppericon:0|t"
|
||||
}
|
||||
|
||||
Private.money_precision_types = {
|
||||
[1] = "123 " .. Private.coin_icons.gold,
|
||||
[2] = "123 " .. Private.coin_icons.gold .. " 45 " .. Private.coin_icons.silver,
|
||||
[3] = "123 " .. Private.coin_icons.gold .. " 45 " .. Private.coin_icons.silver .. " 67 " .. Private.coin_icons.copper
|
||||
}
|
||||
|
||||
Private.item_quality_types = {
|
||||
[0] = ITEM_QUALITY0_DESC,
|
||||
[1] = ITEM_QUALITY1_DESC,
|
||||
@@ -2222,6 +2295,7 @@ Private.cast_types = {
|
||||
}
|
||||
|
||||
-- register sounds
|
||||
LSM:Register("sound", "Heartbeat Single", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\HeartbeatSingle.ogg")
|
||||
LSM:Register("sound", "Batman Punch", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\BatmanPunch.ogg")
|
||||
LSM:Register("sound", "Bike Horn", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\BikeHorn.ogg")
|
||||
LSM:Register("sound", "Boxing Arena Gong", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\BoxingArenaSound.ogg")
|
||||
@@ -2441,7 +2515,9 @@ Private.bufftrigger_2_progress_behavior_types = {
|
||||
|
||||
Private.bufftrigger_2_preferred_match_types = {
|
||||
showLowest = L["Least remaining time"],
|
||||
showHighest = L["Most remaining time"]
|
||||
showHighest = L["Most remaining time"],
|
||||
showLowestSpellId = L["Lowest Spell Id"],
|
||||
showHighestSpellId = L["Highest Spell Id"],
|
||||
}
|
||||
|
||||
Private.bufftrigger_2_per_unit_mode = {
|
||||
@@ -2800,7 +2876,6 @@ Private.author_option_fields = {
|
||||
header = {
|
||||
useName = false,
|
||||
text = "",
|
||||
noMerge = false
|
||||
},
|
||||
group = {
|
||||
groupType = "simple",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local AddonName, Private = ...
|
||||
|
||||
local internalVersion = 80
|
||||
local internalVersion = 82
|
||||
|
||||
-- Lua APIs
|
||||
local insert = table.insert
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## Interface: 30300
|
||||
## Title: WeakAuras
|
||||
## Author: The WeakAuras Team
|
||||
## Version: 5.13.2
|
||||
## Version: 5.19.0
|
||||
## Notes: A powerful, comprehensive utility for displaying graphics and information based on buffs, debuffs, and other triggers.
|
||||
## Notes-esES: Potente y completa aplicación que te permitirá mostrar por pantalla múltiples diseños, basados en beneficios, perjuicios y otros activadores.
|
||||
## Notes-deDE: Ein leistungsfähiges, umfassendes Addon zur grafischen Darstellung von Informationen von Auren, Cooldowns, Timern und vielem mehr.
|
||||
@@ -55,6 +55,7 @@ SubscribableObject.lua
|
||||
# Region support
|
||||
RegionTypes\SmoothStatusBarMixin.lua
|
||||
RegionTypes\RegionPrototype.lua
|
||||
RegionTypes\Empty.lua
|
||||
RegionTypes\ProgressTexture.lua
|
||||
BaseRegions\Texture.lua
|
||||
RegionTypes\Texture.lua
|
||||
|
||||
Reference in New Issue
Block a user