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!

Invisible Pet

Status
Not open for further replies.
Newbie Spellweaver
Joined
Sep 18, 2022
Messages
11
Reaction score
1
Does anyone knows how to fix when using dark illusion, the pet not hidding? looter/raised pets. Can share the code? :thumbup1:
 
Inactive
Joined
Jan 20, 2009
Messages
1,014
Reaction score
1,830
Yeah I tested from dreamer but only raised pet is hiding :/





I want to enable hiding sir ketchup

Find & Replace (Mover.cpp):
Code:
		m_pBalloonFlag = FALSE;
		if( m_pBalloon )
		{
			SAFE_DELETE(m_pBalloon);
			m_pBalloon = NULL;
			m_fBalloonYPos = 1.0f;
		}
	}
	
	if (m_pBalloon)
	{
#ifdef __DI_INVISFIX
		if (HasBuff(BUFF_SKILL, SI_ACR_SUP_DARKILLUSION) || IsMode(TRANSPARENT_MODE))
		{
			m_pBalloon->SetBlendFactor(80);
			if (IsActiveMover() || g_pPlayer->IsAuthHigher(AUTH_GAMEMASTER))
			{
				m_pBalloon->FrameMove();
				BalloonMoveProcess();
			}
			else
			{
				m_pBalloonFlag = FALSE;
				SAFE_DELETE(m_pBalloon);
				m_pBalloon = NULL;
				m_fBalloonYPos = 1.0f;

			}
		}
		else
		{
			m_pBalloon->SetBlendFactor(255);
			m_pBalloon->FrameMove();
			BalloonMoveProcess();
		}
#endif
	}
#endif //__EVE_BALLOON

Find & Replace (WndWorld.cpp):
Code:
#ifdef _DEBUG
#ifdef __XUZHU
			{
				D3DXVECTOR3 vDest = g_pPlayer->GetPos();
				D3DXVECTOR3 vSrc  = pMover->GetPos();		// ¸ó½ºÅÍÂÊ¿¡¼­ Ç÷¹À̾îÂÊÀǺ¤ÅÍ.
				_g_fReg[4] = GetDegreeX( vDest, vSrc );
			}
#endif
#endif			
			BOOL bSkip = FALSE;

			// ¿î¿µÀÚÀÌ°í º¯½ÅÁßÀ̸é HP¹Ù ¾È±×¸°´Ù.
#ifdef __DI_INVISFIX
			if( pMover->IsAuthHigher( AUTH_GAMEMASTER ) == TRUE || pMover->HasBuff( BUFF_SKILL, SI_ACR_SUP_DARKILLUSION ) 
			|| pMover->IsMode( TRANSPARENT_MODE ) )
#else
			if( pMover->IsAuthHigher( AUTH_GAMEMASTER ) == TRUE )
#endif
			{
				bSkip = TRUE;
				
				if( pMover->HasBuffByIk3(IK3_TEXT_DISGUISE) )
					bSkip = TRUE;
			}

Code:
void CWndWorld::ShowMoverMenu( CMover* pTarget )
{
	// ¸Þ´º¸¦ ¶ç¿ì±â¿¡ Àû´çÇÑ °Å¸®ÀÎÁö È®ÀÎ.
	D3DXVECTOR3 vDist = pTarget->GetPos() - g_pPlayer->GetPos();
	FLOAT fDistSq = D3DXVec3LengthSq( &vDist );
#if __VER >= 15 // __IMPROVE_SYSTEM_VER15
	if( (fDistSq < 20.0f * 20.0f) && ( m_bRButtonDown == FALSE || ( pTarget->IsPlayer() && m_bRButtonDown == TRUE ) ) )
#else // __IMPROVE_SYSTEM_VER15
	if( (fDistSq < 20.0f * 20.0f) && m_bRButtonDown == FALSE )
#endif // __IMPROVE_SYSTEM_VER15
	{
#ifdef __DI_INVISFIX
		if( !g_pPlayer->IsAuthHigher( AUTH_GAMEMASTER ) && ( pTarget->HasBuff( BUFF_SKILL, SI_ACR_SUP_DARKILLUSION ) 
		|| pTarget->IsMode( TRANSPARENT_MODE ) ) )
		{
			return;
		}
#endif
		g_pPlayer->ClearDest();
		m_wndMenuMover.DeleteAllMenu();
		m_wndMenuMover.SetLargeWidth( 0 );

Then define:
Code:
#define __DI_INVISFIX
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Sep 18, 2022
Messages
11
Reaction score
1
Find & Replace (Mover.cpp):
Code:
        m_pBalloonFlag = FALSE;
        if( m_pBalloon )
        {
            SAFE_DELETE(m_pBalloon);
            m_pBalloon = NULL;
            m_fBalloonYPos = 1.0f;
        }
    }
    
    if (m_pBalloon)
    {
#ifdef __DI_INVISFIX
        if (HasBuff(BUFF_SKILL, SI_ACR_SUP_DARKILLUSION) || IsMode(TRANSPARENT_MODE))
        {
            m_pBalloon->SetBlendFactor(80);
            if (IsActiveMover() || g_pPlayer->IsAuthHigher(AUTH_GAMEMASTER))
            {
                m_pBalloon->FrameMove();
                BalloonMoveProcess();
            }
            else
            {
                m_pBalloonFlag = FALSE;
                SAFE_DELETE(m_pBalloon);
                m_pBalloon = NULL;
                m_fBalloonYPos = 1.0f;

            }
        }
        else
        {
            m_pBalloon->SetBlendFactor(255);
            m_pBalloon->FrameMove();
            BalloonMoveProcess();
        }
#endif
    }
#endif //__EVE_BALLOON

Find & Replace (WndWorld.cpp):
Code:
#ifdef _DEBUG
#ifdef __XUZHU
            {
                D3DXVECTOR3 vDest = g_pPlayer->GetPos();
                D3DXVECTOR3 vSrc  = pMover->GetPos();        // ¸ó½ºÅÍÂÊ¿¡¼­ Ç÷¹À̾îÂÊÀǺ¤ÅÍ.
                _g_fReg[4] = GetDegreeX( vDest, vSrc );
            }
#endif
#endif            
            BOOL bSkip = FALSE;

            // ¿î¿µÀÚÀÌ°í º¯½ÅÁßÀ̸é HP¹Ù ¾È±×¸°´Ù.
#ifdef __DI_INVISFIX
            if( pMover->IsAuthHigher( AUTH_GAMEMASTER ) == TRUE || pMover->HasBuff( BUFF_SKILL, SI_ACR_SUP_DARKILLUSION ) 
            || pMover->IsMode( TRANSPARENT_MODE ) )
#else
            if( pMover->IsAuthHigher( AUTH_GAMEMASTER ) == TRUE )
#endif
            {
                bSkip = TRUE;
                
                if( pMover->HasBuffByIk3(IK3_TEXT_DISGUISE) )
                    bSkip = TRUE;
            }

Code:
void CWndWorld::ShowMoverMenu( CMover* pTarget )
{
    // ¸Þ´º¸¦ ¶ç¿ì±â¿¡ Àû´çÇÑ °Å¸®ÀÎÁö È®ÀÎ.
    D3DXVECTOR3 vDist = pTarget->GetPos() - g_pPlayer->GetPos();
    FLOAT fDistSq = D3DXVec3LengthSq( &vDist );
#if __VER >= 15 // __IMPROVE_SYSTEM_VER15
    if( (fDistSq < 20.0f * 20.0f) && ( m_bRButtonDown == FALSE || ( pTarget->IsPlayer() && m_bRButtonDown == TRUE ) ) )
#else // __IMPROVE_SYSTEM_VER15
    if( (fDistSq < 20.0f * 20.0f) && m_bRButtonDown == FALSE )
#endif // __IMPROVE_SYSTEM_VER15
    {
#ifdef __DI_INVISFIX
        if( !g_pPlayer->IsAuthHigher( AUTH_GAMEMASTER ) && ( pTarget->HasBuff( BUFF_SKILL, SI_ACR_SUP_DARKILLUSION ) 
        || pTarget->IsMode( TRANSPARENT_MODE ) ) )
        {
            return;
        }
#endif
        g_pPlayer->ClearDest();
        m_wndMenuMover.DeleteAllMenu();
        m_wndMenuMover.SetLargeWidth( 0 );

Then define:
Code:
#define __DI_INVISFIX

Hello sir Ketchup. I mean I want to hide to pet when using Dark Illusion. I already tried this but still the pets are not hiding. Only the balloon. I think you misunderstood my post XD. Sorry for my poor poor poor english.
 
Upvote 0
Newbie Spellweaver
Joined
Sep 8, 2011
Messages
67
Reaction score
252
Code:
#ifdef __PetIllusionFixes
#ifdef __CLIENT
		CMover *pPet = m_pet.GetObj();
		if (pPet)
		{
			if (HasBuff(BUFF_SKILL, SI_ACR_SUP_DARKILLUSION))
				pPet->m_dwMode |= TRANSPARENT_MODE;
			else
				pPet->m_dwMode &= (~TRANSPARENT_MODE);
		}
#endif
#ifdef __WORLDSERVER // force transparent and remove sfx for all users
		CMover* pEatPet = prj.GetMover(GetEatPetId());
		if (pEatPet && IsValidObj(pEatPet))
		{
			if (HasBuff(BUFF_SKILL, SI_ACR_SUP_DARKILLUSION))
			{
				if (!(pEatPet->m_dwMode & TRANSPARENT_MODE))
				{
					pEatPet->m_dwMode |= TRANSPARENT_MODE;
					g_UserMng.AddModifyMode(static_cast<CUser*>(pEatPet));
					pEatPet->m_dwMoverSfxId = NULL_ID;
					g_UserMng.AddChangeMoverSfxId(pEatPet);
#ifdef __SWITCH_PETGLOW
					pMover->m_dwPetGlow = NULL_ID;
					g_UserMng.AddChangePetGlowSfxId(pEatPet);
#endif
				}
			}
			else
			{
				if (pEatPet->m_dwMode & TRANSPARENT_MODE)
				{
					pEatPet->m_dwMode &= (~TRANSPARENT_MODE);
					g_UserMng.AddModifyMode(static_cast<CUser*>(pEatPet));

					CItemElem* itemVisPet = GetVisPetItem();
					if (itemVisPet)
					{
						DWORD dwSfxId = itemVisPet->GetVisPetSfxId();
						if (pEatPet->m_dwMoverSfxId != dwSfxId)
						{
							pEatPet->m_dwMoverSfxId = dwSfxId;
							g_UserMng.AddChangeMoverSfxId(pEatPet);
						}
#ifdef __SWITCH_PETGLOW
						unsigned long dwPetSfxid = itemVisPet->GetPetGlowChange();
						if (pEatPet->m_dwPetGlow != dwPetSfxid)
						{
							pEatPet->m_dwPetGlow = dwPetSfxid;
							g_UserMng.AddChangePetGlowSfxId(pEatPet);
						}
#endif 
					}
				}
			}
		}
#endif
#endif

Here is something in one of my older set of files. You can start getting really creative and applying these "pet illusion" transitions when the object becomes existing or when the Dark Illusion effect starts instead of flooding the process call.
 
Upvote 0
Newbie Spellweaver
Joined
Sep 18, 2022
Messages
11
Reaction score
1
Code:
#ifdef __PetIllusionFixes
#ifdef __CLIENT
        CMover *pPet = m_pet.GetObj();
        if (pPet)
        {
            if (HasBuff(BUFF_SKILL, SI_ACR_SUP_DARKILLUSION))
                pPet->m_dwMode |= TRANSPARENT_MODE;
            else
                pPet->m_dwMode &= (~TRANSPARENT_MODE);
        }
#endif
#ifdef __WORLDSERVER // force transparent and remove sfx for all users
        CMover* pEatPet = prj.GetMover(GetEatPetId());
        if (pEatPet && IsValidObj(pEatPet))
        {
            if (HasBuff(BUFF_SKILL, SI_ACR_SUP_DARKILLUSION))
            {
                if (!(pEatPet->m_dwMode & TRANSPARENT_MODE))
                {
                    pEatPet->m_dwMode |= TRANSPARENT_MODE;
                    g_UserMng.AddModifyMode(static_cast<CUser*>(pEatPet));
                    pEatPet->m_dwMoverSfxId = NULL_ID;
                    g_UserMng.AddChangeMoverSfxId(pEatPet);
#ifdef __SWITCH_PETGLOW
                    pMover->m_dwPetGlow = NULL_ID;
                    g_UserMng.AddChangePetGlowSfxId(pEatPet);
#endif
                }
            }
            else
            {
                if (pEatPet->m_dwMode & TRANSPARENT_MODE)
                {
                    pEatPet->m_dwMode &= (~TRANSPARENT_MODE);
                    g_UserMng.AddModifyMode(static_cast<CUser*>(pEatPet));

                    CItemElem* itemVisPet = GetVisPetItem();
                    if (itemVisPet)
                    {
                        DWORD dwSfxId = itemVisPet->GetVisPetSfxId();
                        if (pEatPet->m_dwMoverSfxId != dwSfxId)
                        {
                            pEatPet->m_dwMoverSfxId = dwSfxId;
                            g_UserMng.AddChangeMoverSfxId(pEatPet);
                        }
#ifdef __SWITCH_PETGLOW
                        unsigned long dwPetSfxid = itemVisPet->GetPetGlowChange();
                        if (pEatPet->m_dwPetGlow != dwPetSfxid)
                        {
                            pEatPet->m_dwPetGlow = dwPetSfxid;
                            g_UserMng.AddChangePetGlowSfxId(pEatPet);
                        }
#endif 
                    }
                }
            }
        }
#endif
#endif

Here is something in one of my older set of files. You can start getting really creative and applying these "pet illusion" transitions when the object becomes existing or when the Dark Illusion effect starts instead of flooding the process call.

Big thanks for this sir. Really works like a charm.
 
Upvote 0
Status
Not open for further replies.
Back
Top