Jump to content

Sonitex

Premium
  • Posts

    521
  • Joined

  • Days Won

    12
  • Feedback

    100%

Everything posted by Sonitex

  1. ui.py class ThinBoard(Window): CORNER_WIDTH = 16 CORNER_HEIGHT = 16 LINE_WIDTH = 16 LINE_HEIGHT = 16 BOARD_COLOR = grp.GenerateColor(0.0, 0.0, 0.0, 0.51) Change BOARD_COLOR
  2. Make sure the packet is being sent/recognized in the correct phase.
  3. Actually, CInstanceBase holds the VID value and that one is set on the server once the entity is spawned. Essentially, CActorInstance is a big mess of components grouped into one class, so it only holds "resource variables" eg. motions, while the CInstanceBase holds the gameplay variables like name, level, etc. The concept is old and very far from the modern implementations of entities but hopefully, you'll understand. Correct, CPythonCharacterManager is responsible for the entities.
  4. Loooooooooong story short: PythonPlayer is like a manager class responsible for your character's data. It is used on the Python side to get the data and display it later on and that's about it. CInstanceBase is like a wrapper for the entity class CActorInstance which holds all the needed components like animations, effects, collisions, etc.
  5. The difference between clang++ and clang++-devel lies in the version of the Clang compiler being used. Both are C++ compilers provided by the Clang project, but clang++-devel typically refers to the development version or a specific version of the Clang compiler. The specific differences between the two can vary depending on the context and the versions installed on your system. Regarding your side question, if thelibcore is strictly a C program, it is generally more appropriate to use a C compiler such as clang or gcc rather than a C++ compiler like clang++. Using a C++ compiler for a C program can lead to syntax errors or unexpected behavior, as C++ and C have slight differences in syntax and language features. Make sure that your Makefile is set up to use a C compiler (e.g., CC = clang or CC = gcc) instead of a C++ compiler. If you are encountering syntax errors or missing brackets when switching to a C compiler, it could be due to subtle differences between the C and C++ languages. Make sure that your code follows the C syntax and conventions and does not rely on C++-specific features. Additionally, ensure that your Makefile and build system are correctly configured to use a C compiler and include the necessary header files and libraries for C code. This was totally not generated by GPT.
  6. Yep, you're correct, the issue is only present on default metin2 sources.
  7. Ayo, recently I've come across an issue with a customer who had item proto entries all over the place and when the database tried to sort that mess, it messed it up even more, eventually, it messed up this very Monday for me as I spent hours debugging this. Long story short: It first inserts key-value to map m_map_itemTableByVnum where the key was an integer (item vnum) and the value was a pointer that pointed to an item table object at position X in m_vec_itemTable but at the end, it sorted this very vector while values in map still pointed to the same positions in the vector. Guessed what happened? An item with vnum 19709 had an item table of the item with vnum 20009 because you donkey were too lazy to put new proto entries in the correct order. Go over to server source, database/ClientManagerBoot.cpp, at the end of the following function: bool CClientManager::InitializeItemTable() { [...] m_map_itemTableByVnum.clear(); auto it = m_vec_itemTable.begin(); while (it != m_vec_itemTable.end()) { TItemTable * item_table = &(*(it++)); sys_log(1, "ITEM: #%-5lu %-24s %-24s VAL: %ld %ld %ld %ld %ld %ld WEAR %lu ANTI %lu IMMUNE %lu REFINE %lu REFINE_SET %u MAGIC_PCT %u", item_table->dwVnum, item_table->szName, item_table->szLocaleName, item_table->alValues[0], item_table->alValues[1], item_table->alValues[2], item_table->alValues[3], item_table->alValues[4], item_table->alValues[5], item_table->dwWearFlags, item_table->dwAntiFlags, item_table->dwImmuneFlag, item_table->dwRefinedVnum, item_table->wRefineSet, item_table->bAlterToMagicItemPct); m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table)); } sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum()); return true; Now we'll do some dark magic, we'll move the sort function at the beginning of previously shown code, like so: bool CClientManager::InitializeItemTable() { [...] m_map_itemTableByVnum.clear(); // -------------------------------------------------------------> Wohoo I am here now! sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum()); auto it = m_vec_itemTable.begin(); while (it != m_vec_itemTable.end()) { TItemTable * item_table = &(*(it++)); sys_log(1, "ITEM: #%-5lu %-24s %-24s VAL: %ld %ld %ld %ld %ld %ld WEAR %lu ANTI %lu IMMUNE %lu REFINE %lu REFINE_SET %u MAGIC_PCT %u", item_table->dwVnum, item_table->szName, item_table->szLocaleName, item_table->alValues[0], item_table->alValues[1], item_table->alValues[2], item_table->alValues[3], item_table->alValues[4], item_table->alValues[5], item_table->dwWearFlags, item_table->dwAntiFlags, item_table->dwImmuneFlag, item_table->dwRefinedVnum, item_table->wRefineSet, item_table->bAlterToMagicItemPct); m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table)); } return true;
  8. Heya here is a guide for the exact thing you're looking for:
  9. Windows server is used explicitly for development as you can hook the running cores to Visual Studio and debug your life-mistakes easier and once you think you solved them, you ship it on FreeBSD in continue the misery there with GDB
  10. I didn't take the negative experience to heart but it was more about sharing private conversations online and interpreting my words in a wrong way.
  11. It was more about me not being able to provide support at that exact time as I was bombarded with exams so the only alternative was to disable it until I am available again. I was also completely transparent about this issue with a dozen of other potential customers and stopped the sales until it was resolved so I don't get this public "shaming" but you do you my friend :))
  12. You probably misunderstood the meaning of CMake. CMake is a cross-platform tool that will generate project files for your FreeBSD platform (eg. Makefiles), but you can also use it to generate Visual Studio project if you're developing on Windows using the same configuration files.
  13. Create an item that can expire, put it in the safe-box and wait for it to expire, which it won't until you teleport or put in the inventory.
  14. Dynamic packet's size depends on the buffer's size that you're writing to. In your case you have set dynamic packet's size to X value, but you only wrote Y amount of data to the buffer and sent it to the client. Likely scenario is you are not increasing the packet's size concurrently with writing data to the buffer, but you're predefining it with some deprecated value e.g., old slot count or using wrong datatypes when determining the size.
  15. As stated in the first post you need to send the string index to the client but how you achieve that is up to you. You can create a new table of string-index and find the index there. This was more of a test and not really an end product therefore it is missing some features, also it was based on the C functions where now we have many other tools that would ease the process of fetching variadic arguments.
  16. Edited the tutorial because it required too much brain power to comprehend it. #nohate
  17. That is correct but do not remove the other friend class as it is used for the same purpose just at a different item loading phase. Usually, I use [...] to indicate before/after code.
  18. Yo! If you have an item with a limit type LIMIT_REAL_TIME_START_FIRST_USE that has been used at one point and put it inside the safe-box, it will not be removed from the game until you pull it out of the safe-box and perform a teleport. item.h // Search: protected: friend class CInputDB; // Add below: friend class CHARACTER; char.cpp // Search: void CHARACTER::LoadSafebox(int iSize, DWORD dwGold, int iItemCount, TPlayerItem * pItems) { [...] if (!m_pkSafebox->Add(pItems->pos, item)) { M2_DESTROY_ITEM(item); } else item->SetSkipSave(false); // Modify to: if (!m_pkSafebox->Add(pItems->pos, item)) { M2_DESTROY_ITEM(item); } else { item->OnAfterCreatedItem(); item->SetSkipSave(false); }
  19. Usually character parts are updated via CHARACTER::UpdatePacket so you should start investigating there if you're even sending the correct sash data to the client.
  20. I'd love to see that separate item drop calculation of yours
  21. Dear wild Metin2 enthusiasts, We are searching for a freelancer in the graphic design domain. More specifically, someone who will refashion the nostalgia present in Metin2's user-interface. The requirements are as follows: • good understanding of graphic design principles • ability to draw on tablet (recommended) • UI elements animating skills • able to speak and write fluent English • commitment to the project Your job would be to modify an existing UI in PSD format and later on create new user interface windows upon it. Another task would be animating certain UI elements such as buttons eg. a hover effect and other simple decorative animations. Detailed instructions would be given to you for any kind of modification or request. It is also possible (recommended) to discuss ideas and wishes via a voice call. If you think you are up for a challenge, I invite you to a chat over Discord (Sonitex#1880). Kind Regards, Sonitex
  22. Oh, I didn't see that you edited the post Better be safe in case the client cannot find the requested string and appends empty space in chat window. Thank you for sharing the notice function with others
×
×
  • 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.