Does anyone knows how to fix when using dark illusion, the pet not hidding? looter/raised pets. Can share the code? :thumbup1:
Printable View
Does anyone knows how to fix when using dark illusion, the pet not hidding? looter/raised pets. Can share the code? :thumbup1:
Check Dreamer Source, there is a fix for it
Find & Replace (Mover.cpp):
Find & Replace (WndWorld.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
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;
}
Then define: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 );
Code:#define __DI_INVISFIX
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.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