classicdb / database

Classic DB is a content database for CMaNGOS Classic: world, NPCs, objects, quests and so on.
https://github.com/cmangos/mangos-classic
Other
87 stars 56 forks source link

Spawn position/rotation when changing maps #856

Closed Phatcat closed 8 years ago

Phatcat commented 8 years ago

When changing maps the traditional way (entering/exiting instance portals, etc) you are sometimes spawned in the air, or looking in the wrong direction.

The easiest way to reproduce this is to:

You should not be spawning i mid air and you should not be rotated towards anything, you should be looking straight when exiting an instance portal.

Note: Gnomer is not the only place where his happens, this is just the one that really caught my attention - I will list the others.

cala commented 8 years ago

Thank you. I agree, there are many teleports that are wrong. Those from areatriggers can be fixed in the dedicated tables. Some spell teleports can also be fixed in their own tables. However, there are some spells using coordinates from the DBC files (like the mage teleport to Stormwind) where the orientation is wrong, but can't be changed.

Phatcat commented 8 years ago

@cala those that are wrong in DBC; maybe special cases should be hardcoded into the core - how else should we fix those?

Phatcat commented 8 years ago

If you point me in the direction of some of these tables I'll have a go at correcting these. Should be able to get through the dungeon ones rather quickly, not like there are that many dungeons =)

cala commented 8 years ago

Sure! areatrigger_teleport for all dungeons/zones in/out spell_target_position for spells that use TARGET_XYZ_COORDINATES

The first one is probably the one with the most "errors" in it because many of them (if not all) were manually added.

Phatcat commented 8 years ago

So what are the rules for entering/exiting dungeons, how many yards in front of the portal should you spawn? I think the position should be in the middle of the portal and orientation be dead ahead, but I am not sure on the distance - what do you think?

cala commented 8 years ago

For exiting/entering dungeons and areas, distance would also depends on the size of the areatrigger on the opposite side of the portal. I mean, if the distance is too short, when entering, the player will be teleported on top of the "exit" areatrigger and when moving, he will be teleported back outside right away.

Phatcat commented 8 years ago

I may just leave the distance as is and only change orientation, then. Height will correct itself as I won't be flying/falling when getting the coords.

evil-at-wow commented 8 years ago

If there are any destinations that are clearly wrong, in particular for dungeons, please list them here. I'll get you the exact destination data from sniffs so you don't have to guess.

The area_trigger data for all sixteen TBC dungeons were once corrected by me as well, so all TBC dungeons should be fine already (this does of course not apply to ClassicDB).

Phatcat commented 8 years ago

well, we have Gnomer for starters. I'll list the rest instead of 'guessing' them. I'll get it done soonish.

Phatcat commented 8 years ago

and that is Gnomer both on enter ANd on exit, which are both CLEARLY wrong. Others may be wrong without clearly being it. I think we may want sniff data on each and every one of them to be sure..

Muehe commented 8 years ago

all-the-things

evil-at-wow commented 8 years ago

It took a while, but I finally went through a pile of data, searching for the positions related to entering or existing instances. Below is what I have found so far. I'm apparently missing some data, notably some exits back to the continents, which I have indicated. I guess I used my hearthstone too much heh.

I'd like to note that all coordinates below are coming from WoTLK sniffs, and more specifically from patches 3.0.3, 3.0.8, 3.0.9 and 3.1.1. This also means that Onyxia was still the Classic level 60 raid, not the level 80 version. It's also the reason why I have not listed any data for Naxxramas, because that was already the level 80 version with exits going to Northrend.

Map 389 (Ragefire Chasm)

Map X Y Z O
389 0.797643 -8.23429 -15.5288 4.71239
1 1814.99 -4419.23 -18.8151 1.91986

Map 43 (Wailing Caverns) No data.

Map 36 (Deadmines)

Map X Y Z O Note
36 -14.5732 -385.475 62.4561 1.5708
0 -11208.7 1675.9 24.5733 4.71239
0 -11339.9 1572.45 94.3916 1.5708 Exit after ship.

Map 33 (Shadowfang Keep)

Map X Y Z O
33 -228.191 2111.41 76.8904 1.22173
0 -233.011 1567.5 76.8921 4.27606

Map 48 (Blackfathom Deeps) Missing the exit at the entrance.

Map X Y Z O Note
48 -150.234 106.594 -39.779 4.45059
1 9664.14 2526.36 1334.27 184.454 Darnassus portal at the end.

Map 34 (Stormwind Stockade)

Map X Y Z O
34 48.9849 0.483882 -16.3942 0
0 -8766.11 845.499 87.9952 3.83972

Map 90 (Gnomeregan) Missing the exit, and the ones at the back door.

Map X Y Z O
90 -329.098 -3.20722 -152.851 2.96706

Map 47 (Razorfen Kraul)

Map X Y Z O
47 1942.27 1544.23 83.3055 1.309
1 -4463.32 -1664.29 84.0489 3.92699

Map 189 (Scarlet Monastery) Graveyard

Map X Y Z O
189 1687.27 1050.09 18.6773 1.5708
0 2915.34 -801.58 160.333 3.49066

Library

Map X Y Z O
189 253.672 -206.624 18.6773 4.71239
0 2869.32 -820.818 160.333 0.349066

Armory

Map X Y Z O
189 1608.1 -318.919 18.6714 4.71239
0 2885.96 -835.802 160.327 0.349066

Cathedral

Map X Y Z O
189 853.179 1319.18 18.6714 1.5708
0 2915.13 -823.637 160.327 3.49066

Map 129 (Razorfen Downs) No data.

Map 70 (Uldaman)

Map X Y Z O
70 -228.859 46.1018 -46.0186 1.5708
0 -6066.25 -2954.56 209.772 3.14159

Map 209 (Zul'Farrak)

Map X Y Z O
209 1212.67 842.04 8.93346 0
1 -6795.56 -2890.72 8.88742 3.14159

Map 349 (Maraudon) Orange side.

Map X Y Z O
349 1016.83 -458.52 -43.4737 0
1 -1468.2 2614.21 76.3804 0

Purple side.

Map X Y Z O
349 755.078 -617.696 -32.9222 1.5708
1 -1182.8 2877.43 85.908 1.65806

Portal to Earth Song Falls.

Map X Y Z O
349 386.27 33.4144 -130.934 0

Map 109 (Sunken Temple)

Map X Y Z O
109 -315.903 100.197 -131.849 3.14159
0 -10176.6 -3995.35 -112.185 3.00197

Map 230 (Blackrock Depths)

Map X Y Z O
230 456.929 34.0923 -68.0896 4.71239
0 -7178.41 -922.152 166.092 2.00713

Map 229 (Blackrock Spire)

Map X Y Z O
229 78.3534 -226.841 49.7662 4.71239
0 -7524.7 -1228.41 287.204 1.74533

Map 429 (Dire Maul) Missing one portal to Dire Maul East and the exits of West and North.

East

Map X Y Z O Note
429 47.4501 -153.665 -2.71439 5.49779
1 -3738.62 934.522 160.975 3.14159
1 -3585.84 847.367 138.641 2.35619 Exit after Alzzin.

East, the back door to the Hidden Reach.

Map X Y Z O
429 10.5786 -836.991 -32.3988 0
1 -4031.25 129.345 26.4744 2.70526

West

Map X Y Z O
429 -65.6559 159.561 -3.4647 2.35619
429 33.1083 158.977 -3.47126 0.785398

North

Map X Y Z O
429 254.92 -19.463 -2.5596 5.49779

Map 329 (Stratholme)

Front entrance.

Map X Y Z O
329 3392.92 -3395.03 143.135 1.5708
329 3392.84 -3364.44 142.965 4.71239

Back door to the undead side.

Map X Y Z O
329 3590.87 -3643.22 138.491 5.49779
0 3233.06 -4048.3 108.442 2.00713

Map 289 (Scholomance)

Map X Y Z O
289 190.819 126.329 137.227 0
0 1273.91 -2553.09 91.8393 3.57793

Map 249 (Onyxia's Lair - Classic version)

Map X Y Z O
249 30.8916 -54.079 -5.02784 4.71239
1 -4750.38 -3754.44 49.0485 0.785398

Map 309 (Zul'Gurub) Missing the exit.

Map X Y Z O
309 -11916.6 -1243.52 92.5338 4.71239

Map 409 (Molten Core) Missing the exit.

Map X Y Z O
409 1080 -483 -108 1

Map 469 (Blackwing Lair) This one is weird. I have two slightly different positions for the entrance, both from the same raid evening. I'm sure one of those is where you end up using the orb, but I'm not entirely sure where the other one comes from. I've teleported to that exact location multiple times during the raid so a summon is extremely unlikely, and I'm fairly sure I did not go through the portal in UBRS. Does anyone know any other way to end up at the entrance? Respawning inside after death?

Map X Y Z O Note
469 -7666.46 -1103.08 399.679 1 Using the orb.
469 -7672.32 -1107.05 396.651 0.785398
0 -7524.7 -1228.41 287.204 1.74533

Map 509 (Ruins of Ahn'Qiraj) Missing the exit.

Map X Y Z O
509 -8436.53 1519.17 31.907 2.61799

Map 531 (Ahn'Qiraj Temple)

Map X Y Z O
531 -8221.35 2014.34 129.071 0.872665
1 -8239.01 1993.25 129.071 4.01426

Anything else I'm forgetting about?

Phatcat commented 8 years ago

There are a couple of non-dungeon instances like champions hall (and horde counterpart) as well as battle grounds (both enter and exits (each BG has a ton of exists depending on where you queued; one for each capital and each individual bg at their own entrance)

But besides this then much love :heart: and many thanks; I will try to find time soon to verify all of these for vanilla.

Phatcat commented 8 years ago

Map 70 (Uldaman)

Uldaman also has a 'side door', I'm guessing you don't have that data either since you didn't list it =)

cala commented 8 years ago

Many thanks and eternal love @evil-at-wow for all these data !

Regarding BWL: there were four ways to zone in BWL :

From my long raiding experience of this lovely dungeon, the last one is the one that can occur several time during a single raiding session. Unless a player has to left for town a come back with the orb several times, but that is unlikely.

evil-at-wow commented 8 years ago

Uldaman also has a 'side door'

Good catch! I forgot about that one, to be honest. But alas, no data yet for that one.

I didn't list the battlegrounds because I don't associate them with the word 'instances', although they are of course instanced maps. I can get a few of those as well. But I'm not a PvP player, so I didn't do a lot of battlegrounds on retail (and no arenas at all) and it's unlikely I have more than a few of the teleports (as you say, you can queue from pretty much every city).

About the BWL teleports: I think you hit the nail on the head cala, so thanks for the hint that made me look better! I've checked the sequence of all SMSG_NEW_WORLD packets around that time, and this is the sequence that came up for the BWL run:

SMSG_NEW_WORLD to map 469 -7666.46 -1103.08 399.679 1
SMSG_NEW_WORLD to map 0 -6450.61 -1113.51 308.022 6.22035
SMSG_NEW_WORLD to map 469 -7672.32 -1107.05 396.651 0.785398
SMSG_NEW_WORLD to map 0 -6450.61 -1113.51 308.022 6.22035
SMSG_NEW_WORLD to map 469 -7672.32 -1107.05 396.651 0.785398
SMSG_NEW_WORLD to map 0 -7524.7 -1228.41 287.204 1.74533
SMSG_NEW_WORLD to map 469 -7666.46 -1103.08 399.679 1
SMSG_NEW_WORLD to map 0 -7524.7 -1228.41 287.204 1.74533

The transfer to map 0 just before the two weird teleports is to a graveyard in Eastern Kingdoms! So it all makes sense now:

The pile of data I went through was like the first half of what I actually have - as you can see from the patch versions, I started with the oldest data I have - so I'll check later if I can fine some more in the other part. Stay tuned.

cala commented 8 years ago

@Phatcat do you mind if I assign this issue to you?

Phatcat commented 8 years ago

That's quite alright, cala.

Phatcat commented 8 years ago

Oh god the naming in areatrigger_teleport is horrible....

You tell me which Uldaman entry fits with which uldaman entrance, just by looking at the name. Also why is each instance not grouped together.... How much does this need to be in sync with UDB and TBC-db because I have half a mind of changing not only the spawn values but also the ordering, the ids and the names.

Phatcat commented 8 years ago

spell_target_position could also do with a name/comment field to be honest.

How much can I change?

cala commented 8 years ago

Regarding areatrigger_teleport, you cannot change the IDs because they are defined by the DBC files. You may change the names but some areatrigger use conditions and maybe scripts and changing the name could break the relation. But I'm not certain as I don't have the documentation at hand and I can not confirm nor deny this.

As for the spell_target_position table, I agree that this table and many others would benefit from a comment-like field. So, this would be a broader change and should probably be initiated from core because many tables structure (if not all) is updated from core.

Phatcat commented 8 years ago

Map 409 (Molten Core)

That's using the Orb inside Blackrock Mountain, right? Not using the actual, original entrance inside blackrock Depths? Or is it the window/lava entrance (as ghost)? Just making sure.

Phatcat commented 8 years ago

Sorry, not orb, that's for BWL. High elf. the reason you get the attunement. You guys know.

Phatcat commented 8 years ago
(3183,'Dire Maul',56,0,0,0,429,44.4499,-154.822,-2.71201,0),
(3184,'Dire Maul',56,0,0,0,429,-201.11,-328.66,-2.72,5.22),
(3185,'Dire Maul',56,0,0,0,429,9.31119,-837.085,-32.5305,0),
(3186,'Dire Maul',56,0,0,0,429,-62.9658,159.867,-3.46206,3.14788),
(3187,'Dire Maul',56,0,0,0,429,31.5609,159.45,-3.4777,0.01),
(3189,'Dire Maul',56,0,0,0,429,255.249,-16.0561,-2.58737,4.7),
(3190,'Dire Maul',0,0,0,0,1,-3831.79,1250.23,160.223,0),
(3191,'Dire Maul',0,0,0,0,1,-3747.96,1249.18,160.217,3.15827),
(3193,'Dire Maul',0,0,0,0,1,-3520.65,1077.72,161.138,1.5009),
(3194,'Dire Maul',0,0,0,0,1,-3737.48,934.975,160.973,3.13864),
(3195,'Dire Maul',0,0,0,0,1,-3980.58,776.193,161.006,0),
(3196,'Dire Maul',0,0,0,0,1,-4030.21,127.966,26.8109,0),
(3197,'Dire Maul',0,0,0,0,1,-3577.67,841.859,134.594,0),

This. This is what I mean by horrible naming...

Phatcat commented 8 years ago
(22668,469,-7581.11,-1216.19,476.8,0),
(22669,469,-7542.47,-1191.92,476.355,0),
(22670,469,-7506.58,-1165.26,476.796,0),
(22671,469,-7561.54,-1244.01,476.8,0),
(22674,469,-7538.63,-1273.64,476.8,0),
(22675,469,-7500.7,-1249.89,476.798,0),
(22676,469,-7469.93,-1227.93,476.777,0),
(22950,429,-37.5643,813.433,-7.43823,4.77),
(22951,1,-3760.87,1086.28,131.96,1.53),
(22972,469,-7538.63,-1277.56,476.799,0),
(22975,469,-7557.95,-1249.87,476.799,0),
(22976,469,-7579.59,-1218.76,476.799,0),
(22977,469,-7599.83,-1190.94,475.472,0),
(22978,469,-7497.51,-1249.17,476.798,0),
(22979,469,-7519.9,-1218.85,476.799,0),
(22980,469,-7540.82,-1190.7,476.355,0),
(22981,469,-7461.41,-1226.29,476.781,0),
(22982,469,-7483.16,-1195.39,476.799,0),
(22983,469,-7504.77,-1164.43,476.797,0),
(22984,469,-7524.15,-1138.16,473.348,0),
(22985,469,-7538.63,-1277.56,476.799,0),

Yeah. I'm not gonna figure out which spell trigger your BWL data belongs to. Also I can't seem to find the BWL exit in our system in either of those 2 tables. Everything else provided has been translated into a db update that I'm gonna test/verify locally in a bit.

Phatcat commented 8 years ago

Somewhat related note: I know you didn't have any data for leaving Molten Core, but I am pretty sure that you do not actually get back inside Blackrock Depths, but actually end up back at the exit of Blackrock Depths, just like you end up at the exit of Blackrock Spire if you manually leave Blackwing Lair, and not at the actual BWL entrance inside UBRS.

Somewhat unrelated note: Is it supposed to be day inside of Dire Maul North instance while it is night outside? - Seems like instances don't follow night scycle properly?

evil-at-wow commented 8 years ago

Map 409 (Molten Core) High elf. The reason you get the attunement. You guys know.

Good remark, because you have the portal inside BRD, the "window jump" and the elf outside. I actually had to check, but yes, I asked the elf. I might have the one from the BRD portal too. I'll add it to the list to check.

As for the exit of Molten Core: indeed, regardless of how you got there, you'll end up near the elf when you run through the portal to exit it. That's what I've always seen at least (WoTLK and later).

evil-at-wow commented 8 years ago

Interesting remark about instances and the day-night cycle. I have done hundreds of them on all moments of the day, and I don't remember seeing any instance at night or something like that. But then again, maybe I just didn't notice...

cala commented 8 years ago

I confirm the exit of MC is right near the High Elf who gives the attunement quest.

Regarding the day/night cycle, I'm pretty sure to have run AQ20 by night and it was the night in the instance, like outside. Night runs of DM West (I mostly played during evening/nights) are also things I remember. In fact, I'm most used to see the game by night than by day and I would have remember the change from night to day when entering a dungeon. But we are speaking of one thing that happened ten years ago, so I can't be 100% positive about this.

Phatcat commented 8 years ago

I'm actually pretty sure I've played a night time version of Dire Maul North. But I am not 100% sure.

Oh yeah, I've played a night time version of ZF. I remember that quite clear actually.

https://www.google.dk/search?q=night+time+zul%27farrak&client=firefox-b-ab&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjSluPXl7TOAhVGkiwKHRYiA4wQ_AUICCgB&biw=1870&bih=1115#imgrc=_oa9px9xIi5_fM%3A

Phatcat commented 8 years ago

I think it's only those instances with 'open air' that are interesting in this regard.

Phatcat commented 8 years ago

skaermbillede 54

Night time ZF is looking fine.