Compare commits

..

No commits in common. "f8aca03f89d1b8b0e9d6f8c7ba9f39171402a710" and "227b75b4d0d3d1764b187fed456e1db3eb7b5853" have entirely different histories.

3 changed files with 6 additions and 27 deletions

View File

@ -5686,10 +5686,10 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject implements Se
if (type == MapleInventoryType.EQUIP) {
return this.inventory[MapleInventoryType.EQUIPPED.ordinal()].countById(itemid);
}
int byIdNum = this.inventory[type.ordinal()].findByIdNum(itemid);
final IItem findById = this.inventory[type.ordinal()].findById(itemid);
short quantity = findById.getQuantity();
return byIdNum;
return quantity;
}

View File

@ -54,16 +54,6 @@ public class MapleInventory implements Iterable<IItem>, Serializable {
return null;
}
public int findByIdNum(final int itemId) {
int re = 0;
for (final IItem item : this.inventory.values()) {
if (item.getItemId() == itemId) {
re+=item.getQuantity();
}
}
return re;
}
public IItem findByUniqueId(final int itemId) {
for (final IItem item : this.inventory.values()) {
if (item.getUniqueId() == itemId) {

View File

@ -441,7 +441,7 @@ public class DamageParse {
long mobMaxHp = monster.getMaxHP();
if (mobMaxHp == 0){
mobMaxHp = monster.getMobMaxHp();
monster.getMobMaxHp();
}
double percentage = ((double) hp / mobMaxHp) * 100; // 显式转换为浮点数并计算百分比‌:ml-citation{ref="1,3" data="citationList"}
@ -1003,20 +1003,9 @@ public class DamageParse {
monster.damage(player, newtotDamageToOneMonster, true, attack.skill);
if (monster.getHp() > 0) {
long hp = monster.getHp();
long mobMaxHp = monster.getMaxHP();
if (mobMaxHp == 0) {
mobMaxHp = monster.getMobMaxHp();
player.dropMessage(-1, "当前怪物血量为: " + monster.getHp());
}
double percentage = ((double) hp / mobMaxHp) * 100; // 显式转换为浮点数并计算百分比‌:ml-citation{ref="1,3" data="citationList"}
String result = String.format("%.2f%%", percentage);
double l = (double) hp / mobMaxHp;
player.dropMessage(-1, "当前怪物血量为:" + hp + " " + result);
}
if (monster.isBuffed(MonsterStatus.MAGIC_DAMAGE_REFLECT)) {
player.addHP(-(7000 + Randomizer.nextInt(8000)));