This commit is contained in:
Lenheart 2025-03-16 12:18:43 +08:00
commit 8d7dc39bf5
7 changed files with 109 additions and 80 deletions

View File

@ -4029,7 +4029,13 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
} }
return ret.masterlevel; return ret.masterlevel;
} }
public void setLevelex(final short level) {
this.level = level;
final Map<MapleStat, Long> statup = new EnumMap(MapleStat.class);
statup.put(MapleStat.EXP, exp);
statup.put(MapleStat.LEVEL, (long) level);
this.client.sendPacket(MaplePacketCreator.updatePlayerStats(statup, this));
}
public void levelUp() { public void levelUp() {
if (this.getLevel() >= this.maxLevel) { if (this.getLevel() >= this.maxLevel) {
return; return;
@ -11870,21 +11876,24 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
return 限制等级; return 限制等级;
} }
public int getDD() { public BigInteger getDD() {
int Magnification = 0; BigInteger re = BigInteger.ZERO;
if (Start.ConfigValuesJson.getInteger("isdd") == 0) return null;
JSONObject dd = Start.ConfigValuesJson.getJSONObject("ddbb"); JSONObject dd = Start.ConfigValuesJson.getJSONObject("ddbb");
JSONObject ddzb = Start.ConfigValuesJson.getJSONObject("ddzb"); JSONObject ddzb = Start.ConfigValuesJson.getJSONObject("ddzb");
if ((dd == null && ddzb == null) || Start.ConfigValuesJson.getInteger("isdd") == 0) return 0;
if (dd != null) { if (dd != null) {
Set<String> strings = dd.keySet(); Set<String> strings = dd.keySet();
for (String string : strings) { for (String string : strings) {
boolean b = this.haveItem(Integer.parseInt(string)); boolean b = this.haveItem(Integer.parseInt(string));
if (b) { if (b) {
int itemNum = getItemNum(Integer.parseInt(string)); int itemNum = getItemNum(Integer.parseInt(string));
Magnification += (dd.getInteger(string))*itemNum;
BigInteger qgbbValue = new BigInteger(dd.getString(string));
BigInteger itemNumBigInt = new BigInteger(Integer.toString(itemNum));
re = re.add(qgbbValue.multiply(itemNumBigInt));
} }
} }
} }
@ -11893,24 +11902,30 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
for (String string : strings) { for (String string : strings) {
boolean b = this.hasEquipped(Integer.parseInt(string)); boolean b = this.hasEquipped(Integer.parseInt(string));
if (b) { if (b) {
Magnification += ddzb.getInteger(string); BigInteger qgbbValue = new BigInteger(ddzb.getString(string));
re = re.add(qgbbValue);
} }
} }
} }
List<Equip> equList = this.getEquList(); List<Equip> equList = this.getEquList();
for (Equip equip : equList) { for (Equip equip : equList) {
Magnification += equip.getdd(); re = re.add(new BigInteger(equip.getdd()));
} }
return Magnification;
if (re.compareTo(BigInteger.ZERO)<=0) return null;
return re;
} }
public int getDB() { public BigInteger getDB() {
int re = 0;
if (Start.ConfigValuesJson.getInteger("isdb") == 0) return null;
BigInteger re = BigInteger.ZERO;
JSONObject dbbb = Start.ConfigValuesJson.getJSONObject("dbbb"); JSONObject dbbb = Start.ConfigValuesJson.getJSONObject("dbbb");
JSONObject dbzb = Start.ConfigValuesJson.getJSONObject("dbzb"); JSONObject dbzb = Start.ConfigValuesJson.getJSONObject("dbzb");
if ((dbbb == null && dbzb == null) || Start.ConfigValuesJson.getInteger("isdb") == 0) return 0;
if (dbbb != null) { if (dbbb != null) {
@ -11919,7 +11934,10 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
boolean b = this.haveItem(Integer.parseInt(string)); boolean b = this.haveItem(Integer.parseInt(string));
if (b) { if (b) {
int itemNum = getItemNum(Integer.parseInt(string)); int itemNum = getItemNum(Integer.parseInt(string));
re += (dbbb.getInteger(string))*itemNum;
BigInteger qgbbValue = new BigInteger(dbbb.getString(string));
BigInteger itemNumBigInt = new BigInteger(Integer.toString(itemNum));
re = re.add(qgbbValue.multiply(itemNumBigInt));
} }
} }
} }
@ -11928,16 +11946,20 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
for (String string : strings) { for (String string : strings) {
boolean b = this.hasEquipped(Integer.parseInt(string)); boolean b = this.hasEquipped(Integer.parseInt(string));
if (b) { if (b) {
re += dbzb.getInteger(string); BigInteger qgbbValue = new BigInteger(dbzb.getString(string));
re = re.add(qgbbValue);
} }
} }
} }
List<Equip> equList = this.getEquList(); List<Equip> equList = this.getEquList();
for (Equip equip : equList) { for (Equip equip : equList) {
re += equip.getdb(); re = re.add( new BigInteger(equip.getdb()));
} }
if (re.compareTo(BigInteger.ZERO)<=0) return null;
return re; return re;
} }
@ -11947,8 +11969,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
JSONObject qgbb = Start.ConfigValuesJson.getJSONObject("qgbb"); JSONObject qgbb = Start.ConfigValuesJson.getJSONObject("qgbb");
JSONObject qgzb = Start.ConfigValuesJson.getJSONObject("qgzb"); JSONObject qgzb = Start.ConfigValuesJson.getJSONObject("qgzb");
if ((qgbb == null && qgzb == null) || Start.ConfigValuesJson.getInteger("isqg") == 0) { if (Start.ConfigValuesJson.getInteger("isqg") == 0) {
return BigInteger.ZERO; return null;
} }
if (qgbb != null) { if (qgbb != null) {
@ -11980,6 +12002,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
BigInteger equipQG = new BigInteger(equip.getqg()); BigInteger equipQG = new BigInteger(equip.getqg());
re = re.add(equipQG); re = re.add(equipQG);
} }
if ( re.compareTo(BigInteger.ZERO)<=0) return null;
return re; return re;
} }

View File

@ -36,8 +36,8 @@ public class Equip extends Item implements IEquip, Serializable {
private long itemEXP; private long itemEXP;
private int durability; private int durability;
private int incSkill; private int incSkill;
private int dd; private String dd;
private int db; private String db;
private String qg; private String qg;
public Equip(final int id, final short position, final byte flag) { public Equip(final int id, final short position, final byte flag) {
@ -71,8 +71,8 @@ public class Equip extends Item implements IEquip, Serializable {
this.itemEXP = 0; this.itemEXP = 0;
this.durability = -1; this.durability = -1;
this.incSkill = -1; this.incSkill = -1;
this.dd = 0; this.dd = "0";
this.db = 0; this.db = "0";
this.qg = "0"; this.qg = "0";
} }
@ -107,8 +107,8 @@ public class Equip extends Item implements IEquip, Serializable {
this.itemEXP = 0; this.itemEXP = 0;
this.durability = -1; this.durability = -1;
this.incSkill = -1; this.incSkill = -1;
this.dd = 0; this.dd = "0";
this.db = 0; this.db = "0";
this.qg = "0"; this.qg = "0";
} }
@ -143,8 +143,8 @@ public class Equip extends Item implements IEquip, Serializable {
this.itemEXP = 0; this.itemEXP = 0;
this.durability = -1; this.durability = -1;
this.incSkill = -1; this.incSkill = -1;
this.dd = 0; this.dd = "0";
this.db = 0; this.db = "0";
this.qg = "0"; this.qg = "0";
} }
@ -384,16 +384,18 @@ public class Equip extends Item implements IEquip, Serializable {
} }
public void setdd(int dd) { public void setdd(String dd) {
if (dd < 0) { BigInteger bigInteger = new BigInteger(dd);
dd = 0; if (bigInteger.compareTo(BigInteger.ZERO) < 0) {
dd = "0";
} }
this.dd = dd; this.dd = dd;
} }
public void setdb(int db) { public void setdb(String db) {
if (db < 0) { BigInteger bigInteger = new BigInteger(db);
db = 0; if (bigInteger.compareTo(BigInteger.ZERO) < 0) {
db = "0";
} }
this.db = db; this.db = db;
} }
@ -420,6 +422,7 @@ public class Equip extends Item implements IEquip, Serializable {
this.level = level; this.level = level;
} }
@Override @Override
public byte getViciousHammer() { public byte getViciousHammer() {
return this.vicioushammer; return this.vicioushammer;
@ -605,12 +608,12 @@ public class Equip extends Item implements IEquip, Serializable {
} }
@Override @Override
public int getdd() { public String getdd() {
return this.dd; return this.dd;
} }
@Override @Override
public int getdb() { public String getdb() {
return this.db; return this.db;
} }

View File

@ -68,9 +68,9 @@ public interface IEquip extends IItem {
short getMpR(); short getMpR();
int getdd(); String getdd();
int getdb(); String getdb();
String getqg(); String getqg();

View File

@ -114,8 +114,8 @@ public enum ItemLoader {
equip.setPotential3(rs.getShort("potential3")); equip.setPotential3(rs.getShort("potential3"));
equip.setHpR(rs.getShort("hpR")); equip.setHpR(rs.getShort("hpR"));
equip.setMpR(rs.getShort("mpR")); equip.setMpR(rs.getShort("mpR"));
equip.setdd(rs.getInt("dd")); equip.setdd(rs.getString("dd"));
equip.setdb(rs.getInt("db")); equip.setdb(rs.getString("db"));
equip.setqg(rs.getString("qg")); equip.setqg(rs.getString("qg"));
equip.setGiftFrom(rs.getString("sender")); equip.setGiftFrom(rs.getString("sender"));
if (equip.getUniqueId() > -1 && GameConstants.isEffectRing(rs.getInt("itemid"))) { if (equip.getUniqueId() > -1 && GameConstants.isEffectRing(rs.getInt("itemid"))) {
@ -266,12 +266,13 @@ public enum ItemLoader {
pse.setInt(25, (int) equip.getPotential3()); pse.setInt(25, (int) equip.getPotential3());
pse.setInt(26, (int) equip.getHpR()); pse.setInt(26, (int) equip.getHpR());
pse.setInt(27, (int) equip.getMpR()); pse.setInt(27, (int) equip.getMpR());
pse.setInt(28, (int) equip.getdd()); pse.setString(28, equip.getdd());
pse.setInt(29, (int) equip.getdb()); pse.setString(29, equip.getdb());
pse.setString(30, equip.getqg()); pse.setString(30, equip.getqg());
pse.executeUpdate(); pse.executeUpdate();
} }
} }
pse.close(); pse.close();
ps.close(); ps.close();
} catch (SQLException ex) { } catch (SQLException ex) {

View File

@ -111,7 +111,8 @@ public class Start {
public static List<ZLConfig> zlConfigs = new ArrayList<>(); public static List<ZLConfig> zlConfigs = new ArrayList<>();
public static int zlkg = 0; public static int zlkg = 0;
public static String[] shxs= {"", "亿", "", "", "","", "", "", "", "", "", "","恒河沙", "阿僧祇", "那由他", "不可思议", "无量", "古戈尔","频菠萝", "矜羯罗","不可说不可说转","超限数",
"绝对无限","绝对无量","绝对小数","绝对大数","绝对超限数"};
public static ArrayList<String> 公告列表; public static ArrayList<String> 公告列表;
public static List<Pair<String, Integer>> exptable; public static List<Pair<String, Integer>> exptable;

View File

@ -439,7 +439,7 @@ public class DamageParse {
BigInteger bigInteger1 = TWgetNewtotDamageToOneMonster(attack, player, newtotDamageToOneMonster, monster); BigInteger bigInteger1 = TWgetNewtotDamageToOneMonster(attack, player, newtotDamageToOneMonster, monster);
monster.damage(player, bigInteger1, true, attack.skill); monster.damage(player, bigInteger1, true, attack.skill);
if (monster.getHp() > 0 ) { if (monster.getHp() > 0 && monster.getStats().isBoss()) {
BigInteger bigInteger = monster.getbigHp(); BigInteger bigInteger = monster.getbigHp();
BigInteger mobMaxHp = monster.getMaxHP(); BigInteger mobMaxHp = monster.getMaxHP();
@ -652,8 +652,8 @@ public class DamageParse {
private static BigInteger TWgetNewtotDamageToOneMonster(AttackInfo attack, MapleCharacter player, long newtotDamageToOneMonster, MapleMonster monster) { private static BigInteger TWgetNewtotDamageToOneMonster(AttackInfo attack, MapleCharacter player, long newtotDamageToOneMonster, MapleMonster monster) {
newtotDamageToOneMonster = 伤害减伤(monster.getId(), newtotDamageToOneMonster); newtotDamageToOneMonster = 伤害减伤(monster.getId(), newtotDamageToOneMonster);
double[] ewds = ewds(player, monster, true, attack.skill); BigInteger[] ewds = ewds(player, monster, true, attack.skill);
double[] ewbl = ewbl(player, monster, true, attack.skill); BigInteger[] ewbl = ewbl(player, monster, true, attack.skill);
String a = ""; String a = "";
String b = ""; String b = "";
String c = ""; String c = "";
@ -665,9 +665,9 @@ public class DamageParse {
BigInteger newtotDamage = BigInteger.valueOf(newtotDamageToOneMonster); BigInteger newtotDamage = BigInteger.valueOf(newtotDamageToOneMonster);
BigInteger v = BigInteger.ZERO; BigInteger v = BigInteger.ZERO;
if (ewds[0] > 0.0) { if (ewds!=null) {
BigDecimal ewds0 = BigDecimal.valueOf(ewds[0]); BigDecimal ewds0 = new BigDecimal(ewds[0]);
BigDecimal ewds1 = BigDecimal.valueOf(ewds[1]); BigDecimal ewds1 = new BigDecimal(ewds[1]);
BigDecimal product = ewds0.multiply(ewds1); BigDecimal product = ewds0.multiply(ewds1);
BigDecimal newtotDamageBD = new BigDecimal(newtotDamage); BigDecimal newtotDamageBD = new BigDecimal(newtotDamage);
BigDecimal result = newtotDamageBD.multiply(product); BigDecimal result = newtotDamageBD.multiply(product);
@ -676,14 +676,14 @@ public class DamageParse {
newtotDamage = newtotDamage.add(v); newtotDamage = newtotDamage.add(v);
} }
if (ewbl[0] > 0.0) { if (ewbl!=null) {
BigInteger damageIncrease = newtotDamage.multiply(BigInteger.valueOf((long) (ewbl[0] * 100))).divide(BigInteger.valueOf(100)); BigInteger damageIncrease = newtotDamage.multiply((ewbl[0].multiply(ewbl[1]))).divide(BigInteger.valueOf(100));
newtotDamage = newtotDamage.add(damageIncrease); newtotDamage = newtotDamage.add(damageIncrease);
a = "伤害加成 #b" + (int) ewbl[0] + "%#k"; a = "伤害加成 #b" + ewbl[0] + "%#k";
} }
if (ewds[0] > 0.0) { if (ewds != null) {
b = "额外段伤 #b" + (int) ewds[0] + "段#k"; b = "额外段伤 #b" + process(ewds[0].toString()) + "段#k";
String s = process(v.toString()); String s = process(v.toString());
c = "段伤伤害 #b" + s + "#k"; c = "段伤伤害 #b" + s + "#k";
} }
@ -1011,7 +1011,7 @@ public class DamageParse {
BigInteger bigInteger1 = TWgetNewtotDamageToOneMonster(attack, player, newtotDamageToOneMonster, monster); BigInteger bigInteger1 = TWgetNewtotDamageToOneMonster(attack, player, newtotDamageToOneMonster, monster);
monster.damage(player, bigInteger1, true, attack.skill); monster.damage(player, bigInteger1, true, attack.skill);
if (monster.getHp() > 0 ) { if (monster.getHp() > 0 &&monster.getStats().isBoss() ) {
BigInteger bigInteger = monster.getbigHp(); BigInteger bigInteger = monster.getbigHp();
BigInteger mobMaxHp = monster.getMaxHP(); BigInteger mobMaxHp = monster.getMaxHP();
@ -1734,37 +1734,36 @@ public class DamageParse {
return 数值; return 数值;
} }
public static double[] ewds(final MapleCharacter play, final MapleMonster monster, boolean mag, int skillId) { public static BigInteger[] ewds(final MapleCharacter play, final MapleMonster monster, boolean mag, int skillId) {
double Magnification = 0.0;
if (Start.ConfigValuesJson == null) return new double[]{0.0, 0.0};
Magnification = play.getDD(); BigInteger Magnification = play.getDD();
if (Magnification == null) {
return null;
}
Integer ddxs = Start.ConfigValuesJson.getJSONObject("ddxs").getInteger(String.valueOf(skillId)); String ddxs = Start.ConfigValuesJson.getJSONObject("ddxs").getString(String.valueOf(skillId));
if (ddxs == null) { if (ddxs == null) {
return new double[]{0.0, 0.0}; return null;
}
if (Magnification == 0) {
return new double[]{0.0, 0.0};
} }
return new double[]{Magnification, ddxs/100.0};
return new BigInteger[]{Magnification, new BigInteger(ddxs).divide(BigInteger.valueOf(100))};
} }
public static double[] ewbl(final MapleCharacter play, final MapleMonster monster, boolean mag, int skillId) { public static BigInteger[] ewbl(final MapleCharacter play, final MapleMonster monster, boolean mag, int skillId) {
double Magnification = 0.0;
Magnification = play.getDB(); BigInteger Magnification = play.getDB();
if (Magnification == null)return null;
Integer dbxs = Start.ConfigValuesJson.getJSONObject("dbxs").getInteger(String.valueOf(skillId)); String dbxs = Start.ConfigValuesJson.getJSONObject("dbxs").getString(String.valueOf(skillId));
if (dbxs == null) { if (dbxs == null) {
return new double[]{0.0, 0.0}; return null;
} }
return new double[]{Magnification, dbxs/100.0}; return new BigInteger[]{Magnification,new BigInteger(dbxs).divide(BigInteger.valueOf(100))};
} }
@ -1773,13 +1772,13 @@ public class DamageParse {
Magnification = play.getQG(); Magnification = play.getQG();
Integer qgxs = Start.ConfigValuesJson.getJSONObject("qgxs").getInteger(String.valueOf(skillId)); String qgxs = Start.ConfigValuesJson.getJSONObject("qgxs").getString(String.valueOf(skillId));
if (qgxs == null) { if (qgxs == null) {
return null; return null;
} }
if (Magnification.compareTo(BigInteger.ZERO) > 0) { if (Magnification!=null) {
BigInteger qgxsBigInt = new BigInteger(qgxs.toString()); BigInteger qgxsBigInt = new BigInteger(qgxs);
BigInteger result = Magnification.multiply(qgxsBigInt).divide(BigInteger.valueOf(100)); BigInteger result = Magnification.multiply(qgxsBigInt).divide(BigInteger.valueOf(100));
return result; return result;
@ -1929,8 +1928,10 @@ public class DamageParse {
public static String process( String b) { public static String process( String b) {
String[] a = {"", "亿", "", "", "","", "", "", "", "", "", "","恒河沙", "阿僧祇", "那由他", "不可思议", "无量", "古戈尔","频菠萝", "矜羯罗","不可说不可说转","超限数",
"绝对无限","绝对无量","绝对小数","绝对大数","绝对超限数"};
String[] a = Start.shxs;
int len = b.length(); int len = b.length();

View File

@ -146,17 +146,17 @@ public class PlayersHandler {
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";
if (Start.ConfigValuesJson.getInteger("isdb") ==1){ if (Start.ConfigValuesJson.getInteger("isdb") ==1 &&player.getDB()!=null){
string += "伤害加成"+player.getDB()+" " ; string += "伤害加成"+DamageParse.process(player.getDB().toString())+" " ;
} }
if (Start.ConfigValuesJson.getInteger("isdd") ==1){ if (Start.ConfigValuesJson.getInteger("isdd") ==1 &&player.getDD()!=null){
string += "多段次数 " +player.getDD() + "\r\n" ; string += "多段次数 " +DamageParse.process(player.getDD().toString()) + "\r\n" ;
}else { }else {
string += "\r\n" ; string += "\r\n" ;
} }
if (Start.ConfigValuesJson.getInteger("isqg") ==1){ if (Start.ConfigValuesJson.getInteger("isqg") ==1 &&player.getQG()!=null ){
string += "切割伤害"+DamageParse.process(player.getQG().toString())+" "; string += "切割伤害"+DamageParse.process(player.getQG().toString())+" ";
} }
if (Start.bskg == 1) { if (Start.bskg == 1) {