Jump to content

Sonitex

Premium
  • Posts

    521
  • Joined

  • Days Won

    12
  • Feedback

    100%

Everything posted by Sonitex

  1. That is the other way I was talking about and you are right, this is much more efficient way of doing it as we are not copying elements to another vector and cleaning them up afterwards. Thank you for the code
  2. When cancelling server timers a core will crash as it is removing a timer from the map and increasing the iterator twice by calling erase() function and afterwards increasing it once again when entering a new cycle of loop. One way of solving this issue is to first collect the timers which must be removed and clean them up at the end. You can also add a simple counter which is increased at each end of the loop's cycle and remove the timer directly from the first loop by specifying the position with the counter itself. Note that this issue seems to appear after upgrading code to C++11 or higher. Replace the following function inside questmanager.cpp: void CQuestManager::CancelServerTimers(DWORD arg) { vector<pair<string, DWORD>> ServerTimersToDelete; for (const auto& kv : m_mapServerTimer) { if (kv.first.second == arg) { LPEVENT event = kv.second; event_cancel(&event); ServerTimersToDelete.push_back(kv.first); } } // Delete all the required server timers for (const auto &timer : ServerTimersToDelete) m_mapServerTimer.erase(timer); // Clean up ServerTimersToDelete.clear(); }
  3. It should be automatically loaded from an active locale path
  4. Download the latest client and search for the monsters I guess
  5. You can extract that from the official client.
  6. Yeah but it goes both ways. Before if you set a value for socket0, left socket1 empty and set socket2, 3rd socket would be ignored. But as you said, you need a bit more precision & focus when doing things like that.
  7. BYTE material_count = 0; for (int i = 0; i < REFINE_MATERIAL_MAX_NUM; i++) { str_to_number(prt->materials[i].vnum, data[col++]); str_to_number(prt->materials[i].count, data[col++]); if (prt->materials[i].vnum) material_count++; } prt->material_count = material_count; Issue is how they approached counting in the first place. When the loop hits a vnum equal to zero, material count was assigned based on current loop index which means if you had 5 slots occupied you would never hit an empty slot which is why material count would be always zero. By extending the loop you would also need to extend mysql columns which does nothing in this case.
  8. Yeah because you have to pass index of the string as an argument. In your case, the bottom part of your code should look like this: pkChar->ChatPacket(CHAT_TYPE_INFO, 880, LC_TEXT("Total number of the Quiz: %d"), c); Or: pkChar->ChatPacket(CHAT_TYPE_INFO, 880, "Total number of the Quiz: %d", c); Also, this does not support quiz strings. Those are stored in a separate file called locale_quiz.txt and additional changes are needed for it to be usable. This release only supports strings that are inside locale_string text files.
  9. You need to use LocaleChatPacket instead of ChatPacket.
  10. Not really. Object shadows are static, created by World Editor automatically. If you really wish to change an object's shadow, you would need to edit shadowmap.dds inside the map folder. Character shadows are created in runtime by the client which means there are no files to be edited.
  11. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) I would not recommend using this as it's missing many features, head over to Mali's release for an updated version. [Hidden Content]
  12. We should probably see the rest of the code, but the compiler is telling you that with a reason. You cannot convert an array of chars to a numerical type. A solution would be setting m_swordRefineEffectRight = dwEff but then again, I am not really sure what you are trying to accomplish here.
  13. There isn't any other way other than through events or the gameplay itself (change of the lore, environment rework, new game mechanics). You can empower players' damage, boost their experience rates, etc. Gameplay takes much more effort to be executed correctly and is kind of risky as the whole game is dependent on it/connected to it. I personally haven't seen a server where players would be amazed with the 2 empire concept, unless it was a total rework of the gameplay. Three kingdom concept is much more appreciated from the player base side. Guilds also have a pretty big impact on the player arrangement around the empires.
  14. You most likely didn't implement it successfully, haven't added it but it doesn't look like it has anything to do with terrain. Also, you will only see lava textures now
  15. Metin client does not support multiple water types, you would have to make some changes to do so.
  16. Updated. I assume calculating the duration in the beginning of the function is not the smartest move when dealing with milliseconds. Moved the calculation to skill module's function which is only used at uiToolTip. It works just fine for me now, if further problems arise I will happily fix them
  17. Soooo.. The issue was inside CPythonPlayer::__RunCoolTime(DWORD dwSkillSlotIndex) which was also using casting speed reduction. Apologies to everyone Added remaining part of the tutorial.
  18. Function affects only the tooltip part. Skill cooldown is calculated by the following function(I think, haven't done much research): CPythonPlayer::__RunCoolTime(DWORD dwSkillSlotIndex)
  19. Sorry to disappoint you but this has nothing to do with damage of the skill. Your issue lays somewhere else.
  20. I will try to see if I still have it although this truly refers to antique now hah
  21. I think what @Finnael is saying makes sense. In order to achieve synchronisation of characters' movement and information you would need to send PacketAround() through P2P so it reaches other servers. Also having one master server would solve issues like spawning regens on each server or something similar (I just guessed).
  22. Haven't really took a deep look but the thing that pointed out to me is party flag that saves dungeon index is set when you talk with the NPC 20531. Because you warped out before starting the dungeon, party flag was not saved and you were teleported to a new instance. I'd recommend to move this part to somewhere else like make_dungeon() function. party.setf("dungeon_index", d.get_map_index()) d.setf("party_leader_pid", party.get_leader_pid())
  23. With that attitude I doubt anyone will help you. But what you can do is read some books about programming, it might improve your knowledge.
×
×
  • 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.