View Single Post
  #15  
Old 10-02-2015, 03:06 AM
AdrianD
Discordant
 
Join Date: Dec 2013
Posts: 297
Default

Last one for a bit:

The two lines below SetPet, <Mob* mypet =......etc.>, gives the same resulting appearance as <SetPet(0);>. (takes a moment to depop) I am unsure if one is better than the other.

\client_process.cpp(841)
Code:
		if (!RuleB(Pets, PetLogPersistence))
		{
			SetPet(0);

//                     or

			Mob* mypet = this->GetPet();
			mypet->CastToNPC()->Depop();

			database.DeletePetInfo(this);

			memset(&m_petinfo, 0, sizeof(struct PetInfo));
			
			database.SavePetInfo(this);
		}
	}
Reply With Quote