[Quest API] Export killed XYZH to EVENT_DEATH_ZONE in Perl. (#2050)

- Export $killed_x, $killed_y, $killed_z, and $killed_h to EVENT_DEATH_ZONE in Perl.
- Cleanup export strings and unnecessary .c_str() calls on event exports.
This commit is contained in:
Kinglykrab
2022-03-12 13:44:01 -05:00
committed by GitHub
parent abcf8cbce1
commit 791d8b329d
9 changed files with 72 additions and 34 deletions
+6 -2
View File
@@ -733,8 +733,12 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue)
if (RuleB(Zone, UseZoneController)) {
auto controller = entity_list.GetNPCByNPCTypeID(ZONE_CONTROLLER_NPC_ID);
if (controller && npc->GetNPCTypeID() != ZONE_CONTROLLER_NPC_ID){
std::string data_pass = fmt::format("{} {}", npc->GetID(), npc->GetNPCTypeID());
parse->EventNPC(EVENT_SPAWN_ZONE, controller, nullptr, data_pass.c_str(), 0);
std::string export_string = fmt::format(
"{} {}",
npc->GetID(),
npc->GetNPCTypeID()
);
parse->EventNPC(EVENT_SPAWN_ZONE, controller, nullptr, export_string, 0);
}
}