diff --git a/dScripts/SGCannon.cpp b/dScripts/SGCannon.cpp index 58e1d144..4b991253 100644 --- a/dScripts/SGCannon.cpp +++ b/dScripts/SGCannon.cpp @@ -61,8 +61,6 @@ void SGCannon::OnStartup(Entity *self) { void SGCannon::OnPlayerLoaded(Entity *self, Entity *player) { Game::logger->Log("SGCannon", "Player loaded\n"); self->SetVar(PlayerIDVariable, player->GetObjectID()); - /*GameMessages::SendSetStunned(player->GetObjectID(), PUSH, player->GetSystemAddress(), LWOOBJID_EMPTY, - true, true, true, true, true, true, true);*/ } void SGCannon::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2, @@ -561,32 +559,15 @@ void SGCannon::StopGame(Entity *self, bool cancel) { auto* missionComponent = player->GetComponent(); - if (self->GetVar(TotalScoreVariable) >= 25000) - { - // For some reason the client thinks this mission is not complete? - auto* mission = missionComponent->GetMission(229); - - if (mission != nullptr && !mission->IsComplete()) - { - mission->Complete(); - } - } - if (missionComponent != nullptr) { - missionComponent->Progress( - MissionTaskType::MISSION_TASK_TYPE_MINIGAME, - self->GetVar(TotalScoreVariable), - self->GetObjectID(), - "performact_score" - ); + missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_MINIGAME, self->GetVar(TotalScoreVariable), self->GetObjectID(), "performact_score"); missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_MINIGAME, self->GetVar(MaxStreakVariable), self->GetObjectID(), "performact_streak"); missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_ACTIVITY, m_CannonLot, 0, "", self->GetVar(TotalScoreVariable)); } LootGenerator::Instance().GiveActivityLoot(player, self, GetGameID(self), self->GetVar(TotalScoreVariable)); - StopActivity(self, player->GetObjectID(), self->GetVar(TotalScoreVariable), - self->GetVar(MaxStreakVariable), percentage); + StopActivity(self, player->GetObjectID(), self->GetVar(TotalScoreVariable), self->GetVar(MaxStreakVariable), percentage); self->SetNetworkVar(AudioFinalWaveDoneVariable, true); // Give the player the model rewards they earned @@ -600,7 +581,6 @@ void SGCannon::StopGame(Entity *self, bool cancel) { self->SetNetworkVar(u"UI_Rewards", GeneralUtils::to_u16string(self->GetVar(TotalScoreVariable)) + u"_0_0_0_0_0_0" ); - self->SetVar(TotalScoreVariable, 0); GameMessages::SendRequestActivitySummaryLeaderboardData( player->GetObjectID(), @@ -612,9 +592,6 @@ void SGCannon::StopGame(Entity *self, bool cancel) { 0, false ); - - // The end menu is not in, just send them back to the main world - //static_cast(player)->SendToZone(1300); } GameMessages::SendActivityStop(self->GetObjectID(), false, cancel, player->GetSystemAddress());