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

local ffxiv_ipc_effect32 = Proto("ffxiv_ipc_effect32", "FFXIV-IPC Effect32")

local effect32_fields = {
  padding_6_a0       = ProtoField.uint16("ffxiv_ipc_effect32.padding_6_a0", "padding_6A0", base.DEC),
  padding_6_a1       = ProtoField.uint16("ffxiv_ipc_effect32.padding_6_a1", "padding_6A1", base.DEC),
  padding_6_a2       = ProtoField.uint16("ffxiv_ipc_effect32.padding_6_a2", "padding_6A2", base.DEC),
  effect_target_id0  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id0", "effectTargetId0", base.HEX),
  effect_target_id1  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id1", "effectTargetId1", base.HEX),
  effect_target_id2  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id2", "effectTargetId2", base.HEX),
  effect_target_id3  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id3", "effectTargetId3", base.HEX),
  effect_target_id4  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id4", "effectTargetId4", base.HEX),
  effect_target_id5  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id5", "effectTargetId5", base.HEX),
  effect_target_id6  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id6", "effectTargetId6", base.HEX),
  effect_target_id7  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id7", "effectTargetId7", base.HEX),
  effect_target_id8  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id8", "effectTargetId8", base.HEX),
  effect_target_id9  = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id9", "effectTargetId9", base.HEX),
  effect_target_id10 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id10", "effectTargetId10", base.HEX),
  effect_target_id11 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id11", "effectTargetId11", base.HEX),
  effect_target_id12 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id12", "effectTargetId12", base.HEX),
  effect_target_id13 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id13", "effectTargetId13", base.HEX),
  effect_target_id14 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id14", "effectTargetId14", base.HEX),
  effect_target_id15 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id15", "effectTargetId15", base.HEX),
  effect_target_id16 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id16", "effectTargetId16", base.HEX),
  effect_target_id17 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id17", "effectTargetId17", base.HEX),
  effect_target_id18 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id18", "effectTargetId18", base.HEX),
  effect_target_id19 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id19", "effectTargetId19", base.HEX),
  effect_target_id20 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id20", "effectTargetId20", base.HEX),
  effect_target_id21 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id21", "effectTargetId21", base.HEX),
  effect_target_id22 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id22", "effectTargetId22", base.HEX),
  effect_target_id23 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id23", "effectTargetId23", base.HEX),
  effect_target_id24 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id24", "effectTargetId24", base.HEX),
  effect_target_id25 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id25", "effectTargetId25", base.HEX),
  effect_target_id26 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id26", "effectTargetId26", base.HEX),
  effect_target_id27 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id27", "effectTargetId27", base.HEX),
  effect_target_id28 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id28", "effectTargetId28", base.HEX),
  effect_target_id29 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id29", "effectTargetId29", base.HEX),
  effect_target_id30 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id30", "effectTargetId30", base.HEX),
  effect_target_id31 = ProtoField.uint64("ffxiv_ipc_effect32.effect_target_id31", "effectTargetId31", base.HEX),
  effect_flags       = ProtoField.uint32("ffxiv_ipc_effect32.effect_flags", "effectFlags", base.DEC),
  effect_flags2      = ProtoField.uint16("ffxiv_ipc_effect32.effect_flags2", "effectFlags2", base.DEC),
  padding_780        = ProtoField.uint16("ffxiv_ipc_effect32.padding_780", "padding_780", base.DEC),
  padding_781        = ProtoField.uint32("ffxiv_ipc_effect32.padding_781", "padding_781", base.DEC),
}

ffxiv_ipc_effect32.fields = effect32_fields

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

  local len = tvbuf:len()

  -- dissect effect_header
  local effect_header_dissector = Dissector.get('ffxiv_ipc_effect_header')
  local effect_header_pos = 0
  local effect_header_len = 42
  local effect_header_count = 1

  while effect_header_pos + effect_header_len <= len do
    local effect_header_tvbr = tvbuf:range(effect_header_pos, 42)
    effect_header_dissector:call(effect_header_tvbr:tvb(), pktinfo, root)
    effect_header_pos = effect_header_pos + effect_header_len
    effect_header_count = effect_header_count - 1
    if effect_header_count <= 0 then
      break
    end
  end

  -- dissect effect_entry
  local effect_entry_dissector = Dissector.get('ffxiv_ipc_effect_entry')
  local effect_entry_pos = 42
  local effect_entry_len = 8
  local effect_entry_count = 256

  while effect_entry_pos + effect_entry_len <= len do
    local effect_entry_tvbr = tvbuf:range(effect_entry_pos, 8)
    effect_entry_dissector:call(effect_entry_tvbr:tvb(), pktinfo, root)
    effect_entry_pos = effect_entry_pos + effect_entry_len
    effect_entry_count = effect_entry_count - 1
    if effect_entry_count <= 0 then
      break
    end
  end

  -- dissect the padding_6_a0 field
  local padding_6_a0_tvbr = tvbuf:range(2090, 2)
  local padding_6_a0_val  = padding_6_a0_tvbr:le_uint()
  tree:add_le(effect32_fields.padding_6_a0, padding_6_a0_tvbr, padding_6_a0_val)

  -- dissect the padding_6_a1 field
  local padding_6_a1_tvbr = tvbuf:range(2092, 2)
  local padding_6_a1_val  = padding_6_a1_tvbr:le_uint()
  tree:add_le(effect32_fields.padding_6_a1, padding_6_a1_tvbr, padding_6_a1_val)

  -- dissect the padding_6_a2 field
  local padding_6_a2_tvbr = tvbuf:range(2094, 2)
  local padding_6_a2_val  = padding_6_a2_tvbr:le_uint()
  tree:add_le(effect32_fields.padding_6_a2, padding_6_a2_tvbr, padding_6_a2_val)

  -- dissect the effect_target_id0 field
  local effect_target_id0_tvbr = tvbuf:range(2096, 8)
  local effect_target_id0_val  = effect_target_id0_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id0, effect_target_id0_tvbr, effect_target_id0_val)

  -- dissect the effect_target_id1 field
  local effect_target_id1_tvbr = tvbuf:range(2104, 8)
  local effect_target_id1_val  = effect_target_id1_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id1, effect_target_id1_tvbr, effect_target_id1_val)

  -- dissect the effect_target_id2 field
  local effect_target_id2_tvbr = tvbuf:range(2112, 8)
  local effect_target_id2_val  = effect_target_id2_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id2, effect_target_id2_tvbr, effect_target_id2_val)

  -- dissect the effect_target_id3 field
  local effect_target_id3_tvbr = tvbuf:range(2120, 8)
  local effect_target_id3_val  = effect_target_id3_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id3, effect_target_id3_tvbr, effect_target_id3_val)

  -- dissect the effect_target_id4 field
  local effect_target_id4_tvbr = tvbuf:range(2128, 8)
  local effect_target_id4_val  = effect_target_id4_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id4, effect_target_id4_tvbr, effect_target_id4_val)

  -- dissect the effect_target_id5 field
  local effect_target_id5_tvbr = tvbuf:range(2136, 8)
  local effect_target_id5_val  = effect_target_id5_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id5, effect_target_id5_tvbr, effect_target_id5_val)

  -- dissect the effect_target_id6 field
  local effect_target_id6_tvbr = tvbuf:range(2144, 8)
  local effect_target_id6_val  = effect_target_id6_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id6, effect_target_id6_tvbr, effect_target_id6_val)

  -- dissect the effect_target_id7 field
  local effect_target_id7_tvbr = tvbuf:range(2152, 8)
  local effect_target_id7_val  = effect_target_id7_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id7, effect_target_id7_tvbr, effect_target_id7_val)

  -- dissect the effect_target_id8 field
  local effect_target_id8_tvbr = tvbuf:range(2160, 8)
  local effect_target_id8_val  = effect_target_id8_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id8, effect_target_id8_tvbr, effect_target_id8_val)

  -- dissect the effect_target_id9 field
  local effect_target_id9_tvbr = tvbuf:range(2168, 8)
  local effect_target_id9_val  = effect_target_id9_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id9, effect_target_id9_tvbr, effect_target_id9_val)

  -- dissect the effect_target_id10 field
  local effect_target_id10_tvbr = tvbuf:range(2176, 8)
  local effect_target_id10_val  = effect_target_id10_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id10, effect_target_id10_tvbr, effect_target_id10_val)

  -- dissect the effect_target_id11 field
  local effect_target_id11_tvbr = tvbuf:range(2184, 8)
  local effect_target_id11_val  = effect_target_id11_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id11, effect_target_id11_tvbr, effect_target_id11_val)

  -- dissect the effect_target_id12 field
  local effect_target_id12_tvbr = tvbuf:range(2192, 8)
  local effect_target_id12_val  = effect_target_id12_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id12, effect_target_id12_tvbr, effect_target_id12_val)

  -- dissect the effect_target_id13 field
  local effect_target_id13_tvbr = tvbuf:range(2200, 8)
  local effect_target_id13_val  = effect_target_id13_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id13, effect_target_id13_tvbr, effect_target_id13_val)

  -- dissect the effect_target_id14 field
  local effect_target_id14_tvbr = tvbuf:range(2208, 8)
  local effect_target_id14_val  = effect_target_id14_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id14, effect_target_id14_tvbr, effect_target_id14_val)

  -- dissect the effect_target_id15 field
  local effect_target_id15_tvbr = tvbuf:range(2216, 8)
  local effect_target_id15_val  = effect_target_id15_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id15, effect_target_id15_tvbr, effect_target_id15_val)

  -- dissect the effect_target_id16 field
  local effect_target_id16_tvbr = tvbuf:range(2224, 8)
  local effect_target_id16_val  = effect_target_id16_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id16, effect_target_id16_tvbr, effect_target_id16_val)

  -- dissect the effect_target_id17 field
  local effect_target_id17_tvbr = tvbuf:range(2232, 8)
  local effect_target_id17_val  = effect_target_id17_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id17, effect_target_id17_tvbr, effect_target_id17_val)

  -- dissect the effect_target_id18 field
  local effect_target_id18_tvbr = tvbuf:range(2240, 8)
  local effect_target_id18_val  = effect_target_id18_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id18, effect_target_id18_tvbr, effect_target_id18_val)

  -- dissect the effect_target_id19 field
  local effect_target_id19_tvbr = tvbuf:range(2248, 8)
  local effect_target_id19_val  = effect_target_id19_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id19, effect_target_id19_tvbr, effect_target_id19_val)

  -- dissect the effect_target_id20 field
  local effect_target_id20_tvbr = tvbuf:range(2256, 8)
  local effect_target_id20_val  = effect_target_id20_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id20, effect_target_id20_tvbr, effect_target_id20_val)

  -- dissect the effect_target_id21 field
  local effect_target_id21_tvbr = tvbuf:range(2264, 8)
  local effect_target_id21_val  = effect_target_id21_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id21, effect_target_id21_tvbr, effect_target_id21_val)

  -- dissect the effect_target_id22 field
  local effect_target_id22_tvbr = tvbuf:range(2272, 8)
  local effect_target_id22_val  = effect_target_id22_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id22, effect_target_id22_tvbr, effect_target_id22_val)

  -- dissect the effect_target_id23 field
  local effect_target_id23_tvbr = tvbuf:range(2280, 8)
  local effect_target_id23_val  = effect_target_id23_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id23, effect_target_id23_tvbr, effect_target_id23_val)

  -- dissect the effect_target_id24 field
  local effect_target_id24_tvbr = tvbuf:range(2288, 8)
  local effect_target_id24_val  = effect_target_id24_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id24, effect_target_id24_tvbr, effect_target_id24_val)

  -- dissect the effect_target_id25 field
  local effect_target_id25_tvbr = tvbuf:range(2296, 8)
  local effect_target_id25_val  = effect_target_id25_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id25, effect_target_id25_tvbr, effect_target_id25_val)

  -- dissect the effect_target_id26 field
  local effect_target_id26_tvbr = tvbuf:range(2304, 8)
  local effect_target_id26_val  = effect_target_id26_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id26, effect_target_id26_tvbr, effect_target_id26_val)

  -- dissect the effect_target_id27 field
  local effect_target_id27_tvbr = tvbuf:range(2312, 8)
  local effect_target_id27_val  = effect_target_id27_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id27, effect_target_id27_tvbr, effect_target_id27_val)

  -- dissect the effect_target_id28 field
  local effect_target_id28_tvbr = tvbuf:range(2320, 8)
  local effect_target_id28_val  = effect_target_id28_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id28, effect_target_id28_tvbr, effect_target_id28_val)

  -- dissect the effect_target_id29 field
  local effect_target_id29_tvbr = tvbuf:range(2328, 8)
  local effect_target_id29_val  = effect_target_id29_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id29, effect_target_id29_tvbr, effect_target_id29_val)

  -- dissect the effect_target_id30 field
  local effect_target_id30_tvbr = tvbuf:range(2336, 8)
  local effect_target_id30_val  = effect_target_id30_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id30, effect_target_id30_tvbr, effect_target_id30_val)

  -- dissect the effect_target_id31 field
  local effect_target_id31_tvbr = tvbuf:range(2344, 8)
  local effect_target_id31_val  = effect_target_id31_tvbr:le_uint64()
  tree:add_le(effect32_fields.effect_target_id31, effect_target_id31_tvbr, effect_target_id31_val)

  -- dissect the effect_flags field
  local effect_flags_tvbr = tvbuf:range(2352, 4)
  local effect_flags_val  = effect_flags_tvbr:le_uint()
  tree:add_le(effect32_fields.effect_flags, effect_flags_tvbr, effect_flags_val)

  -- dissect the effect_flags2 field
  local effect_flags2_tvbr = tvbuf:range(2356, 2)
  local effect_flags2_val  = effect_flags2_tvbr:le_uint()
  tree:add_le(effect32_fields.effect_flags2, effect_flags2_tvbr, effect_flags2_val)

  -- dissect the padding_780 field
  local padding_780_tvbr = tvbuf:range(2358, 2)
  local padding_780_val  = padding_780_tvbr:le_uint()
  tree:add_le(effect32_fields.padding_780, padding_780_tvbr, padding_780_val)

  -- dissect the padding_781 field
  local padding_781_tvbr = tvbuf:range(2360, 4)
  local padding_781_val  = padding_781_tvbr:le_uint()
  tree:add_le(effect32_fields.padding_781, padding_781_tvbr, padding_781_val)

  return len
end