mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Quest API] Export targets to EVENT_CONSIDER and EVENT_CONSIDER_CORPSE (#2908)
# Perl - Export `$target` to `EVENT_CONSIDER`. - Export `$corpse` to `EVENT_CONSIDER_CORPSE`. # Lua - Export `e.other` to `EVENT_CONSIDER`. - Export `e.corpse` to `EVENT_CONSIDER_CORPSE`. # Notes - Allows operators to grab the target or corpse a player is considering.
This commit is contained in:
@@ -1105,6 +1105,13 @@ void handle_player_consider(
|
||||
) {
|
||||
lua_pushinteger(L, Strings::ToInt(data));
|
||||
lua_setfield(L, -2, "entity_id");
|
||||
|
||||
if (extra_pointers && extra_pointers->size() == 1) {
|
||||
Lua_NPC l_npc(std::any_cast<NPC*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_npc_o = luabind::adl::object(L, l_npc);
|
||||
l_npc_o.push(L);
|
||||
lua_setfield(L, -2, "other");
|
||||
}
|
||||
}
|
||||
|
||||
void handle_player_consider_corpse(
|
||||
@@ -1117,6 +1124,13 @@ void handle_player_consider_corpse(
|
||||
) {
|
||||
lua_pushinteger(L, Strings::ToInt(data));
|
||||
lua_setfield(L, -2, "corpse_entity_id");
|
||||
|
||||
if (extra_pointers && extra_pointers->size() == 1) {
|
||||
Lua_Corpse l_corpse(std::any_cast<Corpse *>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_corpse_o = luabind::adl::object(L, l_corpse);
|
||||
l_corpse_o.push(L);
|
||||
lua_setfield(L, -2, "corpse");
|
||||
}
|
||||
}
|
||||
|
||||
void handle_player_inspect(
|
||||
|
||||
Reference in New Issue
Block a user