사이트 로그인
2018.11.02 10:55
프리서버 오픈소스 리니지 목표랩되면 선물주기 소스
L1PcInstance.java
파랑 : 검색
빨강 : 추가
녹색 : 설명
private void levelUp(int gap) {
resetLevel(); //검색
if (getLevel() == 70) { //레벨설정 //여기서부터
try {
L1Item l1item = ItemTable.getInstance().getTemplate(120321); //아이템번호
if (l1item != null) {
switch (getType()){ // <--케릭 클래스 구분
case 0://군주라면
{
if (getInventory().checkItem(21091)) { //아이템번호
sendPackets(new S_SystemMessage("\\\\fY레벨업 보상템은 한개만소지할수있습니다.")); //메세지는 알아서
return;
}
getInventory().storeItem(21091, 1); //여기도 아이템번호
sendPackets(new S_SystemMessage("\\\\fY운영자가 70보상아이템을 주었습니다.")); //적당한걸로 써주세요
break;
}
case 1://기사
{
if (getInventory().checkItem(21092)) { //아이템번호
sendPackets(new S_SystemMessage("\\\\fY레벨업 보상템은 한개만소지할수있습니다.")); //메세지는 알아서
return;
}
getInventory().storeItem(21092, 1); //여기도 아이템번호
sendPackets(new S_SystemMessage("\\\\fY운영자가 70보상아이템을 주었습니다.")); //적당한걸로 써주세요
break;
}
case 2://요정
{
if (getInventory().checkItem(21093)) { //아이템번호
sendPackets(new S_SystemMessage("\\\\fY레벨업 보상템은 한개만소지할수있습니다.")); //메세지는 알아서
return;
}
getInventory().storeItem(21093, 1); //여기도 아이템번호
sendPackets(new S_SystemMessage("\\\\fY운영자가 70보상아이템을 주었습니다.")); //적당한걸로 써주세요
break;
}
case 3://법사
{
if (getInventory().checkItem(21094)) { //아이템번호
sendPackets(new S_SystemMessage("\\\\fY레벨업 보상템은 한개만소지할수있습니다.")); //메세지는 알아서
return;
}
getInventory().storeItem(21094, 1); //여기도 아이템번호
sendPackets(new S_SystemMessage("\\\\fY운영자가 70보상아이템을 주었습니다.")); //적당한걸로 써주세요
break;
}
case 4://다엘
{
if (getInventory().checkItem(21095)) { //아이템번호
sendPackets(new S_SystemMessage("\\\\fY레벨업 보상템은 한개만소지할수있습니다.")); //메세지는 알아서
return;
}
getInventory().storeItem(21095, 1); //여기도 아이템번호
sendPackets(new S_SystemMessage("\\\\fY운영자가 70보상아이템을 주었습니다.")); //적당한걸로 써주세요
break;
}
}
}
} catch (Exception e) {
_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
sendPackets(new S_SystemMessage("레벨업 보상템 획득에 실패했습니다.")); //이부분은 잘모르겟네요;;
}
} //여기까지추가