mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Experimental changes to lua get_qglobal implementation to try to see if we can figure out this gcc x86 bug.
This commit is contained in:
+39
-8
@@ -759,20 +759,52 @@ luabind::object lua_get_qglobals(lua_State *L, Lua_NPC npc, Lua_Client client) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
luabind::object lua_get_qglobals(lua_State *L, Lua_Client client, Lua_NPC npc) {
|
||||
return lua_get_qglobals(L, npc, client);
|
||||
}
|
||||
|
||||
luabind::object lua_get_qglobals(lua_State *L, Lua_Client client) {
|
||||
return lua_get_qglobals(L, Lua_NPC(nullptr), client);
|
||||
luabind::object ret = luabind::newtable(L);
|
||||
|
||||
NPC *n = nullptr;
|
||||
Client *c = client;
|
||||
|
||||
std::list<QGlobal> global_map;
|
||||
QGlobalCache::GetQGlobals(global_map, n, c, zone);
|
||||
auto iter = global_map.begin();
|
||||
while (iter != global_map.end()) {
|
||||
ret[(*iter).name] = (*iter).value;
|
||||
++iter;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
luabind::object lua_get_qglobals(lua_State *L, Lua_NPC npc) {
|
||||
return lua_get_qglobals(L, npc, Lua_Client(nullptr));
|
||||
luabind::object ret = luabind::newtable(L);
|
||||
|
||||
NPC *n = npc;
|
||||
Client *c = nullptr;
|
||||
|
||||
std::list<QGlobal> global_map;
|
||||
QGlobalCache::GetQGlobals(global_map, n, c, zone);
|
||||
auto iter = global_map.begin();
|
||||
while (iter != global_map.end()) {
|
||||
ret[(*iter).name] = (*iter).value;
|
||||
++iter;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
luabind::object lua_get_qglobals(lua_State *L) {
|
||||
return lua_get_qglobals(L, Lua_NPC(nullptr), Lua_Client(nullptr));
|
||||
luabind::object ret = luabind::newtable(L);
|
||||
|
||||
NPC *n = nullptr;
|
||||
Client *c = nullptr;
|
||||
|
||||
std::list<QGlobal> global_map;
|
||||
QGlobalCache::GetQGlobals(global_map, n, c, zone);
|
||||
auto iter = global_map.begin();
|
||||
while (iter != global_map.end()) {
|
||||
ret[(*iter).name] = (*iter).value;
|
||||
++iter;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Lua_EntityList lua_get_entity_list() {
|
||||
@@ -1249,7 +1281,6 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("cross_zone_signal_client_by_name", &lua_cross_zone_signal_client_by_name),
|
||||
luabind::def("cross_zone_message_player_by_name", &lua_cross_zone_message_player_by_name),
|
||||
luabind::def("get_qglobals", (luabind::object(*)(lua_State*,Lua_NPC,Lua_Client))&lua_get_qglobals),
|
||||
luabind::def("get_qglobals", (luabind::object(*)(lua_State*,Lua_Client,Lua_NPC))&lua_get_qglobals),
|
||||
luabind::def("get_qglobals", (luabind::object(*)(lua_State*,Lua_Client))&lua_get_qglobals),
|
||||
luabind::def("get_qglobals", (luabind::object(*)(lua_State*,Lua_NPC))&lua_get_qglobals),
|
||||
luabind::def("get_qglobals", (luabind::object(*)(lua_State*))&lua_get_qglobals),
|
||||
|
||||
Reference in New Issue
Block a user