-- This file is generated by tools/json2lua.js

local ffxiv_ipc_fellowship_member_set_group_handler = Proto("ffxiv_ipc_fellowship_member_set_group_handler", "FFXIV-IPC FellowshipMemberSetGroupHandler")

local fellowship_member_set_group_handler_fields = {
  id       = ProtoField.uint64("ffxiv_ipc_fellowship_member_set_group_handler.id", "ID", base.DEC),
  target   = ProtoField.uint64("ffxiv_ipc_fellowship_member_set_group_handler.target", "Target", base.DEC),
  group    = ProtoField.uint32("ffxiv_ipc_fellowship_member_set_group_handler.group", "Group", base.DEC),
  unknown3 = ProtoField.uint32("ffxiv_ipc_fellowship_member_set_group_handler.unknown3", "Unknown3", base.DEC),
}

ffxiv_ipc_fellowship_member_set_group_handler.fields = fellowship_member_set_group_handler_fields

function ffxiv_ipc_fellowship_member_set_group_handler.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_fellowship_member_set_group_handler, tvbuf)
  pktinfo.cols.info:set("FellowshipMemberSetGroupHandler")

  local len = tvbuf:len()

  -- dissect the id field
  local id_tvbr = tvbuf:range(0, 8)
  local id_val  = id_tvbr:le_uint64()
  tree:add_le(fellowship_member_set_group_handler_fields.id, id_tvbr, id_val)

  -- dissect the target field
  local target_tvbr = tvbuf:range(8, 8)
  local target_val  = target_tvbr:le_uint64()
  tree:add_le(fellowship_member_set_group_handler_fields.target, target_tvbr, target_val)

  -- dissect the group field
  local group_tvbr = tvbuf:range(16, 4)
  local group_val  = group_tvbr:le_uint()
  tree:add_le(fellowship_member_set_group_handler_fields.group, group_tvbr, group_val)

  -- dissect the unknown3 field
  local unknown3_tvbr = tvbuf:range(20, 4)
  local unknown3_val  = unknown3_tvbr:le_uint()
  tree:add_le(fellowship_member_set_group_handler_fields.unknown3, unknown3_tvbr, unknown3_val)

  return len
end