mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-07-07 04:00:02 +00:00
fix: ninjago missions remove items
fixes an issue where this mission was completed prior to a bug fix, causing the items to remain in the inventory. Tested that players with the mission completed have the item correctly removed from their inventory.
This commit is contained in:
parent
bfe6900c26
commit
719717b23c
@ -15,6 +15,7 @@ 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
|
||||||
|
SPEED_BASE,
|
||||||
UP_TO_DATE, // will become SPEED_BASE
|
UP_TO_DATE, // will become SPEED_BASE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,7 +79,9 @@
|
|||||||
#include "PositionUpdate.h"
|
#include "PositionUpdate.h"
|
||||||
#include "PlayerManager.h"
|
#include "PlayerManager.h"
|
||||||
#include "eLoginResponse.h"
|
#include "eLoginResponse.h"
|
||||||
|
#include "MissionComponent.h"
|
||||||
#include "SlashCommandHandler.h"
|
#include "SlashCommandHandler.h"
|
||||||
|
#include "InventoryComponent.h"
|
||||||
|
|
||||||
namespace Game {
|
namespace Game {
|
||||||
Logger* logger = nullptr;
|
Logger* logger = nullptr;
|
||||||
@ -1043,7 +1045,9 @@ void HandlePacket(Packet* packet) {
|
|||||||
|
|
||||||
// Do charxml fixes here
|
// Do charxml fixes here
|
||||||
auto* levelComponent = player->GetComponent<LevelProgressionComponent>();
|
auto* levelComponent = player->GetComponent<LevelProgressionComponent>();
|
||||||
if (!levelComponent) return;
|
auto* const inventoryComponent = player->GetComponent<InventoryComponent>();
|
||||||
|
const auto* const missionComponent = player->GetComponent<MissionComponent>();
|
||||||
|
if (!levelComponent || !missionComponent || !inventoryComponent) return;
|
||||||
|
|
||||||
auto version = levelComponent->GetCharacterVersion();
|
auto version = levelComponent->GetCharacterVersion();
|
||||||
switch (version) {
|
switch (version) {
|
||||||
@ -1060,7 +1064,23 @@ void HandlePacket(Packet* packet) {
|
|||||||
case eCharacterVersion::VAULT_SIZE:
|
case eCharacterVersion::VAULT_SIZE:
|
||||||
LOG("Updaing Speedbase");
|
LOG("Updaing Speedbase");
|
||||||
levelComponent->SetRetroactiveBaseSpeed();
|
levelComponent->SetRetroactiveBaseSpeed();
|
||||||
|
levelComponent->SetCharacterVersion(eCharacterVersion::SPEED_BASE);
|
||||||
|
case eCharacterVersion::SPEED_BASE: {
|
||||||
|
LOG("Removing lots from NJ Jay missions bugged at foss");
|
||||||
|
// https://explorer.lu/missions/1789
|
||||||
|
const auto* mission = missionComponent->GetMission(1789);
|
||||||
|
if (mission && mission->IsComplete()) {
|
||||||
|
inventoryComponent->RemoveItem(14474, 1, eInventoryType::ITEMS);
|
||||||
|
inventoryComponent->RemoveItem(14474, 1, eInventoryType::VAULT_ITEMS);
|
||||||
|
}
|
||||||
|
// https://explorer.lu/missions/1927
|
||||||
|
mission = missionComponent->GetMission(1927);
|
||||||
|
if (mission && mission->IsComplete()) {
|
||||||
|
inventoryComponent->RemoveItem(14493, 1, eInventoryType::ITEMS);
|
||||||
|
inventoryComponent->RemoveItem(14493, 1, eInventoryType::VAULT_ITEMS);
|
||||||
|
}
|
||||||
levelComponent->SetCharacterVersion(eCharacterVersion::UP_TO_DATE);
|
levelComponent->SetCharacterVersion(eCharacterVersion::UP_TO_DATE);
|
||||||
|
}
|
||||||
case eCharacterVersion::UP_TO_DATE:
|
case eCharacterVersion::UP_TO_DATE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user