From c133385b44500004baf024636a00bc67f329872e Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Thu, 16 Jan 2025 16:44:32 +0100 Subject: [PATCH] from retail --- WeakAuras/AuraEnvironment.lua | 4 ++++ WeakAuras/BuffTrigger2.lua | 5 ++++- WeakAuras/GenericTrigger.lua | 4 ++-- WeakAuras/Prototypes.lua | 19 +++++++++---------- WeakAuras/RegionTypes/DynamicGroup.lua | 21 +++++++++++++++------ WeakAuras/RegionTypes/Texture.lua | 1 + WeakAuras/WeakAuras.lua | 2 ++ 7 files changed, 37 insertions(+), 19 deletions(-) diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index e6eacd9..395515b 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -149,6 +149,9 @@ local blockedFunctions = { securecall = true, DeleteCursorItem = true, ChatEdit_SendText = true, + ChatEdit_ActivateChat = true, + ChatEdit_ParseText = true, + ChatEdit_OnEnterPressed = true, } local blockedTables = { @@ -156,6 +159,7 @@ local blockedTables = { SendMailMailButton = true, SendMailMoneyGold = true, MailFrameTab2 = true, + DEFAULT_CHAT_FRAME = true, ChatFrame1 = true, --WeakAurasSaved = true, WeakAurasOptions = true, diff --git a/WeakAuras/BuffTrigger2.lua b/WeakAuras/BuffTrigger2.lua index fa15030..a7ab98a 100644 --- a/WeakAuras/BuffTrigger2.lua +++ b/WeakAuras/BuffTrigger2.lua @@ -1791,8 +1791,11 @@ local function EventHandler(frame, event, arg1, arg2, ...) elseif event == "PARTY_MEMBERS_CHANGED" or event == "RAID_ROSTER_UPDATE" then for unit in GetAllUnits("group", true, "PlayersAndPets") do RecheckActiveForUnitType("group", unit, deactivatedTriggerInfos) - if not UnitExistsFixed(unit) then + local exists = UnitExistsFixed(unit) + if not exists then tinsert(unitsToRemove, unit) + elseif exists ~= existingUnits[unit] then + ScanGroupUnit(time, matchDataChanged, "group", unit) end end elseif event == "UNIT_FLAGS" or event == "UNIT_NAME_UPDATE" or event == "PLAYER_FLAGS_CHANGED" then diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 6b25ceb..3c51ebe 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -3069,7 +3069,7 @@ do local function dbmEventCallback(event, ...) if event == "DBM_TimerStart" then - local id, msg, duration, icon, timerType, spellId, dbmType = ... + local id, msg, duration, icon, timerType, spellId, dbmType, _, _, _, _, _, timerCount = ... local now = GetTime() local expirationTime = now + duration bars[id] = bars[id] or {} @@ -3080,7 +3080,7 @@ do bar.icon = icon bar.timerType = timerType bar.spellId = tostring(spellId) - bar.count = msg:match("%((%d+)%)") or msg:match("((%d+))") or "0" + bar.count = timerCount and tostring(timerCount) or "0" bar.dbmType = dbmType local barOptions = DBM.ReleaseRevision >= 20220412000000 and DBT.Options or DBM.Bars.options diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index b8aa9f4..119cf9d 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -7010,17 +7010,10 @@ Private.event_prototypes = { tinsert(events, "RAID_ROSTER_UPDATE") end - if trigger.use_instance_size ~= nil then - tinsert(events, "ZONE_CHANGED") - tinsert(events, "ZONE_CHANGED_INDOORS") - tinsert(events, "ZONE_CHANGED_NEW_AREA") - end - - if trigger.use_instance_difficulty ~= nil then + if trigger.use_instance_difficulty ~= nil + or trigger.use_instance_size ~= nil + then tinsert(events, "PLAYER_DIFFICULTY_CHANGED") - tinsert(events, "ZONE_CHANGED") - tinsert(events, "ZONE_CHANGED_INDOORS") - tinsert(events, "ZONE_CHANGED_NEW_AREA") end return { @@ -7038,6 +7031,12 @@ Private.event_prototypes = { tinsert(events, "PLAYER_MOVE_SPEED_UPDATE"); end + if trigger.use_instance_difficulty ~= nil + or trigger.use_instance_size ~= nil + then + tinsert(events, "WA_DELAYED_PLAYER_ENTERING_WORLD") + end + if (trigger.use_HasPet ~= nil) then AddUnitChangeInternalEvents("pet", events); end diff --git a/WeakAuras/RegionTypes/DynamicGroup.lua b/WeakAuras/RegionTypes/DynamicGroup.lua index 30aa547..7e591ff 100644 --- a/WeakAuras/RegionTypes/DynamicGroup.lua +++ b/WeakAuras/RegionTypes/DynamicGroup.lua @@ -1343,12 +1343,21 @@ local function modify(parent, region, data) local controlPoint = regionData.controlPoint controlPoint:ClearAnchorPoint() - controlPoint:SetAnchorPoint( - data.selfPoint, - frame == "" and self.relativeTo or frame, - data.anchorPoint, - x + data.xOffset, y + data.yOffset - ) + if frame == "" then + controlPoint:SetAnchorPoint( + data.selfPoint, + self, + data.selfPoint, + x, y + ) + else + controlPoint:SetAnchorPoint( + data.selfPoint, + frame, + data.anchorPoint, + x + data.xOffset, y + data.yOffset + ) + end if show and frame ~= WeakAuras.HiddenFrames then controlPoint:Show() else diff --git a/WeakAuras/RegionTypes/Texture.lua b/WeakAuras/RegionTypes/Texture.lua index e019666..d4ffd3b 100644 --- a/WeakAuras/RegionTypes/Texture.lua +++ b/WeakAuras/RegionTypes/Texture.lua @@ -94,6 +94,7 @@ local function modify(parent, region, data) --region.texture:SetRotation((data.rotation / 180) * math.pi); local function GetRotatedPoints(degrees) + degrees = degrees or 0 local angle = rad(135 - degrees); local vx = math.cos(angle); local vy = math.sin(angle); diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index e537f46..b1f6f7b 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -3046,6 +3046,8 @@ function Private.HandleChatAction(message_type, message, message_dest, message_d message_dest = Private.ReplacePlaceHolders(message_dest, region, customFunc, useHiddenStates, formatters); end if message_dest_isunit == true then + -- send to server like retail doesnt work here + -- message_dest = GetUnitName(message_dest, true) message_dest = UnitName(message_dest) end pcall(function() SendChatMessage(message, "WHISPER", nil, message_dest) end);