Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [Bug Report] Vanilla/TBC/WotLK - wrong variable gets written to/used for the realmlist #3669

Open
kjarex opened this issue Feb 6, 2024 · 4 comments
Labels
Expansion: Classic (1.12) Issues relating to the Classic Expansion (1.12). Expansion: TBC (2.4.3) Issues relating to the TBC Expansion (2.4.3). Expansion: WotLK (3.3.5) Issues relating to the WotLK Expansion (3.3.5). Info: Needs Replication Issue needs replication before further action. Type: Feature Request Issue is a CMaNGOS Extensions request.

Comments

@kjarex
Copy link

kjarex commented Feb 6, 2024

Bug Details

Vanilla/TBC/WotLK - wrong variable gets written to/used for the realmlist

Steps to Reproduce

  1. Note that the sql statement in World::updateRealmList (it's in src/game/World/World.cpp) sets the timezone column to the value of realm_zone
  2. Note that the realm_zone value gets set just the line before to getConfig(CONFIG_UINT32_REALM_ZONE)
  3. Note that this value has been set in World::LoadConfigSettings to the value of the config file mit the key RealmZone or if not set defaulting to REALM_ZONE_DEVELOPMENT (the default value might might give you a clue what this went wrong here)
  4. Note that the config says about RealmZone:
#    RealmZone
#        Server realm zone (set allowed alphabet in character names/etc). See also Strict*Names options.
#
#        1 Development    - any language (Default)
#        2 United States  - extended-Latin
#        3 Oceanic        - extended-Latin
#        4 Latin America  - extended-Latin
#        5 Tournament     - basic-Latin at create, any at login
#        6 Korea          - East-Asian
#        7 Tournament     - basic-Latin at create, any at login
#        8 English        - extended-Latin
#        9 German         - extended-Latin
#        10 French        - extended-Latin
#        11 Spanish       - extended-Latin
#        12 Russian       - Cyrillic
#        13 Tournament    - basic-Latin at create, any at login
#        14 Taiwan        - East-Asian
#        15 Tournament    - basic-Latin at create, any at login
#        16 China         - East-Asian
#        17 CN1           - basic-Latin at create, any at login
#        18 CN2           - basic-Latin at create, any at login
#        19 CN3           - basic-Latin at create, any at login
#        20 CN4           - basic-Latin at create, any at login
#        21 CN5           - basic-Latin at create, any at login
#        22 CN6           - basic-Latin at create, any at login
#        23 CN7           - basic-Latin at create, any at login
#        24 CN8           - basic-Latin at create, any at login
#        25 Tournament    - basic-Latin at create, any at login
#        26 Test Server   - any language
#        27 Tournament    - basic-Latin at create, any at login
#        28 QA Server     - any language
#        29 CN9           - basic-Latin at create, any at login
  1. Remember that at 1. we observed that this value gets written to the column timezone 馃槼
  2. If you still want to run it, and run into issues, the realmlist stays empty

Expected behavior

The config value of TimeZoneOffset (or if that's missing, then the default 0), available as in m_timeZoneOffset= sConfig.GetIntDefault("TimeZoneOffset", 0) * HOUR;) for column timezone

Suggested Workaround

  1. Recompile with the bug fixed
  2. Say it's on purpose like this, kind of an industry standard, as this bug is not limited to just cmangos

Crash Log

No errors shown, as the server never gets aware of the issue to begin with

Core SHA1 Commit Hash

Yes

Database SHA1 Commit Hash

Yes

Operating System

Yes

Client Version

1.12.1 (Classic)

@kjarex kjarex added the Info: Needs Replication Issue needs replication before further action. label Feb 6, 2024
@kjarex
Copy link
Author

kjarex commented Feb 6, 2024

I wasn't able to select tbc, wotlk as well. But I checked and they have it, too.

@kjarex
Copy link
Author

kjarex commented Feb 6, 2024

Well I've been given more info from the discord channel. Turns out, the value is correct, it just isn't at all a timezone (so the table has an absolute horrible and totally msileading or simply wrong column name). And the config file additionally has a completely wrong explanation what the setting RealmZone in the config file actually does (even when acknowledging the notice about possible issues with realms - which forwhatever reason had been missing in mine). But yeah, leave the source itself like it is, but change the name of the column (if you don't want to do that, add at least a comment to it, you have it for other columns/tables, and here that's absolutely misleading as it has literally nothing to do with the timezone). And change the description for RealmZone - as it does not do what it says (or maybe it does do that as well, but it does very different things as well).

@insunaa insunaa added Type: Feature Request Issue is a CMaNGOS Extensions request. Expansion: Classic (1.12) Issues relating to the Classic Expansion (1.12). Expansion: TBC (2.4.3) Issues relating to the TBC Expansion (2.4.3). Expansion: WotLK (3.3.5) Issues relating to the WotLK Expansion (3.3.5). labels Feb 6, 2024
@kjarex
Copy link
Author

kjarex commented Feb 6, 2024

Took a while. Only the values 0, 1, 2, 3, 5 (not 4!) are valid to be shown/offered in realmlist (or you have to change the method which generates/sends the realmlist so that it sends only one of those 5 values). Those values come from Cfg_Categories.dbc - if you have a different value, the client would literally not know how or where it should offer them to the user/player. Even if one sticks to the config file description they won't be able to connect to the realm in 25 out of 30 options - that's a lot.

@insunaa
Copy link
Contributor

insunaa commented Feb 6, 2024

Took a while. Only the values 0, 1, 2, 3, 5 (not 4!) are valid to be shown/offered in realmlist (or you have to change the method which generates/sends the realmlist so that it sends only one of those 5 values). Those values come from Cfg_Categories.dbc - if you have a different value, the client would literally not know how or where it should offer them to the user/player. Even if one sticks to the config file description they won't be able to connect to the realm in 25 out of 30 options - that's a lot.

This applies ONLY to 1.12, NOT to TBC or WotLK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expansion: Classic (1.12) Issues relating to the Classic Expansion (1.12). Expansion: TBC (2.4.3) Issues relating to the TBC Expansion (2.4.3). Expansion: WotLK (3.3.5) Issues relating to the WotLK Expansion (3.3.5). Info: Needs Replication Issue needs replication before further action. Type: Feature Request Issue is a CMaNGOS Extensions request.
Projects
None yet
Development

No branches or pull requests

2 participants