Commit ae44b1e1 authored by Mike's avatar Mike

Fixed the missing bit in VP (Sheet Property can have alias) so seems to work now

parent 1ea465c3
......@@ -112,12 +112,12 @@ function m.parse(payloadSubtree, buffer, module_protocol)
local discreet_vpa_vpb_vpa = (buffer(math.floor(offset/8,1)):bitfield(offset%8,1) == 1)
offset = offset + 1
if discreet_vpa_vpb_vpa then
local discreet_name_string = (buffer(math.floor(offset/8,1)):bitfield(offset%8,1) == 1)
local discreet_name_string_id = (buffer(math.floor(offset/8,1)):bitfield(offset%8,1) == 1)
offset = offset + 1
if discreet_name_string then
if discreet_name_string_id then
local processed = _G.processed
_G.offset = offset%8
action_sint64.parse(payloadSubtree, buffer(math.floor(offset/8)), utils.propIndex.NAME_STRING)
action_sint64.parse(payloadSubtree, buffer(math.floor(offset/8)), utils.propIndex.NAME_STRING_ID)
offset = offset + _G.processed - processed
_G.processed = processed
end
......
......@@ -3,6 +3,7 @@ local utils = require("utils")
local m = {
orientation = ProtoField.uint32("nel.imp.action_sint64.orientation","propertyOrientation",base.HEX),
sheet = ProtoField.uint64("nel.imp.action_sint64.sheet","propertySheet",base.HEX),
sheet_alias = ProtoField.uint32("nel.imp.action_sint64.sheet_alias","Alias",base.DEC),
behaviour = ProtoField.uint64("nel.imp.action_sint64.behaviour","propertyBehaviour",base.HEX),
name_string_id = ProtoField.uint32("nel.imp.action_sint64.name_string_id","propertyNameStringID",base.HEX),
target_id = ProtoField.uint8("nel.imp.action_sint64.target_id","propertyTargetID",base.HEX),
......@@ -29,6 +30,7 @@ function m.get_fields()
local fields = {
impulsion_action_sint64_orientation = m.orientation,
impulsion_action_sint64_sheet = m.sheet,
impulsion_action_sint64_sheet_alias = m.sheet_alias,
impulsion_action_sint64_behaviour = m.behaviour,
impulsion_action_sint64_name_string_id = m.name_string_id,
impulsion_action_sint64_target_id = m.target_id,
......@@ -63,8 +65,15 @@ function m.parse(payloadSubtree, buffer, propIndex)
offset = offset + 32
elseif propIndex == utils.propIndex.SHEET then
local value = buffer(math.floor(offset/8),8):bitfield(offset%8,52)
payloadSubtree:add(m.sheet,buffer(math.floor(offset/8),8)):set_text(string.format("propertySheet(offset %i): %s", offset%8, value:tohex()))
local sheet_prop = payloadSubtree:add(m.sheet,buffer(math.floor(offset/8),8)):set_text(string.format("propertySheet(offset %i): %s", offset%8, value:tohex()))
offset = offset + 52
local alias_present = (buffer(math.floor(offset/8),1):bitfield(offset%8,1) == 1)
offset = offset + 1
if alias_present then
local value = buffer(math.floor(offset/8),5):bitfield(offset%8,32)
sheet_prop:add(m.sheet_alias,buffer(math.floor(offset/8),4)):set_text(string.format("Alias: %i", value))
offset = offset + 32
end
elseif propIndex == utils.propIndex.BEHAVIOUR then
local value = buffer(math.floor(offset/8),7):bitfield(offset%8,48)
payloadSubtree:add(m.behaviour,buffer(math.floor(offset/8),8)):set_text(string.format("propertyBehaviour(offset %i): %s", offset%8, value:tohex()))
......@@ -95,27 +104,27 @@ function m.parse(payloadSubtree, buffer, propIndex)
offset = offset + 58
elseif propIndex == utils.propIndex.ENTITY_MOUNTED_ID then
local value = buffer(math.floor(offset/8),2):bitfield(offset%8,8)
payloadSubtree:add(m.entity_mounted_id,buffer(math.floor(offset/8),1)):set_text(string.format("propertyEntityMountedID(offset %i): %h", offset%8, value))
payloadSubtree:add(m.entity_mounted_id,buffer(math.floor(offset/8),1)):set_text(string.format("propertyEntityMountedID(offset %i): %x", offset%8, value))
offset = offset + 8
elseif propIndex == utils.propIndex.RIDER_ENTITY_ID then
local value = buffer(math.floor(offset/8),2):bitfield(offset%8,8)
payloadSubtree:add(m.rider_entity_id,buffer(math.floor(offset/8),1)):set_text(string.format("propertyRiderEntityID(offset %i): %h", offset%8, value))
payloadSubtree:add(m.rider_entity_id,buffer(math.floor(offset/8),1)):set_text(string.format("propertyRiderEntityID(offset %i): %x", offset%8, value))
offset = offset + 8
elseif propIndex == utils.propIndex.CONTEXTUAL then
local value = buffer(math.floor(offset/8),3):bitfield(offset%8,16)
payloadSubtree:add(m.contextual,buffer(math.floor(offset/8),2)):set_text(string.format("propertyContextual(offset %i): %h", offset%8, value))
payloadSubtree:add(m.contextual,buffer(math.floor(offset/8),2)):set_text(string.format("propertyContextual(offset %i): %x", offset%8, value))
offset = offset + 16
elseif propIndex == utils.propIndex.BARS then
local value = buffer(math.floor(offset/8),5):bitfield(offset%8,32)
payloadSubtree:add(m.bars,buffer(math.floor(offset/8),4)):set_text(string.format("propertyBars(offset %i): %h", offset%8, value))
payloadSubtree:add(m.bars,buffer(math.floor(offset/8),4)):set_text(string.format("propertyBars(offset %i): %x", offset%8, value))
offset = offset + 32
elseif propIndex == utils.propIndex.TARGET_LIST then
local value = buffer(math.floor(offset/8),5):bitfield(offset%8,32)
payloadSubtree:add(m.target_list,buffer(math.floor(offset/8),4)):set_text(string.format("propertyTargetList(offset %i): %h", offset%8, value))
payloadSubtree:add(m.target_list,buffer(math.floor(offset/8),4)):set_text(string.format("propertyTargetList(offset %i): %x", offset%8, value))
offset = offset + 32
elseif propIndex == utils.propIndex.VISUAL_FX then
local value = buffer(math.floor(offset/8),3):bitfield(offset%8,11)
payloadSubtree:add(m.visual_fx,buffer(math.floor(offset/8),2)):set_text(string.format("propertyVisualFX(offset %i): %h", offset%8, value))
payloadSubtree:add(m.visual_fx,buffer(math.floor(offset/8),2)):set_text(string.format("propertyVisualFX(offset %i): %x", offset%8, value))
offset = offset + 11
elseif propIndex == utils.propIndex.GUILD_SYMBOL then
local value = buffer(math.floor(offset/8),9):bitfield(offset%8,60)
......@@ -123,27 +132,27 @@ function m.parse(payloadSubtree, buffer, propIndex)
offset = offset + 60
elseif propIndex == utils.propIndex.GUILD_NAME_ID then
local value = buffer(math.floor(offset/8),5):bitfield(offset%8,32)
payloadSubtree:add(m.guild_name_id,buffer(math.floor(offset/8),4)):set_text(string.format("propertyGuildNameID(offset %i): %h", offset%8, value))
payloadSubtree:add(m.guild_name_id,buffer(math.floor(offset/8),4)):set_text(string.format("propertyGuildNameID(offset %i): %x", offset%8, value))
offset = offset + 32
elseif propIndex == utils.propIndex.EVENT_FACTION_ID then
local value = buffer(math.floor(offset/8),5):bitfield(offset%8,32)
payloadSubtree:add(m.event_faction_id,buffer(math.floor(offset/8),4)):set_text(string.format("propertyEventFactionID(offset %i): %h", offset%8, value))
payloadSubtree:add(m.event_faction_id,buffer(math.floor(offset/8),4)):set_text(string.format("propertyEventFactionID(offset %i): %x", offset%8, value))
offset = offset + 32
elseif propIndex == utils.propIndex.PVP_MODE then
local value = buffer(math.floor(offset/8),3):bitfield(offset%8,10)
payloadSubtree:add(m.pvp_mode,buffer(math.floor(offset/8),2)):set_text(string.format("propertyPvPMode(offset %i): %h", offset%8, value))
payloadSubtree:add(m.pvp_mode,buffer(math.floor(offset/8),2)):set_text(string.format("propertyPvPMode(offset %i): %x", offset%8, value))
offset = offset + 10
elseif propIndex == utils.propIndex.PVP_CLAN then
local value = buffer(math.floor(offset/8),5):bitfield(offset%8,32)
payloadSubtree:add(m.pvp_clan,buffer(math.floor(offset/8),4)):set_text(string.format("propertyPvPClan(offset %i): %h", offset%8, value))
payloadSubtree:add(m.pvp_clan,buffer(math.floor(offset/8),4)):set_text(string.format("propertyPvPClan(offset %i): %x", offset%8, value))
offset = offset + 32
elseif propIndex == utils.propIndex.OWNER_PEOPLE then
local value = buffer(math.floor(offset/8),2):bitfield(offset%8,3)
payloadSubtree:add(m.owner_people,buffer(math.floor(offset/8),1)):set_text(string.format("propertyOwnerPeople(offset %i): %h", offset%8, value))
payloadSubtree:add(m.owner_people,buffer(math.floor(offset/8),1)):set_text(string.format("propertyOwnerPeople(offset %i): %x", offset%8, value))
offset = offset + 3
elseif propIndex == utils.propIndex.OUTPOST_INFOS then
local value = buffer(math.floor(offset/8),3):bitfield(offset%8,16)
payloadSubtree:add(m.outpost_infos,buffer(math.floor(offset/8),2)):set_text(string.format("propertyOutpostInfos(offset %i): %h", offset%8, value))
payloadSubtree:add(m.outpost_infos,buffer(math.floor(offset/8),2)):set_text(string.format("propertyOutpostInfos(offset %i): %x", offset%8, value))
offset = offset + 16
end
......
......@@ -193,8 +193,8 @@ function module_protocol.dissector(buffer, pinfo, tree)
_G.offset = _G.processed % 8
while _G.processed + 16 < length*8 do
local visualPropertiesTree = subtree:add(module_protocol, buffer(math.floor(offset/8)), "visualProperties")
visual_properties.parse(visualPropertiesTree, buffer(math.floor(offset/8)), module_protocol)
local visualPropertiesTree = subtree:add(module_protocol, buffer(math.floor(_G.processed/8)), "visualProperties")
visual_properties.parse(visualPropertiesTree, buffer(math.floor(_G.processed/8)), module_protocol)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment