mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-24 06:27:24 +00:00
WIP
This commit is contained in:
parent
68e5737b74
commit
dbc02b12b1
@ -15,7 +15,9 @@ enum class eCharacterVersion : uint32_t {
|
|||||||
// Fixes vault size value
|
// Fixes vault size value
|
||||||
VAULT_SIZE,
|
VAULT_SIZE,
|
||||||
// Fixes speed base value in level component
|
// Fixes speed base value in level component
|
||||||
UP_TO_DATE, // will become SPEED_BASE
|
SPEED_BASE,
|
||||||
|
// Fixes explore missions that were corruped
|
||||||
|
UP_TO_DATE // Will become EXPLORE
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //!__ECHARACTERVERSION__H__
|
#endif //!__ECHARACTERVERSION__H__
|
||||||
|
@ -620,3 +620,7 @@ bool MissionComponent::HasCollectible(int32_t collectibleID) {
|
|||||||
bool MissionComponent::HasMission(uint32_t missionId) {
|
bool MissionComponent::HasMission(uint32_t missionId) {
|
||||||
return GetMission(missionId) != nullptr;
|
return GetMission(missionId) != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FixExplorerMissions() {
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -170,6 +170,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool HasMission(uint32_t missionId);
|
bool HasMission(uint32_t missionId);
|
||||||
|
|
||||||
|
|
||||||
|
void FixExplorerMissions();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* All the missions owned by this entity, mapped by mission ID
|
* All the missions owned by this entity, mapped by mission ID
|
||||||
|
@ -74,6 +74,7 @@
|
|||||||
#include "ZCompression.h"
|
#include "ZCompression.h"
|
||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "CheatDetection.h"
|
#include "CheatDetection.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
|
|
||||||
namespace Game {
|
namespace Game {
|
||||||
Logger* logger = nullptr;
|
Logger* logger = nullptr;
|
||||||
@ -1057,6 +1058,9 @@ void HandlePacket(Packet* packet) {
|
|||||||
auto* levelComponent = player->GetComponent<LevelProgressionComponent>();
|
auto* levelComponent = player->GetComponent<LevelProgressionComponent>();
|
||||||
if (!levelComponent) return;
|
if (!levelComponent) return;
|
||||||
|
|
||||||
|
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||||
|
if (!missionComponent) return;
|
||||||
|
|
||||||
auto version = levelComponent->GetCharacterVersion();
|
auto version = levelComponent->GetCharacterVersion();
|
||||||
switch(version) {
|
switch(version) {
|
||||||
case eCharacterVersion::RELEASE:
|
case eCharacterVersion::RELEASE:
|
||||||
@ -1070,9 +1074,14 @@ void HandlePacket(Packet* packet) {
|
|||||||
player->RetroactiveVaultSize();
|
player->RetroactiveVaultSize();
|
||||||
levelComponent->SetCharacterVersion(eCharacterVersion::VAULT_SIZE);
|
levelComponent->SetCharacterVersion(eCharacterVersion::VAULT_SIZE);
|
||||||
case eCharacterVersion::VAULT_SIZE:
|
case eCharacterVersion::VAULT_SIZE:
|
||||||
LOG("Updaing Speedbase");
|
LOG("Updating Speedbase");
|
||||||
levelComponent->SetRetroactiveBaseSpeed();
|
levelComponent->SetRetroactiveBaseSpeed();
|
||||||
levelComponent->SetCharacterVersion(eCharacterVersion::UP_TO_DATE);
|
levelComponent->SetCharacterVersion(eCharacterVersion::SPEED_BASE);
|
||||||
|
case eCharacterVersion::SPEED_BASE:
|
||||||
|
LOG("Fixing Explorer missions");
|
||||||
|
missionComponent->FixExplorerMissions();
|
||||||
|
// Commented out so it runs every time for testing
|
||||||
|
// levelComponent->SetCharacterVersion(eCharacterVersion::UP_TO_DATE);
|
||||||
case eCharacterVersion::UP_TO_DATE:
|
case eCharacterVersion::UP_TO_DATE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user