This commit is contained in:
Lenheart 2025-03-14 21:30:40 +08:00
commit a94f423dda
4 changed files with 36 additions and 10 deletions

View File

@ -109,7 +109,7 @@ public class Start {
public static BsConfig bsConfig = null; public static BsConfig bsConfig = null;
public static List<ZLConfig> zlConfigs = new ArrayList<>(); public static List<ZLConfig> zlConfigs = new ArrayList<>();
public static int zlkg = 0;

View File

@ -1050,7 +1050,7 @@ public class 特殊控制台 extends JFrame {
JSONObject jsonObject2 = JSONObject.parseObject(result4); JSONObject jsonObject2 = JSONObject.parseObject(result4);
JSONArray zl = jsonObject2.getJSONArray("zl"); JSONArray zl = jsonObject2.getJSONArray("zl");
Start.zlConfigs = zl .toJavaList(ZLConfig.class).stream().sorted(Comparator.comparing(ZLConfig::getNum)).collect(Collectors.toList()); Start.zlConfigs = zl .toJavaList(ZLConfig.class).stream().sorted(Comparator.comparing(ZLConfig::getNum)).collect(Collectors.toList());
Start.zlkg = jsonObject2.getInteger("zlkg");
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
@ -1084,6 +1084,7 @@ public class 特殊控制台 extends JFrame {
JSONObject jsonObject2 = new JSONObject(); JSONObject jsonObject2 = new JSONObject();
jsonObject2.put("zl", Start.zlConfigs); jsonObject2.put("zl", Start.zlConfigs);
jsonObject2.put("zlkg", Start.zlkg);
String jsonString2 = jsonObject2.toJSONString(); String jsonString2 = jsonObject2.toJSONString();
fileWriter = new FileWriter(new File(property + "\\配置文件\\战力显示.ini")); fileWriter = new FileWriter(new File(property + "\\配置文件\\战力显示.ini"));

View File

@ -4,6 +4,7 @@ import server.maps.MapleMap;
import client.MapleLieDetector; import client.MapleLieDetector;
import server.maps.FieldLimitType; import server.maps.FieldLimitType;
import java.text.DecimalFormat;
import java.util.Map; import java.util.Map;
import client.inventory.ItemFlag; import client.inventory.ItemFlag;
@ -144,8 +145,27 @@ public class PlayersHandler {
string += "经验 " + Math.round((float) 人物经验) * MapleParty.活动经验倍率 + "倍,物品 " + Math.round((float) 人物物品爆率) + "倍, 金币 " + Math.round((float) 人物金币爆率) + "倍,\r\n\r\n"; string += "经验 " + Math.round((float) 人物经验) * MapleParty.活动经验倍率 + "倍,物品 " + Math.round((float) 人物物品爆率) + "倍, 金币 " + Math.round((float) 人物金币爆率) + "倍,\r\n\r\n";
string += "#b个人倍率\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 += "经验 " + (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() + "\r\n" ;
string += "切割伤害"+DamageParse.process(player.getQG().toString())+" 鞭尸几率" +String.format("%.2f", player.getBSJL()/100.0)+"%\r\n"; if (Start.ConfigValuesJson.getInteger("isdb") ==1){
string += "伤害加成"+player.getDB()+" " ;
}
if (Start.ConfigValuesJson.getInteger("isdd") ==1){
string += "多段次数 " +player.getDD() + "\r\n" ;
}else {
string += "\r\n" ;
}
if (Start.ConfigValuesJson.getInteger("isqg") ==1){
string += "切割伤害"+DamageParse.process(player.getQG().toString())+" ";
}
if (Start.bskg == 1) {
double v = player.getBSJL() / 100.0;
DecimalFormat df = new DecimalFormat("#.##");
string += "鞭尸几率" + df.format(v) + "%\r\n";
}else {
string += "\r\n" ;
}
string += "#r个人资产\r\n"; string += "#r个人资产\r\n";
string += "拥有:" + c.getPlayer().getCSPoints(1) + " 点劵\r\n\r\n"; string += "拥有:" + c.getPlayer().getCSPoints(1) + " 点劵\r\n\r\n";
string += "延迟 " + c.getPlayer().getClient().getLatency() + " 毫秒\r\n"; string += "延迟 " + c.getPlayer().getClient().getLatency() + " 毫秒\r\n";

View File

@ -2872,14 +2872,19 @@ public class MaplePacketCreator {
xl = "[☆超级王者☆]"; xl = "[☆超级王者☆]";
else if (c.getCombat() > 1100000) else if (c.getCombat() > 1100000)
xl = "[☆宇宙王者☆]"; xl = "[☆宇宙王者☆]";
String name="";
if (Start.zlkg == 1) {
int 转生次数 = c.getAccountidLogByCid("飞升"); int 转生次数 = c.getAccountidLogByCid("飞升");
int cs = 转生次数; int cs = 转生次数;
String name = "转生次数" + cs +""; name = "转生次数" + cs + "";
for (ZLConfig zlConfig : Start.zlConfigs) { for (ZLConfig zlConfig : Start.zlConfigs) {
if (zlConfig.getNum() <= 转生次数){ if (zlConfig.getNum() <= 转生次数) {
name = zlConfig.getName() +(转生次数 -zlConfig.getNum())+ zlConfig.getName2(); name = zlConfig.getName() + (转生次数 - zlConfig.getNum()) + zlConfig.getName2();
} }
} }
}
mplew.writeMapleAsciiString("战力:" + c.getCombat()+" "+name); mplew.writeMapleAsciiString("战力:" + c.getCombat()+" "+name);
mplew.write(0); mplew.write(0);
mplew.writeInt(0); mplew.writeInt(0);