Пример #1
0
  void Save(SpritesNPCManager mgr) {
    try {
      SpriteNPC t = mgr.mapNPCs.get(myIndex);
      mgr.mapNPCs.get(myIndex).bSpriteSet = (byte) ((int) ((Integer) txtSpriteSet.getValue()));
      mgr.mapNPCs.get(myIndex).bBehavior1 = Byte.parseByte(txtBehavior1.getText());
      mgr.mapNPCs.get(myIndex).bBehavior2 = Byte.parseByte(txtBehavior2.getText());
      mgr.mapNPCs.get(myIndex).bIsTrainer = (byte) (chkIsTrainer.isSelected() ? 1 : 0);

      mgr.mapNPCs.get(myIndex).bTrainerLOS = Byte.parseByte(txtTrainerLOS.getText());
      mgr.mapNPCs.get(myIndex).pScript = Integer.parseInt(txtScript.getText(), 16);
      mgr.mapNPCs.get(myIndex).iFlag = Integer.parseInt(txtiFlag.getText());
    } catch (Exception e) {
    }
    MainGUI.eventEditorPanel.Redraw = true;
    MainGUI.eventEditorPanel.repaint();
  }
Пример #2
0
  private static byte getByteData(String byte1Str) throws Exception {
    byte data_LC;
    byte byte1 = Byte.parseByte(byte1Str);
    // byte byte2 =  Byte.parseByte(byte2Str);
    data_LC = byte1;
    // data_LC[1] = byte2;

    return data_LC;
  }