Update ActivityComponent.cpp

This commit is contained in:
David Markowitz 2024-01-06 02:36:09 -08:00 committed by GitHub
parent 20f7a8ff88
commit 3b0ca7fe35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,12 @@
#include "LeaderboardManager.h"
ActivityComponent::ActivityComponent(Entity* parent, int32_t activityID) : Component(parent) {
/*
* This is precisely what the client does functionally
* Use the component id as the default activity id and load its data from the database
* if activityID is specified and if that column exists in the activities table, update the activity info with that data.
*/
m_ActivityID = activityID;
LoadActivityData(activityID);
if (m_Parent->HasVar(u"activityID")) {