공성전 군주지급템에 관한 소스
이 자료는 러브연구소 삼용이님이 올려주신 글로 바닐라님팩이 출처 인 듯 합니다.
중복이라면 삭제 요청 드립니다.
공성에서 승리하면 승리한혈 군주에게 지급돼는 아이템이구요...
패배하면 인벤에서 아이템이 사라지는 자료입니다.
[출처] 공성전(바닐라님팩) (비공개 카페)
WarTimeController.java
if(castle_id2 == castle_id){//공성이 종료된 성의 번호와 피씨의 성혈등록번호 같다면...
//위에 검색해서 바로밑에 추가~
if (pc.getNetConnection() != null) {
if (pc.getClan().getLeaderId() == pc.getId()) {
if (!pc.getInventory().checkItem(294, 1)) {
L1ItemInstance item = ItemTable.getInstance().createItem(294);
item.setEnchantLevel(10); // 인챈수치
item.setIdentified(true); // 확인상태
item.setCount(1);
pc.getInventory().storeItem(item);
pc.sendPackets(new S_SystemMessage("공성에 승리하여 +" + item.getEnchantLevel() + "군주의 전설검을 획득하였습니다."));
L1ItemInstance l1iteminstance1 = pc.getInventory().getItem(item.getId());
l1iteminstance1.setBless(129);
pc.getInventory().updateItem(item, L1PcInventory.COL_BLESS);
pc.getInventory().saveItem(item, L1PcInventory.COL_BLESS);
}
}
//pc.getInventory().storeItem(438005, 10000); // 코인만개지급
}
} else {
if (pc.getNetConnection() != null) {
if (pc.getClan().getLeaderId() == pc.getId()) {
if (pc.getInventory().checkItem(294, 1)) {
for (L1ItemInstance item : pc.getInventory().getItems()) {
if (item.getItemId() == 294) {
if (item.isEquipped()) {
pc.getInventory().setEquipped(item, false);
}
pc.getInventory().removeItem(item);
pc.sendPackets(new S_SystemMessage("공성에 패배하여 +" + item.getEnchantLevel() + "군주의 전설검을 잃으셨습니다."));
pc.sendPackets(new S_SystemMessage("공성에 패배하여 위로금 10,000,000아데나가 지급되었습니다."));
break;
}
}
pc.getInventory().storeItem(40308, 10000000); // 아데나지급
}
}
}
}
}
} catch (Exception e) {
System.out.println("공성 종료 후 선물지급중 오류!");
}
}
C_SelectCharacter.java
Clanclan(pc);//검색후 추가~
if (pc.getClanid() > 0 && pc.isCrown()) {
if (!(pc.getClan().getCastleId() >= 1 && pc.getClan().getCastleId() <=8)) {
if (pc.getInventory().checkItem(294, 1)) {
for (L1ItemInstance item : pc.getInventory().getItems()) {
if (item.getItemId() == 294) {
if (item.isEquipped()) {
pc.getInventory().setEquipped(item, false);
}
pc.getInventory().removeItem(item);
pc.sendPackets(new S_SystemMessage("공성에 패배하여 +" + item.getEnchantLevel() + "군주의 전설검을 잃으셨습니다."));
pc.sendPackets(new S_SystemMessage("공성에 패배하여 위로금 10,000,000아데나가 지급되었습니다."));
break;
}
}
pc.getInventory().storeItem(40308, 10000000); // 아데나지급
}
}
}
- 출처 : 러브연구소 삼용이님(바닐라팩)
[출처] 공성전(바닐라님팩) (비공개 카페)

연구사원 님의 최근 댓글
감사합니다 2017 11.29 9999 가 본 영자모드이고 7777이 부영자 모드 같더군요. 2016 06.13 좋은 자료 감사합니다. 2016 06.09 감사합니다. 2016 06.08 감사합니다. 2016 06.08