Advertisement
Adrianolls

Untitled

May 23rd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.99 KB | None | 0 0
  1.  for (int i = 1; i <= getTaskInfo().pack_count; i++)
  2.         {
  3.             taskbr = new BinaryReader(pathfile + i);
  4.             TASK_PACK_HEADER task_header = new TASK_PACK_HEADER();
  5.  
  6.             //
  7.             task.task_header.add(task_header);
  8.             //
  9.  
  10.             task_header.magic = taskbr.ReadInt32();
  11.             task_header.item_count = taskbr.ReadInt32();
  12.             task_header.offsets = new int[task_header.item_count];
  13.             for (int j = 0; j < task_header.item_count; j++)
  14.             {
  15.                 task_header.offsets[j] = taskbr.ReadInt32();
  16.             }
  17.  
  18.             for (Integer offset : task_header.offsets)
  19.             {
  20.                 TASK_TEMPLATE task_template = new TASK_TEMPLATE();
  21.                 task.task_template.add(task_template);
  22.                 taskbr.Seek(offset);
  23.  
  24.                 //
  25.                 task_template.m_ID = taskbr.ReadInt32();
  26.                 task_template.m_szName = taskbr.ReadUnicode(TASK_TEMPLATE.TASK_NAME_SIZE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement