self character customization added back, resolved memory leak (packet wasnt deleted)

This commit is contained in:
Emagi 2023-04-28 06:54:51 -04:00
parent 97f0d66bea
commit 297965fff3

View file

@ -2551,20 +2551,21 @@ bool Client::HandlePacket(EQApplicationPacket* app) {
{
LogWrite(OPCODE__DEBUG, 1, "Opcode", "Opcode 0x%X (%i): OP_SubmitCharCust", opcode, opcode);
PacketStruct* packet = configReader.getStruct("WS_SubmitCharCust", version);
/*if (packet && packet->LoadPacketData(app->pBuffer, app->size)) {
if (packet && packet->LoadPacketData(app->pBuffer, app->size)) {
int8 type = packet->getType_int8_ByName("type");
if (type == 0) {
if (player->custNPC) {
/*if (player->custNPC) {
player->custNPCTarget->CustomizeAppearance(packet);
current_zone->SendSpawnChanges(player->custNPCTarget);
}
else {
else {*/
player->CustomizeAppearance(packet);
current_zone->SendSpawnChanges(player);
//}
}
}
}
safe_delete(packet);
/*
if (player->custNPC) {
memcpy(&player->appearance, &player->SavedApp, sizeof(AppearanceData));
memcpy(&player->features, &player->SavedFeatures, sizeof(CharFeatures));