Compare commits
	
		
			No commits in common. "f8aca03f89d1b8b0e9d6f8c7ba9f39171402a710" and "227b75b4d0d3d1764b187fed456e1db3eb7b5853" have entirely different histories.
		
	
	
		
			f8aca03f89
			...
			227b75b4d0
		
	
		|  | @ -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; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -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) { | ||||
|  |  | |||
|  | @ -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,21 +1003,10 @@ 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(); | ||||
|                     } | ||||
| 
 | ||||
|                     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); | ||||
|                     player.dropMessage(-1, "当前怪物血量为: " + monster.getHp()); | ||||
|                 } | ||||
| 
 | ||||
| 
 | ||||
|                 if (monster.isBuffed(MonsterStatus.MAGIC_DAMAGE_REFLECT)) { | ||||
|                     player.addHP(-(7000 + Randomizer.nextInt(8000))); | ||||
|                 } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue