-
-
Notifications
You must be signed in to change notification settings - Fork 763
feat: multiworld system #2826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: multiworld system #2826
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
08ad270 to
8be898c
Compare
b7c6568 to
0e0eb3b
Compare
|
This pull request is open for testing, please be aware that it may contain a lot of bugs, if you find anything out of order that was not supposed to happen, please report commenting in here. |
|
|
works perfectly |
Thanks for testing, @Methemia Are you in the discord? I want to discuss some tests with you as you are already testing this! |
|
Console errors: |
|
I managed to solve the ranking problem here: The house one seemed more complex to me, I solved one problem and another appeared. |
|
When there are 2 worlds linked, the players_online table is reset periodically and does not list the players from the second world, it only lists the first. |
|
I managed to solve this one about the houses resolved from online players |
|
SQL queries from Highscores, houses and players online fixed. |
|
When you have a world with 10 players and another with 0, according to your update, periodically the 0 will clear the list of the one with 10 since &m_players is empty for that world. solution |
|
Also, in the server_initialization.lua file you need to add: |
|
This PR can be merged, I have been testing it for a long time. |
| } | ||
|
|
||
| void House::setOwner(uint32_t guid, bool updateDatabase /* = true*/, const std::shared_ptr<Player> &player /* = nullptr*/) { | ||
| const auto worldId = g_game().worlds().getCurrentWorld()->id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was throwing an exception when someone buys a house, I changed to the line below and fixed the issue.
| const auto worldId = g_game().worlds().getCurrentWorld()->id; | |
| const auto worldId = static_cast<int>(g_game().worlds().getCurrentWorld()->id); |
|
|
||
| const auto worldId = static_cast<int>(g_game().worlds().getCurrentWorld()->id); | ||
|
|
||
| if (m_players.empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider doing this change too:
std::ostringstream query;
query << "SELECT COUNT(*) AS count FROM players_online WHERE world_id = " << worldId << ";";
auto result = g_database().storeQuery(query.str());
int count = result->getNumber<int>("count");
if (count > 0) {
std::ostringstream ss;
ss << "DELETE FROM players_online WHERE world_id = " << worldId << ";";
g_database().executeQuery(ss.str());
changesMade = true;
}There's a conflict in players' online count if there are more than 1 world online.
With this change, one world doesn't impact the other.
|
With the change in the status port, the otservlist no longer finds the server. Is there a solution? |
Instead of 97173 you just use 7173, 7174... |
|
This PR could have been merged a long time ago, and at this moment I have been testing it without any problems with the latest updates. |
|
I even found that it is possible to use the status port directly on 7171 just like before without any problems. |
I've been using this system for a long time without any problems... but I'm already thinking about an improved version |
goooood |





Description
SOME CONFIGS WILL BE REMOVED FROM
config.luaAND WILL BE USED FROM DATABASE, TABLEworlds!Implementation of the multiword system.
This PR is in DRAFT due to the necessary modifications:
Using MyAAC will need the following PR: opentibiabr/myaac#110
Behaviour
Actual
Multiword system isn't enabled and available
Expected
Multiword system be enabled and available
Credits and inspired by: opentibiabr/otservbr-global-archived#929
Type of change
How Has This Been Tested
Test Configuration:
Checklist