Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

Sunken Temple appears on lists as "undefined" #227

Closed wodim closed 3 years ago

wodim commented 4 years ago

https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?zone=1417

image

Also on items:

https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?item=10454

Sarjuuk commented 4 years ago

probably still using the open world area id for sunken temple.

wodim commented 3 years ago

There are other zones that are undefined. Champion's Hall: https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?zone=2918

wodim commented 3 years ago

The Great Sea: https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?zone=207 (even though this looks more like Deadmines. I'm not sure what's up with that)

jackpoz commented 3 years ago

I re-run Calculate.Creature.Zone.Area.Data and aowow sql, undefined seems to have disappeared in all the links mentioned above

jackpoz commented 3 years ago

now that I re-run the aowow sql setup, this issue appeared again (and should be re-opened)

jackpoz commented 3 years ago

@Sarjuuk if I check https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?zone=1417 I see the zone is Sunken Temple and has id 1417. If I click on the first mob https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?npc=5722 and check in world.creature is has zoneId and areaId 1477 (notice it's 1477, not 1417). https://github.com/Sarjuuk/aowow/blob/c65bd88867cb37ca3bb652dd58522270689096b8/static/js/locale_enus.js#L2037 shows 1477 for Sunken Temple , while https://github.com/Sarjuuk/aowow/blob/c65bd88867cb37ca3bb652dd58522270689096b8/static/js/locale_enus.js#L398 shows 1417. SELECT * FROM creature WHERE zoneid = 1417 OR areaId = 1417; gives 0 results.

Is there a typo in the static js files ?

https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?zone=2918 zone 2918 is missing from https://github.com/Sarjuuk/aowow/blob/c65bd88867cb37ca3bb652dd58522270689096b8/static/js/locale_enus.js#L1970 , is it supposed to be in that array ?

Sarjuuk commented 3 years ago

MariaDB [sarjuuk_aowow]> select * from dbc_areatable where id in (1477, 1417);
+------+-------+-----------+-------+---------------+-----------+----------------+---------------------------+-------------------------+----------------------------+-----------+--------------------------+-------------------+------------------+
| id   | mapId | areaTable | flags | soundAmbience | zoneMusic | zoneIntroMusic| name_loc0                 | name_loc2               | name_loc3   | name_loc4 | name_loc6                | name_loc8         | factionGroupMask |
+------+-------+-----------+-------+---------------+-----------+----------------+---------------------------+-------------------------+----------------------------+-----------+--------------------------+-------------------+------------------+
| 1417 |   109 |         0 |     0 |             0 |         0 |              0| Sunken Temple             | Temple englouti         | Versunkener Tempel   | ?????     | Templo Sumergido         | ?????????? ????   |                0 |
| 1477 |   109 |         0 |     0 |            33 |         3 |              0| The Temple of Atal'Hakkar | Le temple d'Atal'Hakkar | Der Tempel von Atal'Hakkar | ??????    | El Templo de Atal'Hakkar | ???? ????'??????? |                0 |
+------+-------+-----------+-------+---------------+-----------+----------------+---------------------------+-------------------------+----------------------------+-----------+--------------------------+-------------------+------------------+
2 rows in set (0.025 sec)```
its a zone on the same instance map and it has me weirded out since day one.
jackpoz commented 3 years ago

well https://github.com/Sarjuuk/aowow/blob/c65bd88867cb37ca3bb652dd58522270689096b8/static/js/global.js#L8528 is the one returning "undefined", maybe better to keep the zone id if the name is not found in the js.

in addition to that it might be good to refresh the list of zones as there are quite a few missing

what about something like

SELECT CONCAT(LPAD(id, 4, " "), ": '", REPLACE(name_loc0, '\'', '\\\''), "',") FROM aowow.aowow_zones;

to get the zones from the db into the js ? is there a reason to exclude some zones ?

jackpoz commented 3 years ago

I opened a PR at https://github.com/TrinityCore/aowow/pull/41 (maybe I should I opened it on this repo but I noticed too late).

I applied it on tcubuntu, you can see the result by clearing your browser cache and visiting these urls:

image