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

local ffxiv_ipc_treasure_shifting_wheel_result = Proto("ffxiv_ipc_treasure_shifting_wheel_result", "FFXIV-IPC Treasure Shifting Wheel Result")

local treasure_shifting_wheel_result_fields = {
  start_pos         = ProtoField.uint8("ffxiv_ipc_treasure_shifting_wheel_result.start_pos", "StartPos", base.DEC),
  end_pos           = ProtoField.uint8("ffxiv_ipc_treasure_shifting_wheel_result.end_pos", "EndPos", base.DEC),
  unknown_result1   = ProtoField.uint16("ffxiv_ipc_treasure_shifting_wheel_result.unknown_result1", "UnknownResult1", base.DEC),
  unknown_constant1 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant1", "UnknownConstant1", base.DEC),
  unknown_constant2 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant2", "UnknownConstant2", base.DEC),
  unknown_constant3 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant3", "UnknownConstant3", base.DEC),
  unknown_constant4 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant4", "UnknownConstant4", base.DEC),
  unknown_constant5 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant5", "UnknownConstant5", base.DEC),
  unknown_level     = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_level", "UnknownLevel", base.DEC),
  extra_move        = ProtoField.uint8("ffxiv_ipc_treasure_shifting_wheel_result.extra_move", "ExtraMove", base.DEC),
  unknown1          = ProtoField.uint8("ffxiv_ipc_treasure_shifting_wheel_result.unknown1", "Unknown1", base.DEC),
  unknown2          = ProtoField.uint16("ffxiv_ipc_treasure_shifting_wheel_result.unknown2", "Unknown2", base.DEC),
  unknown_constant6 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant6", "UnknownConstant6", base.DEC),
  unknown_constant7 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant7", "UnknownConstant7", base.DEC),
  result            = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.result", "Result", base.DEC),
  unknown_constant8 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant8", "UnknownConstant8", base.DEC),
  unknown_constant9 = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.unknown_constant9", "UnknownConstant9", base.DEC),
  final_level       = ProtoField.uint32("ffxiv_ipc_treasure_shifting_wheel_result.final_level", "FinalLevel", base.DEC),
}

ffxiv_ipc_treasure_shifting_wheel_result.fields = treasure_shifting_wheel_result_fields

function ffxiv_ipc_treasure_shifting_wheel_result.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_treasure_shifting_wheel_result, tvbuf)
  pktinfo.cols.info:set("Treasure Shifting Wheel Result")

  local len = tvbuf:len()

  -- dissect the start_pos field
  local start_pos_tvbr = tvbuf:range(0, 1)
  local start_pos_val  = start_pos_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.start_pos, start_pos_tvbr, start_pos_val)

  -- dissect the end_pos field
  local end_pos_tvbr = tvbuf:range(1, 1)
  local end_pos_val  = end_pos_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.end_pos, end_pos_tvbr, end_pos_val)

  -- dissect the unknown_result1 field
  local unknown_result1_tvbr = tvbuf:range(2, 2)
  local unknown_result1_val  = unknown_result1_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_result1, unknown_result1_tvbr, unknown_result1_val)

  -- dissect the unknown_constant1 field
  local unknown_constant1_tvbr = tvbuf:range(4, 4)
  local unknown_constant1_val  = unknown_constant1_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant1, unknown_constant1_tvbr, unknown_constant1_val)

  -- dissect the unknown_constant2 field
  local unknown_constant2_tvbr = tvbuf:range(8, 4)
  local unknown_constant2_val  = unknown_constant2_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant2, unknown_constant2_tvbr, unknown_constant2_val)

  -- dissect the unknown_constant3 field
  local unknown_constant3_tvbr = tvbuf:range(12, 4)
  local unknown_constant3_val  = unknown_constant3_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant3, unknown_constant3_tvbr, unknown_constant3_val)

  -- dissect the unknown_constant4 field
  local unknown_constant4_tvbr = tvbuf:range(16, 4)
  local unknown_constant4_val  = unknown_constant4_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant4, unknown_constant4_tvbr, unknown_constant4_val)

  -- dissect the unknown_constant5 field
  local unknown_constant5_tvbr = tvbuf:range(20, 4)
  local unknown_constant5_val  = unknown_constant5_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant5, unknown_constant5_tvbr, unknown_constant5_val)

  -- dissect the unknown_level field
  local unknown_level_tvbr = tvbuf:range(24, 4)
  local unknown_level_val  = unknown_level_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_level, unknown_level_tvbr, unknown_level_val)

  -- dissect the extra_move field
  local extra_move_tvbr = tvbuf:range(28, 1)
  local extra_move_val  = extra_move_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.extra_move, extra_move_tvbr, extra_move_val)

  -- dissect the unknown1 field
  local unknown1_tvbr = tvbuf:range(29, 1)
  local unknown1_val  = unknown1_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown1, unknown1_tvbr, unknown1_val)

  -- dissect the unknown2 field
  local unknown2_tvbr = tvbuf:range(30, 2)
  local unknown2_val  = unknown2_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown2, unknown2_tvbr, unknown2_val)

  -- dissect the unknown_constant6 field
  local unknown_constant6_tvbr = tvbuf:range(32, 4)
  local unknown_constant6_val  = unknown_constant6_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant6, unknown_constant6_tvbr, unknown_constant6_val)

  -- dissect the unknown_constant7 field
  local unknown_constant7_tvbr = tvbuf:range(36, 4)
  local unknown_constant7_val  = unknown_constant7_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant7, unknown_constant7_tvbr, unknown_constant7_val)

  -- dissect the result field
  local result_tvbr = tvbuf:range(40, 4)
  local result_val  = result_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.result, result_tvbr, result_val)

  -- dissect the unknown_constant8 field
  local unknown_constant8_tvbr = tvbuf:range(44, 4)
  local unknown_constant8_val  = unknown_constant8_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant8, unknown_constant8_tvbr, unknown_constant8_val)

  -- dissect the unknown_constant9 field
  local unknown_constant9_tvbr = tvbuf:range(48, 4)
  local unknown_constant9_val  = unknown_constant9_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.unknown_constant9, unknown_constant9_tvbr, unknown_constant9_val)

  -- dissect the final_level field
  local final_level_tvbr = tvbuf:range(52, 4)
  local final_level_val  = final_level_tvbr:le_uint()
  tree:add_le(treasure_shifting_wheel_result_fields.final_level, final_level_tvbr, final_level_val)

  return len
end