mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Bots] Prevent bot pets from despawning on #repop (#4790)
This commit is contained in:
parent
937b947597
commit
5e4fd43920
@ -3143,20 +3143,23 @@ void EntityList::Depop(bool StartSpawnTimer)
|
|||||||
{
|
{
|
||||||
for (auto it = npc_list.begin(); it != npc_list.end(); ++it) {
|
for (auto it = npc_list.begin(); it != npc_list.end(); ++it) {
|
||||||
NPC *pnpc = it->second;
|
NPC *pnpc = it->second;
|
||||||
|
|
||||||
if (pnpc) {
|
if (pnpc) {
|
||||||
Mob *own = pnpc->GetOwner();
|
Mob *own = pnpc->GetOwner();
|
||||||
//do not depop player's pets...
|
//do not depop player/bot pets...
|
||||||
if (own && own->IsClient())
|
if (own && own->IsOfClientBot()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (pnpc->IsHorse())
|
if (pnpc->IsHorse()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (pnpc->IsFindable())
|
if (pnpc->IsFindable()) {
|
||||||
UpdateFindableNPCState(pnpc, true);
|
UpdateFindableNPCState(pnpc, true);
|
||||||
|
}
|
||||||
|
|
||||||
pnpc->WipeHateList();
|
pnpc->WipeHateList();
|
||||||
|
|
||||||
pnpc->Depop(StartSpawnTimer);
|
pnpc->Depop(StartSpawnTimer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user