Skip to content
Merged
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
7 changes: 4 additions & 3 deletions addons/GearSwap/packet_parsing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ parse.i[0x037] = function (data)
end
end
end]]
-- Info provided by Akaden
vana_offset = os.time() - (((data:unpack("I",0x41)*60 + data:unpack("I",0x37)) % 0x100000000) / 60)

local indi_byte = data:byte(0x59)
if indi_byte%128/64 >= 1 then
Expand Down Expand Up @@ -457,7 +459,7 @@ parse.i[0x063] = function (data)
for i=1,32 do
local buff_id = data:unpack('H',i*2+7)
if buff_id ~= 255 and buff_id ~= 0 then -- 255 is used for "no buff"
local t = data:unpack('I',i*4+0x45)/60+572662306+1009810800
local t = data:unpack('I',i*4+0x45)/60 + vana_offset
newbuffs[i] = setmetatable({
name=res.buffs[buff_id].name,
buff=copy_entry(res.buffs[buff_id]),
Expand All @@ -475,7 +477,6 @@ parse.i[0x063] = function (data)
end
end
if seen_0x063_type9 then

-- Look for exact matches
for n,new in pairs(newbuffs) do
newbuffs[n].matched_exactly = nil
Expand Down Expand Up @@ -556,7 +557,7 @@ parse.i[0x063] = function (data)
end
end
end

table.reassign(_ExtraData.player.buff_details,newbuffs)
for i=1,32 do
player.buffs[i] = (newbuffs[i] and newbuffs[i].id) or nil
Expand Down
1 change: 1 addition & 0 deletions addons/GearSwap/statics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ slot_map.back = 15
gearswap_disabled = false
seen_0x063_type9 = false
delay_0x063_v9 = false
vana_offset = 572662306+1009810800
not_sent_out_equip = {}
command_registry = Command_Registry.new()
equip_list = {}
Expand Down