from retail

This commit is contained in:
NoM0Re
2025-02-11 20:18:57 +01:00
parent eee4c23026
commit f94aff6a9d
6 changed files with 95 additions and 28 deletions
+1 -2
View File
@@ -28,7 +28,6 @@ Private.DiscordList = {
[=[Ifor]=],
[=[Ipwnturkeys]=],
[=[Ironi]=],
[=[Jiberish]=],
[=[Jods]=],
[=[kanegasi]=],
[=[Koxy]=],
@@ -42,9 +41,9 @@ Private.DiscordList = {
[=[Mynze]=],
[=[Nona]=],
[=[NostraDumAzz]=],
[=[Ocelots]=],
[=[Oi]=],
[=[Ora]=],
[=[ParkSaeRoyi]=],
[=[phoenix7700]=],
[=[Pseiko]=],
[=[reggie]=],
+20 -1
View File
@@ -4032,7 +4032,22 @@ local commonConditions = {
name = {
display = L["Name"],
type = "string",
}
},
itemInRange = {
display = WeakAuras.newFeatureString .. L["Item in Range"],
hidden = true,
type = "bool",
test = function(state, needle)
if not state or not state.itemId or not state.show or not UnitExists('target') then
return false
end
if InCombatLockdown() and not UnitCanAttack('player', 'target') then
return false
end
return C_Item.IsItemInRange(state.itemId, 'target') == (needle == 1)
end,
events = { "PLAYER_TARGET_CHANGED", "WA_SPELL_RANGECHECK", }
},
}
function Private.ExpandCustomVariables(variables)
@@ -4108,6 +4123,10 @@ function GenericTrigger.GetTriggerConditions(data, triggernum)
result.name = commonConditions.name;
end
if prototype.hasItemID then
result.itemInRange = commonConditions.itemInRange
end
for _, v in pairs(prototype.args) do
if (v.conditionType and v.name and v.display) then
local enable = true;
+67 -20
View File
@@ -3854,6 +3854,16 @@ Private.event_prototypes = {
type = "item",
test = "true"
},
{
name = "itemId",
display = WeakAuras.newFeatureString .. L["ItemId"],
hidden = true,
init = "itemId",
test = "true",
store = true,
conditionType = "number",
operator_types = "only_equal",
},
{
name = "remaining",
display = L["Remaining Time"],
@@ -3910,26 +3920,6 @@ Private.event_prototypes = {
return state and state.show and (not state.gcdCooldown and state.expirationTime and state.expirationTime > GetTime() or state.enabled == 0) == (needle == 1)
end,
},
{
name = "itemInRange",
display = L["Item in Range"],
hidden = true,
test = "true",
conditionType = "bool",
conditionTest = function(state, needle)
if not state or not state.show or not UnitExists('target') then
return false
end
if InCombatLockdown() and not UnitCanAttack('player', 'target') then
return false
end
return IsItemInRange(state.itemname, 'target') == (needle == 1)
end,
conditionEvents = {
"PLAYER_TARGET_CHANGED",
"WA_SPELL_RANGECHECK",
}
},
{
hidden = true,
name = "gcdCooldown",
@@ -4064,6 +4054,16 @@ Private.event_prototypes = {
end,
statesParameter = "one",
args = {
{
name = "itemId",
display = WeakAuras.newFeatureString .. L["ItemId"],
hidden = true,
init = "item",
test = "true",
store = true,
conditionType = "number",
operator_types = "only_equal",
},
{
name = "itemSlot",
required = true,
@@ -4188,6 +4188,7 @@ Private.event_prototypes = {
}
},
automaticrequired = true,
hasItemID = true,
progressType = "timed"
},
["Cooldown Ready (Item)"] = {
@@ -4223,6 +4224,18 @@ Private.event_prototypes = {
type = "item",
init = "arg"
},
--[[
{
name = "itemId",
display = WeakAuras.newFeatureString .. L["ItemId"],
hidden = true,
init = "itemId",
test = "true",
store = true,
conditionType = "number",
operator_types = "only_equal",
},
]]
{
name = "name",
display = L["Name"],
@@ -4284,6 +4297,16 @@ Private.event_prototypes = {
values = "item_slot_types",
init = "arg"
},
{
name = "itemId",
display = WeakAuras.newFeatureString .. L["ItemId"],
hidden = true,
init = "item",
test = "true",
store = true,
conditionType = "number",
operator_types = "only_equal",
},
{
name = "name",
display = L["Name"],
@@ -5041,6 +5064,18 @@ Private.event_prototypes = {
test = "true",
conditionType = "string"
},
--[[
{
name = "itemId",
display = WeakAuras.newFeatureString .. L["ItemId"],
hidden = true,
init = "itemId",
test = "true",
store = true,
conditionType = "number",
operator_types = "only_equal",
},
]]
{
name = "includeBank",
display = L["Include Bank"],
@@ -5886,6 +5921,18 @@ Private.event_prototypes = {
test = "true",
showExactOption = true
},
--[[
{
name = "itemId",
display = WeakAuras.newFeatureString .. L["ItemId"],
hidden = true,
init = "itemId",
test = "true",
store = true,
conditionType = "number",
operator_types = "only_equal",
},
]]
{
name = "itemSlot",
display = WeakAuras.newFeatureString .. L["Item Slot"],
+5 -4
View File
@@ -89,7 +89,9 @@ local function modify(parent, region, data)
text:SetText("")
text:SetText(WeakAuras.ReplaceRaidMarkerSymbols(data.displayText));
end
text:SetJustifyH(data.justify);
text:SetText("")
text:ClearAllPoints();
text:SetPoint("CENTER", UIParent, "CENTER");
@@ -230,10 +232,9 @@ local function modify(parent, region, data)
local UpdateText
if self.displayText and Private.ContainsAnyPlaceHolders(self.displayText) then
UpdateText = function()
local textStr = self.displayText;
textStr = Private.ReplacePlaceHolders(textStr, self, nil, false, formatters);
if (textStr == nil or textStr == "") then
textStr = " ";
local textStr = Private.ReplacePlaceHolders(self.displayText, self, nil, false, formatters);
if textStr == "" then
textStr = " "
end
SetText(textStr)
+1 -1
View File
@@ -4668,7 +4668,7 @@ function Private.ReplacePlaceHolders(textStr, region, customFunc, useHiddenState
local regionState = region.state or {};
local regionStates = region.states or {};
if (not regionState and not regionValues) then
return;
return ""
end
local endPos = textStr:len();
if (endPos < 2) then
@@ -82,6 +82,7 @@ local function createOptions(parentData, data, index, subIndex)
width = WeakAuras.normalWidth,
name = L["Allow Full Rotation"],
order = 13,
-- hidden = data -- do we need this???
},
textureRotation = {
type = "range",