Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/RA_Integration.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
<ClCompile Include="data\context\GameContext.cpp" />
<ClCompile Include="data\context\SessionTracker.cpp" />
<ClCompile Include="data\models\AchievementModel.cpp" />
<ClCompile Include="data\models\CapturedTriggerHits.cpp" />
<ClCompile Include="data\models\CodeNotesModel.cpp" />
<ClCompile Include="data\models\LeaderboardModel.cpp" />
<ClCompile Include="data\models\LocalBadgesModel.cpp" />
Expand Down Expand Up @@ -221,7 +220,6 @@
<ClInclude Include="data\context\GameContext.hh" />
<ClInclude Include="data\context\SessionTracker.hh" />
<ClInclude Include="data\models\AchievementModel.hh" />
<ClInclude Include="data\models\CapturedTriggerHits.hh" />
<ClInclude Include="data\models\CodeNotesModel.hh" />
<ClInclude Include="data\models\LeaderboardModel.hh" />
<ClInclude Include="data\models\LocalBadgesModel.hh" />
Expand Down
6 changes: 0 additions & 6 deletions src/RA_Integration.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,6 @@
<ClCompile Include="data\models\LocalBadgesModel.cpp">
<Filter>Data\Models</Filter>
</ClCompile>
<ClCompile Include="data\models\CapturedTriggerHits.cpp">
<Filter>Data\Models</Filter>
</ClCompile>
<ClCompile Include="ui\viewmodels\ChallengeIndicatorViewModel.cpp">
<Filter>UI\ViewModels</Filter>
</ClCompile>
Expand Down Expand Up @@ -848,9 +845,6 @@
<ClInclude Include="data\models\LocalBadgesModel.hh">
<Filter>Data\Models</Filter>
</ClInclude>
<ClInclude Include="data\models\CapturedTriggerHits.hh">
<Filter>Data\Models</Filter>
</ClInclude>
<ClInclude Include="ui\win32\bindings\NumericUpDownBinding.hh">
<Filter>UI\Win32\Bindings</Filter>
</ClInclude>
Expand Down
17 changes: 6 additions & 11 deletions src/data/context/GameContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,9 @@ void GameContext::InitializeFromAchievementRuntime(const std::map<uint32_t, std:
for (; pAchievementData < pAchievementStop; ++pAchievementData)
{
// if the server has provided an unexpected category (usually 0), ignore it.
ra::data::models::AssetCategory nCategory = ra::data::models::AssetCategory::None;
switch (pAchievementData->public_.category)
{
case RC_CLIENT_ACHIEVEMENT_CATEGORY_CORE:
nCategory = ra::data::models::AssetCategory::Core;

// automatically activate all core achievements in compatibility mode
if (GetMode() == Mode::CompatibilityTest)
{
Expand All @@ -431,8 +428,6 @@ void GameContext::InitializeFromAchievementRuntime(const std::map<uint32_t, std:
break;

case RC_CLIENT_ACHIEVEMENT_CATEGORY_UNOFFICIAL:
nCategory = ra::data::models::AssetCategory::Unofficial;

// all unofficial achievements should start inactive.
// rc_client automatically activates them.
pAchievementData->public_.state = RC_CLIENT_ACHIEVEMENT_STATE_INACTIVE;
Expand All @@ -449,10 +444,11 @@ void GameContext::InitializeFromAchievementRuntime(const std::map<uint32_t, std:

const auto sDefinition = mAchievementDefinitions.find(pAchievementData->public_.id);
if (sDefinition != mAchievementDefinitions.end())
vmAchievement->Attach(*pAchievementData, nCategory, sDefinition->second);
vmAchievement->InitializeFromPublishedAchievement(*pAchievementData, sDefinition->second);
else
vmAchievement->Attach(*pAchievementData, nCategory, "");
vmAchievement->InitializeFromPublishedAchievement(*pAchievementData, "");

vmAchievement->SetLocalAchievementInfo(*pAchievementData);
vmAchievement->SetSubsetID(pSubset->public_.id);

m_vAssets.Append(std::move(vmAchievement));
Expand Down Expand Up @@ -481,14 +477,13 @@ void GameContext::InitializeFromAchievementRuntime(const std::map<uint32_t, std:
{
auto vmLeaderboard = std::make_unique<ra::data::models::LeaderboardModel>();

const auto nCategory = ra::data::models::AssetCategory::Core; // all published leaderboards are core

const auto sDefinition = mLeaderboardDefinitions.find(pLeaderboardData->public_.id);
if (sDefinition != mLeaderboardDefinitions.end())
vmLeaderboard->Attach(*pLeaderboardData, nCategory, sDefinition->second);
vmLeaderboard->InitializeFromPublishedLeaderboard(*pLeaderboardData, sDefinition->second);
else
vmLeaderboard->Attach(*pLeaderboardData, nCategory, "");
vmLeaderboard->InitializeFromPublishedLeaderboard(*pLeaderboardData, "");

vmLeaderboard->SetLocalLeaderboardInfo(*pLeaderboardData);
vmLeaderboard->SetSubsetID(pSubset->public_.id);

m_vAssets.Append(std::move(vmLeaderboard));
Expand Down
Loading
Loading