From b35ba142beef49c5233fb3111274633843cd1748 Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Tue, 3 Dec 2019 14:37:32 +0100 Subject: [PATCH] Merge branch 'ark' --- .../player_manager/character.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ryzom/server/src/entities_game_service/player_manager/character.cpp b/ryzom/server/src/entities_game_service/player_manager/character.cpp index d9bfa8455..c64d51794 100644 --- a/ryzom/server/src/entities_game_service/player_manager/character.cpp +++ b/ryzom/server/src/entities_game_service/player_manager/character.cpp @@ -13418,12 +13418,12 @@ void CCharacter::abandonMission(uint8 indexClient) } vector params = getCustomMissionParams(toUpper(templ->getMissionName())+"_CALLBACK"); - if (params.size() >= 1) + if (mission->getFinished() && params.size() >= 1) { - if (mission->getFinished() == false) - validateDynamicMissionStep(params[0]+"&result=ABD"); + if (mission->getMissionSuccess()) + validateDynamicMissionStep(params[0]+"&result=SUCCESS"); else - validateDynamicMissionStep(params[0]+"&result=FINABD"); + validateDynamicMissionStep(params[0]+"&result=ABD"); setCustomMissionParams(toUpper(templ->getMissionName())+"_CALLBACK", ""); } @@ -13715,6 +13715,15 @@ bool CCharacter::processMissionStepUserEvent(std::list &eventLis if (!templ->Tags.NoList && !templ->Tags.AutoRemove) sendDynamicSystemMessage(_Id, bChained ? "EGS_MISSION_STEP_SUCCESS" : "EGS_MISSION_SUCCESS"); + if (!bChained) { + vector params = getCustomMissionParams(toUpper(templ->getMissionName())+"_CALLBACK"); + if (params.size() >= 1) + { + validateDynamicMissionStep(params[0]+"&result=FINISHED"); + setCustomMissionParams(toUpper(templ->getMissionName())+"_CALLBACK", ""); + } + } + CMissionManager::getInstance()->missionDoneOnce(templ); mission->stopChildren();