Server Systems & Source Patches
Metin2 Poly Marble Shop: validated purchases and UI lifecycle fixes
M2City Systems · Editorial · Published 2026-11-05 · Branch-specific details should be checked against your own source.
TreeN's supplied Poly Marble Shop v1.0.0 integration adds a selection of five monster marbles and a quantity of 1-10. The game creates item 70104 with the selected monster in socket 0 and charges its configured Yang price. This reviewed integration is intended for administrators merging a legacy Python 2.7 client and a C++11 game branch, not a ready-to-run serverfiles pack.
M2City r1 corrections
The original command parsed into uninitialized values and charged before checking successful inventory placement. The replacement accepts exactly two positive decimal arguments, rejects malformed/overflow values, keeps the server-side monster allowlist and prices, checks character/item/trade states and limits requests to one per second. Total cost uses a 64-bit intermediate. Failed item creation or placement stops the purchase; a detached failed item is destroyed, and Yang is deducted only after successful placement.
Partial fulfillment is intentional: if only eight spaces remain for ten requested items, only eight are delivered and charged. The player must still have enough Yang for the full requested quantity before starting. This assumes the ordinary single-owner game-thread item/gold flow; it is not a crash-safe database transaction.
The client opens at most one confirmation, snapshots its item/count/price, suppresses repeat sends, handles empty selection and normalizes quantities. Callbacks are weak; close/Escape cancels confirmation, logout clears callbacks and child references. Reopening reuses widgets. The revised 460x230 layout provides space for the list and purchase summary instead of placing children beyond the original panels. Uses stock public UI assets; no new gameplay screenshot is claimed.
Integration and staging checklist
Apply reviewed/ only; keep the original archive for provenance. Enable ENABLE_POLY_SHOP on the game, merge the handler with its cstdint/sstream includes, and register buy_marble_item at POS_STANDING/GM_PLAYER as described in INTEGRATION.txt. Verify item 70104, all five mob prototypes, AddToCharacter's bool/detached-failure contract and the real CanHandleItem policy for safebox, refining, warp and custom modals. Do not remove existing protections to force compilation.
Copy the Python controller into root and MarbleShop.py into UIScript with matching case. Keep one instance per GameWindow, use an unoccupied key or existing menu, and destroy it during logout/warp. Close it when other conflicting windows or HideAllWindows run. Match client/server prices and localize labels; changing only the displayed price does not change the server price.
Compile and stage-test the exact fork: 1/10 purchases, full/partial inventory, insufficient funds, trade/refine/warp states, failed grants, repeated requests and item/gold persistence. The included instructions describe the required hooks and compatibility assumptions.
Validation and provenance
All seven original source/instruction files were read. The exact revised native command compiled against fake game APIs with strict warnings and passed malformed argument, allowlist, modal, throttle, gold, partial inventory and create/placement failure cases. Fake-widget tests covered confirmation snapshots, 100 repeat clicks, close/Escape/logout, quantity bounds and 100 teardown cycles. Layout bounds were checked. No complete game/client build, actual rendering or gameplay test is claimed.
The supplied code credits TreeN and its README dates v1.0.0 to October 2017. A related public release by Rainbow1 is linked below; exact archive equivalence and author identity were not independently established. Original notices retained; redistribution confirmed by the supplying owner, without blanket open-source relicensing.
Related Poly Marble Shop release and discussion
Editorial resource — M2City
Version: Owner-supplied legacy integration; M2City r1 (2026-11-04); exact fork unspecified
Rights: Owner explicitly confirmed public redistribution. Preserve original notices; no open-source relicensing.
Validation: All seven source/instruction files read. Revised C++ command compiled with fake game APIs: strict arguments, allowlist, modal guards, throttle, gold, partial/full inventory and create/placement failure. Fake widgets tested one confirmation, snapshot purchase, bounds, repeats, close/logout and 100 cleanup cycles; layout bounds checked. No full game/client build, renderer or gameplay test.
Source: Owner-supplied archive, reviewed files and retained notices; exact upstream release not established
SHA-256: ff88bfde14778e9114c70ec3674ec8d1632b8075eed60f88ad043a61d5cd9389
Download package
3 download options · Sign in to download
metin2-poly-marble-shop-m2city-r1.zipM2City downloadmetin2-poly-marble-shop-m2city-r1.zipGoogle Drive mirrormetin2-poly-marble-shop-m2city-r1.zipMEGA mirrorMAKE THE NEXT ANSWER BETTER
What happened on your build?
Share a small example, the exact error and how you verified your fix. The discussion is open on the forum.
Need a scoped quest, UI or proto fix? · Explore more development guides · Check your proto files free