修复转生问题

更改鞭尸显示
This commit is contained in:
雪风 2025-03-11 22:49:44 +08:00
parent 2d02b4d124
commit 8583c01dc1
3 changed files with 48 additions and 3 deletions

View File

@ -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);
}

View File

@ -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";

View File

@ -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();
}
}