diff --git a/src.zip b/src.zip deleted file mode 100644 index c50c3dc..0000000 Binary files a/src.zip and /dev/null differ diff --git a/src/gui/UI_LenheartUI/DropControl.java b/src/gui/UI_LenheartUI/DropControl.java new file mode 100644 index 0000000..1f7723c --- /dev/null +++ b/src/gui/UI_LenheartUI/DropControl.java @@ -0,0 +1,141 @@ +/* + * Created by JFormDesigner on Wed Mar 12 14:50:47 CST 2025 + */ + +package gui.UI_LenheartUI; + +import gui.Start; +import gui.特殊控制台; + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; +import javax.swing.table.*; + +/** + * @author dongj + */ +public class DropControl extends JPanel { + public DropControl() { + initComponents(); + } + + + private void 保存配置(ActionEvent e) { + // TODO add your code here + + 特殊控制台.setTwConfig(); + } + + private void initComponents() { + // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off + scrollPane1 = new JScrollPane(); + table1 = new JTable(); + toggleButton1 = new JToggleButton(); + toggleButton2 = new JToggleButton(); + label1 = new JLabel(); + label2 = new JLabel(); + button19 = new JButton(); + + //======== this ======== + setLayout(null); + + //======== scrollPane1 ======== + { + + //---- table1 ---- + table1.setModel(new DefaultTableModel( + new Object[][] { + }, + new String[] { + "\u9053\u5177\u4ee3\u7801", "\u91d1\u5e01\u7206\u7387", "\u7269\u54c1\u7206\u7387", "\u5f00\u59cb\u65f6\u95f4", "\u7ed3\u675f\u65f6\u95f4", "\u5355\u7269\u54c1\u6570\u91cf\u5806\u53e0" + } + ) { + Class[] columnTypes = new Class[] { + Integer.class, Integer.class, Integer.class, String.class, String.class, Integer.class + }; + @Override + public Class getColumnClass(int columnIndex) { + return columnTypes[columnIndex]; + } + }); + scrollPane1.setViewportView(table1); + } + add(scrollPane1); + scrollPane1.setBounds(18, 10, 1130, 550); + + //---- toggleButton1 ---- + toggleButton1.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png"))); + toggleButton1.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png"))); + toggleButton1.setFocusPainted(false); + toggleButton1.setContentAreaFilled(false); + add(toggleButton1); + toggleButton1.setBounds(15, 565, 100, 35); + + //---- toggleButton2 ---- + toggleButton2.setIcon(new ImageIcon(getClass().getResource("/image/OFF3.png"))); + toggleButton2.setSelectedIcon(new ImageIcon(getClass().getResource("/image/ON3.png"))); + toggleButton2.setFocusPainted(false); + toggleButton2.setContentAreaFilled(false); + add(toggleButton2); + toggleButton2.setBounds(15, 605, 100, 35); + + //---- label1 ---- + label1.setText("\u591a\u500d\u7206\u7387\u5f00\u5173"); + add(label1); + label1.setBounds(130, 570, 185, 30); + + //---- label2 ---- + label2.setText("\u591a\u7269\u54c1\u7206\u7387\u662f\u5426\u53e0\u52a0"); + add(label2); + label2.setBounds(130, 605, 185, 30); + + //---- button19 ---- + button19.setText("\u4fdd\u5b58\u914d\u7f6e"); + button19.addActionListener(e -> 保存配置(e)); + add(button19); + button19.setBounds(25, 645, 160, 35); + + { + // compute preferred size + Dimension preferredSize = new Dimension(); + for(int i = 0; i < getComponentCount(); i++) { + Rectangle bounds = getComponent(i).getBounds(); + preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width); + preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height); + } + Insets insets = getInsets(); + preferredSize.width += insets.right; + preferredSize.height += insets.bottom; + setMinimumSize(preferredSize); + setPreferredSize(preferredSize); + } + // JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on + + + this.toggleButton1.setSelected(Start.blkg == 1 ? true : false); + this.toggleButton2.setSelected(Start.bldj == 1 ? true : false); + + Start.BLlist.forEach((obj) -> { + Integer ItemId = obj.getItem_id(); + Integer GoldRate = obj.getGold_rate(); + Integer ItemRate = obj.getItem_rate(); + String Time = obj.getTime_range(); + Integer IsStack = obj.getStackableNum(); + + DefaultTableModel tableModel = (DefaultTableModel) ItemTable.getModel(); + Object[] rowData = {ItemId, GiveCount ,NeedItemId, NeedCount}; + tableModel.addRow(rowData); + }); + } + + // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off + private JScrollPane scrollPane1; + private JTable table1; + private JToggleButton toggleButton1; + private JToggleButton toggleButton2; + private JLabel label1; + private JLabel label2; + private JButton button19; + // JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on +} diff --git a/src/gui/UI_LenheartUI/DropControl.jfd b/src/gui/UI_LenheartUI/DropControl.jfd new file mode 100644 index 0000000..ccd7247 --- /dev/null +++ b/src/gui/UI_LenheartUI/DropControl.jfd @@ -0,0 +1,105 @@ +JFDML JFormDesigner: "9.0.0.0.352" Java: "21.0.6" encoding: "UTF-8" + +new FormModel { + contentType: "form/swing" + root: new FormRoot { + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class com.jformdesigner.runtime.NullLayout ) ) { + name: "this" + add( new FormContainer( "javax.swing.JScrollPane", new FormLayoutManager( class javax.swing.JScrollPane ) ) { + name: "scrollPane1" + add( new FormComponent( "javax.swing.JTable" ) { + name: "table1" + "model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector { + add( "道具代码" ) + add( "金币爆率" ) + add( "物品爆率" ) + add( "开始时间" ) + add( "结束时间" ) + add( "单物品数量堆叠" ) + }, new java.util.Vector { + add( class java.lang.Integer ) + add( class java.lang.Integer ) + add( class java.lang.Integer ) + add( class java.lang.String ) + add( class java.lang.String ) + add( class java.lang.Integer ) + }, new java.util.Vector { + add( null ) + add( null ) + add( null ) + add( null ) + add( null ) + add( null ) + }, new java.util.Vector { + add( null ) + add( null ) + add( null ) + add( null ) + add( null ) + add( null ) + } ) + } ) + }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { + "x": 18 + "y": 10 + "width": 1130 + "height": 550 + } ) + add( new FormComponent( "javax.swing.JToggleButton" ) { + name: "toggleButton1" + "icon": &SwingIcon0 new com.jformdesigner.model.SwingIcon( 0, "/image/OFF3.png" ) + "selectedIcon": &SwingIcon1 new com.jformdesigner.model.SwingIcon( 0, "/image/ON3.png" ) + "focusPainted": false + "contentAreaFilled": false + }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { + "width": 100 + "height": 35 + "x": 15 + "y": 565 + } ) + add( new FormComponent( "javax.swing.JToggleButton" ) { + name: "toggleButton2" + "icon": #SwingIcon0 + "selectedIcon": #SwingIcon1 + "focusPainted": false + "contentAreaFilled": false + }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { + "width": 100 + "height": 35 + "x": 15 + "y": 605 + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label1" + "text": "多倍爆率开关" + }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { + "x": 130 + "y": 570 + "width": 185 + "height": 30 + } ) + add( new FormComponent( "javax.swing.JLabel" ) { + name: "label2" + "text": "多物品爆率是否叠加" + }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { + "width": 185 + "height": 30 + "x": 130 + "y": 605 + } ) + add( new FormComponent( "javax.swing.JButton" ) { + name: "button19" + "text": "保存配置" + addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "保存配置", true ) ) + }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { + "width": 160 + "height": 35 + "x": 25 + "y": 645 + } ) + }, new FormLayoutConstraints( null ) { + "location": new java.awt.Point( 0, 0 ) + "size": new java.awt.Dimension( 1585, 715 ) + } ) + } +} diff --git a/src/gui/UI_LenheartUI/UI_LenheartUI.java b/src/gui/UI_LenheartUI/UI_LenheartUI.java index 85747b3..868ba5f 100644 --- a/src/gui/UI_LenheartUI/UI_LenheartUI.java +++ b/src/gui/UI_LenheartUI/UI_LenheartUI.java @@ -6,10 +6,15 @@ public class UI_LenheartUI { private JPanel 物品回收页面; private JPanel 伤害控制页面; + private JPanel 爆率控制页面; + public UI_LenheartUI(JTabbedPane mainComponent) { 物品回收页面 = new ItemRecovery(); 伤害控制页面 = new DamageControl(); + 爆率控制页面 = new DropControl(); + mainComponent.addTab("物品回收设置", 物品回收页面); mainComponent.addTab("伤害控制设置", 伤害控制页面); + mainComponent.addTab("爆率控制设置", 爆率控制页面); } } diff --git a/src/gui/ppms.java b/src/gui/ppms.java index 69c9272..9260883 100644 --- a/src/gui/ppms.java +++ b/src/gui/ppms.java @@ -271,6 +271,7 @@ public class ppms extends JFrame { private JLabel jLabel186; private JLabel jLabel187; private JLabel jLabel188; + private JLabel jLabel1188; private JLabel jLabel189; private JLabel jLabel19; private JLabel jLabel190; @@ -809,6 +810,7 @@ public class ppms extends JFrame { private static JToggleButton 越级带人道具开关; private static JToggleButton 越级打怪; private static JToggleButton 道具强行宠吸开关; + private static JToggleButton BOSS支持吸金吸物开关; private static JTextField 道具经验加成代码; private JButton 道具经验加成修改删除; private JButton 道具经验加成修改按钮; @@ -1430,6 +1432,8 @@ public class ppms extends JFrame { ppms.宠吸道具 = new JTextField(); this.jLabel188 = new JLabel(); ppms.道具强行宠吸开关 = new JToggleButton(); + this.jLabel1188 = new JLabel(); + ppms.BOSS支持吸金吸物开关 = new JToggleButton(); this.jLabel207 = new JLabel(); ppms.特殊全宠物吸金开关 = new JToggleButton(); this.jLabel208 = new JLabel(); @@ -5075,6 +5079,24 @@ public class ppms extends JFrame { ppms.this.道具强行宠吸开关ActionPerformed(evt); } }); + this.jLabel1188.setText("BOSS支持吸金吸物开关"); + ppms.BOSS支持吸金吸物开关.setIcon((Icon) new ImageIcon(this.getClass().getResource("/image/OFF2.png"))); + ppms.BOSS支持吸金吸物开关.setBorderPainted(false); + ppms.BOSS支持吸金吸物开关.setContentAreaFilled(false); + ppms.BOSS支持吸金吸物开关.setFocusPainted(false); + ppms.BOSS支持吸金吸物开关.setSelectedIcon((Icon) new ImageIcon(this.getClass().getResource("/image/ON2.png"))); + ppms.BOSS支持吸金吸物开关.addChangeListener((ChangeListener) new ChangeListener() { + @Override + public void stateChanged(final ChangeEvent evt) { + ppms.this.BOSS支持吸金吸物开关StateChanged(evt); + } + }); + ppms.BOSS支持吸金吸物开关.addActionListener((ActionListener) new ActionListener() { + @Override + public void actionPerformed(final ActionEvent evt) { + ppms.this.BOSS支持吸金吸物开关ActionPerformed(evt); + } + }); this.jLabel207.setText("特殊全宠物吸金开关"); ppms.特殊全宠物吸金开关.setIcon((Icon) new ImageIcon(this.getClass().getResource("/image/OFF2.png"))); ppms.特殊全宠物吸金开关.setBorderPainted(false); @@ -5113,8 +5135,107 @@ public class ppms extends JFrame { }); final GroupLayout jPanel57Layout = new GroupLayout((Container) this.jPanel57); this.jPanel57.setLayout((LayoutManager) jPanel57Layout); - jPanel57Layout.setHorizontalGroup((Group) jPanel57Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel57Layout.createSequentialGroup().addContainerGap().addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.LEADING).addComponent((Component) this.jLabel148).addComponent((Component) this.jLabel165).addComponent((Component) this.jLabel167).addComponent((Component) this.jLabel169).addComponent((Component) this.jLabel187).addComponent((Component) this.jLabel188).addComponent((Component) this.jLabel207).addComponent((Component) this.jLabel208)).addPreferredGap(ComponentPlacement.RELATED, 94, 32767).addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.LEADING).addComponent((Component) ppms.特殊宠物吸金开关, -2, 74, -2).addComponent((Component) ppms.特殊宠物吸取开关, -2, 74, -2).addComponent((Component) ppms.特殊宠物吸物开关, -2, 74, -2).addComponent((Component) ppms.特殊宠物吸物无法使用地图开关, -2, 74, -2).addComponent((Component) ppms.宠吸道具, -2, 74, -2).addComponent((Component) ppms.道具强行宠吸开关, -2, 74, -2).addComponent((Component) ppms.特殊全宠物吸金开关, -2, 74, -2).addComponent((Component) ppms.特殊全宠物吸物开关, -2, 74, -2)).addGap(24, 24, 24))); - jPanel57Layout.setVerticalGroup((Group) jPanel57Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel57Layout.createSequentialGroup().addContainerGap().addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.CENTER).addComponent((Component) this.jLabel148).addComponent((Component) ppms.特殊宠物吸取开关, -2, 30, -2)).addPreferredGap(ComponentPlacement.UNRELATED).addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.CENTER).addComponent((Component) this.jLabel165).addComponent((Component) ppms.特殊宠物吸物开关, -2, 30, -2)).addGap(10, 10, 10).addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.CENTER).addComponent((Component) this.jLabel167).addComponent((Component) ppms.特殊宠物吸金开关, -2, 30, -2)).addGap(10, 10, 10).addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.CENTER).addComponent((Component) ppms.特殊宠物吸物无法使用地图开关, -2, 30, -2).addComponent((Component) this.jLabel169)).addGap(10, 10, 10).addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.CENTER).addComponent((Component) ppms.特殊全宠物吸金开关, -2, 30, -2).addComponent((Component) this.jLabel207)).addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.LEADING).addGroup((Group) jPanel57Layout.createSequentialGroup().addGap(17, 17, 17).addComponent((Component) this.jLabel208)).addGroup((Group) jPanel57Layout.createSequentialGroup().addPreferredGap(ComponentPlacement.UNRELATED).addComponent((Component) ppms.特殊全宠物吸物开关, -2, 30, -2))).addPreferredGap(ComponentPlacement.RELATED, 10, 32767).addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.CENTER).addComponent((Component) ppms.道具强行宠吸开关, -2, 30, -2).addComponent((Component) this.jLabel188)).addGap(10, 10, 10).addGroup((Group) jPanel57Layout.createParallelGroup(Alignment.BASELINE).addComponent((Component) this.jLabel187).addComponent((Component) ppms.宠吸道具, -2, -1, -2)).addGap(38, 38, 38))); + jPanel57Layout.setHorizontalGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.LEADING) + .addGroup( + (Group) jPanel57Layout.createSequentialGroup() + .addContainerGap() + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.LEADING) + .addComponent((Component) this.jLabel148) + .addComponent((Component) this.jLabel165) + .addComponent((Component) this.jLabel167) + .addComponent((Component) this.jLabel169) + .addComponent((Component) this.jLabel187) + .addComponent((Component) this.jLabel188) + .addComponent((Component) this.jLabel1188) + .addComponent((Component) this.jLabel207) + .addComponent((Component) this.jLabel208) + ) + .addPreferredGap(ComponentPlacement.RELATED, 94, 32767) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.LEADING) + .addComponent((Component) ppms.特殊宠物吸金开关, -2, 74, -2) + .addComponent((Component) ppms.特殊宠物吸取开关, -2, 74, -2) + .addComponent((Component) ppms.特殊宠物吸物开关, -2, 74, -2) + .addComponent((Component) ppms.特殊宠物吸物无法使用地图开关, -2, 74, -2) + .addComponent((Component) ppms.宠吸道具, -2, 74, -2) + .addComponent((Component) ppms.道具强行宠吸开关, -2, 74, -2) + .addComponent((Component) ppms.BOSS支持吸金吸物开关, -2, 74, -2) + .addComponent((Component) ppms.特殊全宠物吸金开关, -2, 74, -2) + .addComponent((Component) ppms.特殊全宠物吸物开关, -2, 74, -2) + ) + .addGap(24, 24, 24) + ) + ); + jPanel57Layout.setVerticalGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.LEADING) + .addGroup( + (Group) jPanel57Layout.createSequentialGroup() + .addContainerGap() + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.CENTER) + .addComponent((Component) this.jLabel148) + .addComponent((Component) ppms.特殊宠物吸取开关, -2, 30, -2) + ) + .addPreferredGap(ComponentPlacement.UNRELATED) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.CENTER) + .addComponent((Component) this.jLabel165) + .addComponent((Component) ppms.特殊宠物吸物开关, -2, 30, -2) + ) + .addGap(10, 10, 10) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.CENTER) + .addComponent((Component) this.jLabel167) + .addComponent((Component) ppms.特殊宠物吸金开关, -2, 30, -2) + ) + .addGap(10, 10, 10) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.CENTER) + .addComponent((Component) ppms.特殊宠物吸物无法使用地图开关, -2, 30, -2) + .addComponent((Component) this.jLabel169) + ) + .addGap(10, 10, 10) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.CENTER) + .addComponent((Component) ppms.特殊全宠物吸金开关, -2, 30, -2) + .addComponent((Component) this.jLabel207) + ) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.LEADING) + .addGroup( + (Group) jPanel57Layout.createSequentialGroup() + .addGap(17, 17, 17) + .addComponent((Component) this.jLabel208) + ) + .addGroup( + (Group) jPanel57Layout.createSequentialGroup() + .addPreferredGap(ComponentPlacement.UNRELATED) + .addComponent((Component) ppms.特殊全宠物吸物开关, -2, 30, -2) + ) + ) + .addPreferredGap(ComponentPlacement.RELATED, 10, 32767) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.CENTER) + .addComponent((Component) ppms.道具强行宠吸开关, -2, 30, -2) + .addComponent((Component) this.jLabel188) + ) + .addGap(10, 10, 10) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.CENTER) + .addComponent((Component) ppms.BOSS支持吸金吸物开关, -2, 30, -2) + .addComponent((Component) this.jLabel1188) + ) + .addGap(10, 10, 10) + .addGroup( + (Group) jPanel57Layout.createParallelGroup(Alignment.BASELINE) + .addComponent((Component) this.jLabel187) + .addComponent((Component) ppms.宠吸道具, -2, -1, -2) + ) + .addGap(38, 38, 38) + ) + ); this.jPanel88.setBorder((Border) BorderFactory.createTitledBorder("宠物吸取物品宠物代码列表")); ppms.宠物吸物列表.setModel((TableModel) new DefaultTableModel(new Object[0][], new String[]{"排序代码", "宠物代码"}) { Class[] types = {String.class, Integer.class}; @@ -7349,6 +7470,14 @@ public class ppms extends JFrame { private void 道具强行宠吸开关ActionPerformed(final ActionEvent evt) { } + private void BOSS支持吸金吸物开关StateChanged(final ChangeEvent evt) { + Start.bossxw = (int) (ppms.BOSS支持吸金吸物开关.isSelected() ? 1 : 0); + 特殊控制台.setTwConfig(); + } + + private void BOSS支持吸金吸物开关ActionPerformed(final ActionEvent evt) { + } + private void 修改地图1ActionPerformed(final ActionEvent evt) { this.宠物吸取不参与地图调整(2); }