mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
added tracking of the It's Truly Random achievement
This commit is contained in:
parent
337383b6fd
commit
b05c41fe8f
@ -33,8 +33,22 @@ void LegoDieRoll::OnTimerDone(Entity* self, std::string timerName) {
|
|||||||
GameMessages::SendPlayAnimation(self, u"roll-die-5");
|
GameMessages::SendPlayAnimation(self, u"roll-die-5");
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
|
{
|
||||||
GameMessages::SendPlayAnimation(self, u"roll-die-6");
|
GameMessages::SendPlayAnimation(self, u"roll-die-6");
|
||||||
|
// tracking the It's Truly Random Achievement
|
||||||
|
auto* owner = self->GetOwner();
|
||||||
|
auto* missionComponent = owner->GetComponent<MissionComponent>();
|
||||||
|
|
||||||
|
if (missionComponent != nullptr)
|
||||||
|
{
|
||||||
|
const auto rollMissionState = missionComponent->GetMissionState(756);
|
||||||
|
if (rollMissionState == MissionState::MISSION_STATE_ACTIVE)
|
||||||
|
{
|
||||||
|
missionComponent->ForceProgress(756, 1103, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
Game::logger->LogDebug("LegoDieRoll", "Invalid animation: roll-die-%i\n", dieRoll);
|
Game::logger->LogDebug("LegoDieRoll", "Invalid animation: roll-die-%i\n", dieRoll);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user