Sonitex
-
Posts
522 -
Joined
-
Days Won
12 -
Feedback
100%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Sonitex
-
-
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(); }
- 1
- 1
- 8
-
5 minutes ago, DrTurk said:
How do you declare from which locale_string.txt it should load the information?
My locale_string.txt is located in /locale/de
1217 19:56:49074 :: CPythonLocaleString::FindLocaleString: cannot find "1";
It should be automatically loaded from an active locale path
- 1
-
Download the latest client and search for the monsters I guess
- 1
-
You can extract that from the official client.
- 1
-
8 minutes ago, Istny said:
Cleaner, only downside is, if someone for unknow reason will have for example socket3 set to 0 and socket4 to 11 loop in CHARACTER::DoRefine will use value frome socket3 as material vnum which is 0. Summarazing don't do a mess and you are good to go
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.
- 1
-
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.
- 2
-
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.
-
6 hours ago, newreboot said:
Please can u explain how to use it?
I already compiled the source, and added the locale_string on client, But nothing changed. still reading from my locale_string on serverside...
You need to use LocaleChatPacket instead of ChatPacket.
-
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.
- 1
-
10 hours ago, Calliope said:
You should update the download.
The function: GetFormatSpecifierType on clientside is missing
Done. Sorry for the inconvenience.
- 1
-
M2 Download Center
( Internal )
( GitHub )
I would not recommend using this as it's missing many features, head over to Mali's release for an updated version.
- 229
- 3
- 2
- 4
- 4
- 2
- 2
- 3
- 6
- 8
- 2
- 93
- 10
- 253
-
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.
- 1
-
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.
- 1
-
-
Metin client does not support multiple water types, you would have to make some changes to do so.
- 1
-
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
- 1
-
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.
- 2
-
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)
-
26 minutes ago, Metin2Place said:
If you spam the same skill right after cooldown, the second time it won't do damage.
Sorry to disappoint you but this has nothing to do with damage of the skill. Your issue lays somewhere else.
- 1
-
I will try to see if I still have it although this truly refers to antique now hah
- 1
-
29 minutes ago, Distraught said:
I type the same for the third time now. Packet around will not send anything to the peers because other cores just really don't give a shit what happened real-time with your character. Who sees you (and this is why it sends to them) is connected to the same core as you are.
Third time worked like a charm. Got it (kinda)
- 1
-
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).
-
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())
- 1
-
28 minutes ago, SukH said:
i give u a solution for that go and read books so you can improve ur mental health
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.
- 1
Core crash when cancelling server timers
in Bug Fixes
Posted
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