mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Cleanup] Add GMFind_Struct to packet structures (#3402)
* [Cleanup] Add GMFind_Struct to packet structures # Notes - X and Y were swapped in GMSummon_Struct so it displayed XYZ incorrectly in /find, adding its own struct fixes this. * Update eq_packet_structs.h * Update eq_packet_structs.h
This commit is contained in:
+13
-12
@@ -6471,27 +6471,28 @@ void Client::Handle_OP_GMFind(const EQApplicationPacket *app)
|
||||
RecordPlayerEventLog(PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = "Used /find"});
|
||||
return;
|
||||
}
|
||||
if (app->size != sizeof(GMSummon_Struct)) {
|
||||
LogError("Wrong size: OP_GMFind, size=[{}], expected [{}]", app->size, sizeof(GMSummon_Struct));
|
||||
|
||||
if (app->size != sizeof(GMFind_Struct)) {
|
||||
LogError("Wrong size: OP_GMFind, size=[{}], expected [{}]", app->size, sizeof(GMFind_Struct));
|
||||
return;
|
||||
}
|
||||
|
||||
//Break down incoming
|
||||
GMSummon_Struct* request = (GMSummon_Struct*)app->pBuffer;
|
||||
auto* request = (GMFind_Struct*) app->pBuffer;
|
||||
//Create a new outgoing
|
||||
auto outapp = new EQApplicationPacket(OP_GMFind, sizeof(GMSummon_Struct));
|
||||
GMSummon_Struct* foundplayer = (GMSummon_Struct*)outapp->pBuffer;
|
||||
auto outapp = new EQApplicationPacket(OP_GMFind, sizeof(GMFind_Struct));
|
||||
auto* foundplayer = (GMFind_Struct*) outapp->pBuffer;
|
||||
//Copy the constants
|
||||
strcpy(foundplayer->charname, request->charname);
|
||||
strcpy(foundplayer->gmname, request->gmname);
|
||||
//Check if the NPC exits intrazone...
|
||||
Mob* gt = entity_list.GetMob(request->charname);
|
||||
if (gt != 0) {
|
||||
auto* gt = entity_list.GetMob(request->charname);
|
||||
if (gt) {
|
||||
foundplayer->success = 1;
|
||||
foundplayer->x = (int32)gt->GetX();
|
||||
foundplayer->y = (int32)gt->GetY();
|
||||
|
||||
foundplayer->z = (int32)gt->GetZ();
|
||||
foundplayer->zoneID = zone->GetZoneID();
|
||||
foundplayer->x = gt->GetX();
|
||||
foundplayer->y = gt->GetY();
|
||||
foundplayer->z = gt->GetZ();
|
||||
foundplayer->zoneID = zone->GetZoneID();
|
||||
}
|
||||
//Send the packet...
|
||||
FastQueuePacket(&outapp);
|
||||
|
||||
Reference in New Issue
Block a user