mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 19:48:26 +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:
@@ -1908,11 +1908,17 @@ void PerlembParser::ExportEventVariables(
|
||||
|
||||
case EVENT_CONSIDER: {
|
||||
ExportVar(package_name.c_str(), "entity_id", std::stoi(data));
|
||||
if (extra_pointers && extra_pointers->size() == 1) {
|
||||
ExportVar(package_name.c_str(), "target", "Mob", std::any_cast<Mob*>(extra_pointers->at(0)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case EVENT_CONSIDER_CORPSE: {
|
||||
ExportVar(package_name.c_str(), "corpse_entity_id", std::stoi(data));
|
||||
if (extra_pointers && extra_pointers->size() == 1) {
|
||||
ExportVar(package_name.c_str(), "corpse", "Corpse", std::any_cast<Corpse*>(extra_pointers->at(0)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user