mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 07:27:18 +00:00
Correctly set task value for shooting gallery
This commit is contained in:
parent
a60738f78f
commit
2bc9f8f66d
@ -109,7 +109,7 @@ void Mission::LoadFromXml(tinyxml2::XMLElement* element) {
|
|||||||
} else {
|
} else {
|
||||||
const auto value = std::stoul(task->Attribute("v"));
|
const auto value = std::stoul(task->Attribute("v"));
|
||||||
|
|
||||||
m_Tasks[index]->SetProgress(value, m_Tasks[index]->GetType() == MissionTaskType::MISSION_TASK_TYPE_MINIGAME);
|
m_Tasks[index]->SetProgress(value, false);
|
||||||
|
|
||||||
task = task->NextSiblingElement();
|
task = task->NextSiblingElement();
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,14 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string&
|
|||||||
if (info->target != gameID) {
|
if (info->target != gameID) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Lego Universe is a great game with very easy to understand mission progression.
|
||||||
|
// If we are progressing a mission for shooting gallery we need to set its
|
||||||
|
// completion to 1 and not the targetValue beacuse that makes sense
|
||||||
|
// compared to all other missions and tasks :)
|
||||||
|
if(info->targetGroup == targets && value >= info->targetValue && GetMission()->IsMission() && info->target == 1864 && info->targetGroup == "performact_score") {
|
||||||
|
SetProgress(1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
if(info->targetGroup == targets && value >= info->targetValue) {
|
if(info->targetGroup == targets && value >= info->targetValue) {
|
||||||
SetProgress(info->targetValue);
|
SetProgress(info->targetValue);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user