Ark:Донат-Магазин/API: различия между версиями
Перейти к навигации
Перейти к поиску
VorteX (обсуждение | вклад) (Новая страница: «Shop API - это набор для построения дополнений к плагину донат-магазина на языке С++. ShopAPI поз…») |
VorteX (обсуждение | вклад) м |
||
| Строка 7: | Строка 7: | ||
namespace SurvivalShopApi | namespace SurvivalShopApi | ||
{ | { | ||
typedef bool(*EquipmentFunction)(const unsigned long long steamId, const web::json::value *customItem, std::wstring *logMessage); | |||
// RegisterCustom | |||
// получить версию Shop API | |||
SURVIVALSHOP_API float Version(); | |||
// RegisterCustom | |||
// зарегистрировать собственный тип товара для применения в custom.json | |||
SURVIVALSHOP_API bool RegisterEquipmentType(const std::wstring pluginName, const std::wstring typeName, EquipmentFunction func); | |||
// RegisterCustom | |||
// удалить регистрацию собственного типа товаров | |||
SURVIVALSHOP_API void UnregisterEquipmentType(const std::wstring typeName); | |||
} | } | ||
Версия 21:21, 31 марта 2019
Shop API - это набор для построения дополнений к плагину донат-магазина на языке С++.
ShopAPI позволяет добавлять новые виды товаров, таких как сложные эффекты. Например выдачу разрешений для плагина Permissions.
API версии 1:
namespace SurvivalShopApi
{
typedef bool(*EquipmentFunction)(const unsigned long long steamId, const web::json::value *customItem, std::wstring *logMessage);
// RegisterCustom
// получить версию Shop API
SURVIVALSHOP_API float Version();
// RegisterCustom
// зарегистрировать собственный тип товара для применения в custom.json
SURVIVALSHOP_API bool RegisterEquipmentType(const std::wstring pluginName, const std::wstring typeName, EquipmentFunction func);
// RegisterCustom
// удалить регистрацию собственного типа товаров
SURVIVALSHOP_API void UnregisterEquipmentType(const std::wstring typeName);
}