Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Excuse me: pet problem

Status
Not open for further replies.
Initiate Mage
Joined
Oct 9, 2020
Messages
48
Reaction score
2
Excuse me, how to make the pet refresh to return to the character's side to extend the distance?


Thank you in advance
 
Initiate Mage
Joined
Sep 8, 2011
Messages
67
Reaction score
252
__REACTIVATE_EATPET
Code:
			if( !IsValidArea( pEatPet, 32 ) ) 
			{
				CAIPet* pAIPet	= static_cast<CAIPet*>( pEatPet->m_pAIInterface );
				if( pAIPet )
				{
					CItemElem* pItemElem = (CItemElem*)GetItemId( pAIPet->GetPetItemId() );
					InactivateEatPet(); 
					if( IsUsableItem( pItemElem ) )
						DoUseItem( MAKELONG( ITYPE_ITEM, pItemElem->m_dwObjId ), pItemElem->m_dwObjId );
				}
				else
					InactivateEatPet();
			}

Here if its not in 32 it inactivate and uses once again.
 
Initiate Mage
Joined
Oct 9, 2020
Messages
48
Reaction score
2
Thank you for your reply. What I want to ask is how to increase the range of his items instead of reactivating them
 
Initiate Mage
Joined
Oct 9, 2020
Messages
48
Reaction score
2
__REACTIVATE_EATPET
Code:
            if( !IsValidArea( pEatPet, 32 ) ) 
            {
                CAIPet* pAIPet    = static_cast<CAIPet*>( pEatPet->m_pAIInterface );
                if( pAIPet )
                {
                    CItemElem* pItemElem = (CItemElem*)GetItemId( pAIPet->GetPetItemId() );
                    InactivateEatPet(); 
                    if( IsUsableItem( pItemElem ) )
                        DoUseItem( MAKELONG( ITYPE_ITEM, pItemElem->m_dwObjId ), pItemElem->m_dwObjId );
                }
                else
                    InactivateEatPet();
            }

Here if its not in 32 it inactivate and uses once again.
Thank you. I think you're right. Just change the 32 value
 
Status
Not open for further replies.
Back
Top