port: PythonItem + item module (batch 2 P3-b)

Verbatim 40250 CPythonItem and the item Python module replace the
pending stand-in and the module stub; CPythonApplication::Create calls
m_pyItem.Create() in 40250 order. itemGetIconImage returns its handle
through Py_BuildPointer (the ILP32 int truncated it and wndMgr.SetSlot
crashed on the live inventory). CMapManager::GetNormal evaluates
CTerrain::CalculateNormal on the native height tile; the item text-tail
members stay stubs, Pick answering -1 like an empty tail map.

The fake server drops vnum 19 next to the actor at entergame and answers
CG_ITEM_PICKUP with GC_ITEM_GROUND_DEL; login_flow picks it up through
player.PickCloseItem and checks item.SelectItem(19).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-24 00:50:16 +09:00
co-authored by Claude Opus 5.5
parent f0564a7f12
commit 9298500df9
19 changed files with 2178 additions and 454 deletions
+4
View File
@@ -21,6 +21,10 @@ public:
static constexpr std::uint32_t kLoginKey = 0x13572468;
static constexpr std::uint32_t kMainVID = 0x00012345;
static constexpr std::int32_t kX = 469300, kY = 964200;
// A ground item in view at entergame (CItem::EncodeInsertPacket): vnum 19, owned by the character.
static constexpr std::uint32_t kGroundItemVID = 0x00054321;
static constexpr std::uint32_t kGroundItemVnum = 19;
static constexpr std::int32_t kGroundItemX = kX + 150, kGroundItemY = kY;
~FakeLoginServer();