From bcbfd2d9a7cf403564a908caf63bc419d8b1569b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E9=A3=8E?= <1213457484@qq.com> Date: Wed, 4 Jun 2025 15:00:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/maps/MapleMap.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/server/maps/MapleMap.java b/src/server/maps/MapleMap.java index d2a6fab..86ec16a 100644 --- a/src/server/maps/MapleMap.java +++ b/src/server/maps/MapleMap.java @@ -769,7 +769,22 @@ public final class MapleMap { final int cashz = (mob.getStats().isBoss() && mob.getStats().getHPDisplayType() == 0) ? 20 : 1; final int cashModifier = (int) (mob.getStats().isBoss() ? 0L : ((long) (mob.getMobExp() / 1000) + mob.getMobMaxHp() / 10000L)); for (final MonsterGlobalDropEntry de3 : globalEntry) { - if (Randomizer.nextInt(999999) < (int) ((double) ((long) (de3.chance * chServerrate) * Math.round((double) chr.getDropMod() * chr.getStat().dropBuff / 100.0)) * (showdown / 100.0) / (double) ((Integer) Start.ConfigValuesMap.get("砍爆率")).intValue()) && (de3.continent < 0 || (de3.continent < 10 && this.mapid / 100000000 == de3.continent) || (de3.continent < 100 && this.mapid / 10000000 == de3.continent) || (de3.continent < 1000 && this.mapid / 1000000 == de3.continent))) { + double baseChance = de3.chance * chServerrate; + double dropModFactor = Math.round((double) chr.getDropMod() * chr.getStat().dropBuff / 100.0); + double showdownFactor = showdown / 100.0; + double configRate = ((Integer) Start.ConfigValuesMap.get("砍爆率")).intValue(); + double finalChance = (baseChance * dropModFactor * showdownFactor) / configRate; + int chanceInt = (int) finalChance; + +// boolean isGlobalDrop = de3.continent < 0; +// boolean isContinent1 = de3.continent < 10 && this.mapid / 100000000 == de3.continent; +// boolean isContinent4 = de3.continent < 10 && this.mapid / 100000000 == de3.continent; +// boolean isContinent2 = de3.continent < 100 && this.mapid / 10000000 == de3.continent; +// boolean isContinent3 = de3.continent < 1000 && this.mapid / 1000000 == de3.continent; +// boolean isValidMap = isGlobalDrop || isContinent1 || isContinent2 || isContinent3; + + + if (Randomizer.nextInt(999999) < chanceInt ){ if (droptype == 3) { pos.x = mobpos + ((d % 2 == 0) ? (40 * (d + 1) / 2) : (-(40 * (d / 2)))); } else {