mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 17:54:01 +00:00
Fixed Racing Mission
* Try, Try Again achievement now progresses when the player gets last place in a race of 3 or more players, or when solo racing is enabled. * Race Series 1 mission from Velocity Lane now progresses correctly.
This commit is contained in:
@@ -183,7 +183,13 @@ bool MissionTask::InParameters(const uint32_t value) const
|
||||
|
||||
bool MissionTask::IsComplete() const
|
||||
{
|
||||
return progress >= info->targetValue;
|
||||
// Mission 668 has task uid 984 which is a bit mask. Its completion value is 3.
|
||||
if (info->uid == 984) {
|
||||
return progress >= 3;
|
||||
}
|
||||
else {
|
||||
return progress >= info->targetValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -423,12 +429,23 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string&
|
||||
|
||||
if (parameters[0] != associate) break;
|
||||
|
||||
if (associate == 1 || associate == 15 || associate == 2 || associate == 3)
|
||||
if (associate == 1 || associate == 2 || associate == 3)
|
||||
{
|
||||
if (value > info->targetValue) break;
|
||||
|
||||
AddProgress(info->targetValue);
|
||||
}
|
||||
// task 15 is a bit mask!
|
||||
else if (associate == 15) {
|
||||
if (!InAllTargets(value)) break;
|
||||
|
||||
auto tempProgress = GetProgress();
|
||||
// If we won at Nimbus Station, set bit 0
|
||||
if (value == 1203) SetProgress(tempProgress |= 1 << 0);
|
||||
// If we won at Gnarled Forest, set bit 1
|
||||
else if (value == 1303) SetProgress(tempProgress |= 1 << 1);
|
||||
// If both bits are set, then the client sees the mission as complete.
|
||||
}
|
||||
else if (associate == 10)
|
||||
{
|
||||
// If the player did not crash during the race, progress this task by count.
|
||||
|
Reference in New Issue
Block a user