mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +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:
+3
-5
@@ -8521,6 +8521,9 @@ Client* EntityList::GetBotOwnerByBotID(const uint32 bot_id) {
|
||||
void EntityList::AddBot(Bot *new_bot, bool send_spawn_packet, bool dont_queue) {
|
||||
if (new_bot) {
|
||||
new_bot->SetID(GetFreeID());
|
||||
bot_list.push_back(new_bot);
|
||||
mob_list.insert(std::pair<uint16, Mob*>(new_bot->GetID(), new_bot));
|
||||
parse->EventBot(EVENT_SPAWN, new_bot, nullptr, "", 0);
|
||||
new_bot->SetSpawned();
|
||||
if (send_spawn_packet) {
|
||||
if (dont_queue) {
|
||||
@@ -8538,11 +8541,6 @@ void EntityList::AddBot(Bot *new_bot, bool send_spawn_packet, bool dont_queue) {
|
||||
}
|
||||
}
|
||||
|
||||
bot_list.push_back(new_bot);
|
||||
mob_list.insert(std::pair<uint16, Mob*>(new_bot->GetID(), new_bot));
|
||||
|
||||
parse->EventBot(EVENT_SPAWN, new_bot, nullptr, "", 0);
|
||||
|
||||
new_bot->DispatchZoneControllerEvent(EVENT_SPAWN_ZONE, new_bot, "", 0, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user