채팅0

    프메 65 복사 같이할분

    조회수 899

    어떠한 값으로 하는지는 잘 모르겠지만, 교환이나 상점판매등의 경우 removeById, removeBySlot 메서드를 사용한다.

    해당 메서드에서 item값이 null일경우 완전히 해당 메서드를 스킵함으로써, 복사가 가능하다. 즉 클라이언트 단에서 서버단에 아이템 위치를 보낼때 null값으로 조작해 보내는 경우가 맞는것같다.

    public static boolean removeFromSlot(final MapleClient c, final MapleInventoryType type, final short slot, short quantity, final boolean fromDrop, final boolean consume, boolean packet) {
            if (c.getPlayer() == null || c.getPlayer().getInventory(type) == null) {
                return false;
            }
            final Item item = c.getPlayer().getInventory(type).getItem(slot);
            if (item != null) {
                final boolean allowZero = consume && GameConstants.isRechargable(item.getItemId());
                c.getPlayer().getInventory(type).removeItem(slot, quantity, allowZero);

                if (item.getQuantity() == 0 && !allowZero) {
                    if (packet) {
                        c.getSession().write(MaplePacketCreator.clearInventoryItem(type, item.getPosition(), fromDrop));
                    }
                } else {
                    if (packet) {
                        c.getSession().write(MaplePacketCreator.updateInventorySlot(type, (Item) item, fromDrop));
                    }
                }
                return true;
            } else {
                c.sclose();
            }
            return false;
        }

    해당 메서드에 빨간색 글씨를 추가해주면 해결될것이다.. (아마도 -_-;;)

    댓글5

    회원프로필

    c.close ㄷ 막는걸 올리면 어카노

    2024.04.23 16:38
    회원프로필

    아 게이야 1ㄷ1걸어바

    2024.04.23 16:44
    회원프로필

    65패킷메소복사
    [enable]
    alloc(on,4)
    registersymbol(on)
    alloc(packetarr,200)
    registersymbol(packetarr)
    packetarr:
    db 6F 00 D2 B2 93 03 01 00 FF 00 00 00 FF FF 00 00 FF FF FF 7F AB 76 00 D2 B2 93 03 01 00 FF 00 00 00 FF FF 00 00 FF FF FF 7F
    //패킷 valuea : 00 67 64 db 01 0a 00 00 00
    //21억 drop meso
    //Light Packet
    alloc(packet,200)
    alloc(azby,200)
    alloc(packet_delay,4)
    registersymbol(packet_delay)
    alloc(timer,4)
    label(nopacket)
    packet_delay:
    dd #1000
    timer:
    dd #0
    label(return)
    offsetrect:
    jmp azby
    return:
    azby:
    //original code
    mov edi,edi
    push ebp
    mov ebp,esp
    pushad
    mov ecx,[pCharacter]
    mov ecx,[ecx]
    cmp ecx,0
    je nopacket
    cmp [on],0
    je nopacket
    call callTime
    mov ebx,[timer]
    sub eax,ebx
    cmp eax,[packet_delay]
    jl nopacket
    call callTime
    mov [timer],eax
    mov eax,#200
    mov [packet+4],packetarr
    mov [packet+8],eax
    push packet
    call bypassedSend
    popad
    jmp return
    nopacket:
    popad
    jmp return
    [disable]
    offsetrect:
    mov edi,edi
    push ebp
    mov ebp,esp

    2024.04.23 17:38
    회원프로필

    형 1ㄷ1좀

    2024.04.23 18:30
    회원프로필

    org2 내가 건빵 50개줘ㅜㅅ다 고맙다

    2024.04.23 20:52

      게시글 리스트
      제목작성자작성일조회
      5648604-23900
      5648504-23571
      5648404-23985
      5648304-23947
      5648204-23348
      5648104-23473
      5648004-23471
      5647904-23934
      5647804-23937
      5647704-23328
      5647604-23621
      5647504-23500
      5647404-23604
      5647304-23607
      5647204-23413
      5647104-231985
      5647004-23678
      5646904-23677
      5646804-22553
      5646704-22659
      안내 배너 이미지