mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
Merge branch 'master' of https://github.com/atiernan/whoa
This commit is contained in:
commit
47a9d80584
@ -18,6 +18,7 @@
|
|||||||
#include "sound/Interface.hpp"
|
#include "sound/Interface.hpp"
|
||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "ui/FrameXML.hpp"
|
#include "ui/FrameXML.hpp"
|
||||||
|
#include "ui/Game.hpp"
|
||||||
#include "util/Random.hpp"
|
#include "util/Random.hpp"
|
||||||
#include "world/World.hpp"
|
#include "world/World.hpp"
|
||||||
#include <bc/Debug.hpp>
|
#include <bc/Debug.hpp>
|
||||||
@ -29,6 +30,8 @@ CVar* Client::g_accountNameVar;
|
|||||||
CVar* Client::g_accountListVar;
|
CVar* Client::g_accountListVar;
|
||||||
HEVENTCONTEXT Client::g_clientEventContext;
|
HEVENTCONTEXT Client::g_clientEventContext;
|
||||||
|
|
||||||
|
CGameTime g_clientGameTime;
|
||||||
|
|
||||||
static CVar* s_desktopGammaCvar;
|
static CVar* s_desktopGammaCvar;
|
||||||
static CVar* s_gammaCvar;
|
static CVar* s_gammaCvar;
|
||||||
static CVar* s_textureCacheSizeCvar;
|
static CVar* s_textureCacheSizeCvar;
|
||||||
@ -69,10 +72,28 @@ void BaseInitializeGlobal() {
|
|||||||
PropInitialize();
|
PropInitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t ClientGameTimeTickHandler(const void* data, void* param) {
|
||||||
|
STORM_ASSERT(data);
|
||||||
|
|
||||||
|
g_clientGameTime.GameTimeUpdate(static_cast<const EVENT_DATA_IDLE*>(data)->elapsedSec);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClientInitializeGameTime() {
|
||||||
|
ClientServices::SetMessageHandler(SMSG_GAME_SPEED_SET, &ReceiveNewGameSpeed, nullptr);
|
||||||
|
ClientServices::SetMessageHandler(SMSG_LOGIN_SET_TIME_SPEED, &ReceiveNewTimeSpeed, nullptr);
|
||||||
|
ClientServices::SetMessageHandler(SMSG_GAME_TIME_UPDATE, &ReceiveGameTimeUpdate, nullptr);
|
||||||
|
ClientServices::SetMessageHandler(SMSG_SERVERTIME, &ReceiveServerTime, nullptr);
|
||||||
|
ClientServices::SetMessageHandler(SMSG_GAME_TIME_SET, &ReceiveNewGameTime, nullptr);
|
||||||
|
|
||||||
|
// TODO initialize s_forcedChangeCallbacks
|
||||||
|
}
|
||||||
|
|
||||||
int32_t ClientIdle(const void* data, void* param) {
|
int32_t ClientIdle(const void* data, void* param) {
|
||||||
// TODO
|
ClientGameTimeTickHandler(data, nullptr);
|
||||||
// ClientGameTimeTickHandler(data, param);
|
|
||||||
// Player_C_ZoneUpdateHandler(data, param);
|
// TODO Player_C_ZoneUpdateHandler(data, nullptr);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -85,7 +106,12 @@ void ClientInitializeGame(uint32_t mapId, C3Vector position) {
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
CGGameUI::InitializeGame();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
EventRegister(EVENT_ID_IDLE, ClientIdle);
|
EventRegister(EVENT_ID_IDLE, ClientIdle);
|
||||||
|
ClientInitializeGameTime();
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#define CLIENT_CLIENT_HPP
|
#define CLIENT_CLIENT_HPP
|
||||||
|
|
||||||
#include "event/Event.hpp"
|
#include "event/Event.hpp"
|
||||||
|
#include "util/Time.hpp"
|
||||||
#include <tempest/Vector.hpp>
|
#include <tempest/Vector.hpp>
|
||||||
|
|
||||||
class CVar;
|
class CVar;
|
||||||
@ -12,6 +13,8 @@ namespace Client {
|
|||||||
extern HEVENTCONTEXT g_clientEventContext;
|
extern HEVENTCONTEXT g_clientEventContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern CGameTime g_clientGameTime;
|
||||||
|
|
||||||
void ClientInitializeGame(uint32_t mapId, C3Vector position);
|
void ClientInitializeGame(uint32_t mapId, C3Vector position);
|
||||||
|
|
||||||
void ClientPostClose(int32_t a1);
|
void ClientPostClose(int32_t a1);
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
#include "client/ClientHandlers.hpp"
|
#include "client/ClientHandlers.hpp"
|
||||||
|
#include "Client.hpp"
|
||||||
#include "console/Console.hpp"
|
#include "console/Console.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
#include "object/Client.hpp"
|
#include "object/Client.hpp"
|
||||||
|
#include "util/Time.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
#include "world/World.hpp"
|
#include "world/World.hpp"
|
||||||
#include <common/DataStore.hpp>
|
#include <common/DataStore.hpp>
|
||||||
#include <tempest/Vector.hpp>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <tempest/Vector.hpp>
|
||||||
|
|
||||||
static float s_newFacing;
|
static float s_newFacing;
|
||||||
static C3Vector s_newPosition;
|
static C3Vector s_newPosition;
|
||||||
@ -77,6 +80,56 @@ int32_t PlayedTimeHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataSto
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t ReceiveGameTimeUpdate(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ReceiveNewGameSpeed(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ReceiveNewGameTime(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ReceiveNewTimeSpeed(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
uint32_t encodedTime;
|
||||||
|
msg->Get(encodedTime);
|
||||||
|
|
||||||
|
float newSpeed;
|
||||||
|
msg->Get(newSpeed);
|
||||||
|
|
||||||
|
uint32_t holidayOffset;
|
||||||
|
msg->Get(holidayOffset);
|
||||||
|
|
||||||
|
if (!msg->IsRead()) {
|
||||||
|
STORM_ASSERT(msg->IsFinal());
|
||||||
|
// TODO ConsoleWriteA("Malformed message received: Id = %d, Len = %d, Read = %d\n", DEFAULT_COLOR, msgId, msg->Size(), msg->Tell());
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
WowTime newTime;
|
||||||
|
WowTime::WowDecodeTime(encodedTime, &newTime);
|
||||||
|
newTime.m_holidayOffset = holidayOffset;
|
||||||
|
|
||||||
|
g_clientGameTime.GameTimeSetTime(newTime, true);
|
||||||
|
|
||||||
|
// TODO UpdateTime();
|
||||||
|
|
||||||
|
auto oldSpeed = g_clientGameTime.GameTimeSetMinutesPerSecond(newSpeed);
|
||||||
|
|
||||||
|
char logStr[256];
|
||||||
|
SStrPrintf(logStr, sizeof(logStr), "Gamespeed set from %.03f to %.03f", oldSpeed, newSpeed);
|
||||||
|
ConsoleWrite(logStr, DEFAULT_COLOR);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ReceiveServerTime(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
int32_t TransferAbortedHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
int32_t TransferAbortedHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,16 @@ int32_t NotifyHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore*
|
|||||||
|
|
||||||
int32_t PlayedTimeHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
int32_t PlayedTimeHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
|
int32_t ReceiveGameTimeUpdate(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
|
int32_t ReceiveNewGameSpeed(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
|
int32_t ReceiveNewGameTime(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
|
int32_t ReceiveNewTimeSpeed(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
|
int32_t ReceiveServerTime(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
int32_t TransferAbortedHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
int32_t TransferAbortedHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
int32_t TransferPendingHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
int32_t TransferPendingHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|||||||
@ -25,10 +25,12 @@
|
|||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "ui/FrameXML.hpp"
|
#include "ui/FrameXML.hpp"
|
||||||
#include "ui/Interface.hpp"
|
#include "ui/Interface.hpp"
|
||||||
#include "ui/ScriptFunctions.hpp"
|
#include "ui/Key.hpp"
|
||||||
|
#include "ui/ScriptFunctionsSystem.hpp"
|
||||||
#include "ui/game/CGVideoOptions.hpp"
|
#include "ui/game/CGVideoOptions.hpp"
|
||||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
#include "ui/simple/CSimpleModelFFX.hpp"
|
||||||
#include "ui/simple/CSimpleTop.hpp"
|
#include "ui/simple/CSimpleTop.hpp"
|
||||||
|
#include "ui/simple/ScriptMethods.hpp"
|
||||||
#include "util/Filesystem.hpp"
|
#include "util/Filesystem.hpp"
|
||||||
#include "util/Locale.hpp"
|
#include "util/Locale.hpp"
|
||||||
#include "util/Log.hpp"
|
#include "util/Log.hpp"
|
||||||
@ -36,25 +38,6 @@
|
|||||||
#include <common/MD5.hpp>
|
#include <common/MD5.hpp>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
unsigned char InterfaceKey[256] = {
|
|
||||||
0xC3, 0x5B, 0x50, 0x84, 0xB9, 0x3E, 0x32, 0x42, 0x8C, 0xD0, 0xC7, 0x48, 0xFA, 0x0E, 0x5D, 0x54,
|
|
||||||
0x5A, 0xA3, 0x0E, 0x14, 0xBA, 0x9E, 0x0D, 0xB9, 0x5D, 0x8B, 0xEE, 0xB6, 0x84, 0x93, 0x45, 0x75,
|
|
||||||
0xFF, 0x31, 0xFE, 0x2F, 0x64, 0x3F, 0x3D, 0x6D, 0x07, 0xD9, 0x44, 0x9B, 0x40, 0x85, 0x59, 0x34,
|
|
||||||
0x4E, 0x10, 0xE1, 0xE7, 0x43, 0x69, 0xEF, 0x7C, 0x16, 0xFC, 0xB4, 0xED, 0x1B, 0x95, 0x28, 0xA8,
|
|
||||||
0x23, 0x76, 0x51, 0x31, 0x57, 0x30, 0x2B, 0x79, 0x08, 0x50, 0x10, 0x1C, 0x4A, 0x1A, 0x2C, 0xC8,
|
|
||||||
0x8B, 0x8F, 0x05, 0x2D, 0x22, 0x3D, 0xDB, 0x5A, 0x24, 0x7A, 0x0F, 0x13, 0x50, 0x37, 0x8F, 0x5A,
|
|
||||||
0xCC, 0x9E, 0x04, 0x44, 0x0E, 0x87, 0x01, 0xD4, 0xA3, 0x15, 0x94, 0x16, 0x34, 0xC6, 0xC2, 0xC3,
|
|
||||||
0xFB, 0x49, 0xFE, 0xE1, 0xF9, 0xDA, 0x8C, 0x50, 0x3C, 0xBE, 0x2C, 0xBB, 0x57, 0xED, 0x46, 0xB9,
|
|
||||||
0xAD, 0x8B, 0xC6, 0xDF, 0x0E, 0xD6, 0x0F, 0xBE, 0x80, 0xB3, 0x8B, 0x1E, 0x77, 0xCF, 0xAD, 0x22,
|
|
||||||
0xCF, 0xB7, 0x4B, 0xCF, 0xFB, 0xF0, 0x6B, 0x11, 0x45, 0x2D, 0x7A, 0x81, 0x18, 0xF2, 0x92, 0x7E,
|
|
||||||
0x98, 0x56, 0x5D, 0x5E, 0x69, 0x72, 0x0A, 0x0D, 0x03, 0x0A, 0x85, 0xA2, 0x85, 0x9C, 0xCB, 0xFB,
|
|
||||||
0x56, 0x6E, 0x8F, 0x44, 0xBB, 0x8F, 0x02, 0x22, 0x68, 0x63, 0x97, 0xBC, 0x85, 0xBA, 0xA8, 0xF7,
|
|
||||||
0xB5, 0x40, 0x68, 0x3C, 0x77, 0x86, 0x6F, 0x4B, 0xD7, 0x88, 0xCA, 0x8A, 0xD7, 0xCE, 0x36, 0xF0,
|
|
||||||
0x45, 0x6E, 0xD5, 0x64, 0x79, 0x0F, 0x17, 0xFC, 0x64, 0xDD, 0x10, 0x6F, 0xF3, 0xF5, 0xE0, 0xA6,
|
|
||||||
0xC3, 0xFB, 0x1B, 0x8C, 0x29, 0xEF, 0x8E, 0xE5, 0x34, 0xCB, 0xD1, 0x2A, 0xCE, 0x79, 0xC3, 0x9A,
|
|
||||||
0x0D, 0x36, 0xEA, 0x01, 0xE0, 0xAA, 0x91, 0x20, 0x54, 0xF0, 0x72, 0xD8, 0x1E, 0xC7, 0x89, 0xD2
|
|
||||||
};
|
|
||||||
|
|
||||||
int32_t CGlueMgr::m_acceptedEULA = 1; // TODO
|
int32_t CGlueMgr::m_acceptedEULA = 1; // TODO
|
||||||
int32_t CGlueMgr::m_acceptedTerminationWithoutNotice;
|
int32_t CGlueMgr::m_acceptedTerminationWithoutNotice;
|
||||||
int32_t CGlueMgr::m_acceptedTOS = 1; // TODO
|
int32_t CGlueMgr::m_acceptedTOS = 1; // TODO
|
||||||
@ -1005,51 +988,53 @@ void CGlueMgr::Resume() {
|
|||||||
|
|
||||||
DeleteInterfaceFiles();
|
DeleteInterfaceFiles();
|
||||||
|
|
||||||
MD5_CTX md5;
|
uint8_t digest1[16];
|
||||||
unsigned char digest1[16];
|
|
||||||
unsigned char digest2[16];
|
|
||||||
|
|
||||||
int32_t v8;
|
switch (FrameXML_CheckSignature("Interface\\GlueXML\\GlueXML.toc", nullptr, InterfaceKey, digest1)) {
|
||||||
unsigned char* v9;
|
case 0: {
|
||||||
unsigned char* v10;
|
|
||||||
|
|
||||||
MD5Init(&md5);
|
|
||||||
|
|
||||||
switch (FrameXML_CheckSignature("Interface\\GlueXML\\GlueXML.toc", 0, InterfaceKey, digest1)) {
|
|
||||||
case 0:
|
|
||||||
status.Add(STATUS_WARNING, "GlueXML missing signature");
|
status.Add(STATUS_WARNING, "GlueXML missing signature");
|
||||||
ClientPostClose(9);
|
ClientPostClose(9);
|
||||||
return;
|
|
||||||
|
|
||||||
case 1:
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 1: {
|
||||||
status.Add(STATUS_WARNING, "GlueXML has corrupt signature");
|
status.Add(STATUS_WARNING, "GlueXML has corrupt signature");
|
||||||
ClientPostClose(9);
|
ClientPostClose(9);
|
||||||
return;
|
|
||||||
|
|
||||||
case 2:
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: {
|
||||||
status.Add(STATUS_WARNING, "GlueXML is modified or corrupt");
|
status.Add(STATUS_WARNING, "GlueXML is modified or corrupt");
|
||||||
ClientPostClose(9);
|
ClientPostClose(9);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
case 3:
|
case 3: {
|
||||||
FrameXML_FreeHashNodes();
|
// Success
|
||||||
FrameXML_CreateFrames("Interface\\GlueXML\\GlueXML.toc", 0, &md5, &status);
|
|
||||||
|
|
||||||
MD5Final(digest2, &md5);
|
|
||||||
|
|
||||||
v8 = 16;
|
|
||||||
v9 = digest2;
|
|
||||||
v10 = digest1;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default: {
|
||||||
ClientPostClose(9);
|
ClientPostClose(9);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
MD5_CTX md5;
|
||||||
// - some kind of digest validation?
|
MD5Init(&md5);
|
||||||
|
|
||||||
|
FrameXML_FreeHashNodes();
|
||||||
|
|
||||||
|
FrameXML_CreateFrames("Interface\\GlueXML\\GlueXML.toc", nullptr, &md5, &status);
|
||||||
|
|
||||||
|
uint8_t digest2[16];
|
||||||
|
MD5Final(digest2, &md5);
|
||||||
|
|
||||||
|
// TODO digest validation
|
||||||
|
|
||||||
FrameScript_SignalEvent(22, nullptr);
|
FrameScript_SignalEvent(22, nullptr);
|
||||||
|
|
||||||
@ -1202,6 +1187,10 @@ void CGlueMgr::Suspend() {
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
SystemUnregisterFunctions();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
FrameXML_FreeHashNodes();
|
FrameXML_FreeHashNodes();
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@ -522,36 +522,6 @@ int32_t Script_IsScanDLLFinished(lua_State* L) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_IsWindowsClient(lua_State* L) {
|
|
||||||
#if defined(WHOA_SYSTEM_WIN)
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
#else
|
|
||||||
lua_pushnil(L);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t Script_IsMacClient(lua_State* L) {
|
|
||||||
#if defined(WHOA_SYSTEM_MAC)
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
#else
|
|
||||||
lua_pushnil(L);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t Script_IsLinuxClient(lua_State* L) {
|
|
||||||
#if defined(WHOA_SYSTEM_LINUX)
|
|
||||||
lua_pushnumber(L, 1.0);
|
|
||||||
#else
|
|
||||||
lua_pushnil(L);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t Script_SetRealmSplitState(lua_State* L) {
|
int32_t Script_SetRealmSplitState(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,4 +16,5 @@ target_include_directories(object
|
|||||||
target_link_libraries(object
|
target_link_libraries(object
|
||||||
PRIVATE
|
PRIVATE
|
||||||
db
|
db
|
||||||
|
ui
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#ifndef OBJECT_CLIENT_HPP
|
#ifndef OBJECT_CLIENT_HPP
|
||||||
#define OBJECT_CLIENT_HPP
|
#define OBJECT_CLIENT_HPP
|
||||||
|
|
||||||
|
#include "client/CGPlayer_C.hpp"
|
||||||
#include "client/ObjMgr.hpp"
|
#include "client/ObjMgr.hpp"
|
||||||
#include "object/Types.hpp"
|
#include "object/Types.hpp"
|
||||||
|
|
||||||
|
|||||||
@ -24,3 +24,7 @@ uint32_t CGContainer::TotalFields() {
|
|||||||
uint32_t CGContainer::TotalFieldsSaved() {
|
uint32_t CGContainer::TotalFieldsSaved() {
|
||||||
return CGContainer::GetBaseOffsetSaved() + 72;
|
return CGContainer::GetBaseOffsetSaved() + 72;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGContainerData* CGContainer::Container() const {
|
||||||
|
return this->m_cont;
|
||||||
|
}
|
||||||
|
|||||||
@ -20,9 +20,13 @@ class CGContainer {
|
|||||||
static uint32_t TotalFields();
|
static uint32_t TotalFields();
|
||||||
static uint32_t TotalFieldsSaved();
|
static uint32_t TotalFieldsSaved();
|
||||||
|
|
||||||
// Public member variables
|
protected:
|
||||||
|
// Protected member variables
|
||||||
CGContainerData* m_cont;
|
CGContainerData* m_cont;
|
||||||
uint32_t* m_contSaved;
|
uint32_t* m_contSaved;
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
CGContainerData* Container() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,3 +24,7 @@ uint32_t CGCorpse::TotalFields() {
|
|||||||
uint32_t CGCorpse::TotalFieldsSaved() {
|
uint32_t CGCorpse::TotalFieldsSaved() {
|
||||||
return CGCorpse::GetBaseOffsetSaved() + 3;
|
return CGCorpse::GetBaseOffsetSaved() + 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGCorpseData* CGCorpse::Corpse() const {
|
||||||
|
return this->m_corpse;
|
||||||
|
}
|
||||||
|
|||||||
@ -17,9 +17,13 @@ class CGCorpse {
|
|||||||
static uint32_t TotalFields();
|
static uint32_t TotalFields();
|
||||||
static uint32_t TotalFieldsSaved();
|
static uint32_t TotalFieldsSaved();
|
||||||
|
|
||||||
// Public member variables
|
protected:
|
||||||
|
// Protected member variables
|
||||||
CGCorpseData* m_corpse;
|
CGCorpseData* m_corpse;
|
||||||
uint32_t* m_corpseSaved;
|
uint32_t* m_corpseSaved;
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
CGCorpseData* Corpse() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,3 +24,7 @@ uint32_t CGDynamicObject::TotalFields() {
|
|||||||
uint32_t CGDynamicObject::TotalFieldsSaved() {
|
uint32_t CGDynamicObject::TotalFieldsSaved() {
|
||||||
return CGDynamicObject::GetBaseOffsetSaved() + 0;
|
return CGDynamicObject::GetBaseOffsetSaved() + 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGDynamicObjectData* CGDynamicObject::DynamicObject() const {
|
||||||
|
return this->m_dynamicObj;
|
||||||
|
}
|
||||||
|
|||||||
@ -17,9 +17,13 @@ class CGDynamicObject {
|
|||||||
static uint32_t TotalFields();
|
static uint32_t TotalFields();
|
||||||
static uint32_t TotalFieldsSaved();
|
static uint32_t TotalFieldsSaved();
|
||||||
|
|
||||||
// Public member variables
|
protected:
|
||||||
|
// Protected member variables
|
||||||
CGDynamicObjectData* m_dynamicObj;
|
CGDynamicObjectData* m_dynamicObj;
|
||||||
uint32_t* m_dynamicObjSaved;
|
uint32_t* m_dynamicObjSaved;
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
CGDynamicObjectData* DynamicObject() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,3 +24,7 @@ uint32_t CGGameObject::TotalFields() {
|
|||||||
uint32_t CGGameObject::TotalFieldsSaved() {
|
uint32_t CGGameObject::TotalFieldsSaved() {
|
||||||
return CGGameObject::GetBaseOffsetSaved() + 4;
|
return CGGameObject::GetBaseOffsetSaved() + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGGameObjectData* CGGameObject::GameObject() const {
|
||||||
|
return this->m_gameObj;
|
||||||
|
}
|
||||||
|
|||||||
@ -17,9 +17,13 @@ class CGGameObject {
|
|||||||
static uint32_t TotalFields();
|
static uint32_t TotalFields();
|
||||||
static uint32_t TotalFieldsSaved();
|
static uint32_t TotalFieldsSaved();
|
||||||
|
|
||||||
// Public member variables
|
protected:
|
||||||
|
// Protected member variables
|
||||||
CGGameObjectData* m_gameObj;
|
CGGameObjectData* m_gameObj;
|
||||||
uint32_t* m_gameObjSaved;
|
uint32_t* m_gameObjSaved;
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
CGGameObjectData* GameObject() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,3 +24,7 @@ uint32_t CGItem::TotalFields() {
|
|||||||
uint32_t CGItem::TotalFieldsSaved() {
|
uint32_t CGItem::TotalFieldsSaved() {
|
||||||
return CGItem::GetBaseOffsetSaved() + 47;
|
return CGItem::GetBaseOffsetSaved() + 47;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGItemData* CGItem::Item() const {
|
||||||
|
return this->m_item;
|
||||||
|
}
|
||||||
|
|||||||
@ -38,9 +38,13 @@ class CGItem {
|
|||||||
static uint32_t TotalFields();
|
static uint32_t TotalFields();
|
||||||
static uint32_t TotalFieldsSaved();
|
static uint32_t TotalFieldsSaved();
|
||||||
|
|
||||||
// Public member variables
|
protected:
|
||||||
|
// Protected member variables
|
||||||
CGItemData* m_item;
|
CGItemData* m_item;
|
||||||
uint32_t* m_itemSaved;
|
uint32_t* m_itemSaved;
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
CGItemData* Item() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -23,3 +23,27 @@ uint32_t CGObject::TotalFields() {
|
|||||||
uint32_t CGObject::TotalFieldsSaved() {
|
uint32_t CGObject::TotalFieldsSaved() {
|
||||||
return CGObject::GetBaseOffsetSaved() + 3;
|
return CGObject::GetBaseOffsetSaved() + 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WOWGUID CGObject::GetGUID() const {
|
||||||
|
return this->m_obj->m_guid;
|
||||||
|
}
|
||||||
|
|
||||||
|
OBJECT_TYPE CGObject::GetType() const {
|
||||||
|
return this->m_obj->m_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
OBJECT_TYPE_ID CGObject::GetTypeID() const {
|
||||||
|
return this->m_typeID;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGObject::IsA(OBJECT_TYPE type) const {
|
||||||
|
return (this->GetType() & type) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGObject::IsExactlyA(OBJECT_TYPE_ID typeID) const {
|
||||||
|
return this->m_typeID == typeID;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGObjectData* CGObject::Obj() const {
|
||||||
|
return this->m_obj;
|
||||||
|
}
|
||||||
|
|||||||
@ -25,10 +25,23 @@ class CGObject {
|
|||||||
|
|
||||||
// Public member variables
|
// Public member variables
|
||||||
uint32_t uint0; // TODO what is this?
|
uint32_t uint0; // TODO what is this?
|
||||||
|
uint32_t m_memHandle;
|
||||||
|
|
||||||
|
// Public member functions
|
||||||
|
WOWGUID GetGUID() const;
|
||||||
|
OBJECT_TYPE GetType() const;
|
||||||
|
OBJECT_TYPE_ID GetTypeID() const;
|
||||||
|
int32_t IsA(OBJECT_TYPE type) const;
|
||||||
|
int32_t IsExactlyA(OBJECT_TYPE_ID typeID) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Protected member variables
|
||||||
CGObjectData* m_obj;
|
CGObjectData* m_obj;
|
||||||
uint32_t* m_objSaved;
|
uint32_t* m_objSaved;
|
||||||
uint32_t m_memHandle;
|
|
||||||
OBJECT_TYPE_ID m_typeID;
|
OBJECT_TYPE_ID m_typeID;
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
CGObjectData* Obj() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -5,6 +5,10 @@
|
|||||||
CGObject_C::CGObject_C(uint32_t time, CClientObjCreate& objCreate) {
|
CGObject_C::CGObject_C(uint32_t time, CClientObjCreate& objCreate) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
this->m_model = nullptr;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
this->m_lockCount = 0;
|
this->m_lockCount = 0;
|
||||||
this->m_disabled = false;
|
this->m_disabled = false;
|
||||||
this->m_inReenable = false;
|
this->m_inReenable = false;
|
||||||
@ -27,6 +31,14 @@ void CGObject_C::AddWorldObject() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t CGObject_C::CanBeTargetted() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGObject_C::CanHighlight() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void CGObject_C::Disable() {
|
void CGObject_C::Disable() {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
|||||||
@ -8,12 +8,16 @@
|
|||||||
#include <storm/Hash.hpp>
|
#include <storm/Hash.hpp>
|
||||||
#include <storm/List.hpp>
|
#include <storm/List.hpp>
|
||||||
|
|
||||||
|
class CM2Model;
|
||||||
|
|
||||||
class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID> {
|
class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID> {
|
||||||
public:
|
public:
|
||||||
// Public member variables
|
// Public member variables
|
||||||
TSLink<CGObject_C> m_link;
|
TSLink<CGObject_C> m_link;
|
||||||
uint32_t m_disableTimeMs;
|
uint32_t m_disableTimeMs;
|
||||||
// TODO
|
// TODO
|
||||||
|
CM2Model* m_model;
|
||||||
|
// TODO
|
||||||
uint32_t m_lockCount : 16;
|
uint32_t m_lockCount : 16;
|
||||||
uint32_t m_disabled : 1;
|
uint32_t m_disabled : 1;
|
||||||
uint32_t m_inReenable : 1;
|
uint32_t m_inReenable : 1;
|
||||||
@ -29,6 +33,8 @@ class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID
|
|||||||
void PostReenable();
|
void PostReenable();
|
||||||
virtual void HandleOutOfRange(OUT_OF_RANGE_TYPE type) {};
|
virtual void HandleOutOfRange(OUT_OF_RANGE_TYPE type) {};
|
||||||
// TODO
|
// TODO
|
||||||
|
virtual int32_t CanHighlight();
|
||||||
|
virtual int32_t CanBeTargetted();
|
||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGObject_C() = default;
|
CGObject_C() = default;
|
||||||
|
|||||||
@ -40,3 +40,15 @@ uint32_t CGPlayer::TotalFieldsSaved() {
|
|||||||
uint32_t CGPlayer::TotalRemoteFieldsSaved() {
|
uint32_t CGPlayer::TotalRemoteFieldsSaved() {
|
||||||
return CGPlayer::GetBaseOffsetSaved() + 173;
|
return CGPlayer::GetBaseOffsetSaved() + 173;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t CGPlayer::GetNextLevelXP() const {
|
||||||
|
return this->Player()->nextLevelXP;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t CGPlayer::GetXP() const {
|
||||||
|
return this->Player()->xp;
|
||||||
|
}
|
||||||
|
|
||||||
|
CGPlayerData* CGPlayer::Player() const {
|
||||||
|
return this->m_player;
|
||||||
|
}
|
||||||
|
|||||||
@ -148,9 +148,17 @@ class CGPlayer {
|
|||||||
static uint32_t TotalFieldsSaved();
|
static uint32_t TotalFieldsSaved();
|
||||||
static uint32_t TotalRemoteFieldsSaved();
|
static uint32_t TotalRemoteFieldsSaved();
|
||||||
|
|
||||||
// Public member variables
|
// Public member functions
|
||||||
|
uint32_t GetNextLevelXP() const;
|
||||||
|
uint32_t GetXP() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Protected member variables
|
||||||
CGPlayerData* m_player;
|
CGPlayerData* m_player;
|
||||||
uint32_t* m_playerSaved;
|
uint32_t* m_playerSaved;
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
CGPlayerData* Player() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "object/client/CGPlayer_C.hpp"
|
#include "object/client/CGPlayer_C.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
|
#include "object/client/ObjMgr.hpp"
|
||||||
#include "object/Types.hpp"
|
#include "object/Types.hpp"
|
||||||
#include <storm/Error.hpp>
|
#include <storm/Error.hpp>
|
||||||
|
|
||||||
@ -11,6 +12,22 @@ CGPlayer_C::~CGPlayer_C() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t CGPlayer_C::GetActiveNextLevelXP() const {
|
||||||
|
if (this->GetGUID() != ClntObjMgrGetActivePlayer()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this->GetNextLevelXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t CGPlayer_C::GetActiveXP() const {
|
||||||
|
if (this->GetGUID() != ClntObjMgrGetActivePlayer()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this->GetXP();
|
||||||
|
}
|
||||||
|
|
||||||
void CGPlayer_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
void CGPlayer_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,8 @@ class CGPlayer_C : public CGUnit_C, public CGPlayer {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGPlayer_C(uint32_t time, CClientObjCreate& objCreate);
|
CGPlayer_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
|
uint32_t GetActiveNextLevelXP() const;
|
||||||
|
uint32_t GetActiveXP() const;
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
||||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -24,3 +24,7 @@ uint32_t CGUnit::TotalFields() {
|
|||||||
uint32_t CGUnit::TotalFieldsSaved() {
|
uint32_t CGUnit::TotalFieldsSaved() {
|
||||||
return CGUnit::GetBaseOffsetSaved() + 123;
|
return CGUnit::GetBaseOffsetSaved() + 123;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGUnitData* CGUnit::Unit() const {
|
||||||
|
return this->m_unit;
|
||||||
|
}
|
||||||
|
|||||||
@ -82,9 +82,13 @@ class CGUnit {
|
|||||||
static uint32_t TotalFields();
|
static uint32_t TotalFields();
|
||||||
static uint32_t TotalFieldsSaved();
|
static uint32_t TotalFieldsSaved();
|
||||||
|
|
||||||
// Public member variables
|
protected:
|
||||||
|
// Protected member variables
|
||||||
CGUnitData* m_unit;
|
CGUnitData* m_unit;
|
||||||
uint32_t* m_unitSaved;
|
uint32_t* m_unitSaved;
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
CGUnitData* Unit() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "object/client/CGUnit_C.hpp"
|
#include "object/client/CGUnit_C.hpp"
|
||||||
|
#include "object/client/ObjMgr.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
|
#include "ui/Game.hpp"
|
||||||
|
|
||||||
WOWGUID CGUnit_C::s_activeMover;
|
WOWGUID CGUnit_C::s_activeMover;
|
||||||
|
|
||||||
@ -99,6 +101,20 @@ CGUnit_C::~CGUnit_C() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t CGUnit_C::CanHighlight() {
|
||||||
|
if (this->m_unit->flags & 0x2000000) {
|
||||||
|
if (this->m_unit->createdBy != ClntObjMgrGetActivePlayer() || this->GetGUID() != CGPetInfo::GetPet(0)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGUnit_C::CanBeTargetted() {
|
||||||
|
return this->CanHighlight();
|
||||||
|
}
|
||||||
|
|
||||||
void CGUnit_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
void CGUnit_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,10 @@ class CGUnit_C : public CGObject_C, public CGUnit {
|
|||||||
|
|
||||||
// Virtual public member functions
|
// Virtual public member functions
|
||||||
virtual ~CGUnit_C();
|
virtual ~CGUnit_C();
|
||||||
|
// TODO
|
||||||
|
virtual int32_t CanHighlight();
|
||||||
|
virtual int32_t CanBeTargetted();
|
||||||
|
// TODO
|
||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGUnit_C(uint32_t time, CClientObjCreate& objCreate);
|
CGUnit_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
|
|||||||
@ -61,7 +61,7 @@ int32_t PostInitObject(CDataStore* msg, uint32_t time, bool a3) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object->m_inReenable && object->m_obj->m_type & TYPE_UNIT) {
|
if (object->m_inReenable && object->GetType() & TYPE_UNIT) {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ void PostMovementUpdate(CDataStore* msg) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unit->PostMovementUpdate(move, unit->m_obj->m_guid == CGUnit_C::s_activeMover);
|
unit->PostMovementUpdate(move, unit->GetGUID() == CGUnit_C::s_activeMover);
|
||||||
|
|
||||||
if (reenable) {
|
if (reenable) {
|
||||||
unit->Reenable();
|
unit->Reenable();
|
||||||
@ -201,7 +201,7 @@ int32_t UpdateObject(CDataStore* msg) {
|
|||||||
auto object = GetUpdateObject(guid, &reenable);
|
auto object = GetUpdateObject(guid, &reenable);
|
||||||
|
|
||||||
if (object) {
|
if (object) {
|
||||||
if (!FillInPartialObjectData(object, object->m_obj->m_guid, msg, false, false)) {
|
if (!FillInPartialObjectData(object, object->GetGUID(), msg, false, false)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ int32_t CreateObject(CDataStore* msg, uint32_t time) {
|
|||||||
if (existingObject) {
|
if (existingObject) {
|
||||||
CClientObjCreate::Skip(msg);
|
CClientObjCreate::Skip(msg);
|
||||||
|
|
||||||
if (!FillInPartialObjectData(existingObject, existingObject->m_obj->m_guid, msg, false, true)) {
|
if (!FillInPartialObjectData(existingObject, existingObject->GetGUID(), msg, false, true)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,7 @@ uint32_t GetNumDwordBlocks(OBJECT_TYPE type, WOWGUID guid) {
|
|||||||
* to indicate the end of the hierarchy.
|
* to indicate the end of the hierarchy.
|
||||||
*/
|
*/
|
||||||
OBJECT_TYPE_ID IncTypeID(CGObject_C* object, OBJECT_TYPE_ID curTypeID) {
|
OBJECT_TYPE_ID IncTypeID(CGObject_C* object, OBJECT_TYPE_ID curTypeID) {
|
||||||
switch (object->m_obj->m_type) {
|
switch (object->GetType()) {
|
||||||
// ID_OBJECT -> ID_ITEM -> ID_CONTAINER
|
// ID_OBJECT -> ID_ITEM -> ID_CONTAINER
|
||||||
case HIER_TYPE_ITEM:
|
case HIER_TYPE_ITEM:
|
||||||
case HIER_TYPE_CONTAINER:
|
case HIER_TYPE_CONTAINER:
|
||||||
@ -173,7 +173,7 @@ int32_t CallMirrorHandlers(CDataStore* msg, bool a2, WOWGUID guid) {
|
|||||||
|
|
||||||
OBJECT_TYPE_ID typeID = ID_OBJECT;
|
OBJECT_TYPE_ID typeID = ID_OBJECT;
|
||||||
uint32_t blockOffset = 0;
|
uint32_t blockOffset = 0;
|
||||||
uint32_t numBlocks = GetNumDwordBlocks(object->m_obj->m_type, guid);
|
uint32_t numBlocks = GetNumDwordBlocks(object->GetType(), guid);
|
||||||
|
|
||||||
for (int32_t block = 0; block < numBlocks; block++) {
|
for (int32_t block = 0; block < numBlocks; block++) {
|
||||||
if (block >= s_objMirrorBlocks[typeID]) {
|
if (block >= s_objMirrorBlocks[typeID]) {
|
||||||
@ -203,7 +203,7 @@ int32_t FillInPartialObjectData(CGObject_C* object, WOWGUID guid, CDataStore* ms
|
|||||||
|
|
||||||
OBJECT_TYPE_ID typeID = ID_OBJECT;
|
OBJECT_TYPE_ID typeID = ID_OBJECT;
|
||||||
uint32_t blockOffset = 0;
|
uint32_t blockOffset = 0;
|
||||||
uint32_t numBlocks = GetNumDwordBlocks(object->m_obj->m_type, guid);
|
uint32_t numBlocks = GetNumDwordBlocks(object->GetType(), guid);
|
||||||
|
|
||||||
for (int32_t block = 0; block < numBlocks; block++) {
|
for (int32_t block = 0; block < numBlocks; block++) {
|
||||||
if (block >= s_objMirrorBlocks[typeID]) {
|
if (block >= s_objMirrorBlocks[typeID]) {
|
||||||
|
|||||||
@ -93,9 +93,9 @@ CGObject_C* ClntObjMgrAllocObject(OBJECT_TYPE_ID typeID, WOWGUID guid) {
|
|||||||
|
|
||||||
void ClntObjMgrFreeObject(CGObject_C* object) {
|
void ClntObjMgrFreeObject(CGObject_C* object) {
|
||||||
auto playerGUID = ClntObjMgrGetActivePlayer();
|
auto playerGUID = ClntObjMgrGetActivePlayer();
|
||||||
auto isActivePlayer = object->m_obj->m_guid == playerGUID;
|
auto isActivePlayer = object->GetGUID() == playerGUID;
|
||||||
|
|
||||||
switch (object->m_obj->m_type) {
|
switch (object->GetType()) {
|
||||||
case TYPE_OBJECT:
|
case TYPE_OBJECT:
|
||||||
case HIER_TYPE_ITEM:
|
case HIER_TYPE_ITEM:
|
||||||
case HIER_TYPE_CONTAINER:
|
case HIER_TYPE_CONTAINER:
|
||||||
@ -117,7 +117,7 @@ void ClntObjMgrFreeObject(CGObject_C* object) {
|
|||||||
if (isActivePlayer) {
|
if (isActivePlayer) {
|
||||||
STORM_FREE(object);
|
STORM_FREE(object);
|
||||||
} else {
|
} else {
|
||||||
ObjectFree(s_objHeapId[object->m_typeID], object->m_memHandle);
|
ObjectFree(s_objHeapId[object->GetTypeID()], object->m_memHandle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,8 +171,8 @@ void ClntObjMgrInitializeStd(uint32_t mapID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ClntObjMgrLinkInNewObject(CGObject_C* object) {
|
void ClntObjMgrLinkInNewObject(CGObject_C* object) {
|
||||||
CHashKeyGUID key(object->m_obj->m_guid);
|
CHashKeyGUID key(object->GetGUID());
|
||||||
s_curMgr->m_objects.Insert(object, object->m_obj->m_guid, key);
|
s_curMgr->m_objects.Insert(object, object->GetGUID(), key);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGObject_C* ClntObjMgrObjectPtr(WOWGUID guid, OBJECT_TYPE type, const char* fileName, int32_t lineNumber) {
|
CGObject_C* ClntObjMgrObjectPtr(WOWGUID guid, OBJECT_TYPE type, const char* fileName, int32_t lineNumber) {
|
||||||
@ -186,7 +186,7 @@ CGObject_C* ClntObjMgrObjectPtr(WOWGUID guid, OBJECT_TYPE type, const char* file
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(object->m_obj->m_type & type)) {
|
if (!(object->GetType() & type)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -107,11 +107,11 @@ void HandleObjectOutOfRangePass2(CGObject_C* object) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClntObjMgrGetCurrent()->m_lazyCleanupObjects.Insert(object, object->m_hashval, CHashKeyGUID(object->m_key));
|
ClntObjMgrGetCurrent()->m_lazyCleanupObjects.Insert(object, object->m_hashval, CHashKeyGUID(object->m_key));
|
||||||
ClntObjMgrGetCurrent()->m_lazyCleanupFifo[object->m_typeID - 1].LinkToTail(object);
|
ClntObjMgrGetCurrent()->m_lazyCleanupFifo[object->GetTypeID() - 1].LinkToTail(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitObject(CGObject_C* object, uint32_t time, CClientObjCreate& objCreate) {
|
void InitObject(CGObject_C* object, uint32_t time, CClientObjCreate& objCreate) {
|
||||||
switch (object->m_typeID) {
|
switch (object->GetTypeID()) {
|
||||||
case ID_ITEM: {
|
case ID_ITEM: {
|
||||||
new (object) CGItem_C(time, objCreate);
|
new (object) CGItem_C(time, objCreate);
|
||||||
|
|
||||||
|
|||||||
@ -332,6 +332,10 @@ void CLayoutFrame::GetFirstPointY(const FRAMEPOINT* const pointarray, int32_t el
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float CLayoutFrame::GetHeight() {
|
||||||
|
return this->m_height;
|
||||||
|
}
|
||||||
|
|
||||||
CLayoutFrame* CLayoutFrame::GetLayoutFrameByName(const char* name) {
|
CLayoutFrame* CLayoutFrame::GetLayoutFrameByName(const char* name) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@ -353,8 +357,20 @@ int32_t CLayoutFrame::GetRect(CRect* rect) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
float CLayoutFrame::GetHeight() {
|
void CLayoutFrame::GetSize(float& width, float& height, int32_t a4) {
|
||||||
return this->m_height;
|
width = this->GetWidth();
|
||||||
|
height = this->GetHeight();
|
||||||
|
|
||||||
|
if (!a4 && (width == 0.0f || height == 0.0f)) {
|
||||||
|
if (this->m_flags & FLAG_RESIZE_PENDING) {
|
||||||
|
this->Resize(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this->m_flags & 0x1) {
|
||||||
|
width = (this->m_rect.maxX - this->m_rect.minX) / this->m_layoutScale;
|
||||||
|
height = (this->m_rect.maxY - this->m_rect.minY) / this->m_layoutScale;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float CLayoutFrame::GetWidth() {
|
float CLayoutFrame::GetWidth() {
|
||||||
|
|||||||
@ -51,6 +51,7 @@ class CLayoutFrame {
|
|||||||
virtual void SetHeight(float height);
|
virtual void SetHeight(float height);
|
||||||
virtual float GetWidth();
|
virtual float GetWidth();
|
||||||
virtual float GetHeight();
|
virtual float GetHeight();
|
||||||
|
virtual void GetSize(float& width, float& height, int32_t a4);
|
||||||
virtual void GetClampRectInsets(float& a1, float& a2, float& a3, float& a4);
|
virtual void GetClampRectInsets(float& a1, float& a2, float& a3, float& a4);
|
||||||
virtual int32_t IsAttachmentOrigin();
|
virtual int32_t IsAttachmentOrigin();
|
||||||
virtual CLayoutFrame* GetLayoutFrameByName(const char* name);
|
virtual CLayoutFrame* GetLayoutFrameByName(const char* name);
|
||||||
|
|||||||
@ -1047,6 +1047,15 @@ const char* FrameScript_Sprintf(lua_State* L, int32_t idx, char buffer[], uint32
|
|||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrameScript_UnregisterFunction(const char* name) {
|
||||||
|
auto L = FrameScript::s_context;
|
||||||
|
|
||||||
|
lua_pushnil(L);
|
||||||
|
lua_pushstring(L, name);
|
||||||
|
lua_insert(L, -2);
|
||||||
|
lua_rawset(L, LUA_GLOBALSINDEX);
|
||||||
|
}
|
||||||
|
|
||||||
void FrameScript_UnregisterScriptEvent(FrameScript_Object* object, FrameScript_EventObject* event) {
|
void FrameScript_UnregisterScriptEvent(FrameScript_Object* object, FrameScript_EventObject* event) {
|
||||||
if (event->pendingSignalCount) {
|
if (event->pendingSignalCount) {
|
||||||
auto node = event->unregisterListeners.Head();
|
auto node = event->unregisterListeners.Head();
|
||||||
|
|||||||
@ -99,6 +99,8 @@ void FrameScript_SignalEvent(uint32_t index, const char* format, ...);
|
|||||||
|
|
||||||
const char* FrameScript_Sprintf(lua_State* L, int32_t idx, char buffer[], uint32_t bufferLen);
|
const char* FrameScript_Sprintf(lua_State* L, int32_t idx, char buffer[], uint32_t bufferLen);
|
||||||
|
|
||||||
|
void FrameScript_UnregisterFunction(const char* name);
|
||||||
|
|
||||||
void FrameScript_UnregisterScriptEvent(FrameScript_Object* object, FrameScript_EventObject* event);
|
void FrameScript_UnregisterScriptEvent(FrameScript_Object* object, FrameScript_EventObject* event);
|
||||||
|
|
||||||
void ScriptEventsInitialize();
|
void ScriptEventsInitialize();
|
||||||
|
|||||||
@ -5,6 +5,12 @@
|
|||||||
|
|
||||||
int32_t FrameScript_Object::s_objectTypes = 0;
|
int32_t FrameScript_Object::s_objectTypes = 0;
|
||||||
|
|
||||||
|
FrameScript_Object::ScriptIx::~ScriptIx() {
|
||||||
|
if (this->luaRef) {
|
||||||
|
luaL_unref(FrameScript_GetContext(), LUA_REGISTRYINDEX, this->luaRef);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int32_t FrameScript_Object::CreateScriptMetaTable(lua_State* L, void (*a2)(lua_State* L)) {
|
int32_t FrameScript_Object::CreateScriptMetaTable(lua_State* L, void (*a2)(lua_State* L)) {
|
||||||
lua_createtable(L, 0, 0);
|
lua_createtable(L, 0, 0);
|
||||||
lua_pushstring(L, "__index");
|
lua_pushstring(L, "__index");
|
||||||
@ -24,17 +30,38 @@ void FrameScript_Object::FillScriptMethodTable(lua_State *L, FrameScript_Method
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameScript_Object::~FrameScript_Object() {
|
|
||||||
if (this->m_onEvent.luaRef) {
|
|
||||||
luaL_unref(FrameScript_GetContext(), LUA_REGISTRYINDEX, this->m_onEvent.luaRef);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* FrameScript_Object::GetDisplayName() {
|
const char* FrameScript_Object::GetDisplayName() {
|
||||||
const char* name = this->GetName();
|
const char* name = this->GetName();
|
||||||
return name ? name : "<unnamed>";
|
return name ? name : "<unnamed>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t FrameScript_Object::GetScript(lua_State* L) {
|
||||||
|
if (!lua_isstring(L, 2)) {
|
||||||
|
luaL_error(L, "Usage: %s:GetScript(\"type\")", this->GetDisplayName());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto name = lua_tostring(L, 2);
|
||||||
|
ScriptData data;
|
||||||
|
|
||||||
|
auto script = this->GetScriptByName(name, data);
|
||||||
|
|
||||||
|
if (!script) {
|
||||||
|
luaL_error(L, "%s doesn't have a \"%s\" script", this->GetDisplayName(), lua_tostring(L, 2));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO taint management
|
||||||
|
|
||||||
|
if (script->luaRef > 0) {
|
||||||
|
lua_rawgeti(L, LUA_REGISTRYINDEX, script->luaRef);
|
||||||
|
} else {
|
||||||
|
lua_pushnil(L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
FrameScript_Object::ScriptIx* FrameScript_Object::GetScriptByName(const char* name, FrameScript_Object::ScriptData& data) {
|
FrameScript_Object::ScriptIx* FrameScript_Object::GetScriptByName(const char* name, FrameScript_Object::ScriptData& data) {
|
||||||
if (!SStrCmpI(name, "OnEvent", STORM_MAX_STR)) {
|
if (!SStrCmpI(name, "OnEvent", STORM_MAX_STR)) {
|
||||||
data.wrapper = "return function(self,event,...) %s end";
|
data.wrapper = "return function(self,event,...) %s end";
|
||||||
|
|||||||
@ -14,6 +14,7 @@ class FrameScript_Object {
|
|||||||
struct ScriptIx {
|
struct ScriptIx {
|
||||||
int32_t luaRef = 0;
|
int32_t luaRef = 0;
|
||||||
const char* unk = nullptr;
|
const char* unk = nullptr;
|
||||||
|
~ScriptIx();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScriptFunction {
|
class ScriptFunction {
|
||||||
@ -34,7 +35,7 @@ class FrameScript_Object {
|
|||||||
ScriptIx m_onEvent;
|
ScriptIx m_onEvent;
|
||||||
|
|
||||||
// Virtual member functions
|
// Virtual member functions
|
||||||
virtual ~FrameScript_Object();
|
virtual ~FrameScript_Object() = default;
|
||||||
virtual char* GetName() = 0;
|
virtual char* GetName() = 0;
|
||||||
virtual int32_t GetScriptMetaTable() = 0;
|
virtual int32_t GetScriptMetaTable() = 0;
|
||||||
virtual ScriptIx* GetScriptByName(const char* name, ScriptData& data);
|
virtual ScriptIx* GetScriptByName(const char* name, ScriptData& data);
|
||||||
@ -42,6 +43,7 @@ class FrameScript_Object {
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
const char* GetDisplayName();
|
const char* GetDisplayName();
|
||||||
|
int32_t GetScript(lua_State* L);
|
||||||
int32_t RegisterScriptEvent(const char* name);
|
int32_t RegisterScriptEvent(const char* name);
|
||||||
void RegisterScriptObject(const char* name);
|
void RegisterScriptObject(const char* name);
|
||||||
void RunScript(ScriptIx const& script, int32_t argCount, const char* a4);
|
void RunScript(ScriptIx const& script, int32_t argCount, const char* a4);
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
#include "ui/simple/CSimpleModel.hpp"
|
#include "ui/simple/CSimpleModel.hpp"
|
||||||
#include "ui/simple/CSimpleScrollFrame.hpp"
|
#include "ui/simple/CSimpleScrollFrame.hpp"
|
||||||
#include "ui/simple/CSimpleSlider.hpp"
|
#include "ui/simple/CSimpleSlider.hpp"
|
||||||
|
#include "ui/simple/CSimpleStatusBar.hpp"
|
||||||
#include "util/CStatus.hpp"
|
#include "util/CStatus.hpp"
|
||||||
#include "util/SFile.hpp"
|
#include "util/SFile.hpp"
|
||||||
#include <common/XML.hpp>
|
#include <common/XML.hpp>
|
||||||
@ -96,9 +97,9 @@ CSimpleFrame* Create_SimpleHTML(CSimpleFrame* parent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CSimpleFrame* Create_SimpleStatusBar(CSimpleFrame* parent) {
|
CSimpleFrame* Create_SimpleStatusBar(CSimpleFrame* parent) {
|
||||||
// TODO
|
// TODO CDataAllocator
|
||||||
|
|
||||||
return nullptr;
|
return STORM_NEW(CSimpleStatusBar(parent));
|
||||||
}
|
}
|
||||||
|
|
||||||
CSimpleFrame* Create_SimpleColorSelect(CSimpleFrame* parent) {
|
CSimpleFrame* Create_SimpleColorSelect(CSimpleFrame* parent) {
|
||||||
@ -541,19 +542,19 @@ int32_t FrameXML_RegisterFactory(const char* type, CSimpleFrame* (*factory)(CSim
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FrameXML_RegisterDefault() {
|
void FrameXML_RegisterDefault() {
|
||||||
FrameXML_RegisterFactory("Button", &Create_SimpleButton, 0);
|
FrameXML_RegisterFactory("Button", &Create_SimpleButton, false);
|
||||||
FrameXML_RegisterFactory("CheckButton", &Create_SimpleCheckButton, 0);
|
FrameXML_RegisterFactory("CheckButton", &Create_SimpleCheckButton, false);
|
||||||
FrameXML_RegisterFactory("EditBox", &Create_SimpleEditBox, 0);
|
FrameXML_RegisterFactory("EditBox", &Create_SimpleEditBox, false);
|
||||||
FrameXML_RegisterFactory("Frame", &Create_SimpleFrame, 0);
|
FrameXML_RegisterFactory("Frame", &Create_SimpleFrame, false);
|
||||||
FrameXML_RegisterFactory("MessageFrame", &Create_SimpleMessageFrame, 0);
|
FrameXML_RegisterFactory("MessageFrame", &Create_SimpleMessageFrame, false);
|
||||||
FrameXML_RegisterFactory("Model", &Create_SimpleModel, 0);
|
FrameXML_RegisterFactory("Model", &Create_SimpleModel, false);
|
||||||
FrameXML_RegisterFactory("ScrollFrame", &Create_SimpleScrollFrame, 0);
|
FrameXML_RegisterFactory("ScrollFrame", &Create_SimpleScrollFrame, false);
|
||||||
FrameXML_RegisterFactory("ScrollingMessageFrame", &Create_SimpleScrollingMessageFrame, 0);
|
FrameXML_RegisterFactory("ScrollingMessageFrame", &Create_SimpleScrollingMessageFrame, false);
|
||||||
FrameXML_RegisterFactory("Slider", &Create_SimpleSlider, 0);
|
FrameXML_RegisterFactory("Slider", &Create_SimpleSlider, false);
|
||||||
FrameXML_RegisterFactory("SimpleHTML", &Create_SimpleHTML, 0);
|
FrameXML_RegisterFactory("SimpleHTML", &Create_SimpleHTML, false);
|
||||||
FrameXML_RegisterFactory("StatusBar", &Create_SimpleStatusBar, 0);
|
FrameXML_RegisterFactory("StatusBar", &Create_SimpleStatusBar, false);
|
||||||
FrameXML_RegisterFactory("ColorSelect", &Create_SimpleColorSelect, 0);
|
FrameXML_RegisterFactory("ColorSelect", &Create_SimpleColorSelect, false);
|
||||||
FrameXML_RegisterFactory("MovieFrame", &Create_SimpleMovieFrame, 0);
|
FrameXML_RegisterFactory("MovieFrame", &Create_SimpleMovieFrame, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameXML_ReleaseHashNode(const char* name) {
|
void FrameXML_ReleaseHashNode(const char* name) {
|
||||||
|
|||||||
7
src/ui/Game.hpp
Normal file
7
src/ui/Game.hpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef UI_GAME_HPP
|
||||||
|
#define UI_GAME_HPP
|
||||||
|
|
||||||
|
#include "ui/game/CGGameUI.hpp"
|
||||||
|
#include "ui/game/CGPetInfo.hpp"
|
||||||
|
|
||||||
|
#endif
|
||||||
20
src/ui/Key.cpp
Normal file
20
src/ui/Key.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#include "ui/Key.hpp"
|
||||||
|
|
||||||
|
uint8_t InterfaceKey[256] = {
|
||||||
|
0xC3, 0x5B, 0x50, 0x84, 0xB9, 0x3E, 0x32, 0x42, 0x8C, 0xD0, 0xC7, 0x48, 0xFA, 0x0E, 0x5D, 0x54,
|
||||||
|
0x5A, 0xA3, 0x0E, 0x14, 0xBA, 0x9E, 0x0D, 0xB9, 0x5D, 0x8B, 0xEE, 0xB6, 0x84, 0x93, 0x45, 0x75,
|
||||||
|
0xFF, 0x31, 0xFE, 0x2F, 0x64, 0x3F, 0x3D, 0x6D, 0x07, 0xD9, 0x44, 0x9B, 0x40, 0x85, 0x59, 0x34,
|
||||||
|
0x4E, 0x10, 0xE1, 0xE7, 0x43, 0x69, 0xEF, 0x7C, 0x16, 0xFC, 0xB4, 0xED, 0x1B, 0x95, 0x28, 0xA8,
|
||||||
|
0x23, 0x76, 0x51, 0x31, 0x57, 0x30, 0x2B, 0x79, 0x08, 0x50, 0x10, 0x1C, 0x4A, 0x1A, 0x2C, 0xC8,
|
||||||
|
0x8B, 0x8F, 0x05, 0x2D, 0x22, 0x3D, 0xDB, 0x5A, 0x24, 0x7A, 0x0F, 0x13, 0x50, 0x37, 0x8F, 0x5A,
|
||||||
|
0xCC, 0x9E, 0x04, 0x44, 0x0E, 0x87, 0x01, 0xD4, 0xA3, 0x15, 0x94, 0x16, 0x34, 0xC6, 0xC2, 0xC3,
|
||||||
|
0xFB, 0x49, 0xFE, 0xE1, 0xF9, 0xDA, 0x8C, 0x50, 0x3C, 0xBE, 0x2C, 0xBB, 0x57, 0xED, 0x46, 0xB9,
|
||||||
|
0xAD, 0x8B, 0xC6, 0xDF, 0x0E, 0xD6, 0x0F, 0xBE, 0x80, 0xB3, 0x8B, 0x1E, 0x77, 0xCF, 0xAD, 0x22,
|
||||||
|
0xCF, 0xB7, 0x4B, 0xCF, 0xFB, 0xF0, 0x6B, 0x11, 0x45, 0x2D, 0x7A, 0x81, 0x18, 0xF2, 0x92, 0x7E,
|
||||||
|
0x98, 0x56, 0x5D, 0x5E, 0x69, 0x72, 0x0A, 0x0D, 0x03, 0x0A, 0x85, 0xA2, 0x85, 0x9C, 0xCB, 0xFB,
|
||||||
|
0x56, 0x6E, 0x8F, 0x44, 0xBB, 0x8F, 0x02, 0x22, 0x68, 0x63, 0x97, 0xBC, 0x85, 0xBA, 0xA8, 0xF7,
|
||||||
|
0xB5, 0x40, 0x68, 0x3C, 0x77, 0x86, 0x6F, 0x4B, 0xD7, 0x88, 0xCA, 0x8A, 0xD7, 0xCE, 0x36, 0xF0,
|
||||||
|
0x45, 0x6E, 0xD5, 0x64, 0x79, 0x0F, 0x17, 0xFC, 0x64, 0xDD, 0x10, 0x6F, 0xF3, 0xF5, 0xE0, 0xA6,
|
||||||
|
0xC3, 0xFB, 0x1B, 0x8C, 0x29, 0xEF, 0x8E, 0xE5, 0x34, 0xCB, 0xD1, 0x2A, 0xCE, 0x79, 0xC3, 0x9A,
|
||||||
|
0x0D, 0x36, 0xEA, 0x01, 0xE0, 0xAA, 0x91, 0x20, 0x54, 0xF0, 0x72, 0xD8, 0x1E, 0xC7, 0x89, 0xD2
|
||||||
|
};
|
||||||
8
src/ui/Key.hpp
Normal file
8
src/ui/Key.hpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef UI_KEY_HPP
|
||||||
|
#define UI_KEY_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
extern uint8_t InterfaceKey[256];
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -1,65 +0,0 @@
|
|||||||
#include "ui/ScriptFunctions.hpp"
|
|
||||||
#include "ui/FrameScript.hpp"
|
|
||||||
#include "ui/simple/CSimpleButton.hpp"
|
|
||||||
#include "ui/simple/CSimpleCheckbox.hpp"
|
|
||||||
#include "ui/simple/CSimpleEditBox.hpp"
|
|
||||||
#include "ui/simple/CSimpleFont.hpp"
|
|
||||||
#include "ui/simple/CSimpleFontString.hpp"
|
|
||||||
#include "ui/simple/CSimpleFrame.hpp"
|
|
||||||
#include "ui/simple/CSimpleHTML.hpp"
|
|
||||||
#include "ui/simple/CSimpleModel.hpp"
|
|
||||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
|
||||||
#include "ui/simple/CSimpleScrollFrame.hpp"
|
|
||||||
#include "ui/simple/CSimpleSlider.hpp"
|
|
||||||
#include "ui/simple/CSimpleTexture.hpp"
|
|
||||||
|
|
||||||
void RegisterSimpleFrameScriptMethods() {
|
|
||||||
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME; ++i) {
|
|
||||||
FrameScript_RegisterFunction(
|
|
||||||
FrameScript::s_ScriptFunctions_SimpleFrame[i].name,
|
|
||||||
FrameScript::s_ScriptFunctions_SimpleFrame[i].method
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// CSimpleAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleTranslationAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleRotationAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleScaleAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleControlPoint::CreateScriptMetaTable();
|
|
||||||
// CSimplePathAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleAlphaAnim::CreateScriptMetaTable();
|
|
||||||
// CSimpleAnimGroup::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
CSimpleFont::CreateScriptMetaTable();
|
|
||||||
CSimpleTexture::CreateScriptMetaTable();
|
|
||||||
CSimpleFontString::CreateScriptMetaTable();
|
|
||||||
CSimpleFrame::CreateScriptMetaTable();
|
|
||||||
CSimpleButton::CreateScriptMetaTable();
|
|
||||||
CSimpleCheckbox::CreateScriptMetaTable();
|
|
||||||
CSimpleEditBox::CreateScriptMetaTable();
|
|
||||||
CSimpleHTML::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// CSimpleMessageFrame::CreateScriptMetaTable();
|
|
||||||
// CSimpleMessageScrollFrame::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
CSimpleModel::CreateScriptMetaTable();
|
|
||||||
CSimpleModelFFX::CreateScriptMetaTable();
|
|
||||||
CSimpleScrollFrame::CreateScriptMetaTable();
|
|
||||||
CSimpleSlider::CreateScriptMetaTable();
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
// CSimpleStatusBar::CreateScriptMetaTable();
|
|
||||||
// CSimpleColorSelect::CreateScriptMetaTable();
|
|
||||||
// CSimpleMovieFrame::CreateScriptMetaTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SystemRegisterFunctions() {
|
|
||||||
for (int32_t i = 0; i < NUM_SCRIPT_FUNCTIONS_SYSTEM; ++i) {
|
|
||||||
FrameScript_RegisterFunction(
|
|
||||||
FrameScript::s_ScriptFunctions_System[i].name,
|
|
||||||
FrameScript::s_ScriptFunctions_System[i].method
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
#ifndef UI_SCRIPT_FUNCTIONS_HPP
|
|
||||||
#define UI_SCRIPT_FUNCTIONS_HPP
|
|
||||||
|
|
||||||
#include "ui/Types.hpp"
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
struct lua_State;
|
|
||||||
|
|
||||||
#define NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME 7
|
|
||||||
#define NUM_SCRIPT_FUNCTIONS_SYSTEM 7
|
|
||||||
|
|
||||||
namespace FrameScript {
|
|
||||||
extern FrameScript_Method s_ScriptFunctions_SimpleFrame[NUM_SCRIPT_FUNCTIONS_SIMPLE_FRAME];
|
|
||||||
extern FrameScript_Method s_ScriptFunctions_System[NUM_SCRIPT_FUNCTIONS_SYSTEM];
|
|
||||||
}
|
|
||||||
|
|
||||||
void RegisterSimpleFrameScriptMethods();
|
|
||||||
|
|
||||||
void SystemRegisterFunctions();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#include "ui/ScriptFunctions.hpp"
|
#include "ui/ScriptFunctionsShared.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -6,3 +6,33 @@
|
|||||||
int32_t Script_GetAccountExpansionLevel(lua_State* L) {
|
int32_t Script_GetAccountExpansionLevel(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
WHOA_UNIMPLEMENTED(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsLinuxClient(lua_State* L) {
|
||||||
|
#if defined(WHOA_SYSTEM_LINUX)
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
#else
|
||||||
|
lua_pushnil(L);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsMacClient(lua_State* L) {
|
||||||
|
#if defined(WHOA_SYSTEM_MAC)
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
#else
|
||||||
|
lua_pushnil(L);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsWindowsClient(lua_State* L) {
|
||||||
|
#if defined(WHOA_SYSTEM_WIN)
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
#else
|
||||||
|
lua_pushnil(L);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|||||||
@ -6,4 +6,10 @@
|
|||||||
|
|
||||||
int32_t Script_GetAccountExpansionLevel(lua_State* L);
|
int32_t Script_GetAccountExpansionLevel(lua_State* L);
|
||||||
|
|
||||||
|
int32_t Script_IsLinuxClient(lua_State* L);
|
||||||
|
|
||||||
|
int32_t Script_IsMacClient(lua_State* L);
|
||||||
|
|
||||||
|
int32_t Script_IsWindowsClient(lua_State* L);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
#include "ui/ScriptFunctions.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "client/Client.hpp"
|
||||||
#include "ui/ScriptFunctionsShared.hpp"
|
#include "ui/ScriptFunctionsShared.hpp"
|
||||||
#include "ui/Types.hpp"
|
#include "ui/Types.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
@ -14,7 +15,10 @@ int32_t Script_GetTime(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_GetGameTime(lua_State* L) {
|
int32_t Script_GetGameTime(lua_State* L) {
|
||||||
WHOA_UNIMPLEMENTED(0);
|
lua_pushnumber(L, g_clientGameTime.m_hour);
|
||||||
|
lua_pushnumber(L, g_clientGameTime.m_minute);
|
||||||
|
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_ConsoleExec(lua_State* L) {
|
int32_t Script_ConsoleExec(lua_State* L) {
|
||||||
@ -22,10 +26,12 @@ int32_t Script_ConsoleExec(lua_State* L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t Script_AccessDenied(lua_State* L) {
|
int32_t Script_AccessDenied(lua_State* L) {
|
||||||
return luaL_error(L, "Access Denied");
|
luaL_error(L, "Access Denied");
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameScript_Method FrameScript::s_ScriptFunctions_System[NUM_SCRIPT_FUNCTIONS_SYSTEM] = {
|
static FrameScript_Method s_SystemFunctions[] = {
|
||||||
{ "GetTime", &Script_GetTime },
|
{ "GetTime", &Script_GetTime },
|
||||||
{ "GetGameTime", &Script_GetGameTime },
|
{ "GetGameTime", &Script_GetGameTime },
|
||||||
{ "ConsoleExec", &Script_ConsoleExec },
|
{ "ConsoleExec", &Script_ConsoleExec },
|
||||||
@ -34,3 +40,15 @@ FrameScript_Method FrameScript::s_ScriptFunctions_System[NUM_SCRIPT_FUNCTIONS_SY
|
|||||||
{ "AppendToFile", &Script_AccessDenied },
|
{ "AppendToFile", &Script_AccessDenied },
|
||||||
{ "GetAccountExpansionLevel", &Script_GetAccountExpansionLevel }
|
{ "GetAccountExpansionLevel", &Script_GetAccountExpansionLevel }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void SystemRegisterFunctions() {
|
||||||
|
for (auto& func : s_SystemFunctions) {
|
||||||
|
FrameScript_RegisterFunction(func.name, func.method);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SystemUnregisterFunctions() {
|
||||||
|
for (auto& func : s_SystemFunctions) {
|
||||||
|
FrameScript_UnregisterFunction(func.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
8
src/ui/ScriptFunctionsSystem.hpp
Normal file
8
src/ui/ScriptFunctionsSystem.hpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef UI_SCRIPT_FUNCTIONS_SYSTEM_HPP
|
||||||
|
#define UI_SCRIPT_FUNCTIONS_SYSTEM_HPP
|
||||||
|
|
||||||
|
void SystemRegisterFunctions();
|
||||||
|
|
||||||
|
void SystemUnregisterFunctions();
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -98,6 +98,21 @@ enum TextureImageMode {
|
|||||||
ImageMode_Desaturate = 1
|
ImageMode_Desaturate = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum TOOLTIP_ANCHORPOINT {
|
||||||
|
TOOLTIP_ANCHOR_LEFT = 0,
|
||||||
|
TOOLTIP_ANCHOR_RIGHT = 1,
|
||||||
|
TOOLTIP_ANCHOR_BOTTOMLEFT = 2,
|
||||||
|
TOOLTIP_ANCHOR_BOTTOM = 3,
|
||||||
|
TOOLTIP_ANCHOR_BOTTOMRIGHT = 4,
|
||||||
|
TOOLTIP_ANCHOR_TOPLEFT = 5,
|
||||||
|
TOOLTIP_ANCHOR_TOP = 6,
|
||||||
|
TOOLTIP_ANCHOR_TOPRIGHT = 7,
|
||||||
|
TOOLTIP_ANCHOR_CURSOR = 8,
|
||||||
|
TOOLTIP_ANCHOR_NONE = 9,
|
||||||
|
TOOLTIP_ANCHOR_PRESERVE = 10,
|
||||||
|
TOOLTIP_ANCHOR_CURSOR_RIGHT = 11,
|
||||||
|
};
|
||||||
|
|
||||||
struct FRAMEPRIORITY {
|
struct FRAMEPRIORITY {
|
||||||
CSimpleFrame* frame;
|
CSimpleFrame* frame;
|
||||||
uint32_t priority;
|
uint32_t priority;
|
||||||
|
|||||||
164
src/ui/game/ActionBarScript.cpp
Normal file
164
src/ui/game/ActionBarScript.cpp
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
#include "ui/game/ActionBarScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "ui/game/CGActionBar.hpp"
|
||||||
|
#include "util/Lua.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_GetActionInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetActionTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetActionCount(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetActionCooldown(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetActionAutocast(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetActionText(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_HasAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UseAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_PickupAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_PlaceAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsAttackAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsCurrentAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsAutoRepeatAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsUsableAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsConsumableAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsStackableAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsEquippedAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_ActionHasRange(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsActionInRange(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBonusBarOffset(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetMultiCastBarOffset(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_ChangeActionBarPage(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetActionBarPage(lua_State* L) {
|
||||||
|
if (CGActionBar::s_tempPageActiveFlags) {
|
||||||
|
lua_pushinteger(L, 1);
|
||||||
|
} else {
|
||||||
|
lua_pushinteger(L, CGActionBar::s_currentPage + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetActionBarToggles(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetActionBarToggles(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsPossessBarVisible(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetMultiCastTotemSpells(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetMultiCastSpell(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static FrameScript_Method s_ScriptFunctions[] = {
|
||||||
|
{ "GetActionInfo", &Script_GetActionInfo },
|
||||||
|
{ "GetActionTexture", &Script_GetActionTexture },
|
||||||
|
{ "GetActionCount", &Script_GetActionCount },
|
||||||
|
{ "GetActionCooldown", &Script_GetActionCooldown },
|
||||||
|
{ "GetActionAutocast", &Script_GetActionAutocast },
|
||||||
|
{ "GetActionText", &Script_GetActionText },
|
||||||
|
{ "HasAction", &Script_HasAction },
|
||||||
|
{ "UseAction", &Script_UseAction },
|
||||||
|
{ "PickupAction", &Script_PickupAction },
|
||||||
|
{ "PlaceAction", &Script_PlaceAction },
|
||||||
|
{ "IsAttackAction", &Script_IsAttackAction },
|
||||||
|
{ "IsCurrentAction", &Script_IsCurrentAction },
|
||||||
|
{ "IsAutoRepeatAction", &Script_IsAutoRepeatAction },
|
||||||
|
{ "IsUsableAction", &Script_IsUsableAction },
|
||||||
|
{ "IsConsumableAction", &Script_IsConsumableAction },
|
||||||
|
{ "IsStackableAction", &Script_IsStackableAction },
|
||||||
|
{ "IsEquippedAction", &Script_IsEquippedAction },
|
||||||
|
{ "ActionHasRange", &Script_ActionHasRange },
|
||||||
|
{ "IsActionInRange", &Script_IsActionInRange },
|
||||||
|
{ "GetBonusBarOffset", &Script_GetBonusBarOffset },
|
||||||
|
{ "GetMultiCastBarOffset", &Script_GetMultiCastBarOffset },
|
||||||
|
{ "ChangeActionBarPage", &Script_ChangeActionBarPage },
|
||||||
|
{ "GetActionBarPage", &Script_GetActionBarPage },
|
||||||
|
{ "GetActionBarToggles", &Script_GetActionBarToggles },
|
||||||
|
{ "SetActionBarToggles", &Script_SetActionBarToggles },
|
||||||
|
{ "IsPossessBarVisible", &Script_IsPossessBarVisible },
|
||||||
|
{ "GetMultiCastTotemSpells", &Script_GetMultiCastTotemSpells },
|
||||||
|
{ "SetMultiCastSpell", &Script_SetMultiCastSpell },
|
||||||
|
};
|
||||||
|
|
||||||
|
void ActionBarRegisterScriptFunctions() {
|
||||||
|
for (auto& func : s_ScriptFunctions) {
|
||||||
|
FrameScript_RegisterFunction(func.name, func.method);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/ui/game/ActionBarScript.hpp
Normal file
6
src/ui/game/ActionBarScript.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UI_GAME_ACTION_BAR_SCRIPT_HPP
|
||||||
|
#define UI_GAME_ACTION_BAR_SCRIPT_HPP
|
||||||
|
|
||||||
|
void ActionBarRegisterScriptFunctions();
|
||||||
|
|
||||||
|
#endif
|
||||||
274
src/ui/game/BattlefieldInfoScript.cpp
Normal file
274
src/ui/game/BattlefieldInfoScript.cpp
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
#include "ui/game/BattlefieldInfoScript.hpp"
|
||||||
|
#include "ui/game/CGBattlefieldInfo.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_GetNumBattlefields(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldInstanceInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsBattlefieldArena(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsActiveBattlefieldArena(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_JoinBattlefield(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetSelectedBattlefield(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetSelectedBattlefield(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_AcceptBattlefieldPort(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldStatus(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldPortExpiration(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldInstanceExpiration(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldInstanceRunTime(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldEstimatedWaitTime(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldTimeWaited(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_CloseBattlefield(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_RequestBattlefieldScoreData(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetNumBattlefieldScores(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldScore(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldWinner(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetBattlefieldScoreFaction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_LeaveBattlefield(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetNumBattlefieldStats(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldStatInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldStatData(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_RequestBattlefieldPositions(lua_State* L) {
|
||||||
|
CGBattlefieldInfo::RequestPlayerPositions();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetNumBattlefieldPositions(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldPosition(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetNumBattlefieldFlagPositions(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldFlagPosition(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetNumBattlefieldVehicles(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldVehicleInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_CanJoinBattlefieldAsGroup(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldMapIconScale(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldTeamInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlefieldArenaFaction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SortBattlefieldScoreData(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_HearthAndResurrectFromArea(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_CanHearthAndResurrectFromArea(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetNumBattlegroundTypes(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBattlegroundInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_RequestBattlegroundInstanceInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetNumArenaOpponents(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_BattlefieldMgrEntryInviteResponse(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_BattlefieldMgrQueueRequest(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_BattlefieldMgrQueueInviteResponse(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_BattlefieldMgrExitRequest(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetWorldPVPQueueStatus(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetHolidayBGHonorCurrencyBonuses(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetRandomBGHonorCurrencyBonuses(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SortBGList(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static FrameScript_Method s_ScriptFunctions[] = {
|
||||||
|
{ "GetNumBattlefields", &Script_GetNumBattlefields },
|
||||||
|
{ "GetBattlefieldInfo", &Script_GetBattlefieldInfo },
|
||||||
|
{ "GetBattlefieldInstanceInfo", &Script_GetBattlefieldInstanceInfo },
|
||||||
|
{ "IsBattlefieldArena", &Script_IsBattlefieldArena },
|
||||||
|
{ "IsActiveBattlefieldArena", &Script_IsActiveBattlefieldArena },
|
||||||
|
{ "JoinBattlefield", &Script_JoinBattlefield },
|
||||||
|
{ "SetSelectedBattlefield", &Script_SetSelectedBattlefield },
|
||||||
|
{ "GetSelectedBattlefield", &Script_GetSelectedBattlefield },
|
||||||
|
{ "AcceptBattlefieldPort", &Script_AcceptBattlefieldPort },
|
||||||
|
{ "GetBattlefieldStatus", &Script_GetBattlefieldStatus },
|
||||||
|
{ "GetBattlefieldPortExpiration", &Script_GetBattlefieldPortExpiration },
|
||||||
|
{ "GetBattlefieldInstanceExpiration", &Script_GetBattlefieldInstanceExpiration },
|
||||||
|
{ "GetBattlefieldInstanceRunTime", &Script_GetBattlefieldInstanceRunTime },
|
||||||
|
{ "GetBattlefieldEstimatedWaitTime", &Script_GetBattlefieldEstimatedWaitTime },
|
||||||
|
{ "GetBattlefieldTimeWaited", &Script_GetBattlefieldTimeWaited },
|
||||||
|
{ "CloseBattlefield", &Script_CloseBattlefield },
|
||||||
|
{ "RequestBattlefieldScoreData", &Script_RequestBattlefieldScoreData },
|
||||||
|
{ "GetNumBattlefieldScores", &Script_GetNumBattlefieldScores },
|
||||||
|
{ "GetBattlefieldScore", &Script_GetBattlefieldScore },
|
||||||
|
{ "GetBattlefieldWinner", &Script_GetBattlefieldWinner },
|
||||||
|
{ "SetBattlefieldScoreFaction", &Script_SetBattlefieldScoreFaction },
|
||||||
|
{ "LeaveBattlefield", &Script_LeaveBattlefield },
|
||||||
|
{ "GetNumBattlefieldStats", &Script_GetNumBattlefieldStats },
|
||||||
|
{ "GetBattlefieldStatInfo", &Script_GetBattlefieldStatInfo },
|
||||||
|
{ "GetBattlefieldStatData", &Script_GetBattlefieldStatData },
|
||||||
|
{ "RequestBattlefieldPositions", &Script_RequestBattlefieldPositions },
|
||||||
|
{ "GetNumBattlefieldPositions", &Script_GetNumBattlefieldPositions },
|
||||||
|
{ "GetBattlefieldPosition", &Script_GetBattlefieldPosition },
|
||||||
|
{ "GetNumBattlefieldFlagPositions", &Script_GetNumBattlefieldFlagPositions },
|
||||||
|
{ "GetBattlefieldFlagPosition", &Script_GetBattlefieldFlagPosition },
|
||||||
|
{ "GetNumBattlefieldVehicles", &Script_GetNumBattlefieldVehicles },
|
||||||
|
{ "GetBattlefieldVehicleInfo", &Script_GetBattlefieldVehicleInfo },
|
||||||
|
{ "CanJoinBattlefieldAsGroup", &Script_CanJoinBattlefieldAsGroup },
|
||||||
|
{ "GetBattlefieldMapIconScale", &Script_GetBattlefieldMapIconScale },
|
||||||
|
{ "GetBattlefieldTeamInfo", &Script_GetBattlefieldTeamInfo },
|
||||||
|
{ "GetBattlefieldArenaFaction", &Script_GetBattlefieldArenaFaction },
|
||||||
|
{ "SortBattlefieldScoreData", &Script_SortBattlefieldScoreData },
|
||||||
|
{ "HearthAndResurrectFromArea", &Script_HearthAndResurrectFromArea },
|
||||||
|
{ "CanHearthAndResurrectFromArea", &Script_CanHearthAndResurrectFromArea },
|
||||||
|
{ "GetNumBattlegroundTypes", &Script_GetNumBattlegroundTypes },
|
||||||
|
{ "GetBattlegroundInfo", &Script_GetBattlegroundInfo },
|
||||||
|
{ "RequestBattlegroundInstanceInfo", &Script_RequestBattlegroundInstanceInfo },
|
||||||
|
{ "GetNumArenaOpponents", &Script_GetNumArenaOpponents },
|
||||||
|
{ "BattlefieldMgrEntryInviteResponse", &Script_BattlefieldMgrEntryInviteResponse },
|
||||||
|
{ "BattlefieldMgrQueueRequest", &Script_BattlefieldMgrQueueRequest },
|
||||||
|
{ "BattlefieldMgrQueueInviteResponse", &Script_BattlefieldMgrQueueInviteResponse },
|
||||||
|
{ "BattlefieldMgrExitRequest", &Script_BattlefieldMgrExitRequest },
|
||||||
|
{ "GetWorldPVPQueueStatus", &Script_GetWorldPVPQueueStatus },
|
||||||
|
{ "GetHolidayBGHonorCurrencyBonuses", &Script_GetHolidayBGHonorCurrencyBonuses },
|
||||||
|
{ "GetRandomBGHonorCurrencyBonuses", &Script_GetRandomBGHonorCurrencyBonuses },
|
||||||
|
{ "SortBGList", &Script_SortBGList },
|
||||||
|
};
|
||||||
|
|
||||||
|
void BattlefieldInfoRegisterScriptFunctions() {
|
||||||
|
for (auto& func : s_ScriptFunctions) {
|
||||||
|
FrameScript_RegisterFunction(func.name, func.method);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/ui/game/BattlefieldInfoScript.hpp
Normal file
6
src/ui/game/BattlefieldInfoScript.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UI_GAME_BATTLEFIELD_INFO_SCRIPT_HPP
|
||||||
|
#define UI_GAME_BATTLEFIELD_INFO_SCRIPT_HPP
|
||||||
|
|
||||||
|
void BattlefieldInfoRegisterScriptFunctions();
|
||||||
|
|
||||||
|
#endif
|
||||||
4
src/ui/game/CGActionBar.cpp
Normal file
4
src/ui/game/CGActionBar.cpp
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include "ui/game/CGActionBar.hpp"
|
||||||
|
|
||||||
|
uint32_t CGActionBar::s_currentPage;
|
||||||
|
uint32_t CGActionBar::s_tempPageActiveFlags;
|
||||||
13
src/ui/game/CGActionBar.hpp
Normal file
13
src/ui/game/CGActionBar.hpp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#ifndef UI_GAME_C_G_ACTION_BAR_HPP
|
||||||
|
#define UI_GAME_C_G_ACTION_BAR_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class CGActionBar {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static uint32_t s_currentPage;
|
||||||
|
static uint32_t s_tempPageActiveFlags;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
5
src/ui/game/CGBattlefieldInfo.cpp
Normal file
5
src/ui/game/CGBattlefieldInfo.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "ui/game/CGBattlefieldInfo.hpp"
|
||||||
|
|
||||||
|
void CGBattlefieldInfo::RequestPlayerPositions() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
10
src/ui/game/CGBattlefieldInfo.hpp
Normal file
10
src/ui/game/CGBattlefieldInfo.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_BATTLEFIELD_INFO_HPP
|
||||||
|
#define UI_GAME_C_G_BATTLEFIELD_INFO_HPP
|
||||||
|
|
||||||
|
class CGBattlefieldInfo {
|
||||||
|
public:
|
||||||
|
// Static functions
|
||||||
|
static void RequestPlayerPositions();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
37
src/ui/game/CGCharacterModelBase.cpp
Normal file
37
src/ui/game/CGCharacterModelBase.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGCharacterModelBase.hpp"
|
||||||
|
#include "ui/game/CGCharacterModelBaseScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGCharacterModelBase::s_metatable;
|
||||||
|
int32_t CGCharacterModelBase::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGCharacterModelBase::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGCharacterModelBase)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGCharacterModelBase::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGCharacterModelBase::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGCharacterModelBase::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCharacterModelBase::GetObjectType() {
|
||||||
|
if (!CGCharacterModelBase::s_objectType) {
|
||||||
|
CGCharacterModelBase::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGCharacterModelBase::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGCharacterModelBase::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleModel::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGCharacterModelBaseMethods, NUM_CG_CHARACTER_MODEL_BASE_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGCharacterModelBase::CGCharacterModelBase(CSimpleFrame* parent) : CSimpleModel(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCharacterModelBase::GetScriptMetaTable() {
|
||||||
|
return CGCharacterModelBase::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGCharacterModelBase.hpp
Normal file
28
src/ui/game/CGCharacterModelBase.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_CHARACTER_MODEL_BASE_HPP
|
||||||
|
#define UI_GAME_C_G_CHARACTER_MODEL_BASE_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleModel.hpp"
|
||||||
|
|
||||||
|
class CGCharacterModelBase : public CSimpleModel {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGCharacterModelBase(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
30
src/ui/game/CGCharacterModelBaseScript.cpp
Normal file
30
src/ui/game/CGCharacterModelBaseScript.cpp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include "ui/game/CGCharacterModelBaseScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_SetUnit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetCreature(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_RefreshUnit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetRotation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGCharacterModelBaseMethods[] = {
|
||||||
|
{ "SetUnit", &Script_SetUnit },
|
||||||
|
{ "SetCreature", &Script_SetCreature },
|
||||||
|
{ "RefreshUnit", &Script_RefreshUnit },
|
||||||
|
{ "SetRotation", &Script_SetRotation },
|
||||||
|
};
|
||||||
10
src/ui/game/CGCharacterModelBaseScript.hpp
Normal file
10
src/ui/game/CGCharacterModelBaseScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_CHARACTER_MODEL_BASE_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_CHARACTER_MODEL_BASE_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_CHARACTER_MODEL_BASE_SCRIPT_METHODS 4
|
||||||
|
|
||||||
|
extern FrameScript_Method CGCharacterModelBaseMethods[NUM_CG_CHARACTER_MODEL_BASE_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
37
src/ui/game/CGCooldown.cpp
Normal file
37
src/ui/game/CGCooldown.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGCooldown.hpp"
|
||||||
|
#include "ui/game/CGCooldownScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGCooldown::s_metatable;
|
||||||
|
int32_t CGCooldown::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGCooldown::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGCooldown)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGCooldown::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGCooldown::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGCooldown::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown::GetObjectType() {
|
||||||
|
if (!CGCooldown::s_objectType) {
|
||||||
|
CGCooldown::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGCooldown::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGCooldown::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleFrame::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGCooldownMethods, NUM_CG_COOLDOWN_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGCooldown::CGCooldown(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown::GetScriptMetaTable() {
|
||||||
|
return CGCooldown::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGCooldown.hpp
Normal file
28
src/ui/game/CGCooldown.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_COOLDOWN_HPP
|
||||||
|
#define UI_GAME_C_G_COOLDOWN_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
|
||||||
|
class CGCooldown : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGCooldown(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
35
src/ui/game/CGCooldownScript.cpp
Normal file
35
src/ui/game/CGCooldownScript.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include "ui/game/CGCooldownScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGCooldown_SetCooldown(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown_SetReverse(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown_GetReverse(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown_SetDrawEdge(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGCooldown_GetDrawEdge(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGCooldownMethods[] = {
|
||||||
|
{ "SetCooldown", &CGCooldown_SetCooldown },
|
||||||
|
{ "SetReverse", &CGCooldown_SetReverse },
|
||||||
|
{ "GetReverse", &CGCooldown_GetReverse },
|
||||||
|
{ "SetDrawEdge", &CGCooldown_SetDrawEdge },
|
||||||
|
{ "GetDrawEdge", &CGCooldown_GetDrawEdge },
|
||||||
|
};
|
||||||
10
src/ui/game/CGCooldownScript.hpp
Normal file
10
src/ui/game/CGCooldownScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_COOLDOWN_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_COOLDOWN_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_COOLDOWN_SCRIPT_METHODS 5
|
||||||
|
|
||||||
|
extern FrameScript_Method CGCooldownMethods[NUM_CG_COOLDOWN_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
37
src/ui/game/CGDressUpModelFrame.cpp
Normal file
37
src/ui/game/CGDressUpModelFrame.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGDressUpModelFrame.hpp"
|
||||||
|
#include "ui/game/CGDressUpModelFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGDressUpModelFrame::s_metatable;
|
||||||
|
int32_t CGDressUpModelFrame::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGDressUpModelFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGDressUpModelFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGDressUpModelFrame::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGDressUpModelFrame::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGDressUpModelFrame::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGDressUpModelFrame::GetObjectType() {
|
||||||
|
if (!CGDressUpModelFrame::s_objectType) {
|
||||||
|
CGDressUpModelFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGDressUpModelFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGDressUpModelFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CGCharacterModelBase::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGDressUpModelFrameMethods, NUM_CG_DRESS_UP_MODEL_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGDressUpModelFrame::CGDressUpModelFrame(CSimpleFrame* parent) : CGCharacterModelBase(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGDressUpModelFrame::GetScriptMetaTable() {
|
||||||
|
return CGDressUpModelFrame::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGDressUpModelFrame.hpp
Normal file
28
src/ui/game/CGDressUpModelFrame.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_DRESS_UP_MODEL_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_DRESS_UP_MODEL_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/game/CGCharacterModelBase.hpp"
|
||||||
|
|
||||||
|
class CGDressUpModelFrame : public CGCharacterModelBase {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGDressUpModelFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
25
src/ui/game/CGDressUpModelFrameScript.cpp
Normal file
25
src/ui/game/CGDressUpModelFrameScript.cpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include "ui/game/CGDressUpModelFrameScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_Undress(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_Dress(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_TryOn(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGDressUpModelFrameMethods[] = {
|
||||||
|
{ "Undress", &Script_Undress },
|
||||||
|
{ "Dress", &Script_Dress },
|
||||||
|
{ "TryOn", &Script_TryOn },
|
||||||
|
};
|
||||||
10
src/ui/game/CGDressUpModelFrameScript.hpp
Normal file
10
src/ui/game/CGDressUpModelFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_DRESS_UP_MODEL_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_DRESS_UP_MODEL_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_DRESS_UP_MODEL_FRAME_SCRIPT_METHODS 3
|
||||||
|
|
||||||
|
extern FrameScript_Method CGDressUpModelFrameMethods[NUM_CG_DRESS_UP_MODEL_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
183
src/ui/game/CGGameUI.cpp
Normal file
183
src/ui/game/CGGameUI.cpp
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
#include "ui/game/CGGameUI.hpp"
|
||||||
|
#include "client/Client.hpp"
|
||||||
|
#include "ui/CScriptObject.hpp"
|
||||||
|
#include "ui/FrameXML.hpp"
|
||||||
|
#include "ui/Key.hpp"
|
||||||
|
#include "ui/game/ActionBarScript.hpp"
|
||||||
|
#include "ui/game/BattlefieldInfoScript.hpp"
|
||||||
|
#include "ui/game/CGCharacterModelBase.hpp"
|
||||||
|
#include "ui/game/CGCooldown.hpp"
|
||||||
|
#include "ui/game/CGDressUpModelFrame.hpp"
|
||||||
|
#include "ui/game/CGMinimapFrame.hpp"
|
||||||
|
#include "ui/game/CGQuestPOIFrame.hpp"
|
||||||
|
#include "ui/game/CGTabardModelFrame.hpp"
|
||||||
|
#include "ui/game/CGTooltip.hpp"
|
||||||
|
#include "ui/game/CGWorldFrame.hpp"
|
||||||
|
#include "ui/game/CharacterInfoScript.hpp"
|
||||||
|
#include "ui/game/GMTicketInfoScript.hpp"
|
||||||
|
#include "ui/game/GameScript.hpp"
|
||||||
|
#include "ui/game/ScriptEvents.hpp"
|
||||||
|
#include "ui/game/UIBindingsScript.hpp"
|
||||||
|
#include "ui/simple/CSimpleTop.hpp"
|
||||||
|
#include "util/CStatus.hpp"
|
||||||
|
#include <common/MD5.hpp>
|
||||||
|
|
||||||
|
WOWGUID CGGameUI::s_currentObjectTrack;
|
||||||
|
CScriptObject* CGGameUI::s_gameTooltip;
|
||||||
|
WOWGUID CGGameUI::s_lockedTarget;
|
||||||
|
CSimpleTop* CGGameUI::s_simpleTop;
|
||||||
|
|
||||||
|
void LoadScriptFunctions() {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
CGTooltip::CreateScriptMetaTable();
|
||||||
|
CGCooldown::CreateScriptMetaTable();
|
||||||
|
CGMinimapFrame::CreateScriptMetaTable();
|
||||||
|
CGCharacterModelBase::CreateScriptMetaTable();
|
||||||
|
CGDressUpModelFrame::CreateScriptMetaTable();
|
||||||
|
CGTabardModelFrame::CreateScriptMetaTable();
|
||||||
|
CGQuestPOIFrame::CreateScriptMetaTable();
|
||||||
|
|
||||||
|
GameScriptRegisterFunctions();
|
||||||
|
UIBindingsRegisterScriptFunctions();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
ScriptEventsRegisterFunctions();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
ActionBarRegisterScriptFunctions();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
CharacterInfoRegisterScriptFunctions();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
BattlefieldInfoRegisterScriptFunctions();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
GMTicketInfoRegisterScriptFunctions();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
WOWGUID& CGGameUI::GetCurrentObjectTrack() {
|
||||||
|
return CGGameUI::s_currentObjectTrack;
|
||||||
|
}
|
||||||
|
|
||||||
|
WOWGUID& CGGameUI::GetLockedTarget() {
|
||||||
|
return CGGameUI::s_lockedTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGGameUI::Initialize() {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
CGGameUI::s_simpleTop = STORM_NEW(CSimpleTop);
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
LoadScriptFunctions();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
CGGameUI::RegisterFrameFactories();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
CStatus status;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
uint8_t digest1[16];
|
||||||
|
|
||||||
|
switch (FrameXML_CheckSignature("Interface\\FrameXML\\FrameXML.toc", "Interface\\FrameXML\\Bindings.xml", InterfaceKey, digest1)) {
|
||||||
|
case 0: {
|
||||||
|
status.Add(STATUS_WARNING, "FrameXML missing signature");
|
||||||
|
ClientPostClose(10);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 1: {
|
||||||
|
status.Add(STATUS_WARNING, "FrameXML has corrupt signature");
|
||||||
|
ClientPostClose(10);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: {
|
||||||
|
status.Add(STATUS_WARNING, "FrameXML is modified or corrupt");
|
||||||
|
ClientPostClose(10);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 3: {
|
||||||
|
// Success
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default: {
|
||||||
|
ClientPostClose(10);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MD5_CTX md5;
|
||||||
|
MD5Init(&md5);
|
||||||
|
|
||||||
|
// TODO file count and progress bar logic
|
||||||
|
|
||||||
|
FrameXML_FreeHashNodes();
|
||||||
|
|
||||||
|
FrameXML_CreateFrames("Interface\\FrameXML\\FrameXML.toc", nullptr, &md5, &status);
|
||||||
|
|
||||||
|
// TODO CGUIBindings::s_bindings->Load("Interface\\FrameXML\\Bindings.xml", &md5, &status);
|
||||||
|
|
||||||
|
uint8_t digest2[16];
|
||||||
|
MD5Final(digest2, &md5);
|
||||||
|
|
||||||
|
// TODO digest validation
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
CGGameUI::s_gameTooltip = CScriptObject::GetScriptObjectByName("GameTooltip", CGTooltip::GetObjectType());
|
||||||
|
STORM_ASSERT(CGGameUI::s_gameTooltip);
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGGameUI::InitializeGame() {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
CGGameUI::Initialize();
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGGameUI::IsRaidMember(const WOWGUID& guid) {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGGameUI::IsRaidMemberOrPet(const WOWGUID& guid) {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGGameUI::RegisterFrameFactories() {
|
||||||
|
FrameXML_RegisterFactory("WorldFrame", &CGWorldFrame::Create, true);
|
||||||
|
FrameXML_RegisterFactory("GameTooltip", &CGTooltip::Create, false);
|
||||||
|
FrameXML_RegisterFactory("Cooldown", &CGCooldown::Create, false);
|
||||||
|
FrameXML_RegisterFactory("Minimap", &CGMinimapFrame::Create, false);
|
||||||
|
FrameXML_RegisterFactory("PlayerModel", &CGCharacterModelBase::Create, false);
|
||||||
|
FrameXML_RegisterFactory("DressUpModel", &CGDressUpModelFrame::Create, false);
|
||||||
|
FrameXML_RegisterFactory("TabardModel", &CGTabardModelFrame::Create, false);
|
||||||
|
FrameXML_RegisterFactory("QuestPOIFrame", &CGQuestPOIFrame::Create, false);
|
||||||
|
}
|
||||||
29
src/ui/game/CGGameUI.hpp
Normal file
29
src/ui/game/CGGameUI.hpp
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef UI_GAME_C_G_GAME_UI_HPP
|
||||||
|
#define UI_GAME_C_G_GAME_UI_HPP
|
||||||
|
|
||||||
|
#include "util/guid/Types.hpp"
|
||||||
|
|
||||||
|
class CScriptObject;
|
||||||
|
class CSimpleTop;
|
||||||
|
|
||||||
|
class CGGameUI {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static CScriptObject* s_gameTooltip;
|
||||||
|
static CSimpleTop* s_simpleTop;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static WOWGUID& GetCurrentObjectTrack();
|
||||||
|
static WOWGUID& GetLockedTarget();
|
||||||
|
static void Initialize();
|
||||||
|
static void InitializeGame();
|
||||||
|
static int32_t IsRaidMember(const WOWGUID& guid);
|
||||||
|
static int32_t IsRaidMemberOrPet(const WOWGUID& guid);
|
||||||
|
static void RegisterFrameFactories();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static WOWGUID s_currentObjectTrack;
|
||||||
|
static WOWGUID s_lockedTarget;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
37
src/ui/game/CGMinimapFrame.cpp
Normal file
37
src/ui/game/CGMinimapFrame.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGMinimapFrame.hpp"
|
||||||
|
#include "ui/game/CGMinimapFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame::s_metatable;
|
||||||
|
int32_t CGMinimapFrame::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGMinimapFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGMinimapFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGMinimapFrame::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGMinimapFrame::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGMinimapFrame::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame::GetObjectType() {
|
||||||
|
if (!CGMinimapFrame::s_objectType) {
|
||||||
|
CGMinimapFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGMinimapFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGMinimapFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleFrame::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGMinimapFrameMethods, NUM_CG_MINIMAP_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGMinimapFrame::CGMinimapFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame::GetScriptMetaTable() {
|
||||||
|
return CGMinimapFrame::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGMinimapFrame.hpp
Normal file
28
src/ui/game/CGMinimapFrame.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_MINIMAP_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_MINIMAP_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
|
||||||
|
class CGMinimapFrame : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGMinimapFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
85
src/ui/game/CGMinimapFrameScript.cpp
Normal file
85
src/ui/game/CGMinimapFrameScript.cpp
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#include "ui/game/CGMinimapFrameScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetMaskTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetIconTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetBlipTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetClassBlipTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetPOIArrowTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetStaticPOIArrowTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetCorpsePOIArrowTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetPlayerTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetPlayerTextureHeight(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetPlayerTextureWidth(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_GetZoomLevels(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_GetZoom(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_SetZoom(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_PingLocation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGMinimapFrame_GetPingPosition(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGMinimapFrameMethods[] = {
|
||||||
|
{ "SetMaskTexture", &CGMinimapFrame_SetMaskTexture },
|
||||||
|
{ "SetIconTexture", &CGMinimapFrame_SetIconTexture },
|
||||||
|
{ "SetBlipTexture", &CGMinimapFrame_SetBlipTexture },
|
||||||
|
{ "SetClassBlipTexture", &CGMinimapFrame_SetClassBlipTexture },
|
||||||
|
{ "SetPOIArrowTexture", &CGMinimapFrame_SetPOIArrowTexture },
|
||||||
|
{ "SetStaticPOIArrowTexture", &CGMinimapFrame_SetStaticPOIArrowTexture },
|
||||||
|
{ "SetCorpsePOIArrowTexture", &CGMinimapFrame_SetCorpsePOIArrowTexture },
|
||||||
|
{ "SetPlayerTexture", &CGMinimapFrame_SetPlayerTexture },
|
||||||
|
{ "SetPlayerTextureHeight", &CGMinimapFrame_SetPlayerTextureHeight },
|
||||||
|
{ "SetPlayerTextureWidth", &CGMinimapFrame_SetPlayerTextureWidth },
|
||||||
|
{ "GetZoomLevels", &CGMinimapFrame_GetZoomLevels },
|
||||||
|
{ "GetZoom", &CGMinimapFrame_GetZoom },
|
||||||
|
{ "SetZoom", &CGMinimapFrame_SetZoom },
|
||||||
|
{ "PingLocation", &CGMinimapFrame_PingLocation },
|
||||||
|
{ "GetPingPosition", &CGMinimapFrame_GetPingPosition },
|
||||||
|
};
|
||||||
10
src/ui/game/CGMinimapFrameScript.hpp
Normal file
10
src/ui/game/CGMinimapFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_MINIMAP_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_MINIMAP_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_MINIMAP_FRAME_SCRIPT_METHODS 15
|
||||||
|
|
||||||
|
extern FrameScript_Method CGMinimapFrameMethods[NUM_CG_MINIMAP_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
6
src/ui/game/CGPetInfo.cpp
Normal file
6
src/ui/game/CGPetInfo.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "ui/game/CGPetInfo.hpp"
|
||||||
|
|
||||||
|
WOWGUID CGPetInfo::GetPet(uint32_t index) {
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
13
src/ui/game/CGPetInfo.hpp
Normal file
13
src/ui/game/CGPetInfo.hpp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#ifndef UI_GAME_C_G_PET_INFO_HPP
|
||||||
|
#define UI_GAME_C_G_PET_INFO_HPP
|
||||||
|
|
||||||
|
#include "util/GUID.hpp"
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class CGPetInfo {
|
||||||
|
public:
|
||||||
|
// Static functions
|
||||||
|
static WOWGUID GetPet(uint32_t index);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
38
src/ui/game/CGQuestPOIFrame.cpp
Normal file
38
src/ui/game/CGQuestPOIFrame.cpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#include "ui/game/CGQuestPOIFrame.hpp"
|
||||||
|
#include "ui/game/CGQuestPOIFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame::s_metatable;
|
||||||
|
int32_t CGQuestPOIFrame::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGQuestPOIFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGQuestPOIFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGQuestPOIFrame::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGQuestPOIFrame::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGQuestPOIFrame::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame::GetObjectType() {
|
||||||
|
if (!CGQuestPOIFrame::s_objectType) {
|
||||||
|
CGQuestPOIFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGQuestPOIFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGQuestPOIFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleFrame::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGQuestPOIFrameMethods, NUM_CG_QUEST_POI_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGQuestPOIFrame::CGQuestPOIFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame::GetScriptMetaTable() {
|
||||||
|
return CGQuestPOIFrame::s_metatable;
|
||||||
|
}
|
||||||
|
|
||||||
28
src/ui/game/CGQuestPOIFrame.hpp
Normal file
28
src/ui/game/CGQuestPOIFrame.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_QUEST_POI_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_QUEST_POI_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
|
||||||
|
class CGQuestPOIFrame : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGQuestPOIFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
80
src/ui/game/CGQuestPOIFrameScript.cpp
Normal file
80
src/ui/game/CGQuestPOIFrameScript.cpp
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#include "ui/game/CGQuestPOIFrameScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetFillTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetFillAlpha(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetBorderTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetBorderAlpha(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetBorderScalar(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_DrawQuestBlob(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_EnableSmoothing(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_EnableMerging(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetMergeThreshold(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_SetNumSplinePoints(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_UpdateQuestPOI(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_UpdateMouseOverTooltip(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_GetTooltipIndex(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGQuestPOIFrame_GetNumTooltips(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGQuestPOIFrameMethods[] = {
|
||||||
|
{ "SetFillTexture", &CGQuestPOIFrame_SetFillTexture },
|
||||||
|
{ "SetFillAlpha", &CGQuestPOIFrame_SetFillAlpha },
|
||||||
|
{ "SetBorderTexture", &CGQuestPOIFrame_SetBorderTexture },
|
||||||
|
{ "SetBorderAlpha", &CGQuestPOIFrame_SetBorderAlpha },
|
||||||
|
{ "SetBorderScalar", &CGQuestPOIFrame_SetBorderScalar },
|
||||||
|
{ "DrawQuestBlob", &CGQuestPOIFrame_DrawQuestBlob },
|
||||||
|
{ "EnableSmoothing", &CGQuestPOIFrame_EnableSmoothing },
|
||||||
|
{ "EnableMerging", &CGQuestPOIFrame_EnableMerging },
|
||||||
|
{ "SetMergeThreshold", &CGQuestPOIFrame_SetMergeThreshold },
|
||||||
|
{ "SetNumSplinePoints", &CGQuestPOIFrame_SetNumSplinePoints },
|
||||||
|
{ "UpdateQuestPOI", &CGQuestPOIFrame_UpdateQuestPOI },
|
||||||
|
{ "UpdateMouseOverTooltip", &CGQuestPOIFrame_UpdateMouseOverTooltip },
|
||||||
|
{ "GetTooltipIndex", &CGQuestPOIFrame_GetTooltipIndex },
|
||||||
|
{ "GetNumTooltips", &CGQuestPOIFrame_GetNumTooltips },
|
||||||
|
};
|
||||||
10
src/ui/game/CGQuestPOIFrameScript.hpp
Normal file
10
src/ui/game/CGQuestPOIFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_QUEST_POI_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_QUEST_POI_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_QUEST_POI_FRAME_SCRIPT_METHODS 14
|
||||||
|
|
||||||
|
extern FrameScript_Method CGQuestPOIFrameMethods[NUM_CG_QUEST_POI_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
37
src/ui/game/CGTabardModelFrame.cpp
Normal file
37
src/ui/game/CGTabardModelFrame.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "ui/game/CGTabardModelFrame.hpp"
|
||||||
|
#include "ui/game/CGTabardModelFrameScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame::s_metatable;
|
||||||
|
int32_t CGTabardModelFrame::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGTabardModelFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGTabardModelFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGTabardModelFrame::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGTabardModelFrame::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGTabardModelFrame::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame::GetObjectType() {
|
||||||
|
if (!CGTabardModelFrame::s_objectType) {
|
||||||
|
CGTabardModelFrame::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGTabardModelFrame::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGTabardModelFrame::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CGCharacterModelBase::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGTabardModelFrameMethods, NUM_CG_TABARD_MODEL_FRAME_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGTabardModelFrame::CGTabardModelFrame(CSimpleFrame* parent) : CGCharacterModelBase(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame::GetScriptMetaTable() {
|
||||||
|
return CGTabardModelFrame::s_metatable;
|
||||||
|
}
|
||||||
28
src/ui/game/CGTabardModelFrame.hpp
Normal file
28
src/ui/game/CGTabardModelFrame.hpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef UI_GAME_C_G_TABARD_MODEL_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_TABARD_MODEL_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/game/CGCharacterModelBase.hpp"
|
||||||
|
|
||||||
|
class CGTabardModelFrame : public CGCharacterModelBase {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGTabardModelFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
60
src/ui/game/CGTabardModelFrameScript.cpp
Normal file
60
src/ui/game/CGTabardModelFrameScript.cpp
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#include "ui/game/CGTabardModelFrameScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_InitializeTabardColors(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_Save(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_CycleVariation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetUpperBackgroundFileName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetLowerBackgroundFileName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetUpperEmblemFileName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetLowerEmblemFileName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetUpperEmblemTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_GetLowerEmblemTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTabardModelFrame_CanSaveTabardNow(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGTabardModelFrameMethods[] = {
|
||||||
|
{ "InitializeTabardColors", &CGTabardModelFrame_InitializeTabardColors },
|
||||||
|
{ "Save", &CGTabardModelFrame_Save },
|
||||||
|
{ "CycleVariation", &CGTabardModelFrame_CycleVariation },
|
||||||
|
{ "GetUpperBackgroundFileName", &CGTabardModelFrame_GetUpperBackgroundFileName },
|
||||||
|
{ "GetLowerBackgroundFileName", &CGTabardModelFrame_GetLowerBackgroundFileName },
|
||||||
|
{ "GetUpperEmblemFileName", &CGTabardModelFrame_GetUpperEmblemFileName },
|
||||||
|
{ "GetLowerEmblemFileName", &CGTabardModelFrame_GetLowerEmblemFileName },
|
||||||
|
{ "GetUpperEmblemTexture", &CGTabardModelFrame_GetUpperEmblemTexture },
|
||||||
|
{ "GetLowerEmblemTexture", &CGTabardModelFrame_GetLowerEmblemTexture },
|
||||||
|
{ "CanSaveTabardNow", &CGTabardModelFrame_CanSaveTabardNow },
|
||||||
|
};
|
||||||
10
src/ui/game/CGTabardModelFrameScript.hpp
Normal file
10
src/ui/game/CGTabardModelFrameScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_TABARD_MODEL_FRAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_TABARD_MODEL_FRAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_TABARD_MODEL_FRAME_SCRIPT_METHODS 10
|
||||||
|
|
||||||
|
extern FrameScript_Method CGTabardModelFrameMethods[NUM_CG_TABARD_MODEL_FRAME_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
44
src/ui/game/CGTooltip.cpp
Normal file
44
src/ui/game/CGTooltip.cpp
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#include "ui/game/CGTooltip.hpp"
|
||||||
|
#include "ui/game/CGTooltipScript.hpp"
|
||||||
|
|
||||||
|
int32_t CGTooltip::s_metatable;
|
||||||
|
int32_t CGTooltip::s_objectType;
|
||||||
|
|
||||||
|
CSimpleFrame* CGTooltip::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGTooltip)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGTooltip::CreateScriptMetaTable() {
|
||||||
|
auto L = FrameScript_GetContext();
|
||||||
|
CGTooltip::s_metatable = FrameScript_Object::CreateScriptMetaTable(L, &CGTooltip::RegisterScriptMethods);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip::GetObjectType() {
|
||||||
|
if (!CGTooltip::s_objectType) {
|
||||||
|
CGTooltip::s_objectType = ++FrameScript_Object::s_objectTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CGTooltip::s_objectType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CGTooltip::RegisterScriptMethods(lua_State* L) {
|
||||||
|
CSimpleFrame::RegisterScriptMethods(L);
|
||||||
|
FrameScript_Object::FillScriptMethodTable(L, CGTooltipMethods, NUM_CG_TOOLTIP_SCRIPT_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGTooltip::CGTooltip(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip::GetScriptMetaTable() {
|
||||||
|
return CGTooltip::s_metatable;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CGTooltip::IsA(int32_t type) {
|
||||||
|
return type == CGTooltip::s_objectType
|
||||||
|
|| type == CSimpleFrame::s_objectType
|
||||||
|
|| type == CScriptRegion::s_objectType
|
||||||
|
|| type == CScriptObject::s_objectType;
|
||||||
|
}
|
||||||
33
src/ui/game/CGTooltip.hpp
Normal file
33
src/ui/game/CGTooltip.hpp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#ifndef UI_GAME_C_G_TOOLTIP_HPP
|
||||||
|
#define UI_GAME_C_G_TOOLTIP_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
|
||||||
|
class CGTooltip : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
static int32_t s_metatable;
|
||||||
|
static int32_t s_objectType;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
static void CreateScriptMetaTable();
|
||||||
|
static int32_t GetObjectType();
|
||||||
|
static void RegisterScriptMethods(lua_State* L);
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
CSimpleFrame* m_owner = nullptr;
|
||||||
|
TOOLTIP_ANCHORPOINT m_anchorPoint;
|
||||||
|
// TODO
|
||||||
|
C2Vector m_offset;
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Virtual member functions
|
||||||
|
virtual bool IsA(int32_t type);
|
||||||
|
virtual int32_t GetScriptMetaTable();
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGTooltip(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
385
src/ui/game/CGTooltipScript.cpp
Normal file
385
src/ui/game/CGTooltipScript.cpp
Normal file
@ -0,0 +1,385 @@
|
|||||||
|
#include "ui/game/CGTooltipScript.hpp"
|
||||||
|
#include "ui/game/CGTooltip.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Lua.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t CGTooltip_AddFontStrings(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetMinimumWidth(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_GetMinimumWidth(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetPadding(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_GetPadding(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_IsOwned(lua_State* L) {
|
||||||
|
auto type = CGTooltip::GetObjectType();
|
||||||
|
auto tooltip = static_cast<CGTooltip*>(FrameScript_GetObjectThis(L, type));
|
||||||
|
|
||||||
|
if (lua_type(L, 2) != LUA_TTABLE) {
|
||||||
|
luaL_error(L, "Usage: %s:IsOwned(frame)", tooltip->GetDisplayName());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
lua_rawgeti(L, 2, 0);
|
||||||
|
auto frame = static_cast<CSimpleFrame*>(lua_touserdata(L, -1));
|
||||||
|
lua_settop(L, -2);
|
||||||
|
|
||||||
|
if (!frame) {
|
||||||
|
luaL_error(L, "%s:IsOwned(): Couldn't find 'this' in frame object", tooltip->GetDisplayName());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!frame->IsA(CSimpleFrame::GetObjectType())) {
|
||||||
|
luaL_error(L, "%s:IsOwned(): Wrong object type, expected frame", tooltip->GetDisplayName());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tooltip->m_owner == frame) {
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
} else {
|
||||||
|
lua_pushnil(L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_GetOwner(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetOwner(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_GetAnchorType(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetAnchorType(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_ClearLines(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_AddLine(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_AddDoubleLine(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_AddTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetText(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_AppendText(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_FadeOut(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetHyperlink(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetPetAction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetShapeshift(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetPossession(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetTracking(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetSpell(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetSpellByID(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetGlyph(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetInventoryItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetLootItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetQuestItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetQuestLogItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetTrainerService(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetTradeSkillItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetMerchantItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetMerchantCostItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetTradePlayerItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetTradeTargetItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetBagItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetUnit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetUnitBuff(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetUnitDebuff(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetUnitAura(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetTalent(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetSendMailItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetInboxItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetAuctionSellItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetAuctionItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_NumLines(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetQuestRewardSpell(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetQuestLogRewardSpell(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetHyperlinkCompareItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetBuybackItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetLootRollItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetSocketedItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetSocketGem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetExistingSocketGem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetGuildBankItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_IsUnit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_GetUnit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_GetItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_GetSpell(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetTotem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetCurrencyToken(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetBackpackToken(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_IsEquippedItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetQuestLogSpecialItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetEquipmentSet(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetFrameStack(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetLFGDungeonReward(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t CGTooltip_SetLFGCompletionReward(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameScript_Method CGTooltipMethods[] = {
|
||||||
|
{ "AddFontStrings", &CGTooltip_AddFontStrings },
|
||||||
|
{ "SetMinimumWidth", &CGTooltip_SetMinimumWidth },
|
||||||
|
{ "GetMinimumWidth", &CGTooltip_GetMinimumWidth },
|
||||||
|
{ "SetPadding", &CGTooltip_SetPadding },
|
||||||
|
{ "GetPadding", &CGTooltip_GetPadding },
|
||||||
|
{ "IsOwned", &CGTooltip_IsOwned },
|
||||||
|
{ "GetOwner", &CGTooltip_GetOwner },
|
||||||
|
{ "SetOwner", &CGTooltip_SetOwner },
|
||||||
|
{ "GetAnchorType", &CGTooltip_GetAnchorType },
|
||||||
|
{ "SetAnchorType", &CGTooltip_SetAnchorType },
|
||||||
|
{ "ClearLines", &CGTooltip_ClearLines },
|
||||||
|
{ "AddLine", &CGTooltip_AddLine },
|
||||||
|
{ "AddDoubleLine", &CGTooltip_AddDoubleLine },
|
||||||
|
{ "AddTexture", &CGTooltip_AddTexture },
|
||||||
|
{ "SetText", &CGTooltip_SetText },
|
||||||
|
{ "AppendText", &CGTooltip_AppendText },
|
||||||
|
{ "FadeOut", &CGTooltip_FadeOut },
|
||||||
|
{ "SetHyperlink", &CGTooltip_SetHyperlink },
|
||||||
|
{ "SetAction", &CGTooltip_SetAction },
|
||||||
|
{ "SetPetAction", &CGTooltip_SetPetAction },
|
||||||
|
{ "SetShapeshift", &CGTooltip_SetShapeshift },
|
||||||
|
{ "SetPossession", &CGTooltip_SetPossession },
|
||||||
|
{ "SetTracking", &CGTooltip_SetTracking },
|
||||||
|
{ "SetSpell", &CGTooltip_SetSpell },
|
||||||
|
{ "SetSpellByID", &CGTooltip_SetSpellByID },
|
||||||
|
{ "SetGlyph", &CGTooltip_SetGlyph },
|
||||||
|
{ "SetInventoryItem", &CGTooltip_SetInventoryItem },
|
||||||
|
{ "SetLootItem", &CGTooltip_SetLootItem },
|
||||||
|
{ "SetQuestItem", &CGTooltip_SetQuestItem },
|
||||||
|
{ "SetQuestLogItem", &CGTooltip_SetQuestLogItem },
|
||||||
|
{ "SetTrainerService", &CGTooltip_SetTrainerService },
|
||||||
|
{ "SetTradeSkillItem", &CGTooltip_SetTradeSkillItem },
|
||||||
|
{ "SetMerchantItem", &CGTooltip_SetMerchantItem },
|
||||||
|
{ "SetMerchantCostItem", &CGTooltip_SetMerchantCostItem },
|
||||||
|
{ "SetTradePlayerItem", &CGTooltip_SetTradePlayerItem },
|
||||||
|
{ "SetTradeTargetItem", &CGTooltip_SetTradeTargetItem },
|
||||||
|
{ "SetBagItem", &CGTooltip_SetBagItem },
|
||||||
|
{ "SetUnit", &CGTooltip_SetUnit },
|
||||||
|
{ "SetUnitBuff", &CGTooltip_SetUnitBuff },
|
||||||
|
{ "SetUnitDebuff", &CGTooltip_SetUnitDebuff },
|
||||||
|
{ "SetUnitAura", &CGTooltip_SetUnitAura },
|
||||||
|
{ "SetTalent", &CGTooltip_SetTalent },
|
||||||
|
{ "SetSendMailItem", &CGTooltip_SetSendMailItem },
|
||||||
|
{ "SetInboxItem", &CGTooltip_SetInboxItem },
|
||||||
|
{ "SetAuctionSellItem", &CGTooltip_SetAuctionSellItem },
|
||||||
|
{ "SetAuctionItem", &CGTooltip_SetAuctionItem },
|
||||||
|
{ "NumLines", &CGTooltip_NumLines },
|
||||||
|
{ "SetQuestRewardSpell", &CGTooltip_SetQuestRewardSpell },
|
||||||
|
{ "SetQuestLogRewardSpell", &CGTooltip_SetQuestLogRewardSpell },
|
||||||
|
{ "SetHyperlinkCompareItem", &CGTooltip_SetHyperlinkCompareItem },
|
||||||
|
{ "SetBuybackItem", &CGTooltip_SetBuybackItem },
|
||||||
|
{ "SetLootRollItem", &CGTooltip_SetLootRollItem },
|
||||||
|
{ "SetSocketedItem", &CGTooltip_SetSocketedItem },
|
||||||
|
{ "SetSocketGem", &CGTooltip_SetSocketGem },
|
||||||
|
{ "SetExistingSocketGem", &CGTooltip_SetExistingSocketGem },
|
||||||
|
{ "SetGuildBankItem", &CGTooltip_SetGuildBankItem },
|
||||||
|
{ "IsUnit", &CGTooltip_IsUnit },
|
||||||
|
{ "GetUnit", &CGTooltip_GetUnit },
|
||||||
|
{ "GetItem", &CGTooltip_GetItem },
|
||||||
|
{ "GetSpell", &CGTooltip_GetSpell },
|
||||||
|
{ "SetTotem", &CGTooltip_SetTotem },
|
||||||
|
{ "SetCurrencyToken", &CGTooltip_SetCurrencyToken },
|
||||||
|
{ "SetBackpackToken", &CGTooltip_SetBackpackToken },
|
||||||
|
{ "IsEquippedItem", &CGTooltip_IsEquippedItem },
|
||||||
|
{ "SetQuestLogSpecialItem", &CGTooltip_SetQuestLogSpecialItem },
|
||||||
|
{ "SetEquipmentSet", &CGTooltip_SetEquipmentSet },
|
||||||
|
{ "SetFrameStack", &CGTooltip_SetFrameStack },
|
||||||
|
{ "SetLFGDungeonReward", &CGTooltip_SetLFGDungeonReward },
|
||||||
|
{ "SetLFGCompletionReward", &CGTooltip_SetLFGCompletionReward },
|
||||||
|
};
|
||||||
10
src/ui/game/CGTooltipScript.hpp
Normal file
10
src/ui/game/CGTooltipScript.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UI_GAME_C_G_TOOLTIP_SCRIPT_HPP
|
||||||
|
#define UI_GAME_C_G_TOOLTIP_SCRIPT_HPP
|
||||||
|
|
||||||
|
#include "ui/Types.hpp"
|
||||||
|
|
||||||
|
#define NUM_CG_TOOLTIP_SCRIPT_METHODS 69
|
||||||
|
|
||||||
|
extern FrameScript_Method CGTooltipMethods[NUM_CG_TOOLTIP_SCRIPT_METHODS];
|
||||||
|
|
||||||
|
#endif
|
||||||
22
src/ui/game/CGWorldFrame.cpp
Normal file
22
src/ui/game/CGWorldFrame.cpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include "ui/game/CGWorldFrame.hpp"
|
||||||
|
#include <storm/Memory.hpp>
|
||||||
|
|
||||||
|
CSimpleFrame* CGWorldFrame::Create(CSimpleFrame* parent) {
|
||||||
|
// TODO use CDataAllocator
|
||||||
|
|
||||||
|
return STORM_NEW(CGWorldFrame)(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
CGWorldFrame::CGWorldFrame(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
CGWorldFrame::s_currentWorldFrame = this;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
this->EnableEvent(SIMPLE_EVENT_KEY, -1);
|
||||||
|
this->EnableEvent(SIMPLE_EVENT_MOUSE, -1);
|
||||||
|
this->EnableEvent(SIMPLE_EVENT_MOUSEWHEEL, -1);
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
19
src/ui/game/CGWorldFrame.hpp
Normal file
19
src/ui/game/CGWorldFrame.hpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef UI_GAME_C_G_WORLD_FRAME_HPP
|
||||||
|
#define UI_GAME_C_G_WORLD_FRAME_HPP
|
||||||
|
|
||||||
|
#include "ui/simple/CSimpleFrame.hpp"
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class CGWorldFrame : public CSimpleFrame {
|
||||||
|
public:
|
||||||
|
// Static variables
|
||||||
|
CGWorldFrame* s_currentWorldFrame;
|
||||||
|
|
||||||
|
// Static functions
|
||||||
|
static CSimpleFrame* Create(CSimpleFrame* parent);
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
CGWorldFrame(CSimpleFrame* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
181
src/ui/game/CharacterInfoScript.cpp
Normal file
181
src/ui/game/CharacterInfoScript.cpp
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
#include "ui/game/CharacterInfoScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_GetInventorySlotInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemsForSlot(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemBroken(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemCount(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemQuality(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemCooldown(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemDurability(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemLink(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemID(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryItemGems(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_KeyRingButtonIDToInvSlotID(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_PickupInventoryItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UseInventoryItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SocketInventoryItem(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsInventoryItemLocked(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_PutItemInBag(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_PutItemInBackpack(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_PickupBagFromSlot(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_CursorCanGoInSlot(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_ShowInventorySellCursor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetInventoryPortraitTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetGuildInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInventoryAlertStatus(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UpdateInventoryAlertStatus(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_OffhandHasWeapon(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_HasInspectHonorData(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_RequestInspectHonorData(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInspectHonorData(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetInspectArenaTeamData(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_ClearInspectPlayer(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetWeaponEnchantInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_HasWandEquipped(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static FrameScript_Method s_ScriptFunctions[] = {
|
||||||
|
{ "GetInventorySlotInfo", &Script_GetInventorySlotInfo },
|
||||||
|
{ "GetInventoryItemsForSlot", &Script_GetInventoryItemsForSlot },
|
||||||
|
{ "GetInventoryItemTexture", &Script_GetInventoryItemTexture },
|
||||||
|
{ "GetInventoryItemBroken", &Script_GetInventoryItemBroken },
|
||||||
|
{ "GetInventoryItemCount", &Script_GetInventoryItemCount },
|
||||||
|
{ "GetInventoryItemQuality", &Script_GetInventoryItemQuality },
|
||||||
|
{ "GetInventoryItemCooldown", &Script_GetInventoryItemCooldown },
|
||||||
|
{ "GetInventoryItemDurability", &Script_GetInventoryItemDurability },
|
||||||
|
{ "GetInventoryItemLink", &Script_GetInventoryItemLink },
|
||||||
|
{ "GetInventoryItemID", &Script_GetInventoryItemID },
|
||||||
|
{ "GetInventoryItemGems", &Script_GetInventoryItemGems },
|
||||||
|
{ "KeyRingButtonIDToInvSlotID", &Script_KeyRingButtonIDToInvSlotID },
|
||||||
|
{ "PickupInventoryItem", &Script_PickupInventoryItem },
|
||||||
|
{ "UseInventoryItem", &Script_UseInventoryItem },
|
||||||
|
{ "SocketInventoryItem", &Script_SocketInventoryItem },
|
||||||
|
{ "IsInventoryItemLocked", &Script_IsInventoryItemLocked },
|
||||||
|
{ "PutItemInBag", &Script_PutItemInBag },
|
||||||
|
{ "PutItemInBackpack", &Script_PutItemInBackpack },
|
||||||
|
{ "PickupBagFromSlot", &Script_PickupBagFromSlot },
|
||||||
|
{ "CursorCanGoInSlot", &Script_CursorCanGoInSlot },
|
||||||
|
{ "ShowInventorySellCursor", &Script_ShowInventorySellCursor },
|
||||||
|
{ "SetInventoryPortraitTexture", &Script_SetInventoryPortraitTexture },
|
||||||
|
{ "GetGuildInfo", &Script_GetGuildInfo },
|
||||||
|
{ "GetInventoryAlertStatus", &Script_GetInventoryAlertStatus },
|
||||||
|
{ "UpdateInventoryAlertStatus", &Script_UpdateInventoryAlertStatus },
|
||||||
|
{ "OffhandHasWeapon", &Script_OffhandHasWeapon },
|
||||||
|
{ "HasInspectHonorData", &Script_HasInspectHonorData },
|
||||||
|
{ "RequestInspectHonorData", &Script_RequestInspectHonorData },
|
||||||
|
{ "GetInspectHonorData", &Script_GetInspectHonorData },
|
||||||
|
{ "GetInspectArenaTeamData", &Script_GetInspectArenaTeamData },
|
||||||
|
{ "ClearInspectPlayer", &Script_ClearInspectPlayer },
|
||||||
|
{ "GetWeaponEnchantInfo", &Script_GetWeaponEnchantInfo },
|
||||||
|
{ "HasWandEquipped", &Script_HasWandEquipped },
|
||||||
|
};
|
||||||
|
|
||||||
|
void CharacterInfoRegisterScriptFunctions() {
|
||||||
|
for (auto& func : s_ScriptFunctions) {
|
||||||
|
FrameScript_RegisterFunction(func.name, func.method);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/ui/game/CharacterInfoScript.hpp
Normal file
6
src/ui/game/CharacterInfoScript.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UI_GAME_CHARACTER_INFO_SCRIPT_HPP
|
||||||
|
#define UI_GAME_CHARACTER_INFO_SCRIPT_HPP
|
||||||
|
|
||||||
|
void CharacterInfoRegisterScriptFunctions();
|
||||||
|
|
||||||
|
#endif
|
||||||
91
src/ui/game/GMTicketInfoScript.cpp
Normal file
91
src/ui/game/GMTicketInfoScript.cpp
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
#include "ui/game/GMTicketInfoScript.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_GetGMTicket(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_NewGMTicket(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UpdateGMTicket(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_DeleteGMTicket(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMResponseNeedMoreHelp(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMResponseResolve(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetGMStatus(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMSurveyQuestion(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMSurveyNumAnswers(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMSurveyAnswer(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMSurveyAnswerSubmit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMSurveyCommentSubmit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMSurveySubmit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GMReportLag(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_RegisterStaticConstants(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static FrameScript_Method s_ScriptFunctions[] = {
|
||||||
|
{ "GetGMTicket", &Script_GetGMTicket },
|
||||||
|
{ "NewGMTicket", &Script_NewGMTicket },
|
||||||
|
{ "UpdateGMTicket", &Script_UpdateGMTicket },
|
||||||
|
{ "DeleteGMTicket", &Script_DeleteGMTicket },
|
||||||
|
{ "GMResponseNeedMoreHelp", &Script_GMResponseNeedMoreHelp },
|
||||||
|
{ "GMResponseResolve", &Script_GMResponseResolve },
|
||||||
|
{ "GetGMStatus", &Script_GetGMStatus },
|
||||||
|
{ "GMSurveyQuestion", &Script_GMSurveyQuestion },
|
||||||
|
{ "GMSurveyNumAnswers", &Script_GMSurveyNumAnswers },
|
||||||
|
{ "GMSurveyAnswer", &Script_GMSurveyAnswer },
|
||||||
|
{ "GMSurveyAnswerSubmit", &Script_GMSurveyAnswerSubmit },
|
||||||
|
{ "GMSurveyCommentSubmit", &Script_GMSurveyCommentSubmit },
|
||||||
|
{ "GMSurveySubmit", &Script_GMSurveySubmit },
|
||||||
|
{ "GMReportLag", &Script_GMReportLag },
|
||||||
|
{ "RegisterStaticConstants", &Script_RegisterStaticConstants },
|
||||||
|
};
|
||||||
|
|
||||||
|
void GMTicketInfoRegisterScriptFunctions() {
|
||||||
|
for (auto& func : s_ScriptFunctions) {
|
||||||
|
FrameScript_RegisterFunction(func.name, func.method);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/ui/game/GMTicketInfoScript.hpp
Normal file
6
src/ui/game/GMTicketInfoScript.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UI_GAME_GM_TICKET_INFO_SCRIPT_HPP
|
||||||
|
#define UI_GAME_GM_TICKET_INFO_SCRIPT_HPP
|
||||||
|
|
||||||
|
void GMTicketInfoRegisterScriptFunctions();
|
||||||
|
|
||||||
|
#endif
|
||||||
1605
src/ui/game/GameScript.cpp
Normal file
1605
src/ui/game/GameScript.cpp
Normal file
File diff suppressed because it is too large
Load Diff
6
src/ui/game/GameScript.hpp
Normal file
6
src/ui/game/GameScript.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UI_GAME_GAME_SCRIPT_HPP
|
||||||
|
#define UI_GAME_GAME_SCRIPT_HPP
|
||||||
|
|
||||||
|
void GameScriptRegisterFunctions();
|
||||||
|
|
||||||
|
#endif
|
||||||
949
src/ui/game/ScriptEvents.cpp
Normal file
949
src/ui/game/ScriptEvents.cpp
Normal file
@ -0,0 +1,949 @@
|
|||||||
|
#include "ui/game/ScriptEvents.hpp"
|
||||||
|
#include "db/Db.hpp"
|
||||||
|
#include "object/Client.hpp"
|
||||||
|
#include "ui/FrameScript.hpp"
|
||||||
|
#include "ui/ScriptFunctionsSystem.hpp"
|
||||||
|
#include "ui/game/CGGameUI.hpp"
|
||||||
|
#include "ui/game/ScriptUtil.hpp"
|
||||||
|
#include "util/GUID.hpp"
|
||||||
|
#include "util/Lua.hpp"
|
||||||
|
#include "util/StringTo.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
int32_t Script_UnitExists(lua_State* L) {
|
||||||
|
auto token = lua_tostring(L, 1);
|
||||||
|
WOWGUID guid = 0;
|
||||||
|
Script_GetGUIDFromToken(token, guid, false);
|
||||||
|
|
||||||
|
auto object = ClntObjMgrObjectPtr(guid, TYPE_OBJECT, __FILE__, __LINE__);
|
||||||
|
|
||||||
|
if ((object && object->CanBeTargetted()) || CGGameUI::IsRaidMemberOrPet(guid)) {
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
} else {
|
||||||
|
lua_pushnil(L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsVisible(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsUnit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsPlayer(lua_State* L) {
|
||||||
|
auto token = lua_tostring(L, 1);
|
||||||
|
WOWGUID guid = 0;
|
||||||
|
Script_GetGUIDFromToken(token, guid, false);
|
||||||
|
|
||||||
|
auto object = ClntObjMgrObjectPtr(guid, TYPE_PLAYER, __FILE__, __LINE__);
|
||||||
|
|
||||||
|
if (object || CGGameUI::IsRaidMember(guid)) {
|
||||||
|
lua_pushnumber(L, 1.0);
|
||||||
|
} else {
|
||||||
|
lua_pushnil(L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsInMyGuild(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsCorpse(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsPartyLeader(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitGroupRolesAssigned(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsRaidOfficer(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitInParty(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitPlayerOrPetInParty(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitInRaid(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitPlayerOrPetInRaid(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitPlayerControlled(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsAFK(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsDND(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsPVP(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsPVPSanctuary(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsPVPFreeForAll(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitFactionGroup(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitReaction(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsEnemy(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsFriend(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitCanCooperate(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitCanAssist(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitCanAttack(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsCharmed(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsPossessed(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_PlayerCanTeleport(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitClassification(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitSelectionColor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitGUID(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitPVPName(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitXP(lua_State* L) {
|
||||||
|
if (!lua_isstring(L, 1)) {
|
||||||
|
luaL_error(L, "Usage: UnitXP(\"unit\")");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto name = lua_tostring(L, 1);
|
||||||
|
auto unit = Script_GetUnitFromName(name);
|
||||||
|
|
||||||
|
float xp = 0.0f;
|
||||||
|
|
||||||
|
if (unit && unit->IsA(TYPE_PLAYER)) {
|
||||||
|
xp = static_cast<CGPlayer_C*>(unit)->GetActiveXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
lua_pushnumber(L, xp);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitXPMax(lua_State* L) {
|
||||||
|
if (!lua_isstring(L, 1)) {
|
||||||
|
luaL_error(L, "Usage: UnitXPMax(\"unit\")");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto name = lua_tostring(L, 1);
|
||||||
|
auto unit = Script_GetUnitFromName(name);
|
||||||
|
|
||||||
|
float xpMax = 0.0f;
|
||||||
|
|
||||||
|
if (unit && unit->IsA(TYPE_PLAYER)) {
|
||||||
|
xpMax = static_cast<CGPlayer_C*>(unit)->GetActiveNextLevelXP();
|
||||||
|
}
|
||||||
|
|
||||||
|
lua_pushnumber(L, xpMax);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitHealth(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitHealthMax(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitMana(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitManaMax(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitPower(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitPowerMax(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitPowerType(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitOnTaxi(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsFeignDeath(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsDead(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsGhost(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsDeadOrGhost(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsConnected(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitAffectingCombat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitSex(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitLevel(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetMoney(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetHonorCurrency(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetArenaCurrency(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitRace(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitClass(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitClassBase(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitResistance(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitStat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitAttackBothHands(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitDamage(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitRangedDamage(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitRangedAttack(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitAttackSpeed(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitAttackPower(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitRangedAttackPower(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitDefense(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitArmor(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitCharacterPoints(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitBuff(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitDebuff(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitAura(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsTapped(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsTappedByPlayer(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsTappedByAllThreatList(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsTrivial(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitHasRelicSlot(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_SetPortraitTexture(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_HasFullControl(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetComboPoints(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsInGuild(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsGuildLeader(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsArenaTeamCaptain(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsInArenaTeam(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsResting(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetCombatRating(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetCombatRatingBonus(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetMaxCombatRatingBonus(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetDodgeChance(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetBlockChance(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetShieldBlock(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetParryChance(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetCritChanceFromAgility(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetSpellCritChanceFromIntellect(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetCritChance(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetRangedCritChance(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetSpellCritChance(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetSpellBonusDamage(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetSpellBonusHealing(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPetSpellBonusDamage(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetSpellPenetration(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetArmorPenetration(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetAttackPowerForStat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitCreatureType(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitCreatureFamily(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetResSicknessDuration(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPVPSessionStats(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPVPYesterdayStats(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPVPLifetimeStats(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitPVPRank(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPVPRankInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPVPRankProgress(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitCastingInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitChannelInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsLoggedIn(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsFlyableArea(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsIndoors(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsOutdoors(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsOutOfBounds(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsFalling(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsSwimming(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsFlying(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsMounted(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsStealthed(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsSameServer(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetUnitHealthModifier(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetUnitMaxHealthModifier(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetUnitPowerModifier(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetUnitHealthRegenRateFromSpirit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetUnitManaRegenRateFromSpirit(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetManaRegen(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPowerRegen(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetRuneCooldown(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetRuneCount(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetRuneType(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_ReportPlayerIsPVPAFK(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_PlayerIsPVPInactive(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetExpertise(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetExpertisePercent(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitInBattleground(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitInRange(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetUnitSpeed(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetUnitPitch(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitInVehicle(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitUsingVehicle(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitControllingVehicle(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitInVehicleControlSeat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitHasVehicleUI(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitTargetsVehicleInRaidUI(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitVehicleSkin(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitVehicleSeatCount(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitVehicleSeatInfo(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitSwitchToVehicleSeat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_CanSwitchVehicleSeat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetVehicleUIIndicator(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetVehicleUIIndicatorSeat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitThreatSituation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitDetailedThreatSituation(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_UnitIsControlling(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_EjectPassengerFromSeat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_CanEjectPassengerFromSeat(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_RespondInstanceLock(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPlayerFacing(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetPlayerInfoByGUID(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetItemStats(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_GetItemStatDelta(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_IsXPUserDisabled(lua_State* L) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t Script_FillLocalizedClassList(lua_State* L) {
|
||||||
|
if (lua_type(L, 1) != LUA_TTABLE) {
|
||||||
|
luaL_error(L, "Usage: FillLocalizedClassList(classTable[, isFemale])");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto isFemale = StringToBOOL(L, 2, 0);
|
||||||
|
auto sex = isFemale ? UNITSEX_FEMALE : UNITSEX_MALE;
|
||||||
|
|
||||||
|
lua_settop(L, 1);
|
||||||
|
|
||||||
|
for (int32_t i = 0; i < g_chrClassesDB.GetNumRecords(); ++i) {
|
||||||
|
auto classRec = g_chrClassesDB.GetRecordByIndex(i);
|
||||||
|
if (classRec) {
|
||||||
|
auto displayName = CGUnit_C::GetDisplayClassNameFromRecord(classRec, sex, 0);
|
||||||
|
|
||||||
|
lua_pushstring(L, classRec->m_filename);
|
||||||
|
lua_pushstring(L, displayName);
|
||||||
|
|
||||||
|
lua_settable(L, -3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static FrameScript_Method s_UnitFunctions[] = {
|
||||||
|
{ "UnitExists", &Script_UnitExists },
|
||||||
|
{ "UnitIsVisible", &Script_UnitIsVisible },
|
||||||
|
{ "UnitIsUnit", &Script_UnitIsUnit },
|
||||||
|
{ "UnitIsPlayer", &Script_UnitIsPlayer },
|
||||||
|
{ "UnitIsInMyGuild", &Script_UnitIsInMyGuild },
|
||||||
|
{ "UnitIsCorpse", &Script_UnitIsCorpse },
|
||||||
|
{ "UnitIsPartyLeader", &Script_UnitIsPartyLeader },
|
||||||
|
{ "UnitGroupRolesAssigned", &Script_UnitGroupRolesAssigned },
|
||||||
|
{ "UnitIsRaidOfficer", &Script_UnitIsRaidOfficer },
|
||||||
|
{ "UnitInParty", &Script_UnitInParty },
|
||||||
|
{ "UnitPlayerOrPetInParty", &Script_UnitPlayerOrPetInParty },
|
||||||
|
{ "UnitInRaid", &Script_UnitInRaid },
|
||||||
|
{ "UnitPlayerOrPetInRaid", &Script_UnitPlayerOrPetInRaid },
|
||||||
|
{ "UnitPlayerControlled", &Script_UnitPlayerControlled },
|
||||||
|
{ "UnitIsAFK", &Script_UnitIsAFK },
|
||||||
|
{ "UnitIsDND", &Script_UnitIsDND },
|
||||||
|
{ "UnitIsPVP", &Script_UnitIsPVP },
|
||||||
|
{ "UnitIsPVPSanctuary", &Script_UnitIsPVPSanctuary },
|
||||||
|
{ "UnitIsPVPFreeForAll", &Script_UnitIsPVPFreeForAll },
|
||||||
|
{ "UnitFactionGroup", &Script_UnitFactionGroup },
|
||||||
|
{ "UnitReaction", &Script_UnitReaction },
|
||||||
|
{ "UnitIsEnemy", &Script_UnitIsEnemy },
|
||||||
|
{ "UnitIsFriend", &Script_UnitIsFriend },
|
||||||
|
{ "UnitCanCooperate", &Script_UnitCanCooperate },
|
||||||
|
{ "UnitCanAssist", &Script_UnitCanAssist },
|
||||||
|
{ "UnitCanAttack", &Script_UnitCanAttack },
|
||||||
|
{ "UnitIsCharmed", &Script_UnitIsCharmed },
|
||||||
|
{ "UnitIsPossessed", &Script_UnitIsPossessed },
|
||||||
|
{ "PlayerCanTeleport", &Script_PlayerCanTeleport },
|
||||||
|
{ "UnitClassification", &Script_UnitClassification },
|
||||||
|
{ "UnitSelectionColor", &Script_UnitSelectionColor },
|
||||||
|
{ "UnitGUID", &Script_UnitGUID },
|
||||||
|
{ "UnitName", &Script_UnitName },
|
||||||
|
{ "UnitPVPName", &Script_UnitPVPName },
|
||||||
|
{ "UnitXP", &Script_UnitXP },
|
||||||
|
{ "UnitXPMax", &Script_UnitXPMax },
|
||||||
|
{ "UnitHealth", &Script_UnitHealth },
|
||||||
|
{ "UnitHealthMax", &Script_UnitHealthMax },
|
||||||
|
{ "UnitMana", &Script_UnitMana },
|
||||||
|
{ "UnitManaMax", &Script_UnitManaMax },
|
||||||
|
{ "UnitPower", &Script_UnitPower },
|
||||||
|
{ "UnitPowerMax", &Script_UnitPowerMax },
|
||||||
|
{ "UnitPowerType", &Script_UnitPowerType },
|
||||||
|
{ "UnitOnTaxi", &Script_UnitOnTaxi },
|
||||||
|
{ "UnitIsFeignDeath", &Script_UnitIsFeignDeath },
|
||||||
|
{ "UnitIsDead", &Script_UnitIsDead },
|
||||||
|
{ "UnitIsGhost", &Script_UnitIsGhost },
|
||||||
|
{ "UnitIsDeadOrGhost", &Script_UnitIsDeadOrGhost },
|
||||||
|
{ "UnitIsConnected", &Script_UnitIsConnected },
|
||||||
|
{ "UnitAffectingCombat", &Script_UnitAffectingCombat },
|
||||||
|
{ "UnitSex", &Script_UnitSex },
|
||||||
|
{ "UnitLevel", &Script_UnitLevel },
|
||||||
|
{ "GetMoney", &Script_GetMoney },
|
||||||
|
{ "GetHonorCurrency", &Script_GetHonorCurrency },
|
||||||
|
{ "GetArenaCurrency", &Script_GetArenaCurrency },
|
||||||
|
{ "UnitRace", &Script_UnitRace },
|
||||||
|
{ "UnitClass", &Script_UnitClass },
|
||||||
|
{ "UnitClassBase", &Script_UnitClassBase },
|
||||||
|
{ "UnitResistance", &Script_UnitResistance },
|
||||||
|
{ "UnitStat", &Script_UnitStat },
|
||||||
|
{ "UnitAttackBothHands", &Script_UnitAttackBothHands },
|
||||||
|
{ "UnitDamage", &Script_UnitDamage },
|
||||||
|
{ "UnitRangedDamage", &Script_UnitRangedDamage },
|
||||||
|
{ "UnitRangedAttack", &Script_UnitRangedAttack },
|
||||||
|
{ "UnitAttackSpeed", &Script_UnitAttackSpeed },
|
||||||
|
{ "UnitAttackPower", &Script_UnitAttackPower },
|
||||||
|
{ "UnitRangedAttackPower", &Script_UnitRangedAttackPower },
|
||||||
|
{ "UnitDefense", &Script_UnitDefense },
|
||||||
|
{ "UnitArmor", &Script_UnitArmor },
|
||||||
|
{ "UnitCharacterPoints", &Script_UnitCharacterPoints },
|
||||||
|
{ "UnitBuff", &Script_UnitBuff },
|
||||||
|
{ "UnitDebuff", &Script_UnitDebuff },
|
||||||
|
{ "UnitAura", &Script_UnitAura },
|
||||||
|
{ "UnitIsTapped", &Script_UnitIsTapped },
|
||||||
|
{ "UnitIsTappedByPlayer", &Script_UnitIsTappedByPlayer },
|
||||||
|
{ "UnitIsTappedByAllThreatList", &Script_UnitIsTappedByAllThreatList },
|
||||||
|
{ "UnitIsTrivial", &Script_UnitIsTrivial },
|
||||||
|
{ "UnitHasRelicSlot", &Script_UnitHasRelicSlot },
|
||||||
|
{ "SetPortraitTexture", &Script_SetPortraitTexture },
|
||||||
|
{ "HasFullControl", &Script_HasFullControl },
|
||||||
|
{ "GetComboPoints", &Script_GetComboPoints },
|
||||||
|
{ "IsInGuild", &Script_IsInGuild },
|
||||||
|
{ "IsGuildLeader", &Script_IsGuildLeader },
|
||||||
|
{ "IsArenaTeamCaptain", &Script_IsArenaTeamCaptain },
|
||||||
|
{ "IsInArenaTeam", &Script_IsInArenaTeam },
|
||||||
|
{ "IsResting", &Script_IsResting },
|
||||||
|
{ "GetCombatRating", &Script_GetCombatRating },
|
||||||
|
{ "GetCombatRatingBonus", &Script_GetCombatRatingBonus },
|
||||||
|
{ "GetMaxCombatRatingBonus", &Script_GetMaxCombatRatingBonus },
|
||||||
|
{ "GetDodgeChance", &Script_GetDodgeChance },
|
||||||
|
{ "GetBlockChance", &Script_GetBlockChance },
|
||||||
|
{ "GetShieldBlock", &Script_GetShieldBlock },
|
||||||
|
{ "GetParryChance", &Script_GetParryChance },
|
||||||
|
{ "GetCritChanceFromAgility", &Script_GetCritChanceFromAgility },
|
||||||
|
{ "GetSpellCritChanceFromIntellect", &Script_GetSpellCritChanceFromIntellect },
|
||||||
|
{ "GetCritChance", &Script_GetCritChance },
|
||||||
|
{ "GetRangedCritChance", &Script_GetRangedCritChance },
|
||||||
|
{ "GetSpellCritChance", &Script_GetSpellCritChance },
|
||||||
|
{ "GetSpellBonusDamage", &Script_GetSpellBonusDamage },
|
||||||
|
{ "GetSpellBonusHealing", &Script_GetSpellBonusHealing },
|
||||||
|
{ "GetPetSpellBonusDamage", &Script_GetPetSpellBonusDamage },
|
||||||
|
{ "GetSpellPenetration", &Script_GetSpellPenetration },
|
||||||
|
{ "GetArmorPenetration", &Script_GetArmorPenetration },
|
||||||
|
{ "GetAttackPowerForStat", &Script_GetAttackPowerForStat },
|
||||||
|
{ "UnitCreatureType", &Script_UnitCreatureType },
|
||||||
|
{ "UnitCreatureFamily", &Script_UnitCreatureFamily },
|
||||||
|
{ "GetResSicknessDuration", &Script_GetResSicknessDuration },
|
||||||
|
{ "GetPVPSessionStats", &Script_GetPVPSessionStats },
|
||||||
|
{ "GetPVPYesterdayStats", &Script_GetPVPYesterdayStats },
|
||||||
|
{ "GetPVPLifetimeStats", &Script_GetPVPLifetimeStats },
|
||||||
|
{ "UnitPVPRank", &Script_UnitPVPRank },
|
||||||
|
{ "GetPVPRankInfo", &Script_GetPVPRankInfo },
|
||||||
|
{ "GetPVPRankProgress", &Script_GetPVPRankProgress },
|
||||||
|
{ "UnitCastingInfo", &Script_UnitCastingInfo },
|
||||||
|
{ "UnitChannelInfo", &Script_UnitChannelInfo },
|
||||||
|
{ "IsLoggedIn", &Script_IsLoggedIn },
|
||||||
|
{ "IsFlyableArea", &Script_IsFlyableArea },
|
||||||
|
{ "IsIndoors", &Script_IsIndoors },
|
||||||
|
{ "IsOutdoors", &Script_IsOutdoors },
|
||||||
|
{ "IsOutOfBounds", &Script_IsOutOfBounds },
|
||||||
|
{ "IsFalling", &Script_IsFalling },
|
||||||
|
{ "IsSwimming", &Script_IsSwimming },
|
||||||
|
{ "IsFlying", &Script_IsFlying },
|
||||||
|
{ "IsMounted", &Script_IsMounted },
|
||||||
|
{ "IsStealthed", &Script_IsStealthed },
|
||||||
|
{ "UnitIsSameServer", &Script_UnitIsSameServer },
|
||||||
|
{ "GetUnitHealthModifier", &Script_GetUnitHealthModifier },
|
||||||
|
{ "GetUnitMaxHealthModifier", &Script_GetUnitMaxHealthModifier },
|
||||||
|
{ "GetUnitPowerModifier", &Script_GetUnitPowerModifier },
|
||||||
|
{ "GetUnitHealthRegenRateFromSpirit", &Script_GetUnitHealthRegenRateFromSpirit },
|
||||||
|
{ "GetUnitManaRegenRateFromSpirit", &Script_GetUnitManaRegenRateFromSpirit },
|
||||||
|
{ "GetManaRegen", &Script_GetManaRegen },
|
||||||
|
{ "GetPowerRegen", &Script_GetPowerRegen },
|
||||||
|
{ "GetRuneCooldown", &Script_GetRuneCooldown },
|
||||||
|
{ "GetRuneCount", &Script_GetRuneCount },
|
||||||
|
{ "GetRuneType", &Script_GetRuneType },
|
||||||
|
{ "ReportPlayerIsPVPAFK", &Script_ReportPlayerIsPVPAFK },
|
||||||
|
{ "PlayerIsPVPInactive", &Script_PlayerIsPVPInactive },
|
||||||
|
{ "GetExpertise", &Script_GetExpertise },
|
||||||
|
{ "GetExpertisePercent", &Script_GetExpertisePercent },
|
||||||
|
{ "UnitInBattleground", &Script_UnitInBattleground },
|
||||||
|
{ "UnitInRange", &Script_UnitInRange },
|
||||||
|
{ "GetUnitSpeed", &Script_GetUnitSpeed },
|
||||||
|
{ "GetUnitPitch", &Script_GetUnitPitch },
|
||||||
|
{ "UnitInVehicle", &Script_UnitInVehicle },
|
||||||
|
{ "UnitUsingVehicle", &Script_UnitUsingVehicle },
|
||||||
|
{ "UnitControllingVehicle", &Script_UnitControllingVehicle },
|
||||||
|
{ "UnitInVehicleControlSeat", &Script_UnitInVehicleControlSeat },
|
||||||
|
{ "UnitHasVehicleUI", &Script_UnitHasVehicleUI },
|
||||||
|
{ "UnitTargetsVehicleInRaidUI", &Script_UnitTargetsVehicleInRaidUI },
|
||||||
|
{ "UnitVehicleSkin", &Script_UnitVehicleSkin },
|
||||||
|
{ "UnitVehicleSeatCount", &Script_UnitVehicleSeatCount },
|
||||||
|
{ "UnitVehicleSeatInfo", &Script_UnitVehicleSeatInfo },
|
||||||
|
{ "UnitSwitchToVehicleSeat", &Script_UnitSwitchToVehicleSeat },
|
||||||
|
{ "CanSwitchVehicleSeat", &Script_CanSwitchVehicleSeat },
|
||||||
|
{ "GetVehicleUIIndicator", &Script_GetVehicleUIIndicator },
|
||||||
|
{ "GetVehicleUIIndicatorSeat", &Script_GetVehicleUIIndicatorSeat },
|
||||||
|
{ "UnitThreatSituation", &Script_UnitThreatSituation },
|
||||||
|
{ "UnitDetailedThreatSituation", &Script_UnitDetailedThreatSituation },
|
||||||
|
{ "UnitIsControlling", &Script_UnitIsControlling },
|
||||||
|
{ "EjectPassengerFromSeat", &Script_EjectPassengerFromSeat },
|
||||||
|
{ "CanEjectPassengerFromSeat", &Script_CanEjectPassengerFromSeat },
|
||||||
|
{ "RespondInstanceLock", &Script_RespondInstanceLock },
|
||||||
|
{ "GetPlayerFacing", &Script_GetPlayerFacing },
|
||||||
|
{ "GetPlayerInfoByGUID", &Script_GetPlayerInfoByGUID },
|
||||||
|
{ "GetItemStats", &Script_GetItemStats },
|
||||||
|
{ "GetItemStatDelta", &Script_GetItemStatDelta },
|
||||||
|
{ "IsXPUserDisabled", &Script_IsXPUserDisabled },
|
||||||
|
{ "FillLocalizedClassList", &Script_FillLocalizedClassList },
|
||||||
|
};
|
||||||
|
|
||||||
|
void ScriptEventsRegisterFunctions() {
|
||||||
|
SystemRegisterFunctions();
|
||||||
|
|
||||||
|
for (auto& func : s_UnitFunctions) {
|
||||||
|
FrameScript_RegisterFunction(func.name, func.method);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user