캐릭터 생성 제한 소스
옵코드 경고메시지 수정할줄 몰라서 기존에 있는거 끌어다 썼어요~
packethandler.java
public boolean newchar() throws Exception{
중략...
if(found == 1){
_client.sendPacket(_client.bph().get_CharPacks().S_CharCreateStatus(_client.bph().REASON_INVALID_NAME), true);
}else if(found == 0){
if(doesCharNameExist(newChar.get_name())){
_client.sendPacket(_client.bph().get_CharPacks().S_CharCreateStatus(_client.bph().REASON_ALREADY_EXSISTS), true);
}else{
System.out.println(value);
if((newChar.get_name().length() <= 16) && (isAlphaNumeric(newChar.get_name()))){
if(value == 75){
if(AmountofChars(_client.get_loginName()) <= 1){ // 1캐릭은 0, 2캐릭은 1, 3캐릭은 2, 4캐릭은 3
_client.sendPacket(_client.bph().get_CharPacks().S_CharCreateStatus(_client.bph().REASON_OK), true);
newChar.set_objectId(IdFactory.getInstance().getNextId());
중략...
_client.saveChar(newChar);
_client.sendPacket(_client.bph().get_CharPacks().S_NewCharPacket(newChar), true);
}else{
_client.sendPacket(_client.bph().get_CharPacks().S_CharCreateStatus(_client.bph().REASON_ACCESS_FAILED), true);
}
}else{
_client.sendPacket(_client.bph().get_CharPacks().S_CharCreateStatus(_client.bph().REASON_WRONG_AMOUNT), true);
}
빨간부분 추가하시면 되요~ 버그발견시 댓글~
출처 : 무상이님 아이디어 50% + 노력님 조언 50% +도우미 잔대가리 1% 입니다. 출처 바꾸지마세요
출처 - 팝존

jjukyu 님의 최근 댓글
ㄳ 2024 04.07 감사합니다 2024 04.03 ??? 2024 04.03 2천포 팔아먹고 중단이라니 ..... 2024 04.01 클라좀 올려주세여 2023 10.26