From e90ae107469935c73ff79e74c8cfbc5facda0109 Mon Sep 17 00:00:00 2001 From: dongresource Date: Mon, 7 Sep 2020 22:12:53 +0200 Subject: [PATCH] Summoned NPC are now visible to other players. --- src/NPCManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NPCManager.cpp b/src/NPCManager.cpp index 2e829f8..52d342c 100644 --- a/src/NPCManager.cpp +++ b/src/NPCManager.cpp @@ -166,6 +166,8 @@ void NPCManager::npcSummonHandler(CNSocket* sock, CNPacketData* data) { resp.NPCAppearanceData.iZ = plr->z; sock->sendPacket((void*)&resp, P_FE2CL_NPC_ENTER, sizeof(sP_FE2CL_NPC_ENTER)); + for (CNSocket *s : PlayerManager::players[sock].viewable) + s->sendPacket((void*)&resp, P_FE2CL_NPC_ENTER, sizeof(sP_FE2CL_NPC_ENTER)); } void NPCManager::npcWarpHandler(CNSocket* sock, CNPacketData* data) { @@ -190,4 +192,4 @@ void NPCManager::npcWarpHandler(CNSocket* sock, CNPacketData* data) { plrv.viewableNPCs.clear(); sock->sendPacket((void*)&resp, P_FE2CL_REP_PC_WARP_USE_NPC_SUCC, sizeof(sP_FE2CL_REP_PC_WARP_USE_NPC_SUCC)); -} \ No newline at end of file +}