[Bug Fix] #peqzone no longer bypass Handle_OP_ZoneChange (#2063)

* [Bug Fix] #peqzone no longer bypass Handle_OP_ZoneChange

* Force other quest functions to trigger EVENT_ZONE properly

* call MovePC

* Use MoveZone to keep things uniform
This commit is contained in:
Natedog2012
2022-03-19 18:25:14 -05:00
committed by GitHub
parent 5275201713
commit b6b662f1c7
2 changed files with 7 additions and 85 deletions
+2 -25
View File
@@ -533,18 +533,7 @@ void Client::MovePC(uint32 zoneID, uint32 instanceID, float x, float y, float z,
}
void Client::MoveZone(const char *zone_short_name) {
auto pack = new ServerPacket(ServerOP_ZoneToZoneRequest, sizeof(ZoneToZone_Struct));
ZoneToZone_Struct* ztz = (ZoneToZone_Struct*) pack->pBuffer;
ztz->response = 0;
ztz->current_zone_id = zone->GetZoneID();
ztz->current_instance_id = zone->GetInstanceID();
ztz->requested_zone_id = ZoneID(zone_short_name);
ztz->admin = Admin();
strcpy(ztz->name, GetName());
ztz->guild_id = GuildID();
ztz->ignorerestrictions = 3;
worldserver.SendPacket(pack);
safe_delete(pack);
ProcessMovePC(ZoneID(zone_short_name), 0, 0.0f, 0.0f, 0.0f, 0.0f, 3, ZoneToSafeCoords);
}
void Client::MoveZoneGroup(const char *zone_short_name) {
@@ -579,19 +568,7 @@ void Client::MoveZoneInstance(uint16 instance_id) {
if (!database.CharacterInInstanceGroup(instance_id, CharacterID())) {
database.AddClientToInstance(instance_id, CharacterID());
}
auto pack = new ServerPacket(ServerOP_ZoneToZoneRequest, sizeof(ZoneToZone_Struct));
ZoneToZone_Struct* ztz = (ZoneToZone_Struct*) pack->pBuffer;
ztz->response = 0;
ztz->current_zone_id = zone->GetZoneID();
ztz->current_instance_id = zone->GetInstanceID();
ztz->requested_zone_id = database.ZoneIDFromInstanceID(instance_id);
ztz->requested_instance_id = instance_id;
ztz->admin = Admin();
strcpy(ztz->name, GetName());
ztz->guild_id = GuildID();
ztz->ignorerestrictions = 3;
worldserver.SendPacket(pack);
safe_delete(pack);
ProcessMovePC(database.ZoneIDFromInstanceID(instance_id), instance_id, 0.0f, 0.0f, 0.0f, 0.0f, 3, ZoneToSafeCoords);
}
void Client::MoveZoneInstanceGroup(uint16 instance_id) {