Sonitex
Premium-
Posts
521 -
Joined
-
Days Won
12 -
Feedback
100%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Everything posted by Sonitex
-
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
-
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(); }
-
It should be automatically loaded from an active locale path
-
Download the latest client and search for the monsters I guess
-
You can extract that from the official client.
-
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.
-
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.
-
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.
-
You need to use LocaleChatPacket instead of ChatPacket.
-
[Client] Objects shadows
Sonitex replied to Jettyx's topic in Community Support - Questions & Answers
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. -
Done. Sorry for the inconvenience.
-
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]
- 55 replies
-
- 620
-
Convert char to uint32_t
Sonitex replied to Dievs's topic in Community Support - Questions & Answers
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. -
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.
-
About Adding a Lava to Map
Sonitex replied to SukH's topic in Community Support - Questions & Answers
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 -
About Adding a Lava to Map
Sonitex replied to SukH's topic in Community Support - Questions & Answers
Metin client does not support multiple water types, you would have to make some changes to do so. -
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
-
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.
-
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)
-
Sorry to disappoint you but this has nothing to do with damage of the skill. Your issue lays somewhere else.
-
I will try to see if I still have it although this truly refers to antique now hah
-
Synchronization of two servers
Sonitex replied to AlphaDesign's topic in Community Support - Questions & Answers
Third time worked like a charm. Got it (kinda) -
Synchronization of two servers
Sonitex replied to AlphaDesign's topic in Community Support - Questions & Answers
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). -
Return to dungeon problem
Sonitex replied to DanielFVS's topic in Community Support - Questions & Answers
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()) -
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.