mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-02 14:22:31 +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:
parent
ae53efc52c
commit
f06a37a009
@ -1793,6 +1793,17 @@ struct GMSummon_Struct {
|
|||||||
/*104*/ uint32 unknown2; // E0 E0 56 00
|
/*104*/ uint32 unknown2; // E0 E0 56 00
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GMFind_Struct {
|
||||||
|
char charname[64];
|
||||||
|
char gmname[64];
|
||||||
|
uint32 success;
|
||||||
|
uint32 zoneID;
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float z;
|
||||||
|
uint32 unknown2;
|
||||||
|
};
|
||||||
|
|
||||||
struct GMGoto_Struct { // x,y is swapped as compared to summon and makes sense as own packet
|
struct GMGoto_Struct { // x,y is swapped as compared to summon and makes sense as own packet
|
||||||
/* 0*/ char charname[64];
|
/* 0*/ char charname[64];
|
||||||
|
|
||||||
|
|||||||
@ -6471,27 +6471,28 @@ void Client::Handle_OP_GMFind(const EQApplicationPacket *app)
|
|||||||
RecordPlayerEventLog(PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = "Used /find"});
|
RecordPlayerEventLog(PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = "Used /find"});
|
||||||
return;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Break down incoming
|
//Break down incoming
|
||||||
GMSummon_Struct* request = (GMSummon_Struct*)app->pBuffer;
|
auto* request = (GMFind_Struct*) app->pBuffer;
|
||||||
//Create a new outgoing
|
//Create a new outgoing
|
||||||
auto outapp = new EQApplicationPacket(OP_GMFind, sizeof(GMSummon_Struct));
|
auto outapp = new EQApplicationPacket(OP_GMFind, sizeof(GMFind_Struct));
|
||||||
GMSummon_Struct* foundplayer = (GMSummon_Struct*)outapp->pBuffer;
|
auto* foundplayer = (GMFind_Struct*) outapp->pBuffer;
|
||||||
//Copy the constants
|
//Copy the constants
|
||||||
strcpy(foundplayer->charname, request->charname);
|
strcpy(foundplayer->charname, request->charname);
|
||||||
strcpy(foundplayer->gmname, request->gmname);
|
strcpy(foundplayer->gmname, request->gmname);
|
||||||
//Check if the NPC exits intrazone...
|
//Check if the NPC exits intrazone...
|
||||||
Mob* gt = entity_list.GetMob(request->charname);
|
auto* gt = entity_list.GetMob(request->charname);
|
||||||
if (gt != 0) {
|
if (gt) {
|
||||||
foundplayer->success = 1;
|
foundplayer->success = 1;
|
||||||
foundplayer->x = (int32)gt->GetX();
|
foundplayer->x = gt->GetX();
|
||||||
foundplayer->y = (int32)gt->GetY();
|
foundplayer->y = gt->GetY();
|
||||||
|
foundplayer->z = gt->GetZ();
|
||||||
foundplayer->z = (int32)gt->GetZ();
|
foundplayer->zoneID = zone->GetZoneID();
|
||||||
foundplayer->zoneID = zone->GetZoneID();
|
|
||||||
}
|
}
|
||||||
//Send the packet...
|
//Send the packet...
|
||||||
FastQueuePacket(&outapp);
|
FastQueuePacket(&outapp);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user