mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-02-04 09:09:09 +00:00
feat(net): add RealmConnection::HandleCharEnum implementation
This commit is contained in:
parent
ba21fb2994
commit
1e8dc7aef9
10 changed files with 171 additions and 10 deletions
|
|
@ -74,11 +74,19 @@ int32_t Script_UpdateSelectionCustomizationScene(lua_State* L) {
|
|||
}
|
||||
|
||||
int32_t Script_GetCharacterSelectFacing(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
// Radian to Degree
|
||||
lua_pushnumber(L, CCharacterSelection::s_charFacing * 57.29578f);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_SetCharacterSelectFacing(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
if (!lua_isnumber(L, 1)) {
|
||||
luaL_error(L, "Usage: SetCharacterSelectFacing(degrees)");
|
||||
}
|
||||
// Degree to Radian
|
||||
float facing = lua_tonumber(L, 1) * 0.017453292;
|
||||
CCharacterSelection::SetCharFacing(facing);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_GetSelectBackgroundModel(lua_State* L) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "glue/CGlueMgr.hpp"
|
||||
#include "gx/Coordinate.hpp"
|
||||
#include "net/connection/ClientConnection.hpp"
|
||||
#include "net/Login.hpp"
|
||||
#include "ui/CSimpleTop.hpp"
|
||||
#include "ui/Types.hpp"
|
||||
#include "console/CVar.hpp"
|
||||
|
|
@ -19,11 +20,11 @@ int32_t Script_IsShiftKeyDown(lua_State* L) {
|
|||
}
|
||||
|
||||
int32_t Script_GetBuildInfo(lua_State* L) {
|
||||
auto version = FrameScript_GetText("VERSION", -1, GENDER_NOT_APPLICABLE);
|
||||
lua_pushstring(L, version);
|
||||
auto szVersion = FrameScript_GetText("VERSION", -1, GENDER_NOT_APPLICABLE);
|
||||
auto szVersionType = FrameScript_GetText("RELEASE_BUILD", -1, GENDER_NOT_APPLICABLE);
|
||||
|
||||
auto releaseBuild = FrameScript_GetText("RELEASE_BUILD", -1, GENDER_NOT_APPLICABLE);
|
||||
lua_pushstring(L, releaseBuild);
|
||||
lua_pushstring(L, szVersion);
|
||||
lua_pushstring(L, szVersionType);
|
||||
lua_pushstring(L, "3.3.5");
|
||||
lua_pushstring(L, "12340");
|
||||
lua_pushstring(L, "Jun 24 2010");
|
||||
|
|
@ -274,7 +275,12 @@ int32_t Script_GetServerName(lua_State* L) {
|
|||
}
|
||||
|
||||
int32_t Script_DisconnectFromServer(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
if (ClientServices::Connection()->IsConnected()) {
|
||||
CGlueMgr::m_disconnectPending = 1;
|
||||
ClientServices::Connection()->Disconnect();
|
||||
}
|
||||
ClientServices::LoginConnection()->Logoff();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t Script_IsConnectedToServer(lua_State* L) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue