mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
Some checks failed
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Has been cancelled
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Has been cancelled
95 lines
2.4 KiB
C++
95 lines
2.4 KiB
C++
#include "ui/game/TradeInfoScript.hpp"
|
|
#include "ui/FrameScript.hpp"
|
|
#include "ui/game/CGTradeInfo.hpp"
|
|
#include "util/Lua.hpp"
|
|
#include "util/Unimplemented.hpp"
|
|
|
|
namespace {
|
|
|
|
int32_t Script_CloseTrade(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_ClickTradeButton(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_ClickTargetTradeButton(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_GetTradeTargetItemInfo(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_GetTradeTargetItemLink(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_GetTradePlayerItemInfo(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_GetTradePlayerItemLink(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_AcceptTrade(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_CancelTradeAccept(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_GetPlayerTradeMoney(lua_State* L) {
|
|
if (CGTradeInfo::GetTradePartner()) {
|
|
lua_pushnumber(L, CGTradeInfo::GetPlayerTradeMoney());
|
|
} else {
|
|
lua_pushnumber(L, 0);
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
int32_t Script_GetTargetTradeMoney(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_PickupTradeMoney(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_AddTradeMoney(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
int32_t Script_SetTradeMoney(lua_State* L) {
|
|
WHOA_UNIMPLEMENTED(0);
|
|
}
|
|
|
|
}
|
|
|
|
static FrameScript_Method s_ScriptFunctions[] = {
|
|
{ "CloseTrade", &Script_CloseTrade },
|
|
{ "ClickTradeButton", &Script_ClickTradeButton },
|
|
{ "ClickTargetTradeButton", &Script_ClickTargetTradeButton },
|
|
{ "GetTradeTargetItemInfo", &Script_GetTradeTargetItemInfo },
|
|
{ "GetTradeTargetItemLink", &Script_GetTradeTargetItemLink },
|
|
{ "GetTradePlayerItemInfo", &Script_GetTradePlayerItemInfo },
|
|
{ "GetTradePlayerItemLink", &Script_GetTradePlayerItemLink },
|
|
{ "AcceptTrade", &Script_AcceptTrade },
|
|
{ "CancelTradeAccept", &Script_CancelTradeAccept },
|
|
{ "GetPlayerTradeMoney", &Script_GetPlayerTradeMoney },
|
|
{ "GetTargetTradeMoney", &Script_GetTargetTradeMoney },
|
|
{ "PickupTradeMoney", &Script_PickupTradeMoney },
|
|
{ "AddTradeMoney", &Script_AddTradeMoney },
|
|
{ "SetTradeMoney", &Script_SetTradeMoney },
|
|
};
|
|
|
|
void TradeInfoRegisterScriptFunctions() {
|
|
for (auto& func : s_ScriptFunctions) {
|
|
FrameScript_RegisterFunction(func.name, func.method);
|
|
}
|
|
}
|