Merge branch 'master' of http://192.168.200.25:3000/Lenheart/MXD-Server
This commit is contained in:
commit
8d7dc39bf5
|
|
@ -4029,7 +4029,13 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
}
|
||||
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() {
|
||||
if (this.getLevel() >= this.maxLevel) {
|
||||
return;
|
||||
|
|
@ -11870,21 +11876,24 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
return 限制等级;
|
||||
}
|
||||
|
||||
public int getDD() {
|
||||
int Magnification = 0;
|
||||
public BigInteger getDD() {
|
||||
BigInteger re = BigInteger.ZERO;
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isdd") == 0) return null;
|
||||
|
||||
JSONObject dd = Start.ConfigValuesJson.getJSONObject("ddbb");
|
||||
JSONObject ddzb = Start.ConfigValuesJson.getJSONObject("ddzb");
|
||||
|
||||
if ((dd == null && ddzb == null) || Start.ConfigValuesJson.getInteger("isdd") == 0) return 0;
|
||||
|
||||
|
||||
if (dd != null) {
|
||||
Set<String> strings = dd.keySet();
|
||||
for (String string : strings) {
|
||||
boolean b = this.haveItem(Integer.parseInt(string));
|
||||
if (b) {
|
||||
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) {
|
||||
boolean b = this.hasEquipped(Integer.parseInt(string));
|
||||
if (b) {
|
||||
Magnification += ddzb.getInteger(string);
|
||||
|
||||
BigInteger qgbbValue = new BigInteger(ddzb.getString(string));
|
||||
re = re.add(qgbbValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Equip> equList = this.getEquList();
|
||||
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() {
|
||||
int re = 0;
|
||||
public BigInteger getDB() {
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isdb") == 0) return null;
|
||||
|
||||
BigInteger re = BigInteger.ZERO;
|
||||
|
||||
JSONObject dbbb = Start.ConfigValuesJson.getJSONObject("dbbb");
|
||||
JSONObject dbzb = Start.ConfigValuesJson.getJSONObject("dbzb");
|
||||
|
||||
if ((dbbb == null && dbzb == null) || Start.ConfigValuesJson.getInteger("isdb") == 0) return 0;
|
||||
|
||||
|
||||
if (dbbb != null) {
|
||||
|
|
@ -11919,7 +11934,10 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
boolean b = this.haveItem(Integer.parseInt(string));
|
||||
if (b) {
|
||||
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) {
|
||||
boolean b = this.hasEquipped(Integer.parseInt(string));
|
||||
if (b) {
|
||||
re += dbzb.getInteger(string);
|
||||
BigInteger qgbbValue = new BigInteger(dbzb.getString(string));
|
||||
re = re.add(qgbbValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<Equip> equList = this.getEquList();
|
||||
for (Equip equip : equList) {
|
||||
re += equip.getdb();
|
||||
re = re.add( new BigInteger(equip.getdb()));
|
||||
}
|
||||
|
||||
if (re.compareTo(BigInteger.ZERO)<=0) return null;
|
||||
|
||||
|
||||
return re;
|
||||
}
|
||||
|
||||
|
|
@ -11947,8 +11969,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
JSONObject qgbb = Start.ConfigValuesJson.getJSONObject("qgbb");
|
||||
JSONObject qgzb = Start.ConfigValuesJson.getJSONObject("qgzb");
|
||||
|
||||
if ((qgbb == null && qgzb == null) || Start.ConfigValuesJson.getInteger("isqg") == 0) {
|
||||
return BigInteger.ZERO;
|
||||
if (Start.ConfigValuesJson.getInteger("isqg") == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (qgbb != null) {
|
||||
|
|
@ -11980,6 +12002,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
|
|||
BigInteger equipQG = new BigInteger(equip.getqg());
|
||||
re = re.add(equipQG);
|
||||
}
|
||||
if ( re.compareTo(BigInteger.ZERO)<=0) return null;
|
||||
|
||||
return re;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
private long itemEXP;
|
||||
private int durability;
|
||||
private int incSkill;
|
||||
private int dd;
|
||||
private int db;
|
||||
private String dd;
|
||||
private String db;
|
||||
private String qg;
|
||||
|
||||
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.durability = -1;
|
||||
this.incSkill = -1;
|
||||
this.dd = 0;
|
||||
this.db = 0;
|
||||
this.dd = "0";
|
||||
this.db = "0";
|
||||
this.qg = "0";
|
||||
}
|
||||
|
||||
|
|
@ -107,8 +107,8 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
this.itemEXP = 0;
|
||||
this.durability = -1;
|
||||
this.incSkill = -1;
|
||||
this.dd = 0;
|
||||
this.db = 0;
|
||||
this.dd = "0";
|
||||
this.db = "0";
|
||||
this.qg = "0";
|
||||
}
|
||||
|
||||
|
|
@ -143,8 +143,8 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
this.itemEXP = 0;
|
||||
this.durability = -1;
|
||||
this.incSkill = -1;
|
||||
this.dd = 0;
|
||||
this.db = 0;
|
||||
this.dd = "0";
|
||||
this.db = "0";
|
||||
this.qg = "0";
|
||||
}
|
||||
|
||||
|
|
@ -384,16 +384,18 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
}
|
||||
|
||||
|
||||
public void setdd(int dd) {
|
||||
if (dd < 0) {
|
||||
dd = 0;
|
||||
public void setdd(String dd) {
|
||||
BigInteger bigInteger = new BigInteger(dd);
|
||||
if (bigInteger.compareTo(BigInteger.ZERO) < 0) {
|
||||
dd = "0";
|
||||
}
|
||||
this.dd = dd;
|
||||
}
|
||||
|
||||
public void setdb(int db) {
|
||||
if (db < 0) {
|
||||
db = 0;
|
||||
public void setdb(String db) {
|
||||
BigInteger bigInteger = new BigInteger(db);
|
||||
if (bigInteger.compareTo(BigInteger.ZERO) < 0) {
|
||||
db = "0";
|
||||
}
|
||||
this.db = db;
|
||||
}
|
||||
|
|
@ -420,6 +422,7 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
this.level = level;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public byte getViciousHammer() {
|
||||
return this.vicioushammer;
|
||||
|
|
@ -605,12 +608,12 @@ public class Equip extends Item implements IEquip, Serializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getdd() {
|
||||
public String getdd() {
|
||||
return this.dd;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getdb() {
|
||||
public String getdb() {
|
||||
return this.db;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ public interface IEquip extends IItem {
|
|||
|
||||
short getMpR();
|
||||
|
||||
int getdd();
|
||||
String getdd();
|
||||
|
||||
int getdb();
|
||||
String getdb();
|
||||
|
||||
String getqg();
|
||||
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ public enum ItemLoader {
|
|||
equip.setPotential3(rs.getShort("potential3"));
|
||||
equip.setHpR(rs.getShort("hpR"));
|
||||
equip.setMpR(rs.getShort("mpR"));
|
||||
equip.setdd(rs.getInt("dd"));
|
||||
equip.setdb(rs.getInt("db"));
|
||||
equip.setdd(rs.getString("dd"));
|
||||
equip.setdb(rs.getString("db"));
|
||||
equip.setqg(rs.getString("qg"));
|
||||
equip.setGiftFrom(rs.getString("sender"));
|
||||
if (equip.getUniqueId() > -1 && GameConstants.isEffectRing(rs.getInt("itemid"))) {
|
||||
|
|
@ -266,12 +266,13 @@ public enum ItemLoader {
|
|||
pse.setInt(25, (int) equip.getPotential3());
|
||||
pse.setInt(26, (int) equip.getHpR());
|
||||
pse.setInt(27, (int) equip.getMpR());
|
||||
pse.setInt(28, (int) equip.getdd());
|
||||
pse.setInt(29, (int) equip.getdb());
|
||||
pse.setString(28, equip.getdd());
|
||||
pse.setString(29, equip.getdb());
|
||||
pse.setString(30, equip.getqg());
|
||||
pse.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
pse.close();
|
||||
ps.close();
|
||||
} catch (SQLException ex) {
|
||||
|
|
|
|||
|
|
@ -111,7 +111,8 @@ public class Start {
|
|||
public static List<ZLConfig> zlConfigs = new ArrayList<>();
|
||||
public static int zlkg = 0;
|
||||
|
||||
|
||||
public static String[] shxs= {"万", "亿", "兆", "京", "垓","秭", "穰", "沟", "涧", "正", "载", "极","恒河沙", "阿僧祇", "那由他", "不可思议", "无量", "古戈尔","频菠萝", "矜羯罗","不可说不可说转","超限数",
|
||||
"绝对无限","绝对无量","绝对小数","绝对大数","绝对超限数"};
|
||||
|
||||
public static ArrayList<String> 公告列表;
|
||||
public static List<Pair<String, Integer>> exptable;
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ public class DamageParse {
|
|||
BigInteger bigInteger1 = TWgetNewtotDamageToOneMonster(attack, player, newtotDamageToOneMonster, monster);
|
||||
|
||||
monster.damage(player, bigInteger1, true, attack.skill);
|
||||
if (monster.getHp() > 0 ) {
|
||||
if (monster.getHp() > 0 && monster.getStats().isBoss()) {
|
||||
BigInteger bigInteger = monster.getbigHp();
|
||||
|
||||
BigInteger mobMaxHp = monster.getMaxHP();
|
||||
|
|
@ -652,8 +652,8 @@ public class DamageParse {
|
|||
private static BigInteger TWgetNewtotDamageToOneMonster(AttackInfo attack, MapleCharacter player, long newtotDamageToOneMonster, MapleMonster monster) {
|
||||
newtotDamageToOneMonster = 伤害减伤(monster.getId(), newtotDamageToOneMonster);
|
||||
|
||||
double[] ewds = ewds(player, monster, true, attack.skill);
|
||||
double[] ewbl = ewbl(player, monster, true, attack.skill);
|
||||
BigInteger[] ewds = ewds(player, monster, true, attack.skill);
|
||||
BigInteger[] ewbl = ewbl(player, monster, true, attack.skill);
|
||||
String a = "";
|
||||
String b = "";
|
||||
String c = "";
|
||||
|
|
@ -665,9 +665,9 @@ public class DamageParse {
|
|||
BigInteger newtotDamage = BigInteger.valueOf(newtotDamageToOneMonster);
|
||||
|
||||
BigInteger v = BigInteger.ZERO;
|
||||
if (ewds[0] > 0.0) {
|
||||
BigDecimal ewds0 = BigDecimal.valueOf(ewds[0]);
|
||||
BigDecimal ewds1 = BigDecimal.valueOf(ewds[1]);
|
||||
if (ewds!=null) {
|
||||
BigDecimal ewds0 = new BigDecimal(ewds[0]);
|
||||
BigDecimal ewds1 = new BigDecimal(ewds[1]);
|
||||
BigDecimal product = ewds0.multiply(ewds1);
|
||||
BigDecimal newtotDamageBD = new BigDecimal(newtotDamage);
|
||||
BigDecimal result = newtotDamageBD.multiply(product);
|
||||
|
|
@ -676,14 +676,14 @@ public class DamageParse {
|
|||
newtotDamage = newtotDamage.add(v);
|
||||
}
|
||||
|
||||
if (ewbl[0] > 0.0) {
|
||||
BigInteger damageIncrease = newtotDamage.multiply(BigInteger.valueOf((long) (ewbl[0] * 100))).divide(BigInteger.valueOf(100));
|
||||
if (ewbl!=null) {
|
||||
BigInteger damageIncrease = newtotDamage.multiply((ewbl[0].multiply(ewbl[1]))).divide(BigInteger.valueOf(100));
|
||||
newtotDamage = newtotDamage.add(damageIncrease);
|
||||
a = "伤害加成 #b" + (int) ewbl[0] + "%#k";
|
||||
a = "伤害加成 #b" + ewbl[0] + "%#k";
|
||||
}
|
||||
|
||||
if (ewds[0] > 0.0) {
|
||||
b = "额外段伤 #b" + (int) ewds[0] + "段#k";
|
||||
if (ewds != null) {
|
||||
b = "额外段伤 #b" + process(ewds[0].toString()) + "段#k";
|
||||
String s = process(v.toString());
|
||||
c = "段伤伤害 #b" + s + "#k";
|
||||
}
|
||||
|
|
@ -1011,7 +1011,7 @@ public class DamageParse {
|
|||
BigInteger bigInteger1 = TWgetNewtotDamageToOneMonster(attack, player, newtotDamageToOneMonster, monster);
|
||||
|
||||
monster.damage(player, bigInteger1, true, attack.skill);
|
||||
if (monster.getHp() > 0 ) {
|
||||
if (monster.getHp() > 0 &&monster.getStats().isBoss() ) {
|
||||
BigInteger bigInteger = monster.getbigHp();
|
||||
|
||||
BigInteger mobMaxHp = monster.getMaxHP();
|
||||
|
|
@ -1734,37 +1734,36 @@ public class DamageParse {
|
|||
return 数值;
|
||||
}
|
||||
|
||||
public static double[] 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};
|
||||
public static BigInteger[] ewds(final MapleCharacter play, final MapleMonster monster, boolean mag, int skillId) {
|
||||
|
||||
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) {
|
||||
return new double[]{0.0, 0.0};
|
||||
}
|
||||
if (Magnification == 0) {
|
||||
return new double[]{0.0, 0.0};
|
||||
return null;
|
||||
}
|
||||
|
||||
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) {
|
||||
double Magnification = 0.0;
|
||||
public static BigInteger[] ewbl(final MapleCharacter play, final MapleMonster monster, boolean mag, int skillId) {
|
||||
|
||||
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) {
|
||||
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();
|
||||
|
||||
Integer qgxs = Start.ConfigValuesJson.getJSONObject("qgxs").getInteger(String.valueOf(skillId));
|
||||
String qgxs = Start.ConfigValuesJson.getJSONObject("qgxs").getString(String.valueOf(skillId));
|
||||
if (qgxs == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Magnification.compareTo(BigInteger.ZERO) > 0) {
|
||||
BigInteger qgxsBigInt = new BigInteger(qgxs.toString());
|
||||
if (Magnification!=null) {
|
||||
BigInteger qgxsBigInt = new BigInteger(qgxs);
|
||||
|
||||
BigInteger result = Magnification.multiply(qgxsBigInt).divide(BigInteger.valueOf(100));
|
||||
return result;
|
||||
|
|
@ -1929,8 +1928,10 @@ public class DamageParse {
|
|||
|
||||
|
||||
public static String process( String b) {
|
||||
String[] a = {"万", "亿", "兆", "京", "垓","秭", "穰", "沟", "涧", "正", "载", "极","恒河沙", "阿僧祇", "那由他", "不可思议", "无量", "古戈尔","频菠萝", "矜羯罗","不可说不可说转","超限数",
|
||||
"绝对无限","绝对无量","绝对小数","绝对大数","绝对超限数"};
|
||||
|
||||
|
||||
|
||||
String[] a = Start.shxs;
|
||||
|
||||
|
||||
int len = b.length();
|
||||
|
|
|
|||
|
|
@ -146,17 +146,17 @@ public class PlayersHandler {
|
|||
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";
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isdb") ==1){
|
||||
string += "伤害加成"+player.getDB()+" " ;
|
||||
if (Start.ConfigValuesJson.getInteger("isdb") ==1 &&player.getDB()!=null){
|
||||
string += "伤害加成"+DamageParse.process(player.getDB().toString())+" " ;
|
||||
}
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isdd") ==1){
|
||||
string += "多段次数 " +player.getDD() + "次\r\n" ;
|
||||
if (Start.ConfigValuesJson.getInteger("isdd") ==1 &&player.getDD()!=null){
|
||||
string += "多段次数 " +DamageParse.process(player.getDD().toString()) + "次\r\n" ;
|
||||
}else {
|
||||
string += "\r\n" ;
|
||||
}
|
||||
|
||||
if (Start.ConfigValuesJson.getInteger("isqg") ==1){
|
||||
if (Start.ConfigValuesJson.getInteger("isqg") ==1 &&player.getQG()!=null ){
|
||||
string += "切割伤害"+DamageParse.process(player.getQG().toString())+" ";
|
||||
}
|
||||
if (Start.bskg == 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue