Hm, was thinking perhaps the pet isn't being freed correctly by SetPet(0) for whatever reason;
Could try adding:
Code:
Mob *mypet = GetPet();
if(mypet)
mypet->Depop();
directly above:
Code:
//let the stream factory know were done with this stream
eqs->Close();
eqs->ReleaseFromUse();
in Client::~Client() ln241 in client.cpp and see if it has any impact on at least the pets no longer appearing in the zones as regular npcs.