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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Zone Instances] Handle routing to instances when using evac/succor #4297

Merged
merged 1 commit into from
May 4, 2024

Conversation

joligario
Copy link
Contributor

@joligario joligario commented May 4, 2024

Description

When using evac/succor spells, the client doesn't properly zone, so we have to trick the client by zoning into a valid zone. Currently we use South Qeynos (1) or North Qeynos (2).

			// if we are in the same zone we want to evac to, client will not send OP_ZoneChange back to do an actual
			// zoning of the client, so we have to send a viable zoneid that the client *could* zone to to make it believe
			// we are leaving the zone, even though we are not. We have to do this because we are missing the correct op code
			// and struct that should be used for evac/succor.
			// 213 is Plane of War
			// 76 is orignial Plane of Hate
			// WildcardX 27 January 2008. Tested this for 6.2 and Titanium clients.

			if (GetZoneID() == 1) {
				gmg->zone_id = 2;
			} else {
				gmg->zone_id = 1;
			}

Unfortunately, that messes with routing to instances since those zones won't have the same instance ids. This change tucks away the instance id along with the zone id to use once the zone instruction is issued for evac.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing

Load into Lavastorm, then Evac:

[Sat May 04 13:04:17 2024] ------------------------------------------------
[Sat May 04 13:04:17 2024] Current Expansion | Dragons of Norrath (9)
[Sat May 04 13:04:17 2024] Current Zone | [lavastorm] (The Lavastorm Mountains) version [1] instance_id [5] min/max expansion (9/99) content_flags []
[Sat May 04 13:04:17 2024] ------------------------------------------------
[Sat May 04 13:04:40 2024] Your Fabled Earring of Unseen Horrors shimmers briefly.
[Sat May 04 13:04:40 2024] You begin casting Levant. (Levant)
[Sat May 04 13:04:44 2024] Your Zealot's Spiked Bracer pulses with light as your vision sharpens.
[Sat May 04 13:04:44 2024] LOADING, PLEASE WAIT...
[Sat May 04 13:04:49 2024] ------------------------------------------------
[Sat May 04 13:04:49 2024] Current Expansion | Dragons of Norrath (9)
[Sat May 04 13:04:49 2024] Current Zone | [lavastorm] (The Lavastorm Mountains) version [1] instance_id [5] min/max expansion (9/99) content_flags []
[Sat May 04 13:04:49 2024] ------------------------------------------------

Run to Nektulos, then evac:

[Sat May 04 13:05:36 2024] LOADING, PLEASE WAIT...
[Sat May 04 13:05:40 2024] You have entered The Nektulos Forest.
[Sat May 04 13:06:24 2024] ------------------------------------------------
[Sat May 04 13:06:24 2024] Current Expansion | Dragons of Norrath (9)
[Sat May 04 13:06:24 2024] Current Zone | [nektulos] (The Nektulos Forest) version [0] instance_id [0] min/max expansion (-1/9) content_flags []
[Sat May 04 13:06:24 2024] ------------------------------------------------
[Sat May 04 13:07:04 2024] You begin casting Levant. (Levant)
[Sat May 04 13:07:07 2024] Your Zealot's Spiked Bracer pulses with light as your vision sharpens.
[Sat May 04 13:07:08 2024] LOADING, PLEASE WAIT...
[Sat May 04 13:07:11 2024] You have entered The Nektulos Forest.
[Sat May 04 13:07:12 2024] ------------------------------------------------
[Sat May 04 13:07:12 2024] Current Expansion | Dragons of Norrath (9)
[Sat May 04 13:07:12 2024] Current Zone | [nektulos] (The Nektulos Forest) version [0] instance_id [0] min/max expansion (-1/9) content_flags []
[Sat May 04 13:07:12 2024] ------------------------------------------------

Run to East Commons:

[Sat May 04 13:07:48 2024] LOADING, PLEASE WAIT...
[Sat May 04 13:07:51 2024] You have entered East Commonlands.
[Sat May 04 13:07:52 2024] ------------------------------------------------
[Sat May 04 13:07:52 2024] Current Expansion | Dragons of Norrath (9)
[Sat May 04 13:07:52 2024] Current Zone | [ecommons] (East Commonlands) version [0] instance_id [0] min/max expansion (-1/-1) content_flags []

#zone to West Wastes:

[Sat May 04 13:08:15 2024] You say, '#zone westwastes'
[Sat May 04 13:08:16 2024] LOADING, PLEASE WAIT...
[Sat May 04 13:08:20 2024] You have entered The Western Wastes.
[Sat May 04 13:08:21 2024] ------------------------------------------------
[Sat May 04 13:08:21 2024] Current Expansion | Dragons of Norrath (9)
[Sat May 04 13:08:21 2024] Current Zone | [westwastes] (The Western Wastes) version [0] instance_id [0] min/max expansion (-1/-1) content_flags []
[Sat May 04 13:08:21 2024] ------------------------------------------------

Run to Sirens, evac in Sirens:

[Sat May 04 13:08:35 2024] LOADING, PLEASE WAIT...
[Sat May 04 13:08:38 2024] You have entered Siren's Grotto.
[Sat May 04 13:08:39 2024] ------------------------------------------------
[Sat May 04 13:08:39 2024] Current Expansion | Dragons of Norrath (9)
[Sat May 04 13:08:39 2024] Current Zone | [sirens] (Siren's Grotto) version [1] instance_id [11] min/max expansion (6/99) content_flags []
[Sat May 04 13:08:39 2024] ------------------------------------------------
[Sat May 04 13:08:45 2024] Your Fabled Earring of Unseen Horrors shimmers briefly.
[Sat May 04 13:08:45 2024] You begin casting Levant. (Levant)
[Sat May 04 13:08:48 2024] Your Zealot's Spiked Bracer pulses with light as your vision sharpens.
[Sat May 04 13:08:49 2024] LOADING, PLEASE WAIT...
[Sat May 04 13:08:51 2024] You have entered Siren's Grotto.
[Sat May 04 13:08:52 2024] ------------------------------------------------
[Sat May 04 13:08:52 2024] Current Expansion | Dragons of Norrath (9)
[Sat May 04 13:08:52 2024] Current Zone | [sirens] (Siren's Grotto) version [1] instance_id [11] min/max expansion (6/99) content_flags []
[Sat May 04 13:08:52 2024] ------------------------------------------------

Clients tested: RoF2

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

@joligario joligario requested a review from Akkadius May 4, 2024 17:27
@Akkadius Akkadius merged commit dfd1bfb into master May 4, 2024
2 checks passed
@Akkadius Akkadius deleted the evac_instances branch May 4, 2024 21:59
@Akkadius Akkadius mentioned this pull request May 9, 2024
catapultam-habeo pushed a commit to The-Heroes-Journey-EQEMU/Server that referenced this pull request Jul 14, 2024
Akkadius added a commit that referenced this pull request Jul 25, 2024
catapultam-habeo added a commit to The-Heroes-Journey-EQEMU/Server that referenced this pull request Jul 27, 2024
commit 661f9ef
Author: Akkadius <[email protected]>
Date:   Thu Jul 25 17:31:41 2024 -0500

    Revert "[Zone Instances] Handle routing to instances when using evac/succor (EQEmu#4297)"

    This reverts commit dfd1bfb.
fryguy503 pushed a commit that referenced this pull request Jul 30, 2024
@joligario joligario mentioned this pull request Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants