Added upgrades

This commit is contained in:
wincent
2024-06-02 15:43:35 +02:00
parent d5b2278dc5
commit 364bcf822a
17 changed files with 531 additions and 14 deletions

View File

@@ -6,6 +6,8 @@
#include "CDRewardsTable.h"
Observable<LevelProgressionComponent*> LevelProgressionComponent::OnLevelUp;
LevelProgressionComponent::LevelProgressionComponent(Entity* parent) : Component(parent) {
m_Parent = parent;
m_Level = 1;
@@ -80,6 +82,8 @@ void LevelProgressionComponent::HandleLevelUp() {
}
// Tell the client we have finished sending level rewards.
if (rewardingItem) GameMessages::NotifyLevelRewards(m_Parent->GetObjectID(), m_Parent->GetSystemAddress(), m_Level, !rewardingItem);
OnLevelUp(this);
}
void LevelProgressionComponent::SetRetroactiveBaseSpeed(){

View File

@@ -5,6 +5,7 @@
#include "Component.h"
#include "eCharacterVersion.h"
#include "eReplicaComponentType.h"
#include "Observable.h"
/**
* Component that handles level progression and serilization.
@@ -81,6 +82,8 @@ public:
*/
void SetRetroactiveBaseSpeed();
static Observable<LevelProgressionComponent*> OnLevelUp;
private:
/**
* whether the level is dirty