Browse Source

Merge branch 'master' of Mattyg/filters into master

master
atom0s 6 years ago committed by Gogs
parent
commit
ed1092fa16
  1. 22
      filters.lua

22
filters.lua

@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
_addon.author = 'atom0s';
_addon.name = 'filters';
_addon.version = '3.0.0';
_addon.version = '3.0.1';
require 'common'
@ -37,6 +37,7 @@ filters.pointer = ashita.memory.findpattern('FFXiMain.dll', 0, 'C3C740040000 @@ -37,6 +37,7 @@ filters.pointer = ashita.memory.findpattern('FFXiMain.dll', 0, 'C3C740040000
filters.pointer2 = 0;
filters.offset = 0;
filters.current = nil;
filters.currentName = '(None)';
----------------------------------------------------------------------------------------------------
-- func: msg
@ -101,6 +102,7 @@ ashita.register_event('command', function(command, ntype) @@ -101,6 +102,7 @@ ashita.register_event('command', function(command, ntype)
-- Write the filters to memory..
local pointer = ashita.memory.read_uint32(filters.pointer2);
filters.current = f.filters;
filters.currentName = name;
-- Send the filter update packet..
local packet =
@ -177,6 +179,24 @@ ashita.register_event('incoming_packet', function(id, size, data) @@ -177,6 +179,24 @@ ashita.register_event('incoming_packet', function(id, size, data)
packet[0x15] = realpacket[0x15];
return packet;
-- Zone In packet
elseif (id == 0x000A) then
if (filters.current ~= nil and #filters.current > 0) then
-- Send the filter update packet..
local packet =
{
0xB4, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x40, 0x02, 0x00, 0x00, 0x00
};
-- Set the packet filter info..
for x = 1, #filters.current do
packet[4 + x] = filters.current[x];
end
AddIncomingPacket(0xB4, packet);
msg('Re-loaded filter set: ' .. filters.currentName);
end
end
return false;

Loading…
Cancel
Save