mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-05-05 22:21:12 +00:00
Merge pull request #1787 from DarkflameUniverse/1208-retroactively-fix-nexus-force-explorer-missions
fix: nexus force explorer missions
This commit is contained in:
commit
4bacb8a2ee
@ -16,7 +16,9 @@ enum class eCharacterVersion : uint32_t {
|
|||||||
VAULT_SIZE,
|
VAULT_SIZE,
|
||||||
// Fixes speed base value in level component
|
// Fixes speed base value in level component
|
||||||
SPEED_BASE,
|
SPEED_BASE,
|
||||||
UP_TO_DATE, // will become NJ_JAYMISSIONS
|
// Fixes nexus force explorer missions
|
||||||
|
NJ_JAYMISSIONS,
|
||||||
|
UP_TO_DATE, // will become NEXUS_FORCE_EXPLORER
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //!__ECHARACTERVERSION__H__
|
#endif //!__ECHARACTERVERSION__H__
|
||||||
|
@ -1042,25 +1042,29 @@ void HandlePacket(Packet* packet) {
|
|||||||
// Do charxml fixes here
|
// Do charxml fixes here
|
||||||
auto* levelComponent = player->GetComponent<LevelProgressionComponent>();
|
auto* levelComponent = player->GetComponent<LevelProgressionComponent>();
|
||||||
auto* const inventoryComponent = player->GetComponent<InventoryComponent>();
|
auto* const inventoryComponent = player->GetComponent<InventoryComponent>();
|
||||||
const auto* const missionComponent = player->GetComponent<MissionComponent>();
|
auto* const missionComponent = player->GetComponent<MissionComponent>();
|
||||||
if (!levelComponent || !missionComponent || !inventoryComponent) return;
|
if (!levelComponent || !missionComponent || !inventoryComponent) return;
|
||||||
|
|
||||||
auto version = levelComponent->GetCharacterVersion();
|
auto version = levelComponent->GetCharacterVersion();
|
||||||
switch (version) {
|
switch (version) {
|
||||||
case eCharacterVersion::RELEASE:
|
case eCharacterVersion::RELEASE:
|
||||||
// TODO: Implement, super low priority
|
// TODO: Implement, super low priority
|
||||||
|
[[fallthrough]];
|
||||||
case eCharacterVersion::LIVE:
|
case eCharacterVersion::LIVE:
|
||||||
LOG("Updating Character Flags");
|
LOG("Updating Character Flags");
|
||||||
c->SetRetroactiveFlags();
|
c->SetRetroactiveFlags();
|
||||||
levelComponent->SetCharacterVersion(eCharacterVersion::PLAYER_FACTION_FLAGS);
|
levelComponent->SetCharacterVersion(eCharacterVersion::PLAYER_FACTION_FLAGS);
|
||||||
|
[[fallthrough]];
|
||||||
case eCharacterVersion::PLAYER_FACTION_FLAGS:
|
case eCharacterVersion::PLAYER_FACTION_FLAGS:
|
||||||
LOG("Updating Vault Size");
|
LOG("Updating Vault Size");
|
||||||
player->RetroactiveVaultSize();
|
player->RetroactiveVaultSize();
|
||||||
levelComponent->SetCharacterVersion(eCharacterVersion::VAULT_SIZE);
|
levelComponent->SetCharacterVersion(eCharacterVersion::VAULT_SIZE);
|
||||||
|
[[fallthrough]];
|
||||||
case eCharacterVersion::VAULT_SIZE:
|
case eCharacterVersion::VAULT_SIZE:
|
||||||
LOG("Updaing Speedbase");
|
LOG("Updaing Speedbase");
|
||||||
levelComponent->SetRetroactiveBaseSpeed();
|
levelComponent->SetRetroactiveBaseSpeed();
|
||||||
levelComponent->SetCharacterVersion(eCharacterVersion::SPEED_BASE);
|
levelComponent->SetCharacterVersion(eCharacterVersion::SPEED_BASE);
|
||||||
|
[[fallthrough]];
|
||||||
case eCharacterVersion::SPEED_BASE: {
|
case eCharacterVersion::SPEED_BASE: {
|
||||||
LOG("Removing lots from NJ Jay missions bugged at foss");
|
LOG("Removing lots from NJ Jay missions bugged at foss");
|
||||||
// https://explorer.lu/missions/1789
|
// https://explorer.lu/missions/1789
|
||||||
@ -1075,7 +1079,22 @@ void HandlePacket(Packet* packet) {
|
|||||||
inventoryComponent->RemoveItem(14493, 1, eInventoryType::ITEMS);
|
inventoryComponent->RemoveItem(14493, 1, eInventoryType::ITEMS);
|
||||||
inventoryComponent->RemoveItem(14493, 1, eInventoryType::VAULT_ITEMS);
|
inventoryComponent->RemoveItem(14493, 1, eInventoryType::VAULT_ITEMS);
|
||||||
}
|
}
|
||||||
levelComponent->SetCharacterVersion(eCharacterVersion::UP_TO_DATE);
|
levelComponent->SetCharacterVersion(eCharacterVersion::NJ_JAYMISSIONS);
|
||||||
|
[[fallthrough]];
|
||||||
|
}
|
||||||
|
case eCharacterVersion::NJ_JAYMISSIONS: {
|
||||||
|
LOG("Fixing Nexus Force Explorer missions");
|
||||||
|
auto missions = { 502 /* Pet Cove */, 593/* Nimbus Station */, 938/* Avant Gardens */, 284/* Gnarled Forest */, 754/* Forbidden Valley */ };
|
||||||
|
bool complete = true;
|
||||||
|
for (auto missionID : missions) {
|
||||||
|
auto* mission = missionComponent->GetMission(missionID);
|
||||||
|
if (!mission->IsComplete()) {
|
||||||
|
complete = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (complete) missionComponent->CompleteMission(937 /* Nexus Force explorer */);
|
||||||
|
[[fallthrough]];
|
||||||
}
|
}
|
||||||
case eCharacterVersion::UP_TO_DATE:
|
case eCharacterVersion::UP_TO_DATE:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user