From 1903420820bce5606e25ee28b9a03f45f039f4a7 Mon Sep 17 00:00:00 2001 From: rtw1x1 Date: Wed, 21 Jan 2026 00:22:18 +0000 Subject: [PATCH] ML-Client: NPC Names client sided --- src/UserInterface/Packet.h | 1 + src/UserInterface/PythonNetworkStreamPhaseGame.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/UserInterface/Packet.h b/src/UserInterface/Packet.h index 7a5f4e8..51864d4 100644 --- a/src/UserInterface/Packet.h +++ b/src/UserInterface/Packet.h @@ -2281,6 +2281,7 @@ typedef struct SPacketGCNPCPosition struct TNPCPosition { uint8_t bType; + uint32_t dwVnum; char name[CHARACTER_NAME_MAX_LEN+1]; int32_t x; int32_t y; diff --git a/src/UserInterface/PythonNetworkStreamPhaseGame.cpp b/src/UserInterface/PythonNetworkStreamPhaseGame.cpp index deb133b..335201e 100644 --- a/src/UserInterface/PythonNetworkStreamPhaseGame.cpp +++ b/src/UserInterface/PythonNetworkStreamPhaseGame.cpp @@ -4173,7 +4173,15 @@ bool CPythonNetworkStream::RecvNPCList() if (!Recv(sizeof(TNPCPosition), &NPCPosition)) return false; - CPythonMiniMap::Instance().RegisterAtlasMark(NPCPosition.bType, NPCPosition.name, NPCPosition.x, NPCPosition.y); + const char* c_szName = nullptr; + if (CPythonNonPlayer::Instance().GetName(NPCPosition.dwVnum, &c_szName)) + { + CPythonMiniMap::Instance().RegisterAtlasMark(NPCPosition.bType, c_szName, NPCPosition.x, NPCPosition.y); + } + else + { + CPythonMiniMap::Instance().RegisterAtlasMark(NPCPosition.bType, NPCPosition.name, NPCPosition.x, NPCPosition.y); + } } return true;