변반 착용신 변신레벨 3레벨 다운시키려 하는데 조언좀 해주세요
범이
1
411
0
0
2023.08.09 14:26
if (p.getMinLevel() <= cha.getLevel() || Lineage.event_poly || (bress == 0 && p.getMinLevel() <= 60)
|| cha.getGm() > 0 || cha.getMap() == Lineage.teamBattleMap){
// 축복 변줌일 경우 10분 추가
if (bress == 0) {
time += 1800;
}
if (cha.getInventory() != null && cha.getInventory().isRingOfPolymorphControl2()) {
p.setMinLevel(p.getMinLevel() - 3);
}
Inventory inventory = cha.getInventory();
if (inventory == null || p == null) {
BuffController.remove(cha, ShapeChange.class);
return true;
}
boolean isRingPoly = false;
ItemInstance r1 = inventory.getSlot(Lineage.SLOT_RING_LEFT);
ItemInstance r2 = inventory.getSlot(Lineage.SLOT_RING_RIGHT);
int transformationLevel = p.getMinLevel();
if (cha instanceof PcInstance && !((PcInstance) cha).isTempPoly()) {
isRingPoly = true;
}
boolean hasVIPRings = (r1 != null && r1.getItem().getName().contains("변신 지배 반지")) ||
(r2 != null && r2.getItem().getName().contains("변신 지배 반지"));
int ringPenalty = hasVIPRings ? (r1 != null && r2 != null) ? 4 : 2 : 0;
transformationLevel -= ringPenalty;
boolean canTransform = transformationLevel <= cha.getLevel() ||
Lineage.event_poly ||
cha.getGm() > 0 || cha.getMap() == Lineage.teamBattleMap;
if (canTransform) {
time += 600;
onBuff(cha, target, p, time, false, true);
} else {
String message;
if (hasVIPRings) {
int levelDifference = transformationLevel - cha.getLevel();
message = String.format("%s: %d레벨 이상 변신 가능. %d레벨이 부족합니다.", p.getPolyName(), p.getMinLevel(), levelDifference);
} else {
message = String.format("%s: %d레벨 이상 변신 가능", p.getPolyName(), p.getMinLevel());
}
ChattingController.toChatting(cha, message, Lineage.CHATTING_MODE_MESSAGE);
return false;
}
return true;
}
이렇게 바꾸시면 되시고
감소 레벨은 int ringPenalty = hasVIPRings ? (r1 != null && r2 != null) ? 4 : 2 : 0; 여기서 조정하시면 됩니다 다차면 4 감소 하나면 2 모두 안찼으면 0
채택해주세용