Browse Source

make filters reload when zoning.

pull/1/head
mgramolini 6 years ago
parent
commit
f250e247de
  1. 20
      filters.lua

20
filters.lua

@ -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 = 'NO FILTERS LOADED';
----------------------------------------------------------------------------------------------------
-- 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