mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Zone Points] Fix zone point heading data (#2415)
* [Zone Points] Fix zone point heading data * Update 2022_09_03_fix_zone_point_heading_data.sql * Augment #showzonepoints with saylinks * Add more heading fixes to zone points * Account for 999 target_heading * Add zone safe headings
This commit is contained in:
parent
186c2fe2ae
commit
78d4bd464e
@ -34,7 +34,7 @@
|
|||||||
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9206
|
#define CURRENT_BINARY_DATABASE_VERSION 9207
|
||||||
|
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9029
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9029
|
||||||
|
|||||||
@ -460,6 +460,7 @@
|
|||||||
9204|2022_09_02_faction_association.sql|SHOW TABLES LIKE 'faction_association'|empty|
|
9204|2022_09_02_faction_association.sql|SHOW TABLES LIKE 'faction_association'|empty|
|
||||||
9205|2022_09_03_fix_starting_point_heading.sql|SELECT * FROM db_version WHERE version >= 9205|empty|
|
9205|2022_09_03_fix_starting_point_heading.sql|SELECT * FROM db_version WHERE version >= 9205|empty|
|
||||||
9206|2022_09_03_fix_door_destination_headings.sql|SELECT * FROM db_version WHERE version >= 9206|empty|
|
9206|2022_09_03_fix_door_destination_headings.sql|SELECT * FROM db_version WHERE version >= 9206|empty|
|
||||||
|
9207|2022_09_03_fix_zone_point_heading_data.sql|SELECT * FROM db_version WHERE version >= 9206|empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
3056
utils/sql/git/required/2022_09_03_fix_zone_point_heading_data.sql
Normal file
3056
utils/sql/git/required/2022_09_03_fix_zone_point_heading_data.sql
Normal file
File diff suppressed because it is too large
Load Diff
@ -15,94 +15,102 @@ void command_showzonepoints(Client *c, const Seperator *sep)
|
|||||||
c->Message(Chat::White, "Listing zone points...");
|
c->Message(Chat::White, "Listing zone points...");
|
||||||
c->SendChatLineBreak();
|
c->SendChatLineBreak();
|
||||||
|
|
||||||
for (auto &virtual_zone_point : zone->virtual_zone_point_list) {
|
for (auto &p : zone->virtual_zone_point_list) {
|
||||||
std::string zone_long_name = ZoneLongName(virtual_zone_point.target_zone_id);
|
std::string zone_long_name = ZoneLongName(p.target_zone_id);
|
||||||
|
|
||||||
|
std::string saylink = fmt::format(
|
||||||
|
"#goto {:.0f} {:.0f} {:.0f}",
|
||||||
|
p.x,
|
||||||
|
p.y,
|
||||||
|
p.z
|
||||||
|
);
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Virtual Zone Point x [{}] y [{}] z [{}] h [{}] width [{}] height [{}] | To [{}] ({}) x [{}] y [{}] z [{}] h [{}]",
|
"Virtual Zone Point [{}] x [{}] y [{}] z [{}] h [{}] width [{}] height [{}] | To [{}] ({}) x [{}] y [{}] z [{}] h [{}]",
|
||||||
virtual_zone_point.x,
|
Saylink::Silent(saylink, "Goto").c_str(),
|
||||||
virtual_zone_point.y,
|
p.x,
|
||||||
virtual_zone_point.z,
|
p.y,
|
||||||
virtual_zone_point.heading,
|
p.z,
|
||||||
virtual_zone_point.width,
|
p.heading,
|
||||||
virtual_zone_point.height,
|
p.width,
|
||||||
|
p.height,
|
||||||
zone_long_name.c_str(),
|
zone_long_name.c_str(),
|
||||||
virtual_zone_point.target_zone_id,
|
p.target_zone_id,
|
||||||
virtual_zone_point.target_x,
|
p.target_x,
|
||||||
virtual_zone_point.target_y,
|
p.target_y,
|
||||||
virtual_zone_point.target_z,
|
p.target_z,
|
||||||
virtual_zone_point.target_heading
|
p.target_heading
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
std::string node_name = fmt::format("ZonePoint To [{}]", zone_long_name);
|
std::string node_name = fmt::format("ZonePoint To [{}]", zone_long_name);
|
||||||
|
|
||||||
float half_width = ((float) virtual_zone_point.width / 2);
|
float half_width = ((float) p.width / 2);
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
(float) virtual_zone_point.x + half_width,
|
(float) p.x + half_width,
|
||||||
(float) virtual_zone_point.y + half_width,
|
(float) p.y + half_width,
|
||||||
virtual_zone_point.z,
|
p.z,
|
||||||
virtual_zone_point.heading
|
p.heading
|
||||||
));
|
));
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
(float) virtual_zone_point.x + half_width,
|
(float) p.x + half_width,
|
||||||
(float) virtual_zone_point.y - half_width,
|
(float) p.y - half_width,
|
||||||
virtual_zone_point.z,
|
p.z,
|
||||||
virtual_zone_point.heading
|
p.heading
|
||||||
));
|
));
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
(float) virtual_zone_point.x - half_width,
|
(float) p.x - half_width,
|
||||||
(float) virtual_zone_point.y - half_width,
|
(float) p.y - half_width,
|
||||||
virtual_zone_point.z,
|
p.z,
|
||||||
virtual_zone_point.heading
|
p.heading
|
||||||
));
|
));
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
(float) virtual_zone_point.x - half_width,
|
(float) p.x - half_width,
|
||||||
(float) virtual_zone_point.y + half_width,
|
(float) p.y + half_width,
|
||||||
virtual_zone_point.z,
|
p.z,
|
||||||
virtual_zone_point.heading
|
p.heading
|
||||||
));
|
));
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
(float) virtual_zone_point.x + half_width,
|
(float) p.x + half_width,
|
||||||
(float) virtual_zone_point.y + half_width,
|
(float) p.y + half_width,
|
||||||
(float) virtual_zone_point.z + (float) virtual_zone_point.height,
|
(float) p.z + (float) p.height,
|
||||||
virtual_zone_point.heading
|
p.heading
|
||||||
));
|
));
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
(float) virtual_zone_point.x + half_width,
|
(float) p.x + half_width,
|
||||||
(float) virtual_zone_point.y - half_width,
|
(float) p.y - half_width,
|
||||||
(float) virtual_zone_point.z + (float) virtual_zone_point.height,
|
(float) p.z + (float) p.height,
|
||||||
virtual_zone_point.heading
|
p.heading
|
||||||
));
|
));
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
(float) virtual_zone_point.x - half_width,
|
(float) p.x - half_width,
|
||||||
(float) virtual_zone_point.y - half_width,
|
(float) p.y - half_width,
|
||||||
(float) virtual_zone_point.z + (float) virtual_zone_point.height,
|
(float) p.z + (float) p.height,
|
||||||
virtual_zone_point.heading
|
p.heading
|
||||||
));
|
));
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
(float) virtual_zone_point.x - half_width,
|
(float) p.x - half_width,
|
||||||
(float) virtual_zone_point.y + half_width,
|
(float) p.y + half_width,
|
||||||
(float) virtual_zone_point.z + (float) virtual_zone_point.height,
|
(float) p.z + (float) p.height,
|
||||||
virtual_zone_point.heading
|
p.heading
|
||||||
));
|
));
|
||||||
|
|
||||||
found_zone_points++;
|
found_zone_points++;
|
||||||
@ -111,34 +119,44 @@ void command_showzonepoints(Client *c, const Seperator *sep)
|
|||||||
LinkedListIterator<ZonePoint *> iterator(zone->zone_point_list);
|
LinkedListIterator<ZonePoint *> iterator(zone->zone_point_list);
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
while (iterator.MoreElements()) {
|
while (iterator.MoreElements()) {
|
||||||
ZonePoint *zone_point = iterator.GetData();
|
ZonePoint *p = iterator.GetData();
|
||||||
std::string zone_long_name = ZoneLongName(zone_point->target_zone_id);
|
std::string zone_long_name = ZoneLongName(p->target_zone_id);
|
||||||
std::string node_name = fmt::format("ZonePoint To [{}]", zone_long_name);
|
std::string node_name = fmt::format("ZonePoint To [{}]", zone_long_name);
|
||||||
|
|
||||||
NPC::SpawnZonePointNodeNPC(
|
NPC::SpawnZonePointNodeNPC(
|
||||||
node_name, glm::vec4(
|
node_name, glm::vec4(
|
||||||
zone_point->x,
|
p->x,
|
||||||
zone_point->y,
|
p->y,
|
||||||
zone_point->z,
|
p->z,
|
||||||
zone_point->heading
|
p->heading
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// {:.0f}
|
||||||
|
|
||||||
|
std::string saylink = fmt::format(
|
||||||
|
"#goto {:.0f} {:.0f} {:.0f}",
|
||||||
|
p->x,
|
||||||
|
p->y,
|
||||||
|
p->z
|
||||||
|
);
|
||||||
|
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Client Side Zone Point x [{}] y [{}] z [{}] h [{}] number [{}] | To [{}] ({}) x [{}] y [{}] z [{}] h [{}]",
|
"Client Side Zone Point [{}] x [{}] y [{}] z [{}] h [{}] number [{}] | To [{}] ({}) x [{}] y [{}] z [{}] h [{}]",
|
||||||
zone_point->x,
|
Saylink::Silent(saylink, "Goto").c_str(),
|
||||||
zone_point->y,
|
p->x,
|
||||||
zone_point->z,
|
p->y,
|
||||||
zone_point->heading,
|
p->z,
|
||||||
zone_point->number,
|
p->heading,
|
||||||
|
p->number,
|
||||||
zone_long_name.c_str(),
|
zone_long_name.c_str(),
|
||||||
zone_point->target_zone_id,
|
p->target_zone_id,
|
||||||
zone_point->target_x,
|
p->target_x,
|
||||||
zone_point->target_y,
|
p->target_y,
|
||||||
zone_point->target_z,
|
p->target_z,
|
||||||
zone_point->target_heading
|
p->target_heading
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user