• 0

    posted a message on ChatFrame_OnHyperlinkShow taint
    DBM has been using custom chat links for a very long time and here is how we implemented it. This method shouldn't result in a taint.

    We use a normal SetHook call on the OnHyperlinkClick handler of all chat frames* where we handle our links. The whole link text (which gets lost in the call to SetHyperlink) is still available here:

       DEFAULT_CHAT_FRAME:HookScript("OnHyperlinkClick", function(self, link, string, button, ...)
            local linkType, arg1, arg2, arg3 = strsplit(":", link)
            if linkType ~= "DBM" then
                return
            end
            if arg1 == "cancel" then
                DBM.Bars:CancelBar(link:match("DBM:cancel:(.+):nil$")) -- timer name may contain colons...
    (handle other links...)


    Now we just have to prevent the default chat frame from doing something stupid (passing the link on to ItemRefTooltip:SetHyperlink())

    This is done with a simple hook there which is better for the taint issue:
        local old = ItemRefTooltip.SetHyperlink -- we have to hook this function since the default ChatFrame code assumes that all links except for player and channel links are valid arguments for this function
        function ItemRefTooltip:SetHyperlink(link, ...)
            if link:sub(0, 4) == "DBM:" then
                return
            end
            return old(self, link, ...)
        end


    *) yes, that means it might have issues with addons that replace the chat frames with something custom, like WIM or something. But our messages that contain links are posted to DEFAULT_CHAT_FRAME only anyways and not to actual chats. So this method might not be useable for everyone.

    I have honestly no idea why I wrote it that way back then (I wrote that code during the WotLK beta iirc). The more obvious and robust solution would probably to just hook SetHyperlink and embed all the required information in the link instead of relying on the text (which DBM doesn't anyways, so I wonder why I did it that way...).
    Posted in: Lua Code Discussion
  • 0

    posted a message on Deus Vox Encounters
    We now have all map sizes from the game files. Most of them are confirmed with Blink :)

    DBM:RegisterMapSize("VaultofArchavon", 1, 1398.255004883, 932.170013428) -- Vault of Archavon
    DBM:RegisterMapSize("TheObsidianSanctum", 0, 1162.4967, 775) -- The Obsidian Sanctum
    DBM:RegisterMapSize("IcecrownCitadel",
    	1, 1355.47009278, 903.647033691,	-- The Lower Citadel
    	2, 1067, 711.3336906438,			-- The Rampart of Skulls
    	3, 195.46997071, 130.315002441,		-- Deathbringer's Rise
    	4, 773.71008301, 515.81030273,		-- The Frost Queen's Lair
    	5, 1148.73999024, 765.82006836,		-- The Upper Reaches
    	6, 373.70996094, 249.12988281,		-- Royal Quarters
    	7, 293.26000977, 195.507019042,		-- The Frozen Throne
    	8, 247.92993165, 165.287994385		-- Frostmourne
    )
    DBM:RegisterMapSize("TheArgentColiseum",
    	1, 369.9861869814, 246.657989502,		-- The Argent Coliseum
    	2, 739.996017456, 493.33001709			-- The Icy Depths
    )
    DBM:RegisterMapSize("TheEyeofEternity", 1, 430.07006836, 286.713012695) -- The Eye of Eternity
    DBM:RegisterMapSize("CoTStratholme",
    	1, 1824.997, 1216.67,					-- Norndir Preperation
    	2, 1125.299987791, 750.19995117			-- Stratholme City
    )
    DBM:RegisterMapSize("PitofSaron", 0, 1533.333, 1022.917) -- Pit of Saron
    DBM:RegisterMapSize("Ulduar",
    	1, 3287.49987793, 2191.66662598,		-- The Grand Approach
    	2, 669.45098877, 446.30004883,			-- The Antechamber of Ulduar
    	3, 1328.460998535, 885.63989258,		-- The Inner Sanctum of Ulduar
    	4, 910.5, 607,							-- The Prison of Yogg-Saron
    	5, 1569.45996094, 1046.30004882,		-- The Spark of Imagination
    	6, 619.46899414, 412.97998047			-- The Mind's Eye
    )
    DBM:RegisterMapSize("Ahnkahet", 1, 972.417968747, 648.279022217) -- Ahn'Kahet
    DBM:RegisterMapSize("Gundrak", 1, 905.033050542, 603.35009766) -- Gundrak
    DBM:RegisterMapSize("UtgardeKeep",
    	1, 734.580993652, 489.7215003964,	-- Norndir Preperation
    	2, 481.081008911, 320.7202930448,	-- Dragonflayer Ascent
    	3, 736.581008911, 491.0545120241	-- Tyr's Terrace
    )
    DBM:RegisterMapSize("Naxxramas",
    	1, 1093.83007813, 729.2199707,		-- The Construct Quarter
    	2, 1093.83007813, 729.2199707,		-- The Arachnid Quarter
    	3, 1200, 800,						-- The Military Quarter
    	4, 1200.33007813, 800.2199707,		-- The Plague Quarter
    	5, 2069.80981445, 1379.87988281,	-- The Lower Necropolis
    	6, 655.9399414, 437.29003906		-- The Upper Necropolis
    )
    DBM:RegisterMapSize("HallsofLightning",
    	1, 566.235015869, 377.48999023,	-- Unyielding Garrison
    	2, 708.23701477, 472.160034177	-- Walk of the Makers
    )
    DBM:RegisterMapSize("DrakTharonKeep",
    	1, 619.93917093835, 413.29113734848,	-- The Vestibules of Drak'Tharon
    	2, 619.93877606243, 413.29435426682		-- Drak'Tharon Overlook
    )
    DBM:RegisterMapSize("Ulduar77", 1, 920.19794213868, 613.46401864487) -- Halls of Stone
    DBM:RegisterMapSize("TheForgeofSouls", 1, 1448.09985351, 965.40039062) -- The Forge of Souls
    DBM:RegisterMapSize("HallsofReflection", 1, 879.02001954, 586.01953124) -- Halls of Reflection
    DBM:RegisterMapSize("TheNexus", 1, 1101.280975342, 734.1874999997) -- The Nexus
    DBM:RegisterMapSize("AzjolNerub",
    	1, 752.973999023, 501.983001709,	-- The Brood Pit
    	2, 292.973999023, 195.31597900,		-- Hadronox's Lair
    	3, 367.5, 245						-- The Gilded Gate
    )
    DBM:RegisterMapSize("UtgardePinnacle",
    	1, 548.936019897, 365.957015991,	-- Lower Pinnacle
    	2, 756.17994308428, 504.119003295	-- Upper Pinnacle
    )
    DBM:RegisterMapSize("VioletHold", 1, 256.229003907, 170.82006836) -- The Violet Hold
    DBM:RegisterMapSize("Nexus80",
    	1, 514.706970217, 343.138977053,	-- Band of Variance
    	2, 664.706970217, 443.138977053,	-- Band of Acceleration
    	3, 514.706970217, 343.138977053,	-- Band of Transmutation
    	4, 294.700988772, 196.463989261	-- Band of Alignment
    )
    Posted in: Raid AddOns
  • 0

    posted a message on Deus Vox Encounters
    Quote from Kollektiv
    I'm absolutely sure I didn't move my camera at all. It happens a few times out of a dozen. I actually printed out the blink distance using 790,527 and it was 20 yds every time, but the measured dimensions weren't the same every time. I don't know how it's possible.

    That's why we did multiple measurements in all instances :)

    Quote from Kollektiv
    Something to do with GetPlayerFacing?

    Yes, probably. The mod also tries to update the facing when you look around after entering the slash command but this doesn't work at all. GetPlayerFacing() shows a really strange behaviour.

    Quote from Kollektiv
    How do you know the game files represent game yards of a map?

    It is just very very likely since these files contain the exact same values as our calculated values. What else should be in these files? Such an entry contains the instance ID, the dungeon level and the size.
    Posted in: Raid AddOns
  • 0

    posted a message on Deus Vox Encounters
    Quote from Kollektiv
    I blinked around with your map calc mod and it gave inconsistent results in Ironforge. Sometimes it would be (790, 527), the right dimensions, and other times it would be completely off.

    You must not change the direction you are looking at after executing the slash command (which shouldn't be necessary but there seems to be a bug). You should also not blink directly to the west/east/north/south as the precision of GetPlayerMapPosition() might cause problems there. I get consistent results on all zones.

    Also, I suppose the game files don't lie.
    Posted in: Raid AddOns
  • 0

    posted a message on Deus Vox Encounters
    Quote from Tandanu

    Quote from Kollektiv

    The way I did it was stand directly east/west of someone at 40 yards (painstakingly adjusted using blizzard's range checker) calculate the difference of our x coordinates, and then divide 40 by that result. The same was done in the y direction. I made the y difference on the order of 10^-6 when measuring the x direction and vice-versa. To verify it, I ran in a 40 yd radius circle going in and out of range of healing while spamming my distance function. Whenever I was barely in range it would show 39.9 yards, and 40.1 yards when I was out of range. It's experimental but the actual map coordinates shouldn't be off by much.

    Anyways, I just checked DBM's mod to calculate map sizes and it's totally inaccurate. The results of blinking northeast and blinking nortnortheast are completely different. It's funny how they copy-pasted my pretty much correct data, recalculate all of them with the wrong method, and think my data is wrong.

    Hello,

    I'm the author of DBM, this post has been brought to my attention as you claim that our map size data is "totally inaccurate". I just double-checked my calculations and they are all correct. You can find my calculations in this thread: http://www.deadlybossmods.com/phpbb3/viewtopic.php?f=3&t=2258&start=15

    Could you please explain why this should be wrong? These calculations gave us very accurate values that seem to be correct.

    However, your values seem to be about 5-10% off. This can be explained by the fact that you are are neither utilizing GetPlayerFacing() nor something with a known distance (like Blink). Just walking around will never give you as accurate values as our approach.


    However, feel free to use the map sizes from DBM in your addon.


    Update on this:

    We got the "real" data from the game files (thanks to MMOChampion). This data shows that our values were only 0.0005% percent off while your data is 5-10% wrong.

    You can find the exact values for all instances in our forum: http://www.deadlybossmods.com/phpbb3/viewtopic.php?f=3&t=2258&start=30

    I would still love to hear why our data should be "totally inaccurate" or calculated "with the wrong method" :)
    Posted in: Raid AddOns
  • 0

    posted a message on Deus Vox Encounters
    Quote from Kollektiv

    The way I did it was stand directly east/west of someone at 40 yards (painstakingly adjusted using blizzard's range checker) calculate the difference of our x coordinates, and then divide 40 by that result. The same was done in the y direction. I made the y difference on the order of 10^-6 when measuring the x direction and vice-versa. To verify it, I ran in a 40 yd radius circle going in and out of range of healing while spamming my distance function. Whenever I was barely in range it would show 39.9 yards, and 40.1 yards when I was out of range. It's experimental but the actual map coordinates shouldn't be off by much.

    Anyways, I just checked DBM's mod to calculate map sizes and it's totally inaccurate. The results of blinking northeast and blinking nortnortheast are completely different. It's funny how they copy-pasted my pretty much correct data, recalculate all of them with the wrong method, and think my data is wrong.


    Hello,

    I'm the author of DBM, this post has been brought to my attention as you claim that our map size data is "totally inaccurate". I just double-checked my calculations and they are all correct. You can find my calculations in this thread: http://www.deadlybossmods.com/phpbb3/viewtopic.php?f=3&t=2258&start=15

    Could you please explain why this should be wrong? These calculations gave us very accurate values that seem to be correct.

    However, your values seem to be about 5-10% off. This can be explained by the fact that you are are neither utilizing GetPlayerFacing() nor something with a known distance (like Blink). Just walking around will never give you as accurate values as our approach.


    However, feel free to use the map sizes from DBM in your addon.
    Posted in: Raid AddOns
  • To post a comment, please or register a new account.