Просмотр исходного кода

Record what a collectible pickup does not reach

The grant is withdrawn. A pickup resolves to a stackable profile item in bucket
7, not to a lore book, so inserting that row was never going to produce the
unlock the game performs. It also committed outside any transaction, so nothing
was pushed to the client and a successful grant was invisible.

Discovery is not a flag on the collectible row either. Every aligned halfword of
all 184 bytes across 5181 rows was resolved against the account flag map, and
the only offset that resolves widely is 0x2C, the item definition index already
read: item indices fall inside the flag slot range and resolve by coincidence.

What survives is the identification, which is verified: a pickup names its
collectible, the same one repeatedly, and a different one differently.
Millie 2 недель назад
Родитель
Сommit
d20b06699d

+ 3 - 0
Sunrise/src/client/content/items/packages/package_collectible_build.cpp

@@ -1,3 +1,6 @@
+#include <array>
+#include <cstdio>
+#include "../../../../core/logging/log.h"
 #include "../../../../state/build_data/sobjects/sobject_catalog.h"
 #include <cstring>
 #include <limits>

+ 9 - 0
Sunrise/src/middleware/content/packages/tables/definition_index_table.h

@@ -31,6 +31,15 @@ inline constexpr std::uint16_t kAbsentPackageId = 0xFFFFU;
 /** Element class of the item index table inside the investment container. */
 inline constexpr std::uint32_t kItemIndexTableClass = 0x80807BE8U;
 /** The investment root holds the installed collectible definition table at this slot. */
+/** Investment root slot of the unlock flag mapping tables. */
+inline constexpr std::size_t kUnlockFlagMapTableSlot = 111;
+/** Array descriptor of the account object's flag mapping table. */
+inline constexpr std::size_t kAccountFlagMapDescriptor = 8;
+/** One mapping row: a source and the slot it feeds. */
+inline constexpr std::size_t kUnlockMapRowStride = 8;
+/** The destination slot within one mapping row. */
+inline constexpr std::size_t kUnlockMapDestinationSlotOffset = 4;
+
 inline constexpr std::size_t kCollectibleTableSlot = 19;
 /** Definition class recorded for the installed investment root tag. */
 inline constexpr std::uint32_t kInvestmentRootClass = 0x80807D84U;