feat(D.2b): main-pack cell draws the constant backpack icon (AP-51)
The m_topContainer cell (0x100001C9) rendered blank (tex=0). Retail's IconData::RenderIcons (0x0058d1ee) has an IsThePlayer() branch that draws a CONSTANT backpack — m_idIcon = GetDIDByEnum(0x10000004, 7) = 0x060011F4, m_itemType = TYPE_CONTAINER — NOT the player's body icon (the original AP-51 "equipped-pack weenie icon" premise was wrong). Compose that base over the Container type-underlay via the existing _iconIds delegate. Verified vs decomp (407546-407549) + IconComposer.GetIcon (base=arg2, type drives underlay) + a live dat dump (map 0x25000008 index 7 = 0x060011F4). Test locks type+literal. AP-51 reworded to the residual hardcoded-vs-runtime-resolve nuance (cf. AP-55). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9dc44c3a3d
commit
c71b32f73d
3 changed files with 26 additions and 2 deletions
|
|
@ -361,6 +361,24 @@ public class InventoryControllerTests
|
|||
Assert.True(top.GetItem(0)!.IsOpenContainer); // default open container = main pack
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MainPackCell_requestsConstantBackpackIcon_notPlayerBodyIcon() // AP-51 retire
|
||||
{
|
||||
var (layout, _, _, _, _, _, _, _) = BuildLayout();
|
||||
var objects = new ClientObjectTable();
|
||||
// Give the player a (wrong) body icon to prove the main-pack cell does NOT use it.
|
||||
objects.AddOrUpdate(new ClientObject { ObjectId = Player, IconId = 0x06001234u });
|
||||
(ItemType type, uint icon)? mainPackCall = null;
|
||||
InventoryController.Bind(layout, objects, () => Player,
|
||||
iconIds: (t, icon, _, _, _) => { if (icon == 0x060011F4u) mainPackCall = (t, icon); return 0u; },
|
||||
strength: () => 100, datFont: null);
|
||||
|
||||
// Retail IconData::RenderIcons IsThePlayer branch: GetDIDByEnum(0x10000004,7)=0x060011F4 + TYPE_CONTAINER.
|
||||
Assert.NotNull(mainPackCall);
|
||||
Assert.Equal(ItemType.Container, mainPackCall!.Value.type);
|
||||
Assert.Equal(0x060011F4u, mainPackCall.Value.icon);
|
||||
}
|
||||
|
||||
// Reads the text of the UiText caption child attached by the controller.
|
||||
private static string CaptionText(UiElement host)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue