Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions addons/widescan/packet_handler.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--[[
Copyright 2026, Nifim
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
]]

local handlers = {}
local packet_handlers = {}

local packets = require('packets')

packet_handlers.__index = function(_, k)
return packet_handlers[k]
end

function packet_handlers:register(id, func)
self[id] = self[id] or {}
table.insert(self[id], func)
end

local handle_incoming_chunk = function(id, data, modified, injected)
if not injected then
for _, func in ipairs(handlers[id] or {}) do
local parsed = packets.parse('incoming', data)
func(parsed)
end
end
end
windower.register_event('incoming chunk', handle_incoming_chunk)

return setmetatable(handlers, packet_handlers)
143 changes: 143 additions & 0 deletions addons/widescan/placeholder_lists.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
--[[
Copyright 2026, Nifim
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
]]

return {
[25] = {
["okyupete"] = {[0xE7] = true, [0xDF] = true},
},
[145] = {
["vuu puqu the beguiler"] = {[0x1BA] = true, [0x1B9] = true},
["hoo mjuu the torrent"] = {[0x17B] = true, [0x179] = true},
},
[11] = {
["bugbear strongman"] = {[0x97] = true, [0x9B] = true, [0x95] = true, [0x9A] = true},
},
[109] = {
["bloodpool vorax"] = {[0x153] = true, [0x14E] = true},
["jolly green"] = {[0xD1] = true, [0xD0] = true},
["ni'zho bladebender"] = {[0x75] = true, [0x3C] = true, [0x6D] = true},
},
[103] = {
["golden bat"] = {[0x1CC] = true, [0x1CA] = true},
["valkurm emperor"] = {[0x14E] = true, [0x14A] = true},
},
[126] = {
["slippery sucker"] ={[0x4D] = true, [0x40] = true, [0x41] = true, [0x42] = true, [0x44] = true},
},
[176] = {
["seww the squidlimbed"] = {[0xBD] = true, [0xBA] = true},
["namtar"] = {[0x48] = true, [0x42] = true, [0x47] = true},
},
[88] = {
["ankabut"] = {[0x29] = true, [0x25] = true},
},
[192] = {
["slendlix spindlethumb"] = {[0x89] = true, [0x87] = true, [0x6E] = true},
["nocuous weapon"] = {[0x99] = true, [0x95] = true, [0x97] = true},
},
[117] = {
["herbage hunter"] = {[0x152] = true, [0x183] = true},
["serpopard ishtar"] = {[0x73] = true, [0xF2] = true, [0xEE] = true, [0x70] = true},
},
[111] = {
["kirata"] = {[0xAC] = true, [0xAB] = true},
["gargantua"] = {[0xCF] = true, [0xCE] = true},
},
[4] = {
["intulo"] = {[0x8E] = true, [0x8D] = true},
["serra"] = {[0x2D] = true, [0x2E] = true},
},
[95] = {
["ramponneau"] = {[0x171] = true, [0x16D] = true},
},
[121] = {
["keeper of halidom"] = {[0x92] = true, [0x91] = true},
},
[104] = {
["panzer percival"] = {[0x181] = true, [0x1BA] = true, [0x17D] = true, [0x1B5] = true},
},
[147] = {
["ge'dha evileye"] = {[0x165] = true, [0x7A] = true, [0x77] = true},
["zo'khu blackcloud"] = {[0xEC] = true, [0xEA] = true},
},
[120] = {
["bashe"] = {[0x34] = true, [0x2E] = true},
["deadly dodo"] = {[0x73] = true, [0x71] = true, [0x72] = true},
},
[105] = {
["tottering toby"] = {[0xB4] = true, [0x99] = true},
},
[110] = {
["drooling daisy"] = {[0x1CC] = true, [0x1CB] = true},
["black triple stars"] = {[0xD8] = true, [0xC4] = true, [0xC0] = true, [0xD4] = true},
},
[24] = {
["megalobugard"] = {[0xDD] = true, [0xBF] = true, [0xC8] = true, [0xDB] = true},
},
[96] = {
["ratatoskr"] = {[0x2B] = true, [0x28] = true},
},
[118] = {
["buburimboo"] = {[0x1CB] = true, [0x1CA] = true},
["helldiver"] = {[0x16B] = true, [0x16A] = true},
},
[84] = {
["la velue"] = {[0x128] = true, [0x112] = true},
},
[200] = {
["hovering hotpot"] = {[0xD4] = true, [0xD2] = true, [0xD0] = true},
},
[143] = {
["zi'ghi boneeater"] = {[0x108] = true, [0x105] = true},
["be'hya hundredwall"] = {[0x13A] = true, [0x138] = true, [0x139] = true},
},
[102] = {
["lumbering lambert"] = {[0x135] = true, [0x134] = true},
["tumbling truffle"] = {[0xFB] = true, [0xF8] = true},
},
[2] = {
["orctrap"] = {[0x10C] = true, [0x10B] = true},
},
[119] = {
["daggerclaw dracos"] = {[0xB2] = true, [0xAF] = true},
},
[194] = {
["ah puch"] = {[0x3F] = true, [0x38] = true, [0x3C] = true},
["desmodont"] = {[0x1E] = true, [0x1C] = true},
},
[193] = {
["donggu"] = {[0x39] = true, [0x35] = true},
},
[108] = {
["stray mary"] = {[0xD3] = true, [0x15D] = true, [0x158] = true, [0xCF] = true},
},
[149] = {
["hawkeyed dnatbat"] = {[0x2F] = true, [0x28] = true, [0x2B] = true},
},
[114] = {
["dune widow"] = {[0xEC] = true, [0xEB] = true},
},
[191] = {
["teporingo"] = {[0x20] = true, [0x1F] = true},
},
[166] = {
["hyakume"] = {[0x54] = true, [0x4D] = true},
},
[198] = {
["trembler tabitha"] = {[0x36] = true, [0x34] = true},
},
[151] = {
["moo ouzi the swiftblade"] = {[0x68] = true, [0x65] = true},
},
}
Loading