diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index 4f43a37d..5ba19c64 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -271,6 +271,7 @@ public: void IgnoreRemovedPacket2(const unsigned char* packet); void ReceiveBillingInfo(const unsigned char* packet); void ReceiveActorMessage32(const unsigned char* packet); + void ReceiveActorMessage34(const unsigned char* packet); void ReceiveStatusNotice(const unsigned char* packet); void ReceivePartyBookingRegisterResult(const unsigned char* packet); void ReceivePartyBookingSearchResult(const unsigned char* packet); diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index 7e70c1cb..700b4820 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -7388,3 +7388,30 @@ void CGameMode::AddMiniMapEffectMarker(const unsigned char* packet) { g_miniMapEffectMarkers.emplace(marker->key, MiniMapEffectMarker{0x78, marker->x, marker->y}); } + +struct ActorMessage32 { + /* 0000 */ std::string text; + /* 0018 */ std::string extra; + /* 0030 */ int unknown_0030; + /* 0034 */ int unknown_0034; + /* 0038 */ int unknown_0038; + /* 003C */ int unknown_003C; +}; + +// OFFSET: 0x00D25AC0 +// FUNCTION: fn_21675 +void CGameMode::ReceiveActorMessage34(const unsigned char* packet) { + this->unknown_01AC[*reinterpret_cast(packet + 8)] = *reinterpret_cast(packet + 4); + ActorMessage32 message; + message.text.assign(reinterpret_cast(packet + 17), *reinterpret_cast(packet + 2) - 17); + message.unknown_0030 = packet[16]; + message.unknown_0034 = *reinterpret_cast(packet + 14); + message.unknown_0038 = *reinterpret_cast(packet + 12); + message.unknown_003C = *reinterpret_cast(packet + 8); + if (message.text.size() > 60) { + message.text.resize(60); + } + + UIWindow* window = g_windowMgr.EnsureWindow(0x1C); + window->SendMsg(nullptr, 0x22, reinterpret_cast(&message), 0, 0, 0); +}