وكل عملية شراء تُنشئ مدخلها الخاص، فشراء العنصر نفسه مرتين يمنحك مدخلين. ويحمل كل مدخل حقل status
يضبطه الخادم (unused أو used أو revoked بعد الاسترداد) وحقل used_at. واستخدام العنصر، وتسمّيه
حزمتا التطوير استهلاكًا، يُعلّم مدخله بأنه مستخدَم.لا تُخصم عملية الشراء مرتين أبدًا، ولا تُصفّ في طابور عند انقطاع الاتصال. ويُجلب المخزون دائمًا
محدَّثًا من الخادم؛ أما الكتالوج فمُخزَّن مؤقتًا ويُقدَّم دون اتصال، لذا عامِل أي سعر معروض على أنه
استرشادي حتى تنجح عملية الشراء.ويمكن أن تُباع العناصر بمال حقيقي أيضًا، يُدفع عبر App Store أو Google Play على الهاتف: راجع
الشراء داخل التطبيق. وعلى Windows وmacOS وLinux وWebGL يُدفع عبر
صفحة ويب: راجع الدفع عبر الويب.
تُسمّي عملية الشراء عنصر المتجر بمعرّفه: حقل id الخاص بالعنصر داخل متجره. وهو ليس اسم العنصر،
وليس معرّف المتجر. اقرأه من المتجر بدل كتابته يدويًا: تسرد حزمة التطوير متاجر إصدار اللعبة الذي
يشغّله بناؤك، ومع كلٍّ منها عناصره. وتحمل عناصر المتجر المولَّدة في Unreal المعرّفَ سلفًا.ينتمي المتجر إلى إصدار لعبة واحد، فالمتجر الذي أُنشئ تحت إصدار آخر لا يُسرَد ولا يُعثر عليه بالاسم.
وإن عادت القائمة فارغة، فتحقّق من أن لوحة التحكم تُظهر المتجر تحت إصدار اللعبة الذي يشغّله بناؤك.
تُنشأ المحفظة عند تسجيل اللاعب. يبني الخادم محفظة كل لاعب من قالب العملات لإصدار اللعبة عند
التسجيل، وتبدأ كل عملة من الصفر. أنشئ قالب العملات قبل أن يسجّل لاعب الاختبار؛ فاللاعب الذي سجّل
قبل وجوده لا محفظة لديه يدفع منها. أمّا اللاعب الذي أُنشئت محفظته تحت إصدار لعبة آخر فيحتفظ بها: عند
تسجيل الدخول ينقلها الخادم إلى قالب العملات لهذا الإصدار، مع الإبقاء على الأرصدة وبدء العملات الجديدة من الصفر. راجع
العملات والمحافظ.
وحين يفشل استدعاء، يذكر نصّ حزمة التطوير ما الخطأ وكيف تصلحه. فعملية الشراء التي أُعطيت اسم العنصر
بدل معرّفه تُقرأ هكذا:
Shop item with ID 'GoldItem' not found [shop_item.shop_item_not_found, HTTP 404]Fix: ... take the shop item's Id ..., not the item's name or the shop's id.
ويعني الخطأ 404 بالرمز request.not_found وسببُه Not Found المجرّدة أن الطلب لم يصل إلى أي مسار أصلًا (وأي
سبب آخر يسمّي سجلًّا لم يجده المسار): يجب أن يكون API URL
عنوان خادم Flock وحده، دون /v1 أو أي مسار بعده.
تمنح عمليات الشراء محتوياتها من جهة الخادم. أعطِ عنصر المتجر نوع حزمة عملة أو
عنصر قابل للاستهلاك وأرفق به مكافآت، فيضيف الخادم المكافأة إلى رصيد اللاعب ضمن العملية نفسها
التي تخصم السعر. ولا يمكن أن يقع أحد الشقّين دون الآخر، ولا تقرّر اللعبة ما الذي مُنح — لذا لا
يستطيع تطبيق معدَّل أن يمنح نفسه شيئًا، ولا يترك انقطاع الاتصال اللاعب مخصومًا منه دون مقابل.أما العنصر القياسي فهو السلوك الأقدم ولا يزال الافتراضي: يخصم السعر ويسجّل مدخل مخزون تفسّره
لعبتك كما تشاء. وتبيع المحفظة العنصر القياسي من جديد مع كل عملية شراء، لذا تحقّق قبل عرضه من أن
اللاعب لا يملكه مسبقًا. (أما المتجر فيبيعه مرة واحدة فقط: راجع
الشراء داخل التطبيق.)
لوحة التحكم
Unity
Unreal
يُسعَّر العنصر بعملة، فأنشئ أولًا إعداد العملات لهذا الإصدار (راجع
العملات والمحافظ). ومن دونه تقول عناصر المتجر Add a currency
config to enable item creation، ومعها Go to Currencies. (نذكر الأسماء كما تظهر في لوحة التحكم
بالإنجليزية.)
من القائمة أعلى الصفحة، اختر لعبتك وإصدار اللعبة الذي يشغّله بناؤك. فالمتجر يخصّ ذلك الإصدار وحده.
افتح Monetization → Shops، واضغط New تحت Your Shops.
اكتب Shop Name، واترك Status على Active، واضغط Create Shop. علامة النجاح: تقول
الصفحة Shop created. Add your first item. ويظهر المتجر تحت Your Shops.
والمتجر محدَّد، افتح تبويب Items واضغط Add Item.
في نافذة New Item املأ:
Item Name، وStatus (Active لتبيعه).
Item type، وهو يحدّد ما يناله اللاعب:
Standard يضيف قيدًا إلى مخزون اللاعب ولا يمنح شيئًا آخر؛ ولعبتك تقرّر معناه. وتبيعه المحفظة
من جديد في كل شراء.
Currency pack يدفع مكافآته مباشرةً إلى محفظة اللاعب عند الشراء، دون قيد في المخزون.
Consumable يبقى غير مستخدَم في مخزون اللاعب، ويدفع مكافآته حين تستهلكه لعبتك.
Price وCurrency. بعملة اللعبة يكون السعر عددًا صحيحًا، مثل 50. وبعملة حقيقية اكتبه كما
يراه اللاعب، مثل 4.99: فالخادم يحفظه بأصغر وحدة في العملة، فتقرؤه حزمة التطوير 499.
Store product IDs (App Store وGoogle Play): للعنصر الذي يُباع داخل تطبيق للهاتف فقط
(راجع الشراء داخل التطبيق).
Rewards، لحزمة العملة أو العنصر المستهلَك: اضغط Add reward، واختر عملة غير عملة السعر،
وأدخل Amount عددًا صحيحًا أكبر من صفر. وتحتاج الحزمة إلى عملة ثانية في إعداد العملات.
اضغط Add Item. علامة النجاح: يظهر العنصر في Shop Items بسعره وعملته ومكافآته، وعليه
Real money إن سُعِّر بعملة حقيقية.
ويعرض Preview as player المتجر كما يراه اللاعب. ويُقفَل الإصدار المنشور إلى Production: فتصير
متاجره وعناصره للقراءة فقط، ولا تتغيّر إلا عبر رقعة (patch).
استدعاء واحد يشتري أي عنصر: Shop.PurchaseAsync(item.Id). فالعنصر المسعَّر بعملة اللعبة يُدفع من
المحفظة، والعنصر المدفوع بمال حقيقي يمرّ عبر المتجر (راجع
الشراء داخل التطبيق). وكل مثال أدناه للاعب المسجَّل دخوله
ويعمل داخل دالة async؛ و"Main Shop" يمثّل اسم متجرك.يحتاج اللاعب إلى محفظة يدفع منها. ولاعب الاختبار الذي صنعته في البداية السريعة قبل
وجود قالب العملات لا محفظة له: استدعِ FlockClient.Instance.Authentication.Logout() مرة واحدة، ثم
احذف معرّف الجهاز الذي تحفظه الحزمة (الملف Flock/device_id.txt تحت Application.persistentDataPath)
أو مرّر معرّف جهاز جديدًا خاصًا بك، مثل Guid.NewGuid().ToString()، ثم اضغط Play مجددًا ليُسجَّل لاعب
جديد. ثم امنحه عملة بـAddGameFundsAsync؛ وفي العملات والمحافظ
الخطوتان كاملتين.اعرض المتجر. اقرأ العناصر والمحفظة وما يملكه اللاعب مرة واحدة، ثم ارسم كل عنصر.
using System.Collections.Generic;using Flock;using Flock.Models;// معرّف عنصر المتجر من متجره: لا اسم العنصر، ولا معرّف المتجر.Shop shop = await FlockClient.Instance.Shop.GetByNameAsync("Main Shop");FlockWallet wallet = await FlockClient.Instance.Player.GetWalletAsync();IReadOnlyDictionary<string, int> owned = await FlockClient.Instance.Shop.GetOwnedItemCountsAsync();foreach (ShopItem item in shop.ShopItems){ owned.TryGetValue(item.Id, out int count); string price = $"{item.Price} {item.Currency}"; // مثلًا "20 Gold" bool canPay = item.IsRealMoney || wallet.CanAfford(item); // عطّل ما لا تستطيع المحفظة دفعه bool alreadyHeld = item.Type == ShopItemTypes.Standard && count > 0; // المحفظة ستبيعه مرة أخرى}
وفي الأمثلة أدناه item وpotion وsword عناصر ShopItem مقروءة من المتجر كما سبق.اشترِ عنصرًا. يخبرك الردّ بما مُنح وبالمحفظة بعد الشراء.
using Flock;using Flock.Models;using UnityEngine;PurchaseResult bought = await FlockClient.Instance.Shop.PurchaseAsync(item.Id);foreach (ShopItemReward reward in bought.Granted) Debug.Log($"+{reward.Amount} {reward.Code}"); // مثلًا +500 Goldlong gold = bought.Balances?.BalanceOf("Gold") ?? 0; // null حين لا تتحرّك أي عملةPlayerInventory entry = bought.Inventory; // null لحزمة العملة
حين لا تتمّ عملية الشراء. ترمي عملية الشراء التي لم تشترِ شيئًا استثناءً. وتكفي ثلاث حالات
لشاشة المتجر:
using Flock;using Flock.Exceptions;using UnityEngine;try{ await FlockClient.Instance.Shop.PurchaseAsync(item.Id);}catch (FlockException e) when (e.ErrorCode == FlockErrorCode.ShopInsufficientFunds){ // لا يكفي من عملة العنصر: لم يُشترَ شيء. أخبر اللاعب.}catch (FlockException e) when (e.OutcomeUnknown){ // لم يقل أي ردّ هل تمّت، فربما تمّت. اقرأ المحفظة // والمخزون من جديد قبل عرضه مرة أخرى.}catch (FlockException e){ Debug.LogWarning(e.Message); // ما الخطأ، ثم سطر "Fix:" يقول كيف تصلحه}
وعملية الشراء التي لم يصل ردّها (اتصال انقطع، أو مهلة انتهت، أو خطأ في الخادم) تُرسَل من جديد
تلقائيًا، بمفتاح واحد يجيب به الخادم عن التكرار بعملية الشراء الأولى، فيدفع اللاعب مرة واحدة. أما
استدعاء PurchaseAsync جديد فهو عملية شراء جديدة. وتكون OutcomeUnknown صحيحة حين لا يقول أي ردّ
هل تمّت العملية أم لا.استخدم عنصرًا قابلًا للاستهلاك. تستخدم ConsumeOneAsync واحدًا من عنصر متجر يملكه اللاعب،
وتمنح ما يحمله.
using Flock;using Flock.Exceptions;using Flock.Models;using UnityEngine;try{ ConsumeResult used = await FlockClient.Instance.Shop.ConsumeOneAsync(potion.Id); foreach (ShopItemReward reward in used.Granted) Debug.Log($"+{reward.Amount} {reward.Code}");}catch (FlockValidationException){ // لا يملك اللاعب أيًّا منه (ربما استُخدم على جهاز آخر).}catch (FlockException e) when (e.OutcomeUnknown){ // لم يصل ردّ، فربما استُخدم: اقرأ المخزون من جديد.}
ولا يُرسَل استخدام العنصر مرتين من تلقاء نفسه أبدًا. ولاستخدام مدخل بعينه، مرّر معرّفه:
ConsumeAsync(entry.Id).هل يملكه اللاعب؟
using Flock;bool hasSword = await FlockClient.Instance.Shop.OwnsAsync(sword.Id); // مدخل غير مستخدَم من العنصر
مع الشيفرة المولَّدة. بعد Sync Schemas (تبويب Code Generation في Flock → Settings)
يصبح لكل عنصر معرّف مكتوب النوع في FlockShopItemId، باسم العنصر. ولا توجد هذه الأسماء إلا بعد
المزامنة، ولعناصر متاجرك أنت فقط: GoldPack وPotion وSword هنا أمثلة.
using Flock;using Flock.Generated.Shops;await FlockClient.Instance.Shop.PurchaseAsync(FlockShopItemId.GoldPack);await FlockClient.Instance.Shop.ConsumeOneAsync(FlockShopItemId.Potion);bool hasSword = await FlockClient.Instance.Shop.OwnsAsync(FlockShopItemId.Sword.ShopItemId());
وعملية الشراء أو الاستخدام التي تُبلغ عن محفظة تكتبها أيضًا في بيانات اللاعب المخزّنة مؤقتًا، فتُظهر
القراءة التالية للمحفظة الرصيد الجديد. ولعرض ما سيمنحه العنصر قبل أن يشتريه اللاعب، اقرأ
ShopItem.Rewards؛ ولا تكون Granted ولا Rewards قيمتها null أبدًا.
الرمز
ما الذي حدث
ما العمل
ShopInsufficientFunds
لا يملك اللاعب ثمن العنصر
اقرأ المحفظة قبل عرضه
ShopCurrencyNotHeld
لا رصيد في المحفظة بعملة العنصر
سعّره بعملة من قالب المحفظة
ShopWalletNotFound
لا محفظة للاعب في إصدار اللعبة هذا
أنشئ قالب العملات، ثم سجّل اللاعب
ShopItemShopItemNotFound
لا عنصر بهذا المعرّف
مرّر ShopItem.Id من متجره
ShopItemNotForSale
العنصر، أو متجره، غير نشط في لوحة التحكم
اقرأ المتجر مجددًا، فهو لا يعرضه؛ واجعله نشطًا لبيعه
PlayerInventoryAlreadyUsed
هذا المدخل مستخدَم سلفًا
اقرأ المخزون من جديد
تصفّح باستخدام عقد Flock | Shop، أو مزوّد المتجر في C++. ويمكن قراءة حقلَي data وstats
الحرَّين لأي عنصر عبر مسار منقوط، فلا حاجة إلى عقدة لتحليل JSON.وتُكمل Purchase بكل ما أنتجته عملية الشراء — ما مُنح، والمحفظة بعد المنح، ومدخل المخزون إن
أنشأ العنصر واحدًا.العنصر المسعَّر بعملة اللعبة يُدفع من محفظة اللاعب فورًا. أما العنصر المسعَّر بعملة تُدرجها إعدادات العملات
لديك مالًا حقيقيًا (لإصدار اللعبة الذي ترسله اللعبة) فيمر عبر المتجر الذي ربطته اللعبة بـ UFlockStore::Connect (Flock Connect Store في Blueprint): متجر الهاتف (راجع
الشراء داخل التطبيق)، أو الدفع عبر صفحة ويب على Windows وmacOS وLinux
(راجع الدفع عبر الويب). وإن لم يُربط متجر رُفض الشراء ولا يُحتسب شيء.
اشترِ باختيار عنصر مُولَّد — المعرّف مضمَّن سلفًا ويستحيل أن تخطئ في كتابته.
اقرأ المتجر. وفي C++، اقرأ معرّف عنصر المتجر من متجره: تأخذ Purchase القيمة
FFlockShopItem::Id، لا اسم العنصر ولا معرّف المتجر.
#include "FlockSubsystem.h"#include "Providers/FlockPlayerProvider.h"#include "Providers/FlockShopProvider.h"UFlockSubsystem* Sdk = UFlockSubsystem::Get(this); // this: any object in the game's worldSdk->GetShopProvider()->GetByName(TEXT("Main Shop"), [](TFlockResult<FFlockShop> Shop) { for (const FFlockShopItem& Item : Shop.Value.ShopItems) { // Item.Id is what Purchase takes; Item.Name is for showing the player. } });
اقرأ متجرًا باسمه ومرّ على عناصره: معرّف كل عنصر (Id) هو ما تأخذه Flock Purchase.
اعرض المتجر. اقرأ المحفظة وما يملكه اللاعب مرة واحدة، ثم قرّر لكل عنصر. تأتي المحفظة من ذاكرة بيانات
اللاعب المؤقتة، التي تُبقيها عمليات الشراء محدَّثة؛ أما المخزون فيُقرأ من الخادم في كل استدعاء، لذا اقرأ
الأعداد مرة واحدة لشاشة كاملة.
// Items: the shop items the screen shows, read from their shop as above.const TWeakObjectPtr<UFlockSubsystem> Flock = Sdk;Sdk->GetPlayerProvider()->GetWallet([Flock, Items](TFlockResult<FFlockWallet> Wallet){ if (!Wallet.bSuccess || !Flock.IsValid()) { return; } Flock->GetShopProvider()->GetOwnedItemCounts([Balances = Wallet.Value, Items](TFlockResult<FFlockOwnedItemCounts> Owned) { if (!Owned.bSuccess) { return; } for (const FFlockShopItem& Item : Items) { const int32 Held = Owned.Value.CountOf(Item.Id); // unused entries the player holds const bool bCanBuy = Balances.CanAfford(Item); // false for a real-money item // The wallet sells a standard item again on every purchase: offer it only while Held is 0. } });});
اشترِ.
// ItemId: the Id of an item read from its shop, as above.Sdk->GetShopProvider()->Purchase(ItemId, [](TFlockResult<FFlockPurchaseResult> Bought) { if (!Bought.bSuccess) { if (Bought.Error.ErrorCode == EFlockErrorCode::ShopInsufficientFunds) { // The server declined — show the player, don't retry. } else if (Bought.Error.bOutcomeUnknown) { // No answer said whether it was bought: read the wallet and inventory before offering it again. } // What went wrong, then a "Fix:" line saying how to fix it. UE_LOG(LogTemp, Warning, TEXT("%s"), *Bought.Error.ToDisplayText()); return; } for (const FFlockShopItemReward& Reward : Bought.Value.Granted) { // e.g. +500 GOLD. Ask the reward, never compare Type to a typed-out "currency": // the server owns that set and can add kinds. if (Reward.IsCurrency()) { /* Reward.Code, Reward.Amount */ } } // Both may legitimately be absent, so ask rather than testing the Id yourself. if (Bought.Value.HasWallet()) { /* Bought.Value.Wallet — balances after the grant */ } if (Bought.Value.HasInventoryRow()) { /* Bought.Value.Inventory — the row the player owns */ } });
تُضيف حزمة العملة قيمتها إلى المحفظة مباشرة ولا تنشئ مدخل مخزون — فتعود HasInventoryRow() بالقيمة
false، وهي حالة «لا مدخل» المشروعة لا خطأً. أما العنصر القابل للاستهلاك فيفعل العكس: يستقرّ في
المخزون ويمنح مكافأته عند استهلاك اللاعب له.
// InventoryId: an entry's Id from GetPlayerInventory.Sdk->GetShopProvider()->Consume(InventoryId, [](TFlockResult<FFlockConsumeResult> Consumed) { for (const FFlockShopItemReward& Reward : Consumed.Value.Granted) { /* +Amount Code */ } });// Or use up one entry of a shop item the player holds, without reading the inventory yourself.Sdk->GetShopProvider()->ConsumeOne(PotionItemId, [](TFlockResult<FFlockConsumeResult> Used) { /* Used.Value.Granted */ });// Whether the player holds one: a standard item bought and not used up.Sdk->GetShopProvider()->Owns(PotionItemId, [](TFlockResult<bool> Holds) { /* Holds.Value */ });
PotionItemId هو Id عنصر في المتجر. تقرأ ConsumeOne المخزون وتستخدم أول مدخل غير مستخدَم لذلك
العنصر، متجاوزةً مدخلًا استُخدم في الأثناء على جهاز آخر؛ وأي فشل آخر يوقفها، فلا يستخدم استدعاء واحد
مدخلين أبدًا. وتفشل (Validation) حين لا يملك اللاعب أيًّا منه. وتقرأ Owns المخزون كله. وحين لا يكون أحد
مسجَّل الدخول، تفشل ConsumeOne (Auth) وتفشل Owns (Validation، مع طلب تسجيل الدخول أولًا). أما Consume
فلا ترفضها حزمة التطوير: تُرسل كما هي، فلا تستدعِها إلا ولاعب مسجَّل دخوله.وفي Blueprint هذه هي Flock Purchase وFlock Consume Inventory Item وFlock Consume One
وFlock Owns Shop Item وFlock Get Owned Item Counts. ولشاشة متجر، اقرأ المحفظة بـ Flock Get
Wallet (تحت Flock | Player) والأعداد المملوكة مرة واحدة، ثم اسأل لكل عنصر Can Afford (المحفظة،
العنصر) وOwned Count Of (الأعداد، معرّف العنصر). فكّك نتيجة الشراء للحصول على Inventory وGranted
وWallet، واستخدم العقد التي لا منافذ تنفيذ لها بدل فحص الحقول بنفسك: Has Inventory Row قبل قراءة المدخل، وIs Currency
Reward للتفرّع على نوع المكافأة. ومقارنة Type بنصّ مكتوب يدويًا هي الخطأ الوحيد الجدير بالاحتراس منه —
إذ يُقرأ الخطأ المطبعي على أنه «ليست مكافأة عملة» فيتخطّى المنح بصمت. وعملية الشراء أو الاستهلاك التي
تُبلغ عن محفظة تكتبها أيضًا في بيانات اللاعب المخزّنة مؤقتًا.ولا تكون Granted قيمتها null أبدًا — فالعنصر الذي لا يمنح شيئًا يُعيد قائمة فارغة. ولعرض ما
سيمنحه العنصر قبل أن يشتريه اللاعب، اقرأ Rewards من عنصر الفهرس.وتُفشِل عملية الشراء المرفوضة النتيجةَ بدل أن ترمي استثناءً — تحقّق من Error.ErrorCode بحثًا عن
EFlockErrorCode::ShopInsufficientFunds لتمييز «الرصيد غير كافٍ» عن فشل الشبكة.لا تُشترى عملية شراء مرتين أبدًا. تحمل كل محاولة لاستدعاء Purchase واحد المفتاحَ نفسه، فيُعاد إرسال
ما لم يصل ردّه ويجيب الخادم عن التكرار بعملية الشراء الأولى. واستدعاء Purchase ثانٍ عملية شراء ثانية.
وحين لا يقول أي ردّ هل تمّت، يكون bOutcomeUnknown مضبوطًا في الفشل (Outcome Unknown في خطأ Blueprint):
اقرأ المحفظة والمخزون قبل أن تعرض العنصر مجددًا. وهذا للعنصر المدفوع من المحفظة؛ أما العنصر المدفوع بمال حقيقي
الذي لا يُعرف مصير شرائه فيُعالَج كما تقول صفحة الشراء داخل التطبيق.
ولا يُعاد إرسال الاستهلاك أبدًا بعد فشل ملتبس، لأنه لا
يحمل مفتاحًا والتكرار يمنح مرتين؛ ويُبلغ عن bOutcomeUnknown بالطريقة نفسها.
راجع العملات والمحافظ للاطّلاع على الأرصدة التي تقوم عليها
عمليات الشراء.
هل كانت هذه الصفحة مفيدة؟
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Qwacks","description":"Developer documentation for the Qwacks platform — Flock, Protokite, and Data Duck.","colors":{"primary":"#0099FF","light":"#33ADFF","dark":"#0077CC"},"logo":{"light":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","dark":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9"},"favicon":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","appearance":{"default":"dark","strict":true},"background":{"image":{"light":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47","dark":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47"},"color":{"light":"#FFFFFF","dark":"#181E2E"}},"navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"Pricing"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"Unity SDK"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"Unreal SDK"}],"primary":{"type":"button","label":"Dashboard","href":"https://flock-saas.qwacks.com"}},"fonts":{"heading":{"family":"Readex Pro"},"body":{"family":"Inter"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"welcome"},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"href":"ar/welcome"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qwacks","hasAudioNarration":false,"actualSubdomain":"qwacks","customDomains":["docs.qwacks.com"],"gitSource":{"type":"github","owner":"qwackstack","repo":"qwacksdocs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af5a22514affe1bdef08994","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"ar","tag":"Flock","count":32},{"language":"en","tag":"Flock","count":32},{"language":"ar","tag":"الميزات","count":23},{"language":"en","tag":"Features","count":23},{"language":"ar","tag":"Qwacks","count":12},{"language":"en","tag":"Qwacks","count":12},{"language":"ar","tag":"بدء الاستخدام","count":11},{"language":"en","tag":"Getting Started","count":11},{"language":"ar","tag":"اللعب الجماعي","count":5},{"language":"ar","tag":"Protokite","count":5},{"language":"ar","tag":"المدفوعات والفوترة","count":5},{"language":"en","tag":"Multiplayer","count":5},{"language":"en","tag":"Protokite","count":5},{"language":"en","tag":"Payments \u0026 Billing","count":5},{"language":"ar","tag":"اللاعبون","count":4},{"language":"ar","tag":"الاقتصاد والمدفوعات","count":4},{"language":"en","tag":"Players","count":4},{"language":"en","tag":"Economy and Payments","count":4},{"language":"ar","tag":"المفاهيم","count":3},{"language":"en","tag":"Concepts","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".nav-logo{height:2.5rem!important;max-width:none!important}#topbar-cta-button .bg-primary-dark{background-color:#feca13!important}#topbar-cta-button:hover .bg-primary-dark{background-color:#f89c1c!important}#topbar-cta-button a,#topbar-cta-button a *{color:#1a1206!important}.qwacks-lang-toggle{display:inline-flex;align-items:center;align-self:center;gap:0.5rem;padding:0.25rem 1rem;border:1px solid rgba(255, 255, 255, 0.1);border-radius:56px;background:transparent;color:#fafafa;font-family:\"Readex Pro\", sans-serif;font-size:0.875rem;line-height:1.25rem;white-space:nowrap;margin-inline-start:auto;margin-inline-end:1rem}.qwacks-lang-toggle__option{color:inherit;text-decoration:none;font-weight:400;opacity:0.3}.qwacks-lang-toggle__option:hover{opacity:0.7}.qwacks-lang-toggle__option.is-active{font-weight:700;opacity:1}@media (min-width: 1024px){#localization-select-trigger{display:none!important}}:is(h1,h2,h3,h4){position:relative}:is(h1,h2,h3,h4)>div.absolute{left:auto;right:auto;inset-inline-end:0}:is(h1,h2,h3,h4)>div.absolute>a{margin-inline:0!important}"},{"filePath":"rtl.css","content":"html[data-current-path^=\"/ar\"]{direction:rtl}[dir=\"rtl\"]{direction:rtl}html[lang=\"ar\"]{direction:rtl}@media (min-width: 1024px){html[lang=\"ar\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}html[lang=\"ar\"] .lg\\:pl-\\[5\\.7rem\\]{padding-left:0.25rem;padding-right:5.7rem}html[lang=\"ar\"] .lg\\:pl-\\[23\\.7rem\\]{padding-left:0.25rem;padding-right:23.7rem}}[dir=\"rtl\"] :is(pre,code,kbd,samp){direction:ltr;text-align:left}[dir=\"rtl\"] :not(pre)>code{unicode-bidi:isolate}[dir=\"rtl\"] pre>*{direction:ltr}[dir=\"rtl\"] .pl-3\\.5{padding-left:0;padding-right:0.875rem}[dir=\"rtl\"] .pl-3{padding-left:0;padding-right:0.75rem}[dir=\"rtl\"] .pl-4{padding-left:0;padding-right:1rem}[dir=\"rtl\"] .pr-3{padding-right:0;padding-left:0.75rem}[dir=\"rtl\"] .pr-4{padding-right:0;padding-left:1rem}[dir=\"rtl\"] .pr-8{padding-right:0;padding-left:2rem}[dir=\"rtl\"] .ml-2{margin-left:0;margin-right:0.5rem}[dir=\"rtl\"] .ml-4{margin-left:0;margin-right:1rem}[dir=\"rtl\"] .-ml-4{margin-left:0;margin-right:-1rem}[dir=\"rtl\"] .-ml-10{margin-left:0;margin-right:-2.5rem}[dir=\"rtl\"] .mr-2{margin-right:0;margin-left:0.5rem}[dir=\"rtl\"] .mr-4{margin-right:0;margin-left:1rem}[dir=\"rtl\"] .text-left{text-align:right}[dir=\"rtl\"] .text-right{text-align:left}[dir=\"rtl\"] .left-0{left:auto;right:0}[dir=\"rtl\"] .right-0{right:auto;left:0}[dir=\"rtl\"] .space-x-2>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-3>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}[dir=\"rtl\"] .border-l{border-left-width:0;border-right-width:1px}[dir=\"rtl\"] .border-r{border-right-width:0;border-left-width:1px}@media (min-width: 1024px){[dir=\"rtl\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}}[dir=\"rtl\"] :is(ul,ol){padding-left:0;padding-right:1.5rem}[dir=\"rtl\"] blockquote{border-left:0;border-right:4px solid currentColor;padding-left:0;padding-right:1rem}[dir=\"rtl\"] :is(th,td){text-align:right}[dir=\"rtl\"] .steps{margin-left:0;margin-right:0.875rem}[dir=\"rtl\"] .step>.absolute:not(.w-px){margin-left:0;margin-right:-13px}[dir=\"rtl\"] .step>:not(.absolute){padding-left:1px;padding-right:2rem}[dir=\"rtl\"] #table-of-contents{padding-inline-start:0.75rem;scrollbar-gutter:stable}[dir=\"rtl\"] #sidebar-content a[style*=\"padding-left\"]{padding-left:0!important;padding-right:1rem!important}[dir=\"rtl\"] .card .absolute{right:auto;left:1.25rem}[dir=\"rtl\"] .card .absolute svg{transform:scaleX(-1)}[dir=\"rtl\"] :is(.qwacks-flip-icon,[data-flip-rtl]) svg{transform:scaleX(-1)}[dir=\"rtl\"] #topbar-cta-button svg{transform:scaleX(-1)}[dir=\"rtl\"] .qwacks-lang-toggle svg{transform:none}[dir=\"rtl\"],[dir=\"rtl\"] body{font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.85}[dir=\"rtl\"] :is(h1,h2,h3,h4,h5,h6){font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.5}[dir=\"rtl\"] :is(pre,code,kbd,samp){font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;line-height:1.6}[dir=\"rtl\"]{font-variant-numeric:lining-nums}"}],"page":{"pagePath":"ar/guides/shops-and-inventory","slug":"/ar/guides/shops-and-inventory","pageMetadata":{"title":"المتاجر والمخزون","description":"بِع العناصر وتتبّع ما يملكه كل لاعب.","href":"/ar/guides/shops-and-inventory"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"بِع العناصر وتتبّع ما يملكه كل لاعب.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const Scope=({children})=>{const{Info}=_provideComponents()||{};if(!Info)_missingMdxReference(`Info`,true);return _jsxs(Info,{children:[_jsx(`b`,{children:`النطاق:`}),` `,children]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Note,OptimizedImage,Tab,Table,Tabs,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`يتكوّن اقتصاد Flock من ثلاثة أجزاء:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`المتاجر`}),` — مجموعات من العناصر القابلة للشراء.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`عناصر المتجر`}),` — عروض مفردة لكلٍّ منها سعر وعملة.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`المخزون`}),` — سجلٌّ بما اشتراه كل لاعب.`]}),`\n`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`Scope`,children:_jsxs(Scope,{children:[`تُعرَّف المتاجر وعناصرها لكل `,_jsx(_components.strong,{children:`إصدار لعبة`}),`؛ أما المخزون فلكل لاعب.`]})}),`\n`,_jsx(_components.p,{children:`تخصم عملية الشراء من محفظة اللاعب وتسجّل مدخلًا في المخزون:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Shop item ──purchase──▶ wallet debit ──▶ inventory entry`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`وكل عملية شراء تُنشئ مدخلها الخاص، فشراء العنصر نفسه مرتين يمنحك مدخلين. ويحمل كل مدخل حقل `,_jsx(_components.code,{children:`status`}),`\nيضبطه الخادم (`,_jsx(_components.code,{children:`unused`}),` أو `,_jsx(_components.code,{children:`used`}),` أو `,_jsx(_components.code,{children:`revoked`}),` بعد الاسترداد) وحقل `,_jsx(_components.code,{children:`used_at`}),`. واستخدام العنصر، وتسمّيه\nحزمتا التطوير استهلاكًا، يُعلّم مدخله بأنه مستخدَم.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`لا تُخصم عملية الشراء مرتين أبدًا، ولا تُصفّ في طابور عند انقطاع الاتصال.`}),` ويُجلب المخزون دائمًا\nمحدَّثًا من الخادم؛ أما الكتالوج فمُخزَّن مؤقتًا ويُقدَّم دون اتصال، لذا عامِل أي سعر معروض على أنه\nاسترشادي حتى تنجح عملية الشراء.`]}),`\n`,_jsxs(_components.p,{children:[`ويمكن أن تُباع العناصر بمال حقيقي أيضًا، يُدفع عبر App Store أو Google Play على الهاتف: راجع\n`,_jsx(_components.a,{href:`/ar/guides/real-money-purchases`,children:`الشراء داخل التطبيق`}),`. وعلى Windows وmacOS وLinux وWebGL يُدفع عبر\nصفحة ويب: راجع `,_jsx(_components.a,{href:`/ar/guides/web-checkout`,children:`الدفع عبر الويب`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-id-a-purchase-takes`,children:`المعرّف الذي تأخذه عملية الشراء`}),`\n`,_jsxs(_components.p,{children:[`تُسمّي عملية الشراء `,_jsx(_components.strong,{children:`عنصر المتجر`}),` بمعرّفه: حقل `,_jsx(_components.code,{children:`id`}),` الخاص بالعنصر داخل متجره. وهو ليس اسم العنصر،\nوليس معرّف المتجر. اقرأه من المتجر بدل كتابته يدويًا: تسرد حزمة التطوير متاجر إصدار اللعبة الذي\nيشغّله بناؤك، ومع كلٍّ منها عناصره. وتحمل عناصر المتجر المولَّدة في Unreal المعرّفَ سلفًا.`]}),`\n`,_jsx(_components.p,{children:`ينتمي المتجر إلى إصدار لعبة واحد، فالمتجر الذي أُنشئ تحت إصدار آخر لا يُسرَد ولا يُعثر عليه بالاسم.\nوإن عادت القائمة فارغة، فتحقّق من أن لوحة التحكم تُظهر المتجر تحت إصدار اللعبة الذي يشغّله بناؤك.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`تُنشأ المحفظة عند تسجيل اللاعب.`}),` يبني الخادم محفظة كل لاعب من قالب العملات لإصدار اللعبة عند\nالتسجيل، وتبدأ كل عملة من الصفر. أنشئ قالب العملات قبل أن يسجّل لاعب الاختبار؛ فاللاعب الذي سجّل\nقبل وجوده لا محفظة لديه يدفع منها. أمّا اللاعب الذي أُنشئت محفظته تحت إصدار لعبة آخر فيحتفظ بها: عند\nتسجيل الدخول ينقلها الخادم إلى قالب العملات لهذا الإصدار، مع الإبقاء على الأرصدة وبدء العملات الجديدة من الصفر. راجع\n`,_jsx(_components.a,{href:`/ar/guides/currencies-and-wallets`,children:`العملات والمحافظ`}),`.`]})}),`\n`,_jsx(_components.p,{children:`وحين يفشل استدعاء، يذكر نصّ حزمة التطوير ما الخطأ وكيف تصلحه. فعملية الشراء التي أُعطيت اسم العنصر\nبدل معرّفه تُقرأ هكذا:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Shop item with ID 'GoldItem' not found [shop_item.shop_item_not_found, HTTP 404]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Fix: ... take the shop item's Id ..., not the item's name or the shop's id.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`ويعني الخطأ 404 بالرمز `,_jsx(_components.code,{children:`request.not_found`}),` وسببُه `,_jsx(_components.code,{children:`Not Found`}),` المجرّدة أن الطلب لم يصل إلى أي مسار أصلًا (وأي\nسبب آخر يسمّي سجلًّا لم يجده المسار): يجب أن يكون API URL\nعنوان خادم Flock وحده، دون `,_jsx(_components.code,{children:`/v1`}),` أو أي مسار بعده.`]}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`تمنح عمليات الشراء محتوياتها من جهة الخادم.`}),` أعطِ عنصر المتجر نوع `,_jsx(_components.strong,{children:`حزمة عملة`}),` أو\n`,_jsx(_components.strong,{children:`عنصر قابل للاستهلاك`}),` وأرفق به مكافآت، فيضيف الخادم المكافأة إلى رصيد اللاعب ضمن العملية نفسها\nالتي تخصم السعر. ولا يمكن أن يقع أحد الشقّين دون الآخر، ولا تقرّر اللعبة ما الذي مُنح — لذا لا\nيستطيع تطبيق معدَّل أن يمنح نفسه شيئًا، ولا يترك انقطاع الاتصال اللاعب مخصومًا منه دون مقابل.`]}),_jsxs(_components.p,{children:[`أما العنصر `,_jsx(_components.strong,{children:`القياسي`}),` فهو السلوك الأقدم ولا يزال الافتراضي: يخصم السعر ويسجّل مدخل مخزون تفسّره\nلعبتك كما تشاء. `,_jsx(_components.strong,{children:`وتبيع المحفظة العنصر القياسي من جديد مع كل عملية شراء`}),`، لذا تحقّق قبل عرضه من أن\nاللاعب لا يملكه مسبقًا. (أما المتجر فيبيعه مرة واحدة فقط: راجع\n`,_jsx(_components.a,{href:`/ar/guides/real-money-purchases`,children:`الشراء داخل التطبيق`}),`.)`]})]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`لوحة التحكم`,id:`%D9%84%D9%88%D8%AD%D8%A9-%D8%A7%D9%84%D8%AA%D8%AD%D9%83%D9%85`,children:[_jsxs(_components.p,{children:[`يُسعَّر العنصر بعملة، فأنشئ أولًا إعداد العملات لهذا الإصدار (راجع\n`,_jsx(_components.a,{href:`/ar/guides/currencies-and-wallets`,children:`العملات والمحافظ`}),`). ومن دونه تقول عناصر المتجر `,_jsx(_components.strong,{children:`Add a currency\nconfig to enable item creation`}),`، ومعها `,_jsx(_components.strong,{children:`Go to Currencies`}),`. (نذكر الأسماء كما تظهر في لوحة التحكم\nبالإنجليزية.)`]}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`من القائمة أعلى الصفحة، اختر لعبتك وإصدار اللعبة الذي يشغّله بناؤك. فالمتجر يخصّ ذلك الإصدار وحده.`}),`\n`,_jsxs(_components.li,{children:[`افتح `,_jsx(_components.strong,{children:`Monetization → Shops`}),`، واضغط `,_jsx(_components.strong,{children:`New`}),` تحت `,_jsx(_components.strong,{children:`Your Shops`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`اكتب `,_jsx(_components.strong,{children:`Shop Name`}),`، واترك `,_jsx(_components.strong,{children:`Status`}),` على `,_jsx(_components.strong,{children:`Active`}),`، واضغط `,_jsx(_components.strong,{children:`Create Shop`}),`. `,_jsx(_components.strong,{children:`علامة النجاح:`}),` تقول\nالصفحة `,_jsx(_components.strong,{children:`Shop created. Add your first item.`}),` ويظهر المتجر تحت `,_jsx(_components.strong,{children:`Your Shops`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`والمتجر محدَّد، افتح تبويب `,_jsx(_components.strong,{children:`Items`}),` واضغط `,_jsx(_components.strong,{children:`Add Item`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`في نافذة `,_jsx(_components.strong,{children:`New Item`}),` املأ:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Item Name`}),`، و`,_jsx(_components.strong,{children:`Status`}),` (`,_jsx(_components.strong,{children:`Active`}),` لتبيعه).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Item type`}),`، وهو يحدّد ما يناله اللاعب:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Standard`}),` يضيف قيدًا إلى مخزون اللاعب ولا يمنح شيئًا آخر؛ ولعبتك تقرّر معناه. وتبيعه المحفظة\nمن جديد في كل شراء.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Currency pack`}),` يدفع مكافآته مباشرةً إلى محفظة اللاعب عند الشراء، دون قيد في المخزون.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Consumable`}),` يبقى غير مستخدَم في مخزون اللاعب، ويدفع مكافآته حين تستهلكه لعبتك.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Price`}),` و`,_jsx(_components.strong,{children:`Currency`}),`. بعملة اللعبة يكون السعر عددًا صحيحًا، مثل `,_jsx(_components.code,{children:`50`}),`. وبعملة حقيقية اكتبه كما\nيراه اللاعب، مثل `,_jsx(_components.code,{children:`4.99`}),`: فالخادم يحفظه بأصغر وحدة في العملة، فتقرؤه حزمة التطوير `,_jsx(_components.code,{children:`499`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Store product IDs`}),` (`,_jsx(_components.strong,{children:`App Store`}),` و`,_jsx(_components.strong,{children:`Google Play`}),`): للعنصر الذي يُباع داخل تطبيق للهاتف فقط\n(راجع `,_jsx(_components.a,{href:`/ar/guides/real-money-purchases`,children:`الشراء داخل التطبيق`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rewards`}),`، لحزمة العملة أو العنصر المستهلَك: اضغط `,_jsx(_components.strong,{children:`Add reward`}),`، واختر عملة غير عملة السعر،\nوأدخل `,_jsx(_components.strong,{children:`Amount`}),` عددًا صحيحًا أكبر من صفر. وتحتاج الحزمة إلى عملة ثانية في إعداد العملات.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`اضغط `,_jsx(_components.strong,{children:`Add Item`}),`. `,_jsx(_components.strong,{children:`علامة النجاح:`}),` يظهر العنصر في `,_jsx(_components.strong,{children:`Shop Items`}),` بسعره وعملته ومكافآته، وعليه\n`,_jsx(_components.strong,{children:`Real money`}),` إن سُعِّر بعملة حقيقية.`]}),`\n`]}),_jsxs(_components.p,{children:[`ويعرض `,_jsx(_components.strong,{children:`Preview as player`}),` المتجر كما يراه اللاعب. ويُقفَل الإصدار المنشور إلى `,_jsx(_components.strong,{children:`Production`}),`: فتصير\nمتاجره وعناصره للقراءة فقط، ولا تتغيّر إلا عبر رقعة (patch).`]}),_jsx(Frame,{caption:`Monetization → Shops: تبويب Items لمتجر، ومعه Add Item.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/shops.png?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=fc1fed5840b96a664392783492a37847`,alt:`صفحة Shops وفيها متجران تحت Your Shops وعناصر المتجر المحدَّد`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`866`,height:`866`,\"data-path\":`images/guides/shops.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/shops.png?w=280\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=3f9a065d142f21c4ecd3910ee02481ec 280w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/shops.png?w=560\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=dea1a63a5ae584045f1fa63e5c88b594 560w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/shops.png?w=840\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=4c3170d102769ac08b8fc81834460830 840w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/shops.png?w=1100\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=7460b6779e38f6698c76c3fbe3cbfe1d 1100w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/shops.png?w=1650\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=46b7f43a70b78e29fe0c2d5af149ec61 1650w, https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/images/guides/shops.png?w=2500\u0026fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=a5b5c4b0b2ddede2bc7d21e5ffffb17f 2500w`})})]}),_jsxs(Tab,{title:`Unity`,id:`unity`,children:[_jsxs(_components.p,{children:[`استدعاء واحد يشتري أي عنصر: `,_jsx(_components.code,{children:`Shop.PurchaseAsync(item.Id)`}),`. فالعنصر المسعَّر بعملة اللعبة يُدفع من\nالمحفظة، والعنصر المدفوع بمال حقيقي يمرّ عبر المتجر (راجع\n`,_jsx(_components.a,{href:`/ar/guides/real-money-purchases`,children:`الشراء داخل التطبيق`}),`). وكل مثال أدناه للاعب المسجَّل دخوله\nويعمل داخل دالة `,_jsx(_components.code,{children:`async`}),`؛ و`,_jsx(_components.code,{children:`\"Main Shop\"`}),` يمثّل اسم متجرك.`]}),_jsxs(_components.p,{children:[`يحتاج اللاعب إلى محفظة يدفع منها. ولاعب الاختبار الذي صنعته في `,_jsx(_components.a,{href:`/ar/quickstart`,children:`البداية السريعة`}),` قبل\nوجود قالب العملات لا محفظة له: استدعِ `,_jsx(_components.code,{children:`FlockClient.Instance.Authentication.Logout()`}),` مرة واحدة، ثم\nاحذف معرّف الجهاز الذي تحفظه الحزمة (الملف `,_jsx(_components.code,{children:`Flock/device_id.txt`}),` تحت `,_jsx(_components.code,{children:`Application.persistentDataPath`}),`)\nأو مرّر معرّف جهاز جديدًا خاصًا بك، مثل `,_jsx(_components.code,{children:`Guid.NewGuid().ToString()`}),`، ثم اضغط Play مجددًا ليُسجَّل لاعب\nجديد. ثم امنحه عملة بـ`,_jsx(_components.code,{children:`AddGameFundsAsync`}),`؛ وفي `,_jsx(_components.a,{href:`/ar/guides/currencies-and-wallets`,children:`العملات والمحافظ`}),`\nالخطوتان كاملتين.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`اعرض المتجر.`}),` اقرأ العناصر والمحفظة وما يملكه اللاعب مرة واحدة، ثم ارسم كل عنصر.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Collections`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Generic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// معرّف عنصر المتجر من متجره: لا اسم العنصر، ولا معرّف المتجر.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Shop`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` shop`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetByNameAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Main Shop\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockWallet`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` wallet`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Player`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetWalletAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`IReadOnlyDictionary`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`owned`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetOwnedItemCountsAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItem`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ShopItems`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` owned`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TryGetValue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`out`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` int`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` count`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` string`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` price`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` $\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Price`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Currency`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// مثلًا \"20 Gold\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` bool`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` canPay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`IsRealMoney`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`CanAfford`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// عطّل ما لا تستطيع المحفظة دفعه`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` bool`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` alreadyHeld`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ShopItemTypes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Standard`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` count`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// المحفظة ستبيعه مرة أخرى`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`وفي الأمثلة أدناه `,_jsx(_components.code,{children:`item`}),` و`,_jsx(_components.code,{children:`potion`}),` و`,_jsx(_components.code,{children:`sword`}),` عناصر `,_jsx(_components.code,{children:`ShopItem`}),` مقروءة من المتجر كما سبق.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`اشترِ عنصرًا.`}),` يخبرك الردّ بما مُنح وبالمحفظة بعد الشراء.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`PurchaseResult`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PurchaseAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItemReward`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` reward`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Granted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$\"+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reward`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Amount`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reward`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Code`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// مثلًا +500 Gold`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`long`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` gold`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Balances`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`BalanceOf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Gold\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`??`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// null حين لا تتحرّك أي عملة`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`PlayerInventory`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` entry`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Inventory`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// null لحزمة العملة`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`حين لا تتمّ عملية الشراء.`}),` ترمي عملية الشراء التي لم تشترِ شيئًا استثناءً. وتكفي ثلاث حالات\nلشاشة المتجر:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`21`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Exceptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PurchaseAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ErrorCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockErrorCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ShopInsufficientFunds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // لا يكفي من عملة العنصر: لم يُشترَ شيء. أخبر اللاعب.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OutcomeUnknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // لم يقل أي ردّ هل تمّت، فربما تمّت. اقرأ المحفظة`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // والمخزون من جديد قبل عرضه مرة أخرى.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogWarning`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ما الخطأ، ثم سطر \"Fix:\" يقول كيف تصلحه`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`وعملية الشراء التي لم يصل ردّها (اتصال انقطع، أو مهلة انتهت، أو خطأ في الخادم) تُرسَل من جديد\nتلقائيًا، بمفتاح واحد يجيب به الخادم عن التكرار بعملية الشراء الأولى، فيدفع اللاعب مرة واحدة. أما\nاستدعاء `,_jsx(_components.code,{children:`PurchaseAsync`}),` جديد فهو عملية شراء جديدة. وتكون `,_jsx(_components.code,{children:`OutcomeUnknown`}),` صحيحة حين لا يقول أي ردّ\nهل تمّت العملية أم لا.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`استخدم عنصرًا قابلًا للاستهلاك.`}),` تستخدم `,_jsx(_components.code,{children:`ConsumeOneAsync`}),` واحدًا من عنصر متجر يملكه اللاعب،\nوتمنح ما يحمله.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Exceptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ConsumeResult`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` used`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ConsumeOneAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`potion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItemReward`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` reward`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` used`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Granted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$\"+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reward`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Amount`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reward`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Code`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockValidationException`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // لا يملك اللاعب أيًّا منه (ربما استُخدم على جهاز آخر).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OutcomeUnknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // لم يصل ردّ، فربما استُخدم: اقرأ المخزون من جديد.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`ولا يُرسَل استخدام العنصر مرتين من تلقاء نفسه أبدًا. ولاستخدام مدخل بعينه، مرّر معرّفه:\n`,_jsx(_components.code,{children:`ConsumeAsync(entry.Id)`}),`.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`هل يملكه اللاعب؟`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`bool`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` hasSword`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`OwnsAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sword`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// مدخل غير مستخدَم من العنصر`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`مع الشيفرة المولَّدة.`}),` بعد `,_jsx(_components.strong,{children:`Sync Schemas`}),` (تبويب `,_jsx(_components.strong,{children:`Code Generation`}),` في `,_jsx(_components.strong,{children:`Flock → Settings`}),`)\nيصبح لكل عنصر معرّف مكتوب النوع في `,_jsx(_components.code,{children:`FlockShopItemId`}),`، باسم العنصر. ولا توجد هذه الأسماء إلا بعد\nالمزامنة، ولعناصر متاجرك أنت فقط: `,_jsx(_components.code,{children:`GoldPack`}),` و`,_jsx(_components.code,{children:`Potion`}),` و`,_jsx(_components.code,{children:`Sword`}),` هنا أمثلة.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Generated`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Shops`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PurchaseAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockShopItemId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GoldPack`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ConsumeOneAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockShopItemId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Potion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`bool`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` hasSword`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`OwnsAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FlockShopItemId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sword`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ShopItemId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`وعملية الشراء أو الاستخدام التي تُبلغ عن محفظة تكتبها أيضًا في بيانات اللاعب المخزّنة مؤقتًا، فتُظهر\nالقراءة التالية للمحفظة الرصيد الجديد. ولعرض ما سيمنحه العنصر قبل أن يشتريه اللاعب، اقرأ\n`,_jsx(_components.code,{children:`ShopItem.Rewards`}),`؛ ولا تكون `,_jsx(_components.code,{children:`Granted`}),` ولا `,_jsx(_components.code,{children:`Rewards`}),` قيمتها `,_jsx(_components.code,{children:`null`}),` أبدًا.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`الرمز`}),_jsx(_components.th,{children:`ما الذي حدث`}),_jsx(_components.th,{children:`ما العمل`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ShopInsufficientFunds`})}),_jsx(_components.td,{children:`لا يملك اللاعب ثمن العنصر`}),_jsx(_components.td,{children:`اقرأ المحفظة قبل عرضه`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ShopCurrencyNotHeld`})}),_jsx(_components.td,{children:`لا رصيد في المحفظة بعملة العنصر`}),_jsx(_components.td,{children:`سعّره بعملة من قالب المحفظة`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ShopWalletNotFound`})}),_jsx(_components.td,{children:`لا محفظة للاعب في إصدار اللعبة هذا`}),_jsx(_components.td,{children:`أنشئ قالب العملات، ثم سجّل اللاعب`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ShopItemShopItemNotFound`})}),_jsx(_components.td,{children:`لا عنصر بهذا المعرّف`}),_jsxs(_components.td,{children:[`مرّر `,_jsx(_components.code,{children:`ShopItem.Id`}),` من متجره`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ShopItemNotForSale`})}),_jsxs(_components.td,{children:[`العنصر، أو متجره، `,_jsx(_components.strong,{children:`غير نشط`}),` في لوحة التحكم`]}),_jsxs(_components.td,{children:[`اقرأ المتجر مجددًا، فهو لا يعرضه؛ واجعله `,_jsx(_components.strong,{children:`نشطًا`}),` لبيعه`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PlayerInventoryAlreadyUsed`})}),_jsx(_components.td,{children:`هذا المدخل مستخدَم سلفًا`}),_jsx(_components.td,{children:`اقرأ المخزون من جديد`})]})]})]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal`,children:[_jsxs(_components.p,{children:[`تصفّح باستخدام عقد `,_jsx(_components.em,{children:`Flock | Shop`}),`، أو مزوّد المتجر في C++. ويمكن قراءة حقلَي `,_jsx(_components.code,{children:`data`}),` و`,_jsx(_components.code,{children:`stats`}),`\nالحرَّين لأي عنصر عبر مسار منقوط، فلا حاجة إلى عقدة لتحليل JSON.`]}),_jsxs(_components.p,{children:[`وتُكمل `,_jsx(_components.code,{children:`Purchase`}),` بكل ما أنتجته عملية الشراء — ما مُنح، والمحفظة بعد المنح، ومدخل المخزون إن\nأنشأ العنصر واحدًا.`]}),_jsxs(_components.p,{children:[`العنصر المسعَّر بعملة اللعبة يُدفع من محفظة اللاعب فورًا. أما العنصر المسعَّر بعملة تُدرجها إعدادات العملات\nلديك مالًا حقيقيًا (لإصدار اللعبة الذي ترسله اللعبة) فيمر عبر المتجر الذي ربطته اللعبة بـ `,_jsx(_components.code,{children:`UFlockStore::Connect`}),` (`,_jsx(_components.strong,{children:`Flock Connect Store`}),` في Blueprint): متجر الهاتف (راجع\n`,_jsx(_components.a,{href:`/ar/guides/real-money-purchases`,children:`الشراء داخل التطبيق`}),`)، أو الدفع عبر صفحة ويب على Windows وmacOS وLinux\n(راجع `,_jsx(_components.a,{href:`/ar/guides/web-checkout`,children:`الدفع عبر الويب`}),`). وإن لم يُربط متجر رُفض الشراء ولا يُحتسب شيء.`]}),_jsx(Frame,{caption:`اشترِ باختيار عنصر مُولَّد — المعرّف مضمَّن سلفًا ويستحيل أن تخطئ في كتابته.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-purchase.png?fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=7d62008138e464eab95c97c1be0943a7`,alt:`عقدة Flock Purchase داخل مخطط Blueprint`,\"data-og-width\":`333`,width:`333`,\"data-og-height\":`237`,height:`237`,\"data-path\":`images/sdk/unreal/shop-purchase.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-purchase.png?w=280\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=95a24f58076f55b879b952a101386a78 280w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-purchase.png?w=560\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=50c1d126e0f052dce492945298f792dc 560w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-purchase.png?w=840\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=81c5acdb745b833c402d7aaded97c9c9 840w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-purchase.png?w=1100\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=a7ab6e21659adedfdaef20d6f4c1bb0e 1100w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-purchase.png?w=1650\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=077b108daa33bd92893cb6e4ff5fee7e 1650w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-purchase.png?w=2500\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=9a13830be95b21deb0315032e77fe93f 2500w`})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`اقرأ المتجر.`}),` وفي C++، اقرأ معرّف عنصر المتجر من متجره: تأخذ `,_jsx(_components.code,{children:`Purchase`}),` القيمة\n`,_jsx(_components.code,{children:`FFlockShopItem::Id`}),`، لا اسم العنصر ولا معرّف المتجر.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"FlockSubsystem.h\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Providers/FlockPlayerProvider.h\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Providers/FlockShopProvider.h\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // this: any object in the game's world`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetShopProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetByName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Main Shop\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockShop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Item : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ShopItems`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Item.Id is what Purchase takes; Item.Name is for showing the player.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`]})})}),_jsx(Frame,{caption:`اقرأ متجرًا باسمه ومرّ على عناصره: معرّف كل عنصر (Id) هو ما تأخذه Flock Purchase.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-browse.png?fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=b858e971cdc334aeb049b60da281492f`,alt:`Flock Get Shop By Name إلى Break Flock Shop، وتمرّ Shop Items فيها على ForEach Loop إلى Break Flock Shop Item`,\"data-og-width\":`680`,width:`680`,\"data-og-height\":`340`,height:`340`,\"data-path\":`images/sdk/unreal/shop-browse.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-browse.png?w=280\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=e1664d213bad9d19f02e79efed96fff1 280w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-browse.png?w=560\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=0b9e5d01758d4b710ae9a78ecee54dd8 560w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-browse.png?w=840\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=020524b4e4d989de84a984a3ff5f828b 840w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-browse.png?w=1100\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=b37d2c6ef7082fd0c330f01a61c86704 1100w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-browse.png?w=1650\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=9c84e55b866d5e4af8eda0c04300307a 1650w, https://mintcdn.com/qwacks/xJEjgQCFVIWLhvHB/images/sdk/unreal/shop-browse.png?w=2500\u0026fit=max\u0026auto=format\u0026n=xJEjgQCFVIWLhvHB\u0026q=85\u0026s=6b8fd984ef48e082248ad948bf6c32e3 2500w`})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`اعرض المتجر.`}),` اقرأ المحفظة وما يملكه اللاعب مرة واحدة، ثم قرّر لكل عنصر. تأتي المحفظة من ذاكرة بيانات\nاللاعب المؤقتة، التي تُبقيها عمليات الشراء محدَّثة؛ أما المخزون فيُقرأ من الخادم في كل استدعاء، لذا اقرأ\nالأعداد مرة واحدة لشاشة كاملة.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Items: the shop items the screen shows, read from their shop as above.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TWeakObjectPtr`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flock `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sdk;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetPlayerProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetWallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockWallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IsValid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetShopProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetOwnedItemCounts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Balances`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Wallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockOwnedItemCounts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Owned`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Owned`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Item : Items)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` int32 Held `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Owned`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`CountOf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // unused entries the player holds`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` bCanBuy `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Balances`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`CanAfford`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(Item);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // false for a real-money item`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The wallet sells a standard item again on every purchase: offer it only while Held is 0.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`اشترِ.`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`30`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ItemId: the Id of an item read from its shop, as above.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetShopProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(ItemId,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockPurchaseResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ErrorCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EFlockErrorCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::ShopInsufficientFunds)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The server declined — show the player, don't retry.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bOutcomeUnknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // No answer said whether it was bought: read the wallet and inventory before offering it again.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // What went wrong, then a \"Fix:\" line saying how to fix it.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItemReward`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Reward : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Granted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // e.g. +500 GOLD. Ask the reward, never compare Type to a typed-out \"currency\":`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // the server owns that set and can add kinds.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Reward`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IsCurrency`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /* Reward.Code, Reward.Amount */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Both may legitimately be absent, so ask rather than testing the Id yourself.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`HasWallet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /* Bought.Value.Wallet — balances after the grant */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`HasInventoryRow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /* Bought.Value.Inventory — the row the player owns */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`]})})}),_jsxs(_components.p,{children:[`تُضيف حزمة العملة قيمتها إلى المحفظة مباشرة ولا تنشئ مدخل مخزون — فتعود `,_jsx(_components.code,{children:`HasInventoryRow()`}),` بالقيمة\nfalse، وهي حالة «لا مدخل» المشروعة لا خطأً. أما `,_jsx(_components.strong,{children:`العنصر القابل للاستهلاك`}),` فيفعل العكس: يستقرّ في\nالمخزون ويمنح مكافأته عند استهلاك اللاعب له.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// InventoryId: an entry's Id from GetPlayerInventory.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetShopProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Consume`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(InventoryId,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockConsumeResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Consumed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItemReward`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Reward : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Consumed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Granted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /* +Amount Code */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Or use up one entry of a shop item the player holds, without reading the inventory yourself.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetShopProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ConsumeOne`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(PotionItemId,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockConsumeResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Used`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /* Used.Value.Granted */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Whether the player holds one: a standard item bought and not used up.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetShopProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Owns`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(PotionItemId, [](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Holds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /* Holds.Value */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`PotionItemId`}),` هو `,_jsx(_components.code,{children:`Id`}),` عنصر في المتجر. تقرأ `,_jsx(_components.code,{children:`ConsumeOne`}),` المخزون وتستخدم أول مدخل غير مستخدَم لذلك\nالعنصر، متجاوزةً مدخلًا استُخدم في الأثناء على جهاز آخر؛ وأي فشل آخر يوقفها، فلا يستخدم استدعاء واحد\nمدخلين أبدًا. وتفشل (`,_jsx(_components.code,{children:`Validation`}),`) حين لا يملك اللاعب أيًّا منه. وتقرأ `,_jsx(_components.code,{children:`Owns`}),` المخزون كله. وحين لا يكون أحد\nمسجَّل الدخول، تفشل `,_jsx(_components.code,{children:`ConsumeOne`}),` (`,_jsx(_components.code,{children:`Auth`}),`) وتفشل `,_jsx(_components.code,{children:`Owns`}),` (`,_jsx(_components.code,{children:`Validation`}),`، مع طلب تسجيل الدخول أولًا). أما `,_jsx(_components.code,{children:`Consume`}),`\nفلا ترفضها حزمة التطوير: تُرسل كما هي، فلا تستدعِها إلا ولاعب مسجَّل دخوله.`]}),_jsxs(_components.p,{children:[`وفي Blueprint هذه هي `,_jsx(_components.strong,{children:`Flock Purchase`}),` و`,_jsx(_components.strong,{children:`Flock Consume Inventory Item`}),` و`,_jsx(_components.strong,{children:`Flock Consume One`}),`\nو`,_jsx(_components.strong,{children:`Flock Owns Shop Item`}),` و`,_jsx(_components.strong,{children:`Flock Get Owned Item Counts`}),`. ولشاشة متجر، اقرأ المحفظة بـ `,_jsx(_components.strong,{children:`Flock Get\nWallet`}),` (تحت `,_jsx(_components.em,{children:`Flock | Player`}),`) والأعداد المملوكة مرة واحدة، ثم اسأل لكل عنصر `,_jsx(_components.strong,{children:`Can Afford`}),` (المحفظة،\nالعنصر) و`,_jsx(_components.strong,{children:`Owned Count Of`}),` (الأعداد، معرّف العنصر). فكّك نتيجة الشراء للحصول على `,_jsx(_components.code,{children:`Inventory`}),` و`,_jsx(_components.code,{children:`Granted`}),`\nو`,_jsx(_components.code,{children:`Wallet`}),`، واستخدم العقد التي لا منافذ تنفيذ لها بدل فحص الحقول بنفسك: `,_jsx(_components.em,{children:`Has Inventory Row`}),` قبل قراءة المدخل، و`,_jsx(_components.em,{children:`Is Currency\nReward`}),` للتفرّع على نوع المكافأة. ومقارنة `,_jsx(_components.code,{children:`Type`}),` بنصّ مكتوب يدويًا هي الخطأ الوحيد الجدير بالاحتراس منه —\nإذ يُقرأ الخطأ المطبعي على أنه «ليست مكافأة عملة» فيتخطّى المنح بصمت. وعملية الشراء أو الاستهلاك التي\nتُبلغ عن محفظة تكتبها أيضًا في بيانات اللاعب المخزّنة مؤقتًا.`]}),_jsxs(_components.p,{children:[`ولا تكون `,_jsx(_components.code,{children:`Granted`}),` قيمتها `,_jsx(_components.code,{children:`null`}),` أبدًا — فالعنصر الذي لا يمنح شيئًا يُعيد قائمة فارغة. ولعرض ما\nسيمنحه العنصر قبل أن يشتريه اللاعب، اقرأ `,_jsx(_components.code,{children:`Rewards`}),` من عنصر الفهرس.`]}),_jsxs(_components.p,{children:[`وتُفشِل عملية الشراء المرفوضة النتيجةَ بدل أن ترمي استثناءً — تحقّق من `,_jsx(_components.code,{children:`Error.ErrorCode`}),` بحثًا عن\n`,_jsx(_components.code,{children:`EFlockErrorCode::ShopInsufficientFunds`}),` لتمييز «الرصيد غير كافٍ» عن فشل الشبكة.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`لا تُشترى عملية شراء مرتين أبدًا.`}),` تحمل كل محاولة لاستدعاء `,_jsx(_components.code,{children:`Purchase`}),` واحد المفتاحَ نفسه، فيُعاد إرسال\nما لم يصل ردّه ويجيب الخادم عن التكرار بعملية الشراء الأولى. واستدعاء `,_jsx(_components.code,{children:`Purchase`}),` ثانٍ عملية شراء ثانية.\nوحين لا يقول أي ردّ هل تمّت، يكون `,_jsx(_components.code,{children:`bOutcomeUnknown`}),` مضبوطًا في الفشل (`,_jsx(_components.em,{children:`Outcome Unknown`}),` في خطأ Blueprint):\nاقرأ المحفظة والمخزون قبل أن تعرض العنصر مجددًا. وهذا للعنصر المدفوع من المحفظة؛ أما العنصر المدفوع بمال حقيقي\nالذي لا يُعرف مصير شرائه فيُعالَج كما تقول صفحة `,_jsx(_components.a,{href:`/ar/guides/real-money-purchases#buy`,children:`الشراء داخل التطبيق`}),`.\n`,_jsx(_components.strong,{children:`ولا يُعاد إرسال الاستهلاك أبدًا`}),` بعد فشل ملتبس، لأنه لا\nيحمل مفتاحًا والتكرار يمنح مرتين؛ ويُبلغ عن `,_jsx(_components.code,{children:`bOutcomeUnknown`}),` بالطريقة نفسها.`]})]})]}),`\n`,_jsxs(_components.p,{children:[`راجع `,_jsx(_components.a,{href:`/ar/guides/currencies-and-wallets`,children:`العملات والمحافظ`}),` للاطّلاع على الأرصدة التي تقوم عليها\nعمليات الشراء.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{Scope,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"المتاجر والمخزون","description":"بِع العناصر وتتبّع ما يملكه كل لاعب.","href":"/ar/guides/shops-and-inventory"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"المعرّف الذي تأخذه عملية الشراء","slug":"the-id-a-purchase-takes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/qwacks/05763fd4e1d53e37/lang-toggle.js"],"subdomain":"qwacks","siteName":"Qwacks","title":"المتاجر والمخزون - Qwacks","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/guides/shops-and-inventory","matchLevel":1},"ar":{"href":"/ar/guides/shops-and-inventory","matchLevel":0}}},"lastModified":"2026-11-11T19:01:52.260Z","originalFileLocation":"ar/guides/shops-and-inventory.mdx","locale":"ar"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"بِع العناصر وتتبّع ما يملكه كل لاعب.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"المتاجر والمخزون - Qwacks\">\u003cmeta data-mint-head property=\"og:description\" content=\"بِع العناصر وتتبّع ما يملكه كل لاعب.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Qwacks\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.qwacks.com/ar/guides/shops-and-inventory\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=%D8%A7%D9%84%D8%A7%D9%82%D8%AA%D8%B5%D8%A7%D8%AF+%D9%88%D8%A7%D9%84%D9%85%D8%AF%D9%81%D9%88%D8%B9%D8%A7%D8%AA\u0026amp;title=%D8%A7%D9%84%D9%85%D8%AA%D8%A7%D8%AC%D8%B1+%D9%88%D8%A7%D9%84%D9%85%D8%AE%D8%B2%D9%88%D9%86\u0026amp;description=%D8%A8%D9%90%D8%B9+%D8%A7%D9%84%D8%B9%D9%86%D8%A7%D8%B5%D8%B1+%D9%88%D8%AA%D8%AA%D8%A8%D9%91%D8%B9+%D9%85%D8%A7+%D9%8A%D9%85%D9%84%D9%83%D9%87+%D9%83%D9%84+%D9%84%D8%A7%D8%B9%D8%A8.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=65e3514c736a56d056e39e85c323ad36d8619ba2db851dfad79e276b0b500e75\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"المتاجر والمخزون - Qwacks\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"بِع العناصر وتتبّع ما يملكه كل لاعب.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=%D8%A7%D9%84%D8%A7%D9%82%D8%AA%D8%B5%D8%A7%D8%AF+%D9%88%D8%A7%D9%84%D9%85%D8%AF%D9%81%D9%88%D8%B9%D8%A7%D8%AA\u0026amp;title=%D8%A7%D9%84%D9%85%D8%AA%D8%A7%D8%AC%D8%B1+%D9%88%D8%A7%D9%84%D9%85%D8%AE%D8%B2%D9%88%D9%86\u0026amp;description=%D8%A8%D9%90%D8%B9+%D8%A7%D9%84%D8%B9%D9%86%D8%A7%D8%B5%D8%B1+%D9%88%D8%AA%D8%AA%D8%A8%D9%91%D8%B9+%D9%85%D8%A7+%D9%8A%D9%85%D9%84%D9%83%D9%87+%D9%83%D9%84+%D9%84%D8%A7%D8%B9%D8%A8.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=65e3514c736a56d056e39e85c323ad36d8619ba2db851dfad79e276b0b500e75\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0099FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.qwacks.com/ar/guides/shops-and-inventory\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ar/guides/shops-and-inventory.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://docs.qwacks.com/ar/guides/shops-and-inventory\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.qwacks.com/guides/shops-and-inventory\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.qwacks.com/guides/shops-and-inventory\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.qwacks.com/#organization\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.qwacks.com#website\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.qwacks.com/ar/guides/shops-and-inventory#webpage\",\"url\":\"https://docs.qwacks.com/ar/guides/shops-and-inventory\",\"name\":\"المتاجر والمخزون\",\"description\":\"بِع العناصر وتتبّع ما يملكه كل لاعب.\",\"dateModified\":\"2026-11-11T19:01:52.260Z\",\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.qwacks.com/ar/guides/shops-and-inventory#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.qwacks.com/ar/guides/shops-and-inventory#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"الميزات\",\"item\":\"https://docs.qwacks.com/ar/guides/players-and-auth\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"الاقتصاد والمدفوعات\",\"item\":\"https://docs.qwacks.com/ar/guides/currencies-and-wallets\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"المتاجر والمخزون\",\"item\":\"https://docs.qwacks.com/ar/guides/shops-and-inventory\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.qwacks.com/ar/guides/shops-and-inventory#article\",\"headline\":\"المتاجر والمخزون\",\"name\":\"المتاجر والمخزون\",\"description\":\"بِع العناصر وتتبّع ما يملكه كل لاعب.\",\"url\":\"https://docs.qwacks.com/ar/guides/shops-and-inventory\",\"mainEntityOfPage\":{\"@id\":\"https://docs.qwacks.com/ar/guides/shops-and-inventory#webpage\"},\"dateModified\":\"2026-11-11T19:01:52.260Z\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Qwacks\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Qwacks\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/ar/guides/shops-and-inventory.md","siteName":"Qwacks","nav":{"global":null,"languages":[{"language":"en","default":true,"pages":[{"title":"en","href":"/guides/shops-and-inventory"}]},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"tabs":[{"tab":"Qwacks","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/qwacks.svg","pages":[{"title":"Qwacks","href":"/ar/welcome"}]},{"tab":"Flock","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/flock.svg","groups":[{"group":"بدء الاستخدام","pages":[{"title":"Flock","href":"/ar/introduction"},{"title":"البداية السريعة","href":"/ar/quickstart"},{"title":"المصادقة","href":"/ar/authentication"},{"title":"حزمة تطوير Unity","href":"/ar/sdk/unity"},{"title":"حزمة تطوير Unreal","href":"/ar/sdk/unreal"}]},{"group":"المفاهيم","pages":[{"title":"الاستوديوهات والألعاب","href":"/ar/concepts/studios-and-games"},{"title":"الإصدارات","href":"/ar/concepts/versions"},{"title":"اللاعبون","href":"/ar/concepts/players"}]},{"group":"الميزات","pages":[{"group":"اللاعبون","pages":[{"title":"تسجيل الدخول","href":"/ar/guides/players-and-auth"},{"title":"ربط الحسابات","href":"/ar/guides/account-linking"},{"title":"بيانات اللاعب","href":"/ar/guides/player-data"},{"title":"الحظر","href":"/ar/guides/bans"}]},{"group":"التقدّم","pages":[{"title":"الإنجازات","href":"/ar/guides/achievements"},{"title":"لوحات الصدارة","href":"/ar/guides/leaderboards"}]},{"group":"الاقتصاد والمدفوعات","pages":[{"title":"العملات والمحافظ","description":"عرِّف العملات المكتسَبة والمدفوعة وتتبّع أرصدة اللاعبين.","href":"/ar/guides/currencies-and-wallets"},{"title":"المتاجر والمخزون","href":"/ar/guides/shops-and-inventory"},{"title":"الشراء داخل التطبيق","description":"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.","href":"/ar/guides/real-money-purchases"},{"title":"الدفع عبر الويب","href":"/ar/guides/web-checkout"}]},{"group":"محتوى اللعبة","pages":[{"title":"الإعدادات عن بُعد","href":"/ar/guides/remote-config"},{"title":"تحديثات اللعبة","href":"/ar/guides/game-patches"},{"title":"ملفات اللعبة","href":"/ar/guides/assets"}]},{"group":"التواصل مع اللاعبين","pages":[{"title":"شرائح اللاعبين","href":"/ar/guides/segments"},{"title":"الإشعارات","href":"/ar/guides/notifications"}]},{"group":"التحليلات","pages":[{"title":"التحليلات والأحداث","href":"/ar/guides/analytics-and-events"},{"title":"تعريفات المقاييس","href":"/ar/guides/metric-definitions"},{"title":"تنبيهات المطوّرين","href":"/ar/guides/developer-alerts"}]},{"group":"اللعب الجماعي","pages":[{"title":"اللعب الجماعي","sidebarTitle":"نظرة عامة","href":"/ar/guides/multiplayer"},{"title":"الفرق","href":"/ar/guides/parties"},{"title":"مطابقة اللاعبين","href":"/ar/guides/matchmaking"},{"title":"الجلسات","href":"/ar/guides/sessions"},{"title":"اتصال اللاعبين","href":"/ar/guides/connecting-players"}]}]},{"group":"المرجع","pages":[{"title":"سجل التغييرات","href":"/ar/changelog"}]}]},{"tab":"Protokite","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/protokite.svg","pages":[{"title":"Protokite","href":"/ar/protokite/getting-started"}]},{"tab":"Data Duck","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/data-duck.svg","pages":[{"title":"Data Duck","href":"/ar/data-duck/getting-started"}]}]}]},"basePath":"","title":"المتاجر والمخزون - Qwacks","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-u3J1-UOn.js","DynamicMarkdown-B-f2cqXQ.js","zoom-image-lightbox-DTFzvaXJ.js","lightbox-handle-r17bVUz3.js"]}