Noticias:

SMF - Just Installed!

Menú principal

Source Custom ViewDetails character

Publicado por Dakosmu, Jun 29, 2023, 07:49 AM

Tema anterior - Siguiente tema

Dakosmu

Source Custom ViewDetails character

Los visitantes no pueden visualizar imágenes en los mensajes, por favor Regístrate o Inicia Sesión




Crear Nuevo Filto llamado OpenViewSetItem

Los visitantes no pueden visualizar imágenes en los mensajes, por favor Regístrate o Inicia Sesión


Y agregar los Archivos existentes QuickCommandWindow.cpp QuickCommandWindow.h


Abrimos stdafx.h


Agregamos

#pragma comment(lib,"wzMUQuiz.lib") //soiitem
#define SOIITEM 1
Los visitantes no pueden visualizar imágenes en los mensajes, por favor Regístrate o Inicia Sesión



main.cpp

Agregamos
#include "QuickCommandWindow.h"
Agregamos
#if(SOIITEM)
    g_pQuickCommandWindow.szInit();
#endif

Los visitantes no pueden visualizar imágenes en los mensajes, por favor Regístrate o Inicia Sesión




protocol.cpp

Agregar
#include "QuickCommandWindow.h"

Buscar
Add
        case 0x4E:
            switch (((lpMsg[0] == 0xC1) ? lpMsg[3] : lpMsg[4]))
            {


Agregar COdigo 1

#if(SOIITEM) //OpenViewSetItem
            case 0x0D:
                g_pQuickCommandWindow.ReceiveInventory(lpMsg);
                return 1;
#endif
Los visitantes no pueden visualizar imágenes en los mensajes, por favor Regístrate o Inicia Sesión


-----------------------------protocol.cpp---------------------------------------

Buscar
            case 0xE5: //-> novo banco de joias
                gJewelBank.LoadInfoBank((PMSG_JEWELSBANK*)lpMsg);



Agregar COdigo 2

#if(SOIITEM)
        case 0xD2: //OpenViewSetItem
            switch (lpMsg[3])
            {
            case 0x05:
                g_pQuickCommandWindow.ReceivePeriodItemList(lpMsg);
                break;
            }
            break;
#endif


protocol.h

Los visitantes no pueden visualizar imágenes en los mensajes, por favor Regístrate o Inicia Sesión


Buscar
struct PMSG_CASH_SHOP_OPEN_RECVo Buscar
struct PMSG_ITEM_MOVE_RECV
Agregar
#if(SOIITEM)
typedef struct
{
    PSBMSG_HEAD header;
    BYTE index[2];
}PMSG_VIEW_REQUEST_SEND;
#endif

QuickCommandWindow.cpp
// QuickCommandWindow.cpp:
// GoldMu.net
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#if(SOIITEM)
#include "Protocol.h"
#include "QuickCommandWindow.h"

SEASON3B::QuickCommandWindow g_pQuickCommandWindow;

namespace SEASON3B
{
    QuickCommandWindow::QuickCommandWindow(void)
    {
    }

    QuickCommandWindow::~QuickCommandWindow(void)
    {
    }
   
    void QuickCommandWindow::SendRequestViewItem(int pSelectedCha)
    {
        WORD p_Key = *(WORD *)(pSelectedCha + 126);

   
        PMSG_VIEW_REQUEST_SEND Send;
        Send.header.set(0xF3, 0xF4, sizeof(Send));
        Send.index[0] = (BYTE)((p_Key) >> 8);
        Send.index[1] = (BYTE)((p_Key) & 0xff);
        DataSend((LPBYTE)&Send, Send.header.size);
    }

    BOOL QuickCommandWindow::ReceiveInventory(BYTE *ReceiveBuffer)
    {
        setStatusDetails(true);

        ResetEquipItem();

        LPHEADER_DEFAULT_SUBCODE_WORD DataRecv = (LPHEADER_DEFAULT_SUBCODE_WORD)ReceiveBuffer;
        int Offset = sizeof(HEADER_DEFAULT_SUBCODE_WORD);

        for(int i=0;iValue;i++)
        {
            LPRECEIVE_INVENTORY Data = (LPRECEIVE_INVENTORY)(ReceiveBuffer+Offset);

            SetEquipItem(Data->Index, Data->Item);

            Offset += sizeof(RECEIVE_INVENTORY);
        }

        return ( TRUE);
    }

    bool QuickCommandWindow::ReceivePeriodItemList(BYTE* pReceiveBuffer)
    {
        LPPMSG_PERIODITEMEX_ITEMLIST Data = (LPPMSG_PERIODITEMEX_ITEMLIST)pReceiveBuffer;

        if(Data->wItemSlotIndex < 12)
        {
            SetPeriodItem(Data->wItemSlotIndex, (long)Data->lExpireDate);
        }

        return true;
    }

    void QuickCommandWindow::szInit()
    {
        Init(3400, SendRequestViewItem);
    }
}
#endif


QuickCommandWindow.h


#pragma once
#if(SOIITEM)
typedef struct //-- itemlist
{
    PSWMSG_HEAD  Header;
    BYTE        Value;
} HEADER_DEFAULT_SUBCODE_WORD, * LPHEADER_DEFAULT_SUBCODE_WORD;

typedef struct
{
    PSBMSG_HEAD        Header;
    WORD            wItemCode;
    WORD            wItemSlotIndex;
    long            lExpireDate;
}PMSG_PERIODITEMEX_ITEMLIST, *LPPMSG_PERIODITEMEX_ITEMLIST;

typedef struct //-- GetList Item
{
    BYTE          Index;
    BYTE          Item[12];
} RECEIVE_INVENTORY, * LPRECEIVE_INVENTORY;

namespace SEASON3B
{
    typedef void (*PUSHEVENT_CALLBACK)(int);

    void ResetEquipItem();
    void setStatusDetails(bool bShow);
    void SetPeriodItem(int iIndex, long lExpireDate);
    void SetEquipItem(int iIndex, BYTE* pbyItemPacket);
    void Init(int txt, PUSHEVENT_CALLBACK pCallback);

    class QuickCommandWindow
    {
    public:
        void szInit();
        QuickCommandWindow(void);
        virtual ~QuickCommandWindow(void);

        BOOL ReceiveInventory(BYTE *ReceiveBuffer);
        bool ReceivePeriodItemList(BYTE* ReceiveBuffer);
        static void SendRequestViewItem(int pSelectedCha);
   
    };
}



extern SEASON3B::QuickCommandWindow g_pQuickCommandWindow;
#endif




Para Solucionar Debes editar el archivo Text.bmd y agregar la linea 3400. y agregar ViewDetails
Los visitantes no pueden visualizar imágenes en los mensajes, por favor Regístrate o Inicia Sesión











Descargar
You require the following to view this post content:
  • You require a post count of at least 3, you need another 3 posts.


Creditos
takumi12
GoldSun
Dakosmu Por la Guia



Bon Dia

🡱 🡳