Jump to content
  • Register Now

    Sign up and take advantage of the features of our community! Some forums are only accessible to our members!

  • 0

search system ninja and pet hide


chairman

Question

2 answers to this question

Recommended Posts

  • 0

that? 

bool CPetActor::Update(DWORD deltaTime)
{
	bool bResult = true;
	bool bHide = false;

	// Ćę ÁÖŔÎŔĚ Á׾ú°ĹłŞ, ĽŇČŻµČ ĆęŔÇ »óĹ°ˇ ŔĚ»óÇϴٸé ĆęŔ» ľřľÚ. (NOTE: °ˇ˛ű°ˇ´Ů ŔĚ·± Ŕú·± ŔĚŔŻ·Î ĽŇČŻµČ ĆęŔĚ DEAD »óĹÂżˇ şüÁö´Â °ćżě°ˇ ŔÖŔ˝-_-;)
	// ĆęŔ» ĽŇČŻÇŃ ľĆŔĚĹŰŔĚ ľř°ĹłŞ, ł»°ˇ °ˇÁř »óĹ°ˇ ľĆ´Ď¶ó¸é ĆęŔ» ľřľÚ.
	if ((IsSummoned() && m_pkChar->IsDead()) || NULL == ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID()) || ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID())->GetOwner() != this->GetOwner())
	{
		if (bHide == false)
		{
			m_pkOwner->SetQuestFlag("pet_system.pet_vnum", 0);
			m_pkOwner->SetQuestFlag("pet_item_id.pet_vnum", 0);
			m_pkOwner->SetQuestFlag("itemVnumPet.pet_vnum", 0);
			this->Unsummon();
			return true;
		}
	}

	if (this->IsSummoned() && HasOption(EPetOption_Followable))
		bResult = bResult && this->_UpdateFollowAI();
	
	if (this->IsSummoned() && m_pkOwner->IsAffectFlag(AFF_EUNHYUNG))
	{
		CPetSystem* petSystem = m_pkOwner->GetPetSystem();
		if (0 == petSystem)
			return false;

		DWORD pVnum = m_pkOwner->GetQuestFlag("pet_system.pet_vnum");
		if (0 == pVnum)
			return false;
			
		LPITEM pItem = m_pkOwner->GetInventoryItem(m_dwSummonItemVnum);
		if (0 == pItem)
			return false;			
			
		CPetActor* petActor = petSystem->GetByVnum(pVnum);
		if (petActor)
		{
			bHide = true;
			petSystem->DeletePet(petActor);
		}
		else
		{
			bHide = false;		
			petSystem->Summon(pVnum, pItem, "", false);
		}
	}	
	
	return bResult;
}

 

@martysama0134@xP3NG3Rx

Edited by chairman (see edit history)
Link to post
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.