mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna fix TC errors from previous commits, fix merge and fix a crash on osx
This commit is contained in:
@@ -1435,7 +1435,7 @@ namespace LuaGlobalFunctions
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), phase);
|
||||
|
||||
uint32 db_lowguid = creature->GetDBTableGUIDLow();
|
||||
if (!creaturLoadCreatureFromDB(db_lowguid, map))
|
||||
if (!creature->LoadCreatureFromDB(db_lowguid, map))
|
||||
{
|
||||
delete creature;
|
||||
Eluna::Push(L);
|
||||
@@ -2260,9 +2260,9 @@ namespace LuaGlobalFunctions
|
||||
*
|
||||
* @return uint32 currTime
|
||||
*/
|
||||
int GetCurrTime(Eluna* E)
|
||||
int GetCurrTime(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
Eluna::Push(E->L, ElunaUtil::GetCurrTime());
|
||||
Eluna::Push(L, ElunaUtil::GetCurrTime());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2272,30 +2272,30 @@ namespace LuaGlobalFunctions
|
||||
* @param uint32 oldTime
|
||||
* @return uint32 timeDiff
|
||||
*/
|
||||
int GetTimeDiff(Eluna* E)
|
||||
int GetTimeDiff(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
uint32 oldtimems = Eluna::CHECKVAL<uint32>(E->L, 1);
|
||||
uint32 oldtimems = Eluna::CHECKVAL<uint32>(L, 1);
|
||||
|
||||
Eluna::Push(E->L, ElunaUtil::GetTimeDiff(oldtimems));
|
||||
Eluna::Push(L, ElunaUtil::GetTimeDiff(oldtimems));
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string GetStackAsString(Eluna* E)
|
||||
std::string GetStackAsString(lua_State* L)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
for (int i = 1; i <= lua_gettop(E->L); ++i)
|
||||
oss << luaL_tolstring(E->L, i, NULL);
|
||||
for (int i = 1; i <= lua_gettop(L); ++i)
|
||||
oss << luaL_tolstring(L, i, NULL);
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints given parameters to the info log
|
||||
*
|
||||
* @param ... variableArguments
|
||||
*/
|
||||
int PrintInfo(Eluna* E)
|
||||
int PrintInfo(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
ELUNA_LOG_INFO("%s", GetStackAsString(E).c_str());
|
||||
ELUNA_LOG_INFO("%s", GetStackAsString(L).c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2304,9 +2304,9 @@ namespace LuaGlobalFunctions
|
||||
*
|
||||
* @param ... variableArguments
|
||||
*/
|
||||
int PrintError(Eluna* E)
|
||||
int PrintError(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
ELUNA_LOG_ERROR("%s", GetStackAsString(E).c_str());
|
||||
ELUNA_LOG_ERROR("%s", GetStackAsString(L).c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2315,9 +2315,9 @@ namespace LuaGlobalFunctions
|
||||
*
|
||||
* @param ... variableArguments
|
||||
*/
|
||||
int PrintDebug(Eluna* E)
|
||||
int PrintDebug(Eluna* /*E*/, lua_State* L)
|
||||
{
|
||||
ELUNA_LOG_DEBUG("%s", GetStackAsString(E).c_str());
|
||||
ELUNA_LOG_DEBUG("%s", GetStackAsString(L).c_str());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user