From effbbd9a5e77fb5060105b3a40ed259c5d587520 Mon Sep 17 00:00:00 2001 From: Gent S Date: Mon, 30 Nov 2020 19:16:47 -0500 Subject: [PATCH] Fix level-up not triggering and using wrong packets --- src/MissionManager.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/MissionManager.cpp b/src/MissionManager.cpp index b9133ab..60ffc09 100644 --- a/src/MissionManager.cpp +++ b/src/MissionManager.cpp @@ -488,13 +488,12 @@ void MissionManager::updateFusionMatter(CNSocket* sock, int fusion) { plr->fusionmatter -= (int)MissionManager::AvatarGrowth[plr->level]["m_iReqBlob_NanoCreate"]; plr->level++; - INITSTRUCT(sP_FE2CL_REP_PC_CHANGE_LEVEL, response); + INITSTRUCT(sP_FE2CL_REP_PC_CHANGE_LEVEL_SUCC, response); - response.iPC_ID = plr->iID; - response.iPC_Level = plr->level; + response.iFusionMatter = plr->fusionmatter; + response.iLevel = plr->level; - sock->sendPacket((void*)&response, P_FE2CL_REP_PC_CHANGE_LEVEL, sizeof(sP_FE2CL_REP_PC_CHANGE_LEVEL)); - PlayerManager::sendToViewable(sock, (void*)&response, P_FE2CL_REP_PC_CHANGE_LEVEL, sizeof(sP_FE2CL_REP_PC_CHANGE_LEVEL)); + sock->sendPacket((void*)&response, P_FE2CL_REP_PC_CHANGE_LEVEL_SUCC, sizeof(sP_FE2CL_REP_PC_CHANGE_LEVEL_SUCC)); #endif // play the beam animation for other players