mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 19:03:43 +00:00
CollectibleComponent (79 rows: id, requirement_mission) is only in the CDClient for the server: the 1.10.64 client has no string for it. DLU never read it. What the column holds (1.10.64 CDClient, joined with ComponentsRegistry, Missions and MissionTasks): for 63 rows it is the mission the collectible belongs to. Mostly that is the achievement whose collection task (taskType 3) targets the collectible's LOT (the flags, imagination bricks, Johnny Thunder collectibles). For a few it is a mission to accept from an NPC that does not collect the item itself: the four Ninjago dragon relics (16483-16485) are collected by the hidden achievements 2064-2067 but their requirement is 2040 (accepted from LOT 13789, "complete 2064-2067"). Other values: -1 and 66666666 (no such mission) on test rows. So a collectible whose requirement_mission is a mission to accept (Missions.isMission) now only counts (HasBeenCollected progresses nothing) while the player has that mission accepted and not handed in (ACTIVE, READY_TO_COMPLETE or their repeat states). Achievements, missing missions and rows without one are unchanged. Without this, a player who had not accepted 2040 could collect the relics early and have 2040 complete as soon as it was accepted. The gate itself is inferred from the data: the captures show collections but not the live server's check. The collectible's object report shows the requirement mission. Check in game: in Ninjago Monastery, before accepting the dragon relic mission (2040), touch a dragon relic: it does not count; accept 2040 and collect them: each counts and 2040 completes after the fourth. Flags, imagination bricks and Johnny Thunder collectibles still count as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
840 B
C++
26 lines
840 B
C++
#pragma once
|
|
|
|
#include "CDTable.h"
|
|
|
|
#include <cstdint>
|
|
#include <map>
|
|
|
|
/**
|
|
* CollectibleComponent: read only by the server (the 1.10.64 client has no string for the table).
|
|
* requirement_mission is the mission a collectible belongs to, usually the achievement its collection task is in; for
|
|
* some it is a mission that must be accepted first (e.g. 2040 for the Ninjago dragon relics, which the hidden
|
|
* achievements 2064-2067 collect). -1 when the row has none.
|
|
*/
|
|
struct CDCollectibleComponent {
|
|
int32_t id{};
|
|
int32_t requirementMission{ -1 };
|
|
};
|
|
|
|
class CDCollectibleComponentTable : public CDTable<CDCollectibleComponentTable, std::map<int32_t, CDCollectibleComponent>> {
|
|
public:
|
|
void LoadValuesFromDatabase();
|
|
|
|
// The row for a component ID, or nothing
|
|
[[nodiscard]] const CDCollectibleComponent* GetByID(int32_t id) const;
|
|
};
|