mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
check spr and dat signatures
This commit is contained in:
@@ -50,6 +50,21 @@ bool luavalue_cast(int index, int& i)
|
||||
return true;
|
||||
}
|
||||
|
||||
// uint
|
||||
void push_luavalue(uint v)
|
||||
{
|
||||
push_luavalue((double)v);
|
||||
}
|
||||
|
||||
bool luavalue_cast(int index, uint& v)
|
||||
{
|
||||
double d;
|
||||
bool ret = luavalue_cast(index, d);
|
||||
v = (uint32)d;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
// double
|
||||
void push_luavalue(double d)
|
||||
{
|
||||
|
@@ -36,6 +36,10 @@ bool luavalue_cast(int index, bool& b);
|
||||
void push_luavalue(int i);
|
||||
bool luavalue_cast(int index, int& i);
|
||||
|
||||
// uint
|
||||
void push_luavalue(uint v);
|
||||
bool luavalue_cast(int index, uint& v);
|
||||
|
||||
// double
|
||||
void push_luavalue(double d);
|
||||
bool luavalue_cast(int index, double& d);
|
||||
|
@@ -47,10 +47,12 @@ void OTClient::registerLuaFunctions()
|
||||
g_lua.registerStaticClass("g_thingsType");
|
||||
g_lua.bindClassStaticFunction("g_thingsType", "load", std::bind(&ThingsType::load, &g_thingsType, _1));
|
||||
g_lua.bindClassStaticFunction("g_thingsType", "isLoaded", std::bind(&ThingsType::isLoaded, &g_thingsType));
|
||||
g_lua.bindClassStaticFunction("g_thingsType", "getSignature", std::bind(&ThingsType::getSignature, &g_thingsType));
|
||||
|
||||
g_lua.registerStaticClass("g_sprites");
|
||||
g_lua.bindClassStaticFunction("g_sprites", "load", std::bind(&SpriteManager::load, &g_sprites, _1));
|
||||
g_lua.bindClassStaticFunction("g_sprites", "isLoaded", std::bind(&SpriteManager::isLoaded, &g_sprites));
|
||||
g_lua.bindClassStaticFunction("g_sprites", "getSignature", std::bind(&SpriteManager::getSignature, &g_sprites));
|
||||
|
||||
g_lua.bindGlobalFunction("exit", std::bind(&Application::exit, g_app));
|
||||
g_lua.bindGlobalFunction("getOufitColor", Outfit::getColor);
|
||||
|
Reference in New Issue
Block a user