mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
Fixed bugs with minigame progression
This commit is contained in:
parent
1607b506c8
commit
b077bd937d
@ -78,14 +78,7 @@ void MissionTask::SetProgress(const uint32_t value, const bool echo)
|
||||
|
||||
std::vector<float> updates;
|
||||
updates.push_back(static_cast<float>(progress));
|
||||
|
||||
GameMessages::SendNotifyMissionTask(
|
||||
entity,
|
||||
entity->GetSystemAddress(),
|
||||
static_cast<int>(info->id),
|
||||
static_cast<int>(1 << (mask + 1)),
|
||||
updates
|
||||
);
|
||||
GameMessages::SendNotifyMissionTask(entity, entity->GetSystemAddress(), static_cast<int>(info->id), static_cast<int>(1 << (mask + 1)), updates);
|
||||
}
|
||||
|
||||
|
||||
@ -190,15 +183,13 @@ bool MissionTask::InParameters(const uint32_t value) const
|
||||
|
||||
bool MissionTask::IsComplete() const
|
||||
{
|
||||
// Minigames are the only ones where the target value is a score they need to get but the actual target is the act ID
|
||||
return GetType() == MissionTaskType::MISSION_TASK_TYPE_MINIGAME ? progress == info->target : progress >= info->targetValue;
|
||||
return progress >= info->targetValue;
|
||||
}
|
||||
|
||||
|
||||
void MissionTask::Complete()
|
||||
{
|
||||
// Minigames are the only ones where the target value is a score they need to get but the actual target is the act ID
|
||||
SetProgress(GetType() == MissionTaskType::MISSION_TASK_TYPE_MINIGAME ? info->target : info->targetValue);
|
||||
SetProgress(info->targetValue);
|
||||
}
|
||||
|
||||
|
||||
@ -354,7 +345,7 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string&
|
||||
}
|
||||
|
||||
if(info->targetGroup == targets && value >= info->targetValue) {
|
||||
SetProgress(info->target);
|
||||
SetProgress(info->targetValue);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user