mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 11:48:37 +00:00
[Bug Fix] Move EVENT_SPAWN for adding NPCs back to original spot, also add NPCs… (#2749)
* Move EVENT_SPAWN for adding NPCs back to original spot, also add NPCs to npc/mob list before parsing * Adjust bots EVENT_SPAWN before spawn packet
This commit is contained in:
+6
-6
@@ -697,7 +697,12 @@ void EntityList::AddNPC(NPC *npc, bool send_spawn_packet, bool dont_queue)
|
||||
owner->SetPetID(npc->GetID());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
npc_list.insert(std::pair<uint16, NPC *>(npc->GetID(), npc));
|
||||
mob_list.insert(std::pair<uint16, Mob *>(npc->GetID(), npc));
|
||||
|
||||
parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0);
|
||||
|
||||
const auto emote_id = npc->GetEmoteID();
|
||||
if (emote_id != 0) {
|
||||
npc->DoNPCEmote(EQ::constants::EmoteEventTypes::OnSpawn, emote_id);
|
||||
@@ -731,11 +736,6 @@ void EntityList::AddNPC(NPC *npc, bool send_spawn_packet, bool dont_queue)
|
||||
}
|
||||
}
|
||||
|
||||
npc_list.insert(std::pair<uint16, NPC *>(npc->GetID(), npc));
|
||||
mob_list.insert(std::pair<uint16, Mob *>(npc->GetID(), npc));
|
||||
|
||||
parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0);
|
||||
|
||||
entity_list.ScanCloseMobs(npc->close_mobs, npc, true);
|
||||
|
||||
npc->DispatchZoneControllerEvent(EVENT_SPAWN_ZONE, npc, "", 0, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user