Moved formatted message into the new tob patch and cleaned up a bit

This commit is contained in:
dannuic
2026-04-22 16:11:01 -06:00
parent 46dce8499f
commit 79be47430c
18 changed files with 256 additions and 150 deletions
+3 -3
View File
@@ -135,6 +135,7 @@ set(common_sources
util/directory.cpp
util/uuid.cpp
zone_store.cpp
links.cpp
)
set(repositories
@@ -733,9 +734,8 @@ set(common_headers
util/memory_stream.h
util/uuid.h
version.h
zone_store.h
links.h
links.cpp
zone_store.h
links.h
)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${common_sources})
-37
View File
@@ -651,43 +651,6 @@ namespace TOB
FINISH_ENCODE();
}
ENCODE(OP_FormattedMessage)
{
EQApplicationPacket* in = *p;
*p = nullptr;
FormattedMessage_Struct* emu = (FormattedMessage_Struct*)in->pBuffer;
char* old_message_ptr = (char*)in->pBuffer;
old_message_ptr += sizeof(FormattedMessage_Struct);
std::string old_message_array[9];
for (int i = 0; i < 9; ++i) {
if (*old_message_ptr == 0) { break; }
old_message_array[i] = old_message_ptr;
old_message_ptr += old_message_array[i].length() + 1;
}
SerializeBuffer buffer;
buffer.WriteUInt32(0); // This is a string written like the message arrays
buffer.WriteUInt8(emu->unknown0);
buffer.WriteUInt32(emu->string_id);
buffer.WriteUInt32(emu->type);
for (int i = 0; i < 9; ++i) {
std::string new_message;
ServerToTOBConvertLinks(new_message, old_message_array[i]);
buffer.WriteLengthString(new_message);
}
auto outapp = new EQApplicationPacket(OP_FormattedMessage, buffer.size());
outapp->WriteData(buffer.buffer(), buffer.size());
dest->FastQueuePacket(&outapp, ack_req);
delete in;
}
ENCODE(OP_GMTraining) {
ENCODE_LENGTH_EXACT(GMTrainee_Struct);
SETUP_DIRECT_ENCODE(GMTrainee_Struct, structs::GMTrainee_Struct);
-1
View File
@@ -24,7 +24,6 @@ E(OP_DeleteSpawn)
E(OP_DisciplineUpdate)
E(OP_ExpansionInfo)
E(OP_ExpUpdate)
E(OP_FormattedMessage)
E(OP_GMTraining)
E(OP_GMTrainSkillConfirm)
E(OP_GroundSpawn)