• 🎉 Hey there! I've just launched my brand new server voting platform — Metin2 P Servers 🚀

Not answered Martysama 5.8 problem with refine

Metin2Hub Bot
M2Hub Bot
Feb
Threads
66
2,363
2
1,293
113
HubMoney
1,678
View attachment 2966

Anyone knows how to fix this?

he confuses the value of vnum count and prob, dont know why

Hello dear user,

Your post will be under surveillance by bots for the next few hours.

Forum description : Metin2 private server, Metin2 download, Metin2 support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.
 
Member
Sep
Threads
0
4
0
1
HubMoney
23
Can someone help me?!
There are 2 problems, one is in the Packets.h file in the client, search
TRefineTable and do the same on the server you will see that the structures are different, then changes the client structure with the one present in the server. Fix errors that can popup due to that mod. Then open PythonNetworkStreamPhaseGame, search for RecvRefineInformationPacketNew and replace it with the code you can see down here.


C++:
bool CPythonNetworkStream::RecvRefineInformationPacketNew()
{
    TPacketGCRefineInformationNew kRefineInfoPacket;
    if (!Recv(sizeof(kRefineInfoPacket), &kRefineInfoPacket))
        return false;

    PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME],
        "OpenRefineDialog",
        Py_BuildValue("(BILiB)",
            kRefineInfoPacket.pos,
            kRefineInfoPacket.result_vnum,
            kRefineInfoPacket.cost,
            kRefineInfoPacket.prob,
            kRefineInfoPacket.type)
        );

    for (int i = 0; i < kRefineInfoPacket.material_count; ++i)
    {
        PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "AppendMaterialToRefineDialog", Py_BuildValue("(II)", kRefineInfoPacket.materials[i].vnum, kRefineInfoPacket.materials[i].count));
    }
    //>> RecvRefineInformationPacketNew(pos = 3, result_vnum = 51, cost = 600, prob = 0, type = 100)
#ifdef _DEBUG
    Tracef(" >> RecvRefineInformationPacketNew(pos=%d, result_vnum=%d, cost=%lld, prob=%d, type=%d)\n",
                                                        kRefineInfoPacket.pos,
                                                        kRefineInfoPacket.result_vnum,
        kRefineInfoPacket.cost,
        kRefineInfoPacket.prob,
                                                        kRefineInfoPacket.type);
#endif

    return true;
}