Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/01/19 in all areas

  1. All public offlineshop's have memory leak and at final server will crash with 'Segmentation Fault (core dumped)", don't use any public offlineshop, but, if you have general knowledge about memset and moving all querry to smart pointers, you're good, but remove edit function and don't use ken.
    1 point
  2. OnUpdate() is executed only when character is dead for this case so don't worry - but you're right with only binary thing. I've forgot about NotifyDeadMainCharacter. I'm going to update this guide, thanks ?
    1 point
  3. You're right, but if you really want to use something like this, you should do a customizable class, like: [Hidden Content]
    1 point
  4. Dear members, there are a few new features that we would like to tell you about: 1) metin2.dev Discord Server Yeah, you heard right. We now also have a Discord server! After we received many requests concerning this, we decided to open the Discord Server. You can join it under the following link: https://discord.metin2.dev/ - Please note that ALL FOUR STEPS are necessary to get the corresponding ranks on the server (and to see some more channels). 2) FAQ section Last week we started the section "Frequently Asked Questions". This section will gradually be filled with a series of guides that will make it easier for beginners to create their own server. We as the metin2.dev team have already started with some small things and are now happy about contributions from the community - from you! This contribution can be an already existing topic in the forum or a completely new contribution. Please note that we want to establish a certain quality standard in the FAQ and thus qualify all text and instructions individually. So either send us a private message with your contribution or the link to the corresponding topic and we will include it in our FAQ if it meets our standards. 3) New Rank: Honorable Member metin2.dev has been online for almost 7 years now. During this time some releases and tutorials have been collected. In order to honour those who stand out from the crowd and are not in debt, we have introduced the new rank 'Honorable Member' some time ago and look again and again, which of our members has earned this rank - maybe you are next soon! The first three members to receive this rank are: - @.plechito' - @martysama0134 - @xP3NG3Rx Who looks at the contributions of these persons, will notice fast, on which we set value on. 4) metin2.dev private bin We now have a private bin. PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. Also file uploads are possible. You're free to use it at it is. You can find it at https://metin2.dev/bin/ Thank you for being part of metin2.dev and making this a great place every day! Sincerely, pollux & the metin2.dev team
    1 point
  5. moved to: [Hidden Content] Few days ago, I did something similar for the client (EterLib\error.cpp) (instead of errorlog): #define ENABLE_CRASH_MINIDUMP #ifdef ENABLE_CRASH_MINIDUMP # include "../UserInterface/Version.h" # include <iomanip> # include <sstream> void make_minidump(EXCEPTION_POINTERS * e) { auto hDbgHelp = LoadLibraryA("dbghelp"); if (hDbgHelp == nullptr) return; auto pMiniDumpWriteDump = (decltype(&MiniDumpWriteDump)) GetProcAddress(hDbgHelp, "MiniDumpWriteDump"); if (pMiniDumpWriteDump == nullptr) return; // folder name std::string folder = "logs"; CreateDirectoryA(folder.c_str(), nullptr); // time format auto t = std::time(nullptr); std::ostringstream timefmt; timefmt << std::put_time(std::localtime(&t), "%Y%m%d_%H%M%S"); // filename std::string filename = fmt::format("{}\\metin2client_{}_{}.dmp", folder, METIN2_GET_VERSION(), timefmt.str()); auto hFile = CreateFileA(filename.c_str(), GENERIC_WRITE, FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (hFile == INVALID_HANDLE_VALUE) return; MINIDUMP_EXCEPTION_INFORMATION exceptionInfo; exceptionInfo.ThreadId = GetCurrentThreadId(); exceptionInfo.ExceptionPointers = e; exceptionInfo.ClientPointers = FALSE; auto dumped = pMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, MINIDUMP_TYPE(MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory), e ? &exceptionInfo : nullptr, nullptr, nullptr); CloseHandle(hFile); // std::string errMsg = "The application crashed. Send the generated file to the staff: "s + name; // MessageBox(nullptr, errMsg.c_str(), "Metin2Client", MB_ICONSTOP); return; } #endif LONG __stdcall EterExceptionFilter(_EXCEPTION_POINTERS * pExceptionInfo) { #ifdef ENABLE_CRASH_MINIDUMP make_minidump(pExceptionInfo); #else // eterlog trash #endif return EXCEPTION_EXECUTE_HANDLER; } I'm not using it since I'll use crashrpt2 instead. Version without c++17&libfmt: #define ENABLE_CRASH_MINIDUMP #ifdef ENABLE_CRASH_MINIDUMP #include "../UserInterface/Version.h" #include <iomanip> #include <sstream> void make_minidump(EXCEPTION_POINTERS* e) { auto hDbgHelp = LoadLibraryA("dbghelp"); if(hDbgHelp == nullptr) return; auto pMiniDumpWriteDump = (decltype(&MiniDumpWriteDump))GetProcAddress(hDbgHelp, "MiniDumpWriteDump"); if(pMiniDumpWriteDump == nullptr) return; // folder name std::string folder = "logs"; CreateDirectoryA(folder.c_str(), nullptr); // time format auto t = std::time(nullptr); std::ostringstream timefmt; timefmt << std::put_time(std::localtime(&t), "%Y%m%d_%H%M%S"); // filename std::string filename = folder + "\\"s + "metin2client_"s + std::to_string(METIN2_GET_VERSION()) + "_"s + timefmt.str() + ".dmp"; auto hFile = CreateFileA(filename.c_str(), GENERIC_WRITE, FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if(hFile == INVALID_HANDLE_VALUE) return; MINIDUMP_EXCEPTION_INFORMATION exceptionInfo; exceptionInfo.ThreadId = GetCurrentThreadId(); exceptionInfo.ExceptionPointers = e; exceptionInfo.ClientPointers = FALSE; auto dumped = pMiniDumpWriteDump( GetCurrentProcess(), GetCurrentProcessId(), hFile, MINIDUMP_TYPE(MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory), e ? &exceptionInfo : nullptr, nullptr, nullptr); CloseHandle(hFile); // std::string errMsg = "The application crashed. Send the generated file to the staff: "s + name; // MessageBox(nullptr, errMsg.c_str(), "Metin2Client", MB_ICONSTOP); return; } #endif LONG __stdcall EterExceptionFilter(_EXCEPTION_POINTERS * pExceptionInfo) { #ifdef ENABLE_CRASH_MINIDUMP make_minidump(pExceptionInfo); #else // eterlog trash #endif return EXCEPTION_EXECUTE_HANDLER; }
    1 point
  6. Well I have just searched for a topic like this, because I don't like to start a whole new topic for this small fix. So, the problem is: you can't put stones into the 3rd socket (socket2) while using itemshop with item_award. Open cilentmanager.cpp and search: DWORD dwSocket2 = 0; It is in the CClientManager::RESULT_SAFEBOX_LOAD function. Then replace with this: DWORD dwSocket2 = pItemAward->dwSocket2; The problem caused because the dwSocket variable definied as 0, and only modified if (pItemTable->bType == ITEM_UNIQUE) Have a nice day
    1 point
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.