Invisible Pet

Results 1 to 8 of 8
  1. #1
    Apprentice cheryl123 is offline
    MemberRank
    Sep 2022 Join Date
    11Posts

    Invisible Pet

    Does anyone knows how to fix when using dark illusion, the pet not hidding? looter/raised pets. Can share the code?


  2. #2
    Valued Member c2cube is online now
    MemberRank
    Sep 2021 Join Date
    131Posts
    Check Dreamer Source, there is a fix for it

  3. #3
    Enthusiast Ketchup is offline
    MemberRank
    Jan 2009 Join Date
    25Posts
    Quote Originally Posted by cheryl123 View Post
    Does anyone knows how to fix when using dark illusion, the pet not hidding? looter/raised pets. Can share the code?
    I can't tell if your asking to remove hiding it or if you want to hide it?

  4. #4
    Apprentice cheryl123 is offline
    MemberRank
    Sep 2022 Join Date
    11Posts
    Quote Originally Posted by c2cube View Post
    Check Dreamer Source, there is a fix for it
    Yeah I tested from dreamer but only raised pet is hiding :/

    - - - Updated - - -

    Quote Originally Posted by Ketchup View Post
    I can't tell if your asking to remove hiding it or if you want to hide it?
    I want to enable hiding sir ketchup

  5. #5
    Enthusiast Ketchup is offline
    MemberRank
    Jan 2009 Join Date
    25Posts
    Quote Originally Posted by cheryl123 View Post
    Yeah I tested from dreamer but only raised pet is hiding :/

    - - - Updated - - -



    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 by Ketchup; 23-01-23 at 03:19 AM.

  6. #6
    Apprentice cheryl123 is offline
    MemberRank
    Sep 2022 Join Date
    11Posts
    Quote Originally Posted by Ketchup View Post
    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.

  7. #7
    Novice Fenris is offline
    MemberRank
    Sep 2011 Join Date
    RE:ℓσα∂Location
    69Posts
    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.

  8. #8
    Apprentice cheryl123 is offline
    MemberRank
    Sep 2022 Join Date
    11Posts
    Quote Originally Posted by Fenris View Post
    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.



Advertisement