Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Updating waypoint behavior to support zoneshard changes. #116

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions bazaar/player.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,21 @@ sub EVENT_CLICKDOOR {
sub EVENT_POPUPRESPONSE {
if ($popupid == 1460 || $popupid == 1461) {
my $group_flg = quest::get_data($client->AccountID() ."-group-ports-enabled") || "";

my $attuned_shortname = $client->GetEntityVariable("magic_map_attune");
my $instance_id = -1;
if($attuned_shortname =~ /(.+?)\s+(-*\d+)/) {
$attuned_shortname = $1;
$instance_id = $2;
}

my $waypoint_data = plugin::GetWaypoint($attuned_shortname, $client);
my $group = $client->GetGroup();
my $dz = $client->GetExpedition();

# The zoneshard teleport options skip over interaction with Tearel that sets this. Not typically an issue except for super-fresh characters.
plugin::AddDefaultAttunement($client);

# Group option locked behind EoM
if ($popupid == 1461 && !$group_flg) {
plugin::YellowText("Your account does not have the ability to transport your group this way unlocked.");
Expand Down Expand Up @@ -135,7 +145,11 @@ sub EVENT_POPUPRESPONSE {
}

$client->SpellEffect(218,1);
$client->MovePC(quest::GetZoneID($attuned_shortname), $x, $y, $z, $heading);
if($instance_id == -1) {
$client->MovePC(quest::GetZoneID($attuned_shortname), $x, $y, $z, $heading);
} else {
$client->MovePCInstance(quest::GetZoneID($attuned_shortname), $instance_id, $x, $y, $z, $heading);
}
}
}
}
}
18 changes: 16 additions & 2 deletions ecommons/player.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,21 @@ sub EVENT_CLICKDOOR {
sub EVENT_POPUPRESPONSE {
if ($popupid == 1460 || $popupid == 1461) {
my $group_flg = quest::get_data($client->AccountID() ."-group-ports-enabled") || "";

my $attuned_shortname = $client->GetEntityVariable("magic_map_attune");
my $instance_id = -1;
if($attuned_shortname =~ /(.+?)\s+(-*\d+)/) {
$attuned_shortname = $1;
$instance_id = $2;
}

my $waypoint_data = plugin::GetWaypoint($attuned_shortname, $client);
my $group = $client->GetGroup();
my $dz = $client->GetExpedition();

# The zoneshard teleport options skip over interaction with Tearel that sets this. Not typically an issue except for super-fresh characters.
plugin::AddDefaultAttunement($client);

# Group option locked behind EoM
if ($popupid == 1461 && !$group_flg) {
plugin::YellowText("Your account does not have the ability to transport your group this way unlocked.");
Expand Down Expand Up @@ -135,7 +145,11 @@ sub EVENT_POPUPRESPONSE {
}

$client->SpellEffect(218,1);
$client->MovePC(quest::GetZoneID($attuned_shortname), $x, $y, $z, $heading);
if($instance_id == -1) {
$client->MovePC(quest::GetZoneID($attuned_shortname), $x, $y, $z, $heading);
} else {
$client->MovePCInstance(quest::GetZoneID($attuned_shortname), $instance_id, $x, $y, $z, $heading);
}
}
}
}
}