Merge branch 'master' of http://192.168.200.25:3000/Lenheart/MXD-Server
This commit is contained in:
commit
824a68b345
|
|
@ -6373,6 +6373,50 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
return jf;
|
||||
}
|
||||
|
||||
public int getAccountidLogByCid(final String log1) {
|
||||
int jf = 0;
|
||||
try {
|
||||
final Connection con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
|
||||
final PreparedStatement ps = con.prepareStatement("select * from accountidlog where cid =? and log = ?");
|
||||
ps.setInt(1, this.id);
|
||||
ps.setString(2, log1);
|
||||
final ResultSet rs = ps.executeQuery();
|
||||
if (rs.next()) {
|
||||
jf = rs.getInt("sz1");
|
||||
} else {
|
||||
final PreparedStatement psu = con.prepareStatement("insert into accountidlog (id,cid,log, sz1) VALUES (?,?, ?,?)");
|
||||
psu.setInt(1, this.accountid);
|
||||
psu.setInt(2, this.id);
|
||||
psu.setString(3, log1);
|
||||
psu.setInt(4, 0);
|
||||
psu.executeUpdate();
|
||||
psu.close();
|
||||
}
|
||||
rs.close();
|
||||
ps.close();
|
||||
con.close();
|
||||
} catch (SQLException ex) {
|
||||
System.err.println("FZ3读取发生错误: " + ex);
|
||||
}
|
||||
return jf;
|
||||
}
|
||||
|
||||
public void setAccountidLogByCid(final String log1, final int slot) {
|
||||
final int jf = this.getAccountidLog(log1);
|
||||
try {
|
||||
final Connection con = (Connection) DBConPool.getInstance().getDataSource().getConnection();
|
||||
final PreparedStatement ps = con.prepareStatement("UPDATE accountidlog SET sz1 = ? where cid = ? AND log = ?");
|
||||
ps.setInt(1, jf + slot);
|
||||
ps.setInt(2, this.id);
|
||||
ps.setString(3, log1);
|
||||
ps.executeUpdate();
|
||||
ps.close();
|
||||
con.close();
|
||||
} catch (SQLException ex) {
|
||||
System.err.println("FZ3加减发生错误: " + ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void setAccountidLog(final String log1) {
|
||||
this.setAccountidLog(log1, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -597,8 +597,8 @@ public class PlayerStats implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
double bl = 0;
|
||||
double jb = 0;
|
||||
int bl = 0;
|
||||
int jb = 0;
|
||||
if (Start.blkg == 1){
|
||||
for (BlConfig blConfig : Start.BLlist) {
|
||||
if (blConfig.isInTimeRange()){
|
||||
|
|
@ -619,8 +619,8 @@ public class PlayerStats implements Serializable {
|
|||
}
|
||||
}
|
||||
}
|
||||
this.dropMod+= bl;
|
||||
this.cashMod+= jb;
|
||||
this.dropMod+= bl/100;
|
||||
this.cashMod+= jb/100;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import cn.hutool.core.date.DateUtil;
|
|||
|
||||
public class BlConfig {
|
||||
int item_id;
|
||||
double gold_rate;
|
||||
double item_rate;
|
||||
int gold_rate;
|
||||
int item_rate;
|
||||
|
||||
String time_range;
|
||||
|
||||
|
|
@ -22,19 +22,19 @@ public class BlConfig {
|
|||
this.item_id = item_id;
|
||||
}
|
||||
|
||||
public double getGold_rate() {
|
||||
public int getGold_rate() {
|
||||
return gold_rate;
|
||||
}
|
||||
|
||||
public void setGold_rate(double gold_rate) {
|
||||
public void setGold_rate(int gold_rate) {
|
||||
this.gold_rate = gold_rate;
|
||||
}
|
||||
|
||||
public double getItem_rate() {
|
||||
public int getItem_rate() {
|
||||
return item_rate;
|
||||
}
|
||||
|
||||
public void setItem_rate(double item_rate) {
|
||||
public void setItem_rate(int item_rate) {
|
||||
this.item_rate = item_rate;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package gui;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.PreparedStatement;
|
||||
|
|
@ -71,6 +72,7 @@ import javax.swing.JPanel;
|
|||
import javax.swing.JLabel;
|
||||
import java.lang.management.MemoryMXBean;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -1008,6 +1010,7 @@ public class 特殊控制台 extends JFrame {
|
|||
}
|
||||
|
||||
public static void initTWinfo(){
|
||||
try {
|
||||
String property = System.getProperty("user.dir");
|
||||
FileReader fileReader = new FileReader(property + "\\配置文件\\伤害控制.ini");
|
||||
String result = fileReader.readString();
|
||||
|
|
@ -1033,12 +1036,13 @@ public class 特殊控制台 extends JFrame {
|
|||
//转json
|
||||
JSONObject jsonObject1 = JSONObject.parseObject(result3);
|
||||
Start.blkg = jsonObject1.getInteger("open");
|
||||
Start.bossxw = jsonObject1.getInteger("bossxw");
|
||||
Start.bldj = jsonObject1.getInteger("stackable");
|
||||
Start.BLlist = jsonObject1.getJSONArray("gold_and_item_drop_rates").toJavaList(BlConfig.class);
|
||||
|
||||
Start.bskg = jsonObject1.getInteger("bskg");
|
||||
Start.bsConfig = jsonObject1.getObject("bsitem",BsConfig.class);
|
||||
try {
|
||||
|
||||
|
||||
|
||||
fileReader = new FileReader(property + "\\配置文件\\战力显示.ini");
|
||||
|
|
@ -1061,6 +1065,33 @@ public class 特殊控制台 extends JFrame {
|
|||
String jsonStr = JSONUtil.toJsonStr(Start.ConfigItemJson);
|
||||
FileWriter fileWriter2 = new FileWriter(new File(property + "\\配置文件\\物品回收.ini"));
|
||||
fileWriter2.write(jsonStr);
|
||||
|
||||
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("open", Start.blkg);
|
||||
jsonObject1.put("stackable", Start.bldj);
|
||||
jsonObject1.put("bossxw", Start.bossxw);
|
||||
jsonObject1.put("gold_and_item_drop_rates", Start.BLlist);
|
||||
|
||||
jsonObject1.put("bskg", Start.bskg);
|
||||
jsonObject1.put("bsitem", Start.bsConfig);
|
||||
String jsonString1 = jsonObject1.toJSONString();
|
||||
fileWriter = new FileWriter(property + "\\配置文件\\多倍爆率.ini");
|
||||
fileWriter.write(jsonString1);
|
||||
|
||||
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
List<ZLConfig> sortedZlConfigs = Start.zlConfigs.stream()
|
||||
.sorted(Comparator.comparing(ZLConfig::getNum))
|
||||
.collect(Collectors.toList());
|
||||
jsonObject2.put("zl", new JSONArray(Collections.singletonList(sortedZlConfigs)));
|
||||
String jsonString2 = jsonObject2.toJSONString();
|
||||
|
||||
fileWriter = new FileWriter(property + "\\配置文件\\战力显示.ini");
|
||||
fileWriter.write(jsonString2);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void 配置更新(final String name, final int value) {
|
||||
|
|
|
|||
|
|
@ -144,7 +144,8 @@ public class PlayersHandler {
|
|||
string += "经验 " + Math.round((float) 人物经验) * MapleParty.活动经验倍率 + "倍,物品 " + Math.round((float) 人物物品爆率) + "倍, 金币 " + Math.round((float) 人物金币爆率) + "倍,\r\n\r\n";
|
||||
string += "#b个人倍率\r\n";
|
||||
string += "经验 " + (long) (Math.round((float) c.getPlayer().getEXPMod()) * 100) * Math.round(c.getPlayer().getStat().expBuff / 100.0) + "%, 爆率 " + (long) (Math.round((float) c.getPlayer().getDropMod()) * 100) * Math.round(c.getPlayer().getStat().dropBuff / 100.0) + "%, 金币 " +(long) (Math.round((float) c.getPlayer().getCashMod()) * 100) * Math.round(c.getPlayer().getStat().mesoBuff / 100.0) + "%\r\n";
|
||||
string += "伤害加成"+player.getDB()+"% 多段次数 " +player.getDD() + "次 切割伤害"+DamageParse.process(player.getQG().toString())+" 鞭尸几率" + player.getBSJL()/100+"%\r\n\r\n";
|
||||
string += "伤害加成"+player.getDB()+"% 多段次数 " +player.getDD() + "次\r\n" ;
|
||||
string += "切割伤害"+DamageParse.process(player.getQG().toString())+" 鞭尸几率" +String.format("%.2f", player.getBSJL()/100.0)+"%\r\n";
|
||||
string += "#r个人资产\r\n";
|
||||
string += "拥有:" + c.getPlayer().getCSPoints(1) + " 点劵\r\n\r\n";
|
||||
string += "延迟 " + c.getPlayer().getClient().getLatency() + " 毫秒\r\n";
|
||||
|
|
|
|||
|
|
@ -2872,11 +2872,11 @@ public class MaplePacketCreator {
|
|||
xl = "[☆超级王者☆]";
|
||||
else if (c.getCombat() > 1100000)
|
||||
xl = "[☆宇宙王者☆]";
|
||||
int 转生次数 = c.getAccountidLog("飞升");
|
||||
int 转生次数 = c.getAccountidLogByCid("飞升");
|
||||
int cs = 转生次数;
|
||||
String name = "转生次数" + cs +"层";
|
||||
for (ZLConfig zlConfig : Start.zlConfigs) {
|
||||
if (zlConfig.getNum() <转生次数){
|
||||
if (zlConfig.getNum() <= 转生次数){
|
||||
name = zlConfig.getName() +(转生次数 -zlConfig.getNum())+ zlConfig.getName2();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue