축복받은 무기 낮은 손상도 클래식 처럼 구현
컨텐츠 정보
- 607 조회
- 2 댓글
- 목록
본문
정보? 원천 소스 구한 곳
https://www.youtube.com/shorts/VYXssbX4AP4
기획의도
축복받은 손상이 true값인 무기의 낮은 손상 확률 구현
제가 가지고 있는 서버팩은 MonsterInstance.java 파일에 손상도 구현이 들어있어서
이 java파일의 아래 부분을
if (mon.isToughskin() && type == 0 && cha.isBuffSoulOfFlame() == false) {
if (PluginController.init(MonsterInstance.class, "toDamage.손상처리",
cha) == null) {
ItemInstance weapon = cha.getInventory().getSlot(8);
if (weapon != null && weapon.getItem().isCanbedmg()
&& Util.random(0, 100) < 7 && weapon.getBress() != 0) {
weapon.setDurability(weapon.getDurability() + 1);
if (Lineage.server_version >= 160)
cha.toSender(S_InventoryStatus.clone(BasePacketPooling
.getPool(S_InventoryStatus.class), weapon));
cha.toSender(S_Message.clone(
BasePacketPooling.getPool(S_Message.class), 268,
weapon.toString()));
}
}
}
이 부분을 아래처럼 바꿔주라고 하네요.
if (mon.isToughskin() && type == 0 && cha.isBuffSoulOfFlame() == false) {
if (PluginController.init(MonsterInstance.class, "toDamage.손상처리", cha) == null) {
ItemInstance weapon = cha.getInventory().getSlot(8);
if (weapon != null && weapon.getItem().isCanbedmg()) {
int damageChance = 25; // 일반 및 저주 무기 손상 확률 (25%)
if (weapon.getBress() == 0) {
damageChance = 14; // 축복받은 무기 손상 확률 (14% - 약 14회 타격 시 2회)
}
if (Util.random(0, 100) < damageChance) {
weapon.setDurability(weapon.getDurability() + 1);
if (Lineage.server_version >= 160)
cha.toSender(S_InventoryStatus.clone(BasePacketPooling.getPool(S_InventoryStatus.class), weapon));
cha.toSender(S_Message.clone(BasePacketPooling.getPool(S_Message.class), 268, weapon.toString()));
}
}
}
}
-
등록일 2026.08.24
-
등록일 2026.07.27
-
등록일 2026.07.04DLL인젝션 점이라도 하나 찍어보기댓글 3
-
등록일 2026.06.29
















