no message

This commit is contained in:
Lenheart 2025-03-14 15:01:36 +08:00
parent ddc2c68c55
commit 6c7889169e
3 changed files with 446 additions and 162 deletions

View File

@ -10,6 +10,7 @@ import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.List;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.*; import javax.swing.border.*;
import javax.swing.table.*; import javax.swing.table.*;
@ -17,6 +18,7 @@ import com.intellij.uiDesigner.core.*;
import com.jgoodies.forms.factories.*; import com.jgoodies.forms.factories.*;
import com.jgoodies.forms.layout.*; import com.jgoodies.forms.layout.*;
import database.DBConPool; import database.DBConPool;
import gui.tw.Drop;
import info.clearthought.layout.*; import info.clearthought.layout.*;
import net.miginfocom.swing.*; import net.miginfocom.swing.*;
import server.MapleItemInformationProvider; import server.MapleItemInformationProvider;
@ -31,71 +33,83 @@ public class ExplosiveControl extends JPanel {
initComponents(); initComponents();
} }
private void 加载刷新怪物卡片(ActionEvent e) { public void ClearTable(JTable tableobj) {
for (int i = ((DefaultTableModel) (DefaultTableModel) this.table2.getModel()).getRowCount() - 1; i >= 0; --i) { for (int i = ((DefaultTableModel) (DefaultTableModel) tableobj.getModel()).getRowCount() - 1; i >= 0; --i) {
((DefaultTableModel) (DefaultTableModel) this.table2.getModel()).removeRow(i); ((DefaultTableModel) (DefaultTableModel) tableobj.getModel()).removeRow(i);
}
try {
final Connection con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
PreparedStatement ps = null;
ResultSet rs = null;
ps = con.prepareStatement("SELECT * FROM drop_data WHERE itemid >=2380000&& itemid <2390000");
rs = ps.executeQuery();
while (rs.next()) {
((DefaultTableModel) this.table2.getModel()).insertRow(this.table2.getRowCount(), new Object[]{Integer.valueOf(rs.getInt("id")), Integer.valueOf(rs.getInt("dropperid")), MapleItemInformationProvider.getInstance().getName(rs.getInt("itemid")), Integer.valueOf(rs.getInt("itemid")), Integer.valueOf(rs.getInt("chance"))});
}
rs.close();
ps.close();
con.close();
} catch (SQLException ex) {
System.err.println("[" + FileoutputUtil.CurrentReadable_Time() + "]刷新出错:" + ex.getMessage());
} }
} }
public void 刷新怪物爆物(final int type) { public void WriteTable2(List<Drop> kps){
for (int i = ((DefaultTableModel) (DefaultTableModel) this.table2.getModel()).getRowCount() - 1; i >= 0; --i) { DefaultTableModel tableModel = (DefaultTableModel)table2.getModel();
((DefaultTableModel) (DefaultTableModel) this.table2.getModel()).removeRow(i);
} for (Drop kp : kps) {
try { tableModel.insertRow(this.table2.getRowCount(), new Object[]{Integer.valueOf(kp.getId()), kp.getDropName(), Integer.valueOf(kp.getDropperid()), kp.getItenName(), Integer.valueOf(kp.getItemId()), Integer.valueOf(kp.getChance())});
final Connection con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
PreparedStatement ps = null;
ResultSet rs = null;
switch (type) {
case 0: {
ps = con.prepareStatement("SELECT * FROM drop_data WHERE itemid !=0");
rs = ps.executeQuery();
break;
}
case 1: {
ps = con.prepareStatement("SELECT * FROM drop_data WHERE itemid = ?");
ps.setInt(1, Integer.valueOf(this.物品ID查询掉落.getText()).intValue());
rs = ps.executeQuery();
break;
}
case 2: {
ps = con.prepareStatement("SELECT * FROM drop_data WHERE dropperid = ?");
ps.setInt(1, Integer.valueOf(this.怪物ID查询掉落.getText()).intValue());
rs = ps.executeQuery();
break;
} }
} }
while (rs.next()) {
String dropperid = "未知名字"; public void WriteTable1(List<Drop> kps){
try { DefaultTableModel tableModel = (DefaultTableModel)table1.getModel();
dropperid = MapleLifeFactory.getMonster(Integer.valueOf(rs.getInt("dropperid"))).getStats().getName();
}catch (Exception e) {} for (Drop kp : kps) {
((DefaultTableModel) this.table2.getModel()).insertRow(this.table2.getRowCount(), new Object[]{Integer.valueOf(rs.getInt("id")),dropperid, Integer.valueOf(rs.getInt("dropperid")), MapleItemInformationProvider.getInstance().getName(rs.getInt("itemid")), Integer.valueOf(rs.getInt("itemid")), Integer.valueOf(rs.getInt("chance"))}); tableModel.insertRow(this.table1.getRowCount(), new Object[]{Integer.valueOf(kp.getId()), kp.getItenName(), Integer.valueOf(kp.getItemId()), Integer.valueOf(kp.getChance())});
} }
rs.close();
ps.close();
con.close();
} catch (SQLException ex) {
System.err.println("[" + FileoutputUtil.CurrentReadable_Time() + "]怪物暴率出错:" + ex.getMessage());
} }
private void 加载刷新怪物卡片(ActionEvent e) {
ClearTable(table2);
WriteTable2(Drop.getKPS());
} }
private void 刷新怪物爆物数据(ActionEvent e) { private void 刷新怪物爆物数据(ActionEvent e) {
刷新怪物爆物(0); ClearTable(table2);
WriteTable2(Drop.getMobBLs());
ClearTable(table1);
WriteTable1(Drop.getQQS());
}
private void 根据怪物ID清理(ActionEvent e) {
Drop.deleteGWdropperid(Integer.valueOf(this.怪物ID清理.getText()));
ClearTable(table2);
刷新怪物爆物数据(null);
}
private void 根据物品ID清理(ActionEvent e) {
Drop.deleteItemId(Integer.valueOf(this.物品ID清理.getText()));
ClearTable(table1);
ClearTable(table2);
刷新怪物爆物数据(null);
}
private void 一键清空独立爆率表(ActionEvent e) {
Drop.deleteGWAll();
ClearTable(table2);
}
private void 一键清空全局爆率表(ActionEvent e) {
Drop.deleteQJAll();
ClearTable(table1);
}
private void button物品ID查询掉落(ActionEvent e) {
ClearTable(table2);
WriteTable2(Drop.getItemIdsMob(this.物品ID查询掉落.getText()));
}
private void 物品名查询掉落函数(ActionEvent e) {
ClearTable(table2);
WriteTable2(Drop.getItemNamesMob(this.物品名查询掉落.getText()));
}
private void 怪物ID查询掉落函数(ActionEvent e) {
ClearTable(table2);
WriteTable2(Drop.getMobIdsMob(this.怪物ID查询掉落.getText()));
}
private void 怪物名查询掉落函数(ActionEvent e) {
ClearTable(table2);
WriteTable2(Drop.getMobNames(this.怪物名查询掉落.getText()));
} }
public void SetRightL(JTable tableobj){ public void SetRightL(JTable tableobj){
@ -111,6 +125,82 @@ public class ExplosiveControl extends JPanel {
} }
} }
private void 新增独立爆率配置(ActionEvent e) {
Integer MonId;
Integer ItemId;
Integer Chance;
try {
MonId = Integer.valueOf(this.G_1.getText());
ItemId = Integer.valueOf(this.G_2.getText());
Chance = Integer.valueOf(this.G_3.getText());
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, "新增失败!检查是否填写了全部参数", "提示", JOptionPane.INFORMATION_MESSAGE);
return;
}
try {
Drop.insertGWId(MonId, ItemId, Chance);
} catch (Exception ee) {
// 显示消息提示框
JOptionPane.showMessageDialog(null, "新增失败检查怪物ID和物品ID是否有误。", "提示", JOptionPane.INFORMATION_MESSAGE);
return;
}
刷新怪物爆物数据(null);
}
private void 独立爆率删除配置(ActionEvent e) {
// TODO add your code here
int selectedRow = table2.getSelectedRow();
if (selectedRow != -1) {
DefaultTableModel tableModel = (DefaultTableModel) table2.getModel();
Integer Ids = (Integer) tableModel.getValueAt(selectedRow,0);
Integer MonId = (Integer) tableModel.getValueAt(selectedRow,2);
Drop.deleteGWId(Ids,MonId);
tableModel.removeRow(selectedRow);
if(tableModel.getRowCount() > selectedRow)table2.setRowSelectionInterval(selectedRow, selectedRow);
}
}
private void 新增全局爆率配置(ActionEvent e) {
Integer ItemId;
Integer Chance;
try {
ItemId = Integer.valueOf(this.G_5.getText());
Chance = Integer.valueOf(this.G_6.getText());
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, "新增失败!检查是否填写了全部参数", "提示", JOptionPane.INFORMATION_MESSAGE);
return;
}
try {
Drop.insertQQ( ItemId, Chance);
} catch (Exception ee) {
// 显示消息提示框
JOptionPane.showMessageDialog(null, "新增失败检查怪物ID和物品ID是否有误。", "提示", JOptionPane.INFORMATION_MESSAGE);
return;
}
刷新怪物爆物数据(null);
}
private void 删除全局爆率配置(ActionEvent e) {
int selectedRow = table1.getSelectedRow();
if (selectedRow != -1) {
DefaultTableModel tableModel = (DefaultTableModel) table1.getModel();
Integer Ids = (Integer) tableModel.getValueAt(selectedRow,0);
Integer MonId = (Integer) tableModel.getValueAt(selectedRow,2);
// TODO add your code here
tableModel.removeRow(selectedRow);
if(tableModel.getRowCount() > selectedRow)table1.setRowSelectionInterval(selectedRow, selectedRow);
}
}
private void initComponents() { private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off
panel1 = new JPanel(); panel1 = new JPanel();
@ -119,18 +209,20 @@ public class ExplosiveControl extends JPanel {
panel2 = new JPanel(); panel2 = new JPanel();
button11 = new JButton(); button11 = new JButton();
panel3 = new JPanel(); panel3 = new JPanel();
textField1 = new JTextField(); 怪物ID清理 = new JTextField();
textField2 = new JTextField(); 物品ID清理 = new JTextField();
button13 = new JButton(); button13 = new JButton();
button14 = new JButton(); button14 = new JButton();
label5 = new JLabel();
label6 = new JLabel();
panel4 = new JPanel(); panel4 = new JPanel();
物品ID查询掉落 = new JTextField(); 物品ID查询掉落 = new JTextField();
button15 = new JButton(); button15 = new JButton();
textField4 = new JTextField(); 物品名查询掉落 = new JTextField();
button16 = new JButton(); button16 = new JButton();
怪物ID查询掉落 = new JTextField(); 怪物ID查询掉落 = new JTextField();
button17 = new JButton(); button17 = new JButton();
textField6 = new JTextField(); 怪物名查询掉落 = new JTextField();
button18 = new JButton(); button18 = new JButton();
label1 = new JLabel(); label1 = new JLabel();
label2 = new JLabel(); label2 = new JLabel();
@ -151,6 +243,16 @@ public class ExplosiveControl extends JPanel {
button7 = new JButton(); button7 = new JButton();
button8 = new JButton(); button8 = new JButton();
button19 = new JButton(); button19 = new JButton();
G_1 = new JTextField();
G_2 = new JTextField();
G_3 = new JTextField();
label7 = new JLabel();
label8 = new JLabel();
label9 = new JLabel();
label11 = new JLabel();
G_5 = new JTextField();
label12 = new JLabel();
G_6 = new JTextField();
//======== this ======== //======== this ========
setLayout(null); setLayout(null);
@ -162,11 +264,13 @@ public class ExplosiveControl extends JPanel {
//---- button9 ---- //---- button9 ----
button9.setText("\u4e00\u952e\u6e05\u7a7a\u72ec\u7acb\u7206\u7387\u8868"); button9.setText("\u4e00\u952e\u6e05\u7a7a\u72ec\u7acb\u7206\u7387\u8868");
button9.addActionListener(e -> 一键清空独立爆率表(e));
panel1.add(button9); panel1.add(button9);
button9.setBounds(5, 30, 190, button9.getPreferredSize().height); button9.setBounds(5, 30, 190, button9.getPreferredSize().height);
//---- button10 ---- //---- button10 ----
button10.setText("\u4e00\u952e\u6e05\u7a7a\u5168\u5c40\u7206\u7387\u8868"); button10.setText("\u4e00\u952e\u6e05\u7a7a\u5168\u5c40\u7206\u7387\u8868");
button10.addActionListener(e -> 一键清空全局爆率表(e));
panel1.add(button10); panel1.add(button10);
button10.setBounds(5, 60, 190, button10.getPreferredSize().height); button10.setBounds(5, 60, 190, button10.getPreferredSize().height);
@ -221,20 +325,32 @@ public class ExplosiveControl extends JPanel {
{ {
panel3.setBorder(new TitledBorder("\u5feb\u6377\u6e05\u7406\u6240\u6709\u7206\u7387")); panel3.setBorder(new TitledBorder("\u5feb\u6377\u6e05\u7406\u6240\u6709\u7206\u7387"));
panel3.setLayout(null); panel3.setLayout(null);
panel3.add(textField1); panel3.add(怪物ID清理);
textField1.setBounds(10, 35, 115, textField1.getPreferredSize().height); 怪物ID清理.setBounds(10, 35, 115, 怪物ID清理.getPreferredSize().height);
panel3.add(textField2); panel3.add(物品ID清理);
textField2.setBounds(10, 80, 115, textField2.getPreferredSize().height); 物品ID清理.setBounds(10, 85, 115, 物品ID清理.getPreferredSize().height);
//---- button13 ---- //---- button13 ----
button13.setText("\u6e05\u7406"); button13.setText("\u6e05\u7406");
button13.addActionListener(e -> 根据怪物ID清理(e));
panel3.add(button13); panel3.add(button13);
button13.setBounds(130, 35, 58, 25); button13.setBounds(130, 35, 58, 25);
//---- button14 ---- //---- button14 ----
button14.setText("\u6e05\u7406"); button14.setText("\u6e05\u7406");
button14.addActionListener(e -> 根据物品ID清理(e));
panel3.add(button14); panel3.add(button14);
button14.setBounds(130, 80, 58, 25); button14.setBounds(130, 85, 58, 25);
//---- label5 ----
label5.setText("\u6839\u636e\u602a\u7269ID\u6e05\u7406");
panel3.add(label5);
label5.setBounds(15, 20, 85, 17);
//---- label6 ----
label6.setText("\u6839\u636e\u7269\u54c1ID\u6e05\u7406");
panel3.add(label6);
label6.setBounds(15, 70, 85, 17);
{ {
// compute preferred size // compute preferred size
@ -259,33 +375,37 @@ public class ExplosiveControl extends JPanel {
panel4.setBorder(new TitledBorder("\u5feb\u6377\u67e5\u8be2")); panel4.setBorder(new TitledBorder("\u5feb\u6377\u67e5\u8be2"));
panel4.setLayout(null); panel4.setLayout(null);
panel4.add(物品ID查询掉落); panel4.add(物品ID查询掉落);
物品ID查询掉落.setBounds(10, 45, 115, 物品ID查询掉落.getPreferredSize().height); 物品ID查询掉落.setBounds(10, 40, 115, 物品ID查询掉落.getPreferredSize().height);
//---- button15 ---- //---- button15 ----
button15.setText("\u67e5\u8be2"); button15.setText("\u67e5\u8be2");
button15.addActionListener(e -> button物品ID查询掉落(e));
panel4.add(button15); panel4.add(button15);
button15.setBounds(130, 45, 58, 25); button15.setBounds(130, 40, 58, 25);
panel4.add(textField4); panel4.add(物品名查询掉落);
textField4.setBounds(10, 115, 115, textField4.getPreferredSize().height); 物品名查询掉落.setBounds(10, 90, 115, 物品名查询掉落.getPreferredSize().height);
//---- button16 ---- //---- button16 ----
button16.setText("\u67e5\u8be2"); button16.setText("\u67e5\u8be2");
button16.addActionListener(e -> 物品名查询掉落函数(e));
panel4.add(button16); panel4.add(button16);
button16.setBounds(130, 115, 58, 25); button16.setBounds(130, 90, 58, 25);
panel4.add(怪物ID查询掉落); panel4.add(怪物ID查询掉落);
怪物ID查询掉落.setBounds(10, 180, 115, 怪物ID查询掉落.getPreferredSize().height); 怪物ID查询掉落.setBounds(10, 140, 115, 怪物ID查询掉落.getPreferredSize().height);
//---- button17 ---- //---- button17 ----
button17.setText("\u67e5\u8be2"); button17.setText("\u67e5\u8be2");
button17.addActionListener(e -> 怪物ID查询掉落函数(e));
panel4.add(button17); panel4.add(button17);
button17.setBounds(130, 180, 58, 25); button17.setBounds(130, 140, 58, 25);
panel4.add(textField6); panel4.add(怪物名查询掉落);
textField6.setBounds(10, 245, 115, textField6.getPreferredSize().height); 怪物名查询掉落.setBounds(10, 190, 115, 怪物名查询掉落.getPreferredSize().height);
//---- button18 ---- //---- button18 ----
button18.setText("\u67e5\u8be2"); button18.setText("\u67e5\u8be2");
button18.addActionListener(e -> 怪物名查询掉落函数(e));
panel4.add(button18); panel4.add(button18);
button18.setBounds(130, 245, 58, 25); button18.setBounds(130, 190, 58, 25);
//---- label1 ---- //---- label1 ----
label1.setText("\u7269\u54c1ID\u67e5\u8be2\u6389\u843d"); label1.setText("\u7269\u54c1ID\u67e5\u8be2\u6389\u843d");
@ -295,17 +415,17 @@ public class ExplosiveControl extends JPanel {
//---- label2 ---- //---- label2 ----
label2.setText("\u7269\u54c1\u540d\u67e5\u8be2\u6389\u843d"); label2.setText("\u7269\u54c1\u540d\u67e5\u8be2\u6389\u843d");
panel4.add(label2); panel4.add(label2);
label2.setBounds(15, 91, 85, 17); label2.setBounds(15, 75, 85, 17);
//---- label3 ---- //---- label3 ----
label3.setText("\u602a\u7269ID\u67e5\u8be2\u6389\u843d"); label3.setText("\u602a\u7269ID\u67e5\u8be2\u6389\u843d");
panel4.add(label3); panel4.add(label3);
label3.setBounds(15, 157, 85, 17); label3.setBounds(15, 125, 85, 17);
//---- label4 ---- //---- label4 ----
label4.setText("\u602a\u7269\u540d\u67e5\u8be2\u6389\u843d"); label4.setText("\u602a\u7269\u540d\u67e5\u8be2\u6389\u843d");
panel4.add(label4); panel4.add(label4);
label4.setBounds(15, 223, 85, 17); label4.setBounds(15, 175, 85, 17);
{ {
// compute preferred size // compute preferred size
@ -323,7 +443,7 @@ public class ExplosiveControl extends JPanel {
} }
} }
add(panel4); add(panel4);
panel4.setBounds(25, 340, 200, 295); panel4.setBounds(25, 340, 200, 235);
//======== panel5 ======== //======== panel5 ========
{ {
@ -336,7 +456,6 @@ public class ExplosiveControl extends JPanel {
//---- table2 ---- //---- table2 ----
table2.setModel(new DefaultTableModel( table2.setModel(new DefaultTableModel(
new Object[][] { new Object[][] {
{null, null, null, null, null, null},
}, },
new String[] { new String[] {
"\u5e8f\u53f7", "\u602a\u7269\u540d", "\u602a\u7269ID", "\u7269\u54c1\u540d", "\u7269\u54c1ID", "\u7206\u7387" "\u5e8f\u53f7", "\u602a\u7269\u540d", "\u602a\u7269ID", "\u7269\u54c1\u540d", "\u7269\u54c1ID", "\u7206\u7387"
@ -360,7 +479,7 @@ public class ExplosiveControl extends JPanel {
panel5.add(scrollPane3); panel5.add(scrollPane3);
} }
add(panel5); add(panel5);
panel5.setBounds(235, 5, 840, 620); panel5.setBounds(235, 5, 840, 580);
//======== panel6 ======== //======== panel6 ========
{ {
@ -375,7 +494,6 @@ public class ExplosiveControl extends JPanel {
//---- table1 ---- //---- table1 ----
table1.setModel(new DefaultTableModel( table1.setModel(new DefaultTableModel(
new Object[][] { new Object[][] {
{null, null, null, null},
}, },
new String[] { new String[] {
"\u5e8f\u53f7", "\u7269\u54c1\u540d", "\u7269\u54c1ID", "\u7206\u7387" "\u5e8f\u53f7", "\u7269\u54c1\u540d", "\u7269\u54c1ID", "\u7206\u7387"
@ -399,53 +517,107 @@ public class ExplosiveControl extends JPanel {
panel6.add(scrollPane1); panel6.add(scrollPane1);
} }
add(panel6); add(panel6);
panel6.setBounds(1090, 5, 410, 620); panel6.setBounds(1080, 5, 420, 580);
//---- button1 ---- //---- button1 ----
button1.setText("\u65b0\u589e\u914d\u7f6e"); button1.setText("\u65b0\u589e\u914d\u7f6e");
button1.addActionListener(e -> 新增独立爆率配置(e));
add(button1); add(button1);
button1.setBounds(383, 625, 95, button1.getPreferredSize().height); button1.setBounds(235, 625, 95, button1.getPreferredSize().height);
//---- button2 ---- //---- button2 ----
button2.setText("\u5220\u9664\u914d\u7f6e"); button2.setText("\u5220\u9664\u914d\u7f6e");
button2.addActionListener(e -> 独立爆率删除配置(e));
add(button2); add(button2);
button2.setBounds(491, 625, 95, 34); button2.setBounds(345, 625, 95, 34);
//---- button5 ---- //---- button5 ----
button5.setText("\u4e00\u952e\u5bfc\u5165"); button5.setText("\u4e00\u952e\u5bfc\u5165");
add(button5); add(button5);
button5.setBounds(599, 625, 95, 34); button5.setBounds(455, 625, 95, 34);
//---- button6 ---- //---- button6 ----
button6.setText("\u4e00\u952e\u5bfc\u51fa"); button6.setText("\u4e00\u952e\u5bfc\u51fa");
add(button6); add(button6);
button6.setBounds(707, 625, 95, 34); button6.setBounds(560, 625, 95, 34);
//---- button3 ---- //---- button3 ----
button3.setText("\u65b0\u589e\u914d\u7f6e"); button3.setText("\u65b0\u589e\u914d\u7f6e");
button3.addActionListener(e -> 新增全局爆率配置(e));
add(button3); add(button3);
button3.setBounds(1090, 625, 95, 34); button3.setBounds(1080, 625, 95, 34);
//---- button4 ---- //---- button4 ----
button4.setText("\u5220\u9664\u914d\u7f6e"); button4.setText("\u5220\u9664\u914d\u7f6e");
button4.addActionListener(e -> 删除全局爆率配置(e));
add(button4); add(button4);
button4.setBounds(1195, 625, 95, 34); button4.setBounds(1185, 625, 95, 34);
//---- button7 ---- //---- button7 ----
button7.setText("\u4e00\u952e\u5bfc\u5165"); button7.setText("\u4e00\u952e\u5bfc\u5165");
add(button7); add(button7);
button7.setBounds(1300, 625, 95, 34); button7.setBounds(1290, 625, 95, 34);
//---- button8 ---- //---- button8 ----
button8.setText("\u4e00\u952e\u5bfc\u51fa"); button8.setText("\u4e00\u952e\u5bfc\u51fa");
add(button8); add(button8);
button8.setBounds(1405, 625, 95, 34); button8.setBounds(1395, 625, 95, 34);
//---- button19 ---- //---- button19 ----
button19.setText("\u5237\u65b0\u602a\u7269\u7206\u7269\u6570\u636e"); button19.setText("\u5237\u65b0\u602a\u7269\u7206\u7269\u6570\u636e");
button19.addActionListener(e -> 刷新怪物爆物数据(e)); button19.addActionListener(e -> 刷新怪物爆物数据(e));
add(button19); add(button19);
button19.setBounds(235, 625, 135, 34); button19.setBounds(45, 585, 155, 60);
//---- G_1 ----
G_1.setToolTipText("\u602a\u7269ID");
add(G_1);
G_1.setBounds(280, 590, 100, 30);
//---- G_2 ----
G_2.setToolTipText("\u7269\u54c1ID");
add(G_2);
G_2.setBounds(425, 590, 100, 30);
//---- G_3 ----
G_3.setToolTipText("\u7206\u7387");
add(G_3);
G_3.setBounds(560, 590, 100, 30);
//---- label7 ----
label7.setText("\u602a\u7269ID");
add(label7);
label7.setBounds(new Rectangle(new Point(240, 595), label7.getPreferredSize()));
//---- label8 ----
label8.setText("\u7269\u54c1ID");
add(label8);
label8.setBounds(385, 595, 37, 17);
//---- label9 ----
label9.setText("\u7206\u7387");
add(label9);
label9.setBounds(530, 595, 37, 17);
//---- label11 ----
label11.setText("\u7269\u54c1ID");
add(label11);
label11.setBounds(1085, 595, 37, 17);
//---- G_5 ----
G_5.setToolTipText("\u7269\u54c1ID");
add(G_5);
G_5.setBounds(1125, 590, 100, 30);
//---- label12 ----
label12.setText("\u7206\u7387");
add(label12);
label12.setBounds(1230, 595, 37, 17);
//---- G_6 ----
G_6.setToolTipText("\u7206\u7387");
add(G_6);
G_6.setBounds(1260, 590, 100, 30);
{ {
// compute preferred size // compute preferred size
@ -475,18 +647,20 @@ public class ExplosiveControl extends JPanel {
private JPanel panel2; private JPanel panel2;
private JButton button11; private JButton button11;
private JPanel panel3; private JPanel panel3;
private JTextField textField1; private JTextField 怪物ID清理;
private JTextField textField2; private JTextField 物品ID清理;
private JButton button13; private JButton button13;
private JButton button14; private JButton button14;
private JLabel label5;
private JLabel label6;
private JPanel panel4; private JPanel panel4;
private JTextField 物品ID查询掉落; private JTextField 物品ID查询掉落;
private JButton button15; private JButton button15;
private JTextField textField4; private JTextField 物品名查询掉落;
private JButton button16; private JButton button16;
private JTextField 怪物ID查询掉落; private JTextField 怪物ID查询掉落;
private JButton button17; private JButton button17;
private JTextField textField6; private JTextField 怪物名查询掉落;
private JButton button18; private JButton button18;
private JLabel label1; private JLabel label1;
private JLabel label2; private JLabel label2;
@ -507,5 +681,15 @@ public class ExplosiveControl extends JPanel {
private JButton button7; private JButton button7;
private JButton button8; private JButton button8;
private JButton button19; private JButton button19;
private JTextField G_1;
private JTextField G_2;
private JTextField G_3;
private JLabel label7;
private JLabel label8;
private JLabel label9;
private JLabel label11;
private JTextField G_5;
private JLabel label12;
private JTextField G_6;
// JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on // JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on
} }

View File

@ -11,6 +11,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button9" name: "button9"
"text": "一键清空独立爆率表" "text": "一键清空独立爆率表"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "一键清空独立爆率表", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 5 "x": 5
"y": 30 "y": 30
@ -19,6 +20,7 @@ new FormModel {
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button10" name: "button10"
"text": "一键清空全局爆率表" "text": "一键清空全局爆率表"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "一键清空全局爆率表", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 5 "x": 5
"y": 60 "y": 60
@ -52,22 +54,23 @@ new FormModel {
name: "panel3" name: "panel3"
"border": new javax.swing.border.TitledBorder( "快捷清理所有爆率" ) "border": new javax.swing.border.TitledBorder( "快捷清理所有爆率" )
add( new FormComponent( "javax.swing.JTextField" ) { add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField1" name: "怪物ID清理"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 10 "x": 10
"y": 35 "y": 35
"width": 115 "width": 115
} ) } )
add( new FormComponent( "javax.swing.JTextField" ) { add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField2" name: "物品ID清理"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 10 "x": 10
"y": 80 "y": 85
"width": 115 "width": 115
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button13" name: "button13"
"text": "清理" "text": "清理"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "根据怪物ID清理", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 130 "x": 130
"y": 35 "y": 35
@ -77,12 +80,31 @@ new FormModel {
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button14" name: "button14"
"text": "清理" "text": "清理"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "根据物品ID清理", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 130 "x": 130
"y": 80 "y": 85
"height": 25 "height": 25
"width": 58 "width": 58
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label5"
"text": "根据怪物ID清理"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 85
"height": 17
"x": 15
"y": 20
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label6"
"text": "根据物品ID清理"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 85
"height": 17
"x": 15
"y": 70
} )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 200 "width": 200
"height": 125 "height": 125
@ -97,64 +119,68 @@ new FormModel {
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 115 "width": 115
"x": 10 "x": 10
"y": 45 "y": 40
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button15" name: "button15"
"text": "查询" "text": "查询"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "button物品ID查询掉落", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 58 "width": 58
"height": 25 "height": 25
"x": 130 "x": 130
"y": 45 "y": 40
} ) } )
add( new FormComponent( "javax.swing.JTextField" ) { add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField4" name: "物品名查询掉落"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 115 "width": 115
"x": 10 "x": 10
"y": 115 "y": 90
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button16" name: "button16"
"text": "查询" "text": "查询"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "物品名查询掉落函数", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 58 "width": 58
"height": 25 "height": 25
"x": 130 "x": 130
"y": 115 "y": 90
} ) } )
add( new FormComponent( "javax.swing.JTextField" ) { add( new FormComponent( "javax.swing.JTextField" ) {
name: "怪物ID查询掉落" name: "怪物ID查询掉落"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 115 "width": 115
"x": 10 "x": 10
"y": 180 "y": 140
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button17" name: "button17"
"text": "查询" "text": "查询"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "怪物ID查询掉落函数", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 58 "width": 58
"height": 25 "height": 25
"x": 130 "x": 130
"y": 180 "y": 140
} ) } )
add( new FormComponent( "javax.swing.JTextField" ) { add( new FormComponent( "javax.swing.JTextField" ) {
name: "textField6" name: "怪物名查询掉落"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 115 "width": 115
"x": 10 "x": 10
"y": 245 "y": 190
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button18" name: "button18"
"text": "查询" "text": "查询"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "怪物名查询掉落函数", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 58 "width": 58
"height": 25 "height": 25
"x": 130 "x": 130
"y": 245 "y": 190
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label1" name: "label1"
@ -170,7 +196,7 @@ new FormModel {
"width": 85 "width": 85
"height": 17 "height": 17
"x": 15 "x": 15
"y": 91 "y": 75
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label3" name: "label3"
@ -179,7 +205,7 @@ new FormModel {
"width": 85 "width": 85
"height": 17 "height": 17
"x": 15 "x": 15
"y": 157 "y": 125
} ) } )
add( new FormComponent( "javax.swing.JLabel" ) { add( new FormComponent( "javax.swing.JLabel" ) {
name: "label4" name: "label4"
@ -188,11 +214,11 @@ new FormModel {
"width": 85 "width": 85
"height": 17 "height": 17
"x": 15 "x": 15
"y": 223 "y": 175
} ) } )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 200 "width": 200
"height": 295 "height": 235
"x": 25 "x": 25
"y": 340 "y": 340
} ) } )
@ -203,16 +229,7 @@ new FormModel {
name: "scrollPane3" name: "scrollPane3"
add( new FormComponent( "javax.swing.JTable" ) { add( new FormComponent( "javax.swing.JTable" ) {
name: "table2" name: "table2"
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector { "model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
add( new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
add( null )
add( null )
} )
}, new java.util.Vector {
add( "序号" ) add( "序号" )
add( "怪物名" ) add( "怪物名" )
add( "怪物ID" ) add( "怪物ID" )
@ -245,7 +262,7 @@ new FormModel {
} ) } )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 840 "width": 840
"height": 620 "height": 580
"x": 235 "x": 235
"y": 5 "y": 5
} ) } )
@ -258,14 +275,7 @@ new FormModel {
"verticalScrollBarPolicy": 21 "verticalScrollBarPolicy": 21
add( new FormComponent( "javax.swing.JTable" ) { add( new FormComponent( "javax.swing.JTable" ) {
name: "table1" name: "table1"
"model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector { "model": new com.jformdesigner.model.SwingTableModel( new java.util.Vector, new java.util.Vector {
add( new java.util.Vector {
add( null )
add( null )
add( null )
add( null )
} )
}, new java.util.Vector {
add( "序号" ) add( "序号" )
add( "物品名" ) add( "物品名" )
add( "物品ID" ) add( "物品ID" )
@ -289,26 +299,28 @@ new FormModel {
} ) } )
} ) } )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 410 "width": 420
"height": 620 "height": 580
"x": 1090 "x": 1080
"y": 5 "y": 5
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button1" name: "button1"
"text": "新增配置" "text": "新增配置"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增独立爆率配置", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 383 "x": 235
"y": 625 "y": 625
"width": 95 "width": 95
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button2" name: "button2"
"text": "删除配置" "text": "删除配置"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "独立爆率删除配置", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 95 "width": 95
"height": 34 "height": 34
"x": 491 "x": 345
"y": 625 "y": 625
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
@ -317,7 +329,7 @@ new FormModel {
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 95 "width": 95
"height": 34 "height": 34
"x": 599 "x": 455
"y": 625 "y": 625
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
@ -326,25 +338,27 @@ new FormModel {
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 95 "width": 95
"height": 34 "height": 34
"x": 707 "x": 560
"y": 625 "y": 625
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button3" name: "button3"
"text": "新增配置" "text": "新增配置"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "新增全局爆率配置", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 95 "width": 95
"height": 34 "height": 34
"x": 1090 "x": 1080
"y": 625 "y": 625
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
name: "button4" name: "button4"
"text": "删除配置" "text": "删除配置"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "删除全局爆率配置", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 95 "width": 95
"height": 34 "height": 34
"x": 1195 "x": 1185
"y": 625 "y": 625
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
@ -353,7 +367,7 @@ new FormModel {
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 95 "width": 95
"height": 34 "height": 34
"x": 1300 "x": 1290
"y": 625 "y": 625
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
@ -362,7 +376,7 @@ new FormModel {
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 95 "width": 95
"height": 34 "height": 34
"x": 1405 "x": 1395
"y": 625 "y": 625
} ) } )
add( new FormComponent( "javax.swing.JButton" ) { add( new FormComponent( "javax.swing.JButton" ) {
@ -370,10 +384,98 @@ new FormModel {
"text": "刷新怪物爆物数据" "text": "刷新怪物爆物数据"
addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "刷新怪物爆物数据", true ) ) addEvent( new FormEvent( "java.awt.event.ActionListener", "actionPerformed", "刷新怪物爆物数据", true ) )
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) { }, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 135 "width": 155
"height": 34 "height": 60
"x": 235 "x": 45
"y": 625 "y": 585
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "G_1"
"toolTipText": "怪物ID"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 30
"x": 280
"y": 590
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "G_2"
"toolTipText": "物品ID"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 30
"x": 425
"y": 590
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "G_3"
"toolTipText": "爆率"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 30
"x": 560
"y": 590
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label7"
"text": "怪物ID"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"x": 240
"y": 595
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label8"
"text": "物品ID"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 37
"height": 17
"x": 385
"y": 595
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label9"
"text": "爆率"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 37
"height": 17
"x": 530
"y": 595
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label11"
"text": "物品ID"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 37
"height": 17
"x": 1085
"y": 595
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "G_5"
"toolTipText": "物品ID"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 30
"x": 1125
"y": 590
} )
add( new FormComponent( "javax.swing.JLabel" ) {
name: "label12"
"text": "爆率"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 37
"height": 17
"x": 1230
"y": 595
} )
add( new FormComponent( "javax.swing.JTextField" ) {
name: "G_6"
"toolTipText": "爆率"
}, new FormLayoutConstraints( class com.jformdesigner.runtime.NullConstraints ) {
"width": 100
"height": 30
"x": 1260
"y": 590
} ) } )
}, new FormLayoutConstraints( null ) { }, new FormLayoutConstraints( null ) {
"location": new java.awt.Point( 0, 0 ) "location": new java.awt.Point( 0, 0 )

View File

@ -104,12 +104,17 @@ public class Drop {
b.setDropperid(rs.getInt("dropperid")); b.setDropperid(rs.getInt("dropperid"));
b.setItemId(rs.getInt("itemid")); b.setItemId(rs.getInt("itemid"));
b.setItenName(MapleItemInformationProvider.getInstance().getName(rs.getInt("itemid"))); b.setItenName(MapleItemInformationProvider.getInstance().getName(rs.getInt("itemid")));
try{
MapleMonster dropperid1 = MapleLifeFactory.getMonster(rs.getInt("dropperid")); MapleMonster dropperid1 = MapleLifeFactory.getMonster(rs.getInt("dropperid"));
if (dropperid1 != null) { if (dropperid1 != null) {
b.setDropName(dropperid1.getStats().getName()); b.setDropName(dropperid1.getStats().getName());
} else { } else {
b.setDropName("未查询到怪物"); b.setDropName("未查询到怪物");
} }
}
catch (Exception e){
b.setDropName("无名字");
};
b.setChance(rs.getInt("chance")); b.setChance(rs.getInt("chance"));
b.setChance(rs.getInt("chance")); b.setChance(rs.getInt("chance"));
mobs.add(b); mobs.add(b);
@ -239,6 +244,7 @@ public class Drop {
* @param chance 爆率 * @param chance 爆率
*/ */
public static void insertGWId(int dropperid, int itemid, int chance) { public static void insertGWId(int dropperid, int itemid, int chance) {
MapleMonster dropperid1 = MapleLifeFactory.getMonster(itemid);
try { try {
final Connection con = (Connection) DBConPool.getInstance().getDataSource().getConnection(); final Connection con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
PreparedStatement ps = null; PreparedStatement ps = null;
@ -257,7 +263,6 @@ public class Drop {
b.setDropperid(dropperid); b.setDropperid(dropperid);
b.setItemId(itemid); b.setItemId(itemid);
b.setItenName(MapleItemInformationProvider.getInstance().getName(itemid)); b.setItenName(MapleItemInformationProvider.getInstance().getName(itemid));
MapleMonster dropperid1 = MapleLifeFactory.getMonster(itemid);
if (dropperid1 != null) { if (dropperid1 != null) {
b.setDropName(dropperid1.getStats().getName()); b.setDropName(dropperid1.getStats().getName());
} else { } else {
@ -292,15 +297,8 @@ public class Drop {
while (rs.next()) { while (rs.next()) {
Drop b = new Drop(); Drop b = new Drop();
b.setId(rs.getInt("id")); b.setId(rs.getInt("id"));
b.setDropperid(rs.getInt("dropperid"));
b.setItemId(rs.getInt("itemid")); b.setItemId(rs.getInt("itemid"));
b.setItenName(MapleItemInformationProvider.getInstance().getName(rs.getInt("itemid"))); b.setItenName(MapleItemInformationProvider.getInstance().getName(rs.getInt("itemid")));
MapleMonster dropperid1 = MapleLifeFactory.getMonster(rs.getInt("dropperid"));
if (dropperid1 != null) {
b.setDropName(dropperid1.getStats().getName());
} else {
b.setDropName("未查询到怪物");
}
b.setChance(rs.getInt("chance")); b.setChance(rs.getInt("chance"));
QQS.add(b); QQS.add(b);
} }