Wedding ring don't work

Newbie Spellweaver
Joined
Jun 13, 2013
Messages
30
Reaction score
0
In the game there are engagement rings . They should teleport character. But for some reason they do not work. Please tell me which file to climb to fix it.
 
Wedding rings are couple rings and infact they can teleport




BOOL CMover::DoUseItemWarp( ItemProp* pItemProp, CItemElem* pItemElem )
Took an look into it and see if its defined there


#ifdef __WORLDSERVER
BOOL CMover::DoUseItemWarp( ItemProp* pItemProp, CItemElem* pItemElem )
{
switch( pItemProp->dwID )
{
case II_GEN_WARP_COUPLERING:
case II_GEN_WARP_WEDDING_BAND:
#if __VER >= 8 // __S_COUPLERING01
case II_GEN_WARP_COUPLERING01:
#endif // __VER >= 8
{
if( IsFly() )
{
return FALSE;
}
// if( pItemElem->IsFlag( CItemElem::expired ) )
// {
// ( (CUser*)this )->AddDefinedText( TID_GAME_ITEM_EXPIRED );
// return FALSE;
// }
u_long idCouple = (u_long)( pItemElem->GetRandomOptItemId() );
if( idCouple == m_idPlayer )
{
( (CUser*)this )->AddDefinedText( TID_GAME_COUPLERING_ERR01, "%s", GetName() );
return FALSE;
}


if( idCouple > 0 )
{
// teleport
#if __VER >= 11 // __SYS_PLAYER_DATA
const char* lpszPlayer = CPlayerDataCenter::GetInstance()->GetPlayerString( idCouple );
#else // __SYS_PLAYER_DATA
LPCSTR lpszPlayer = prj.GetPlayerString( idCouple );
#endif // __SYS_PLAYER_DATA
if( lpszPlayer )
{
CUser* pUser = (CUser*)prj.GetUserByID( idCouple );
if( IsValidObj( (CObj*)pUser ) )
{
if( pUser->IsFly() )
{
( (CUser*)this )->AddDefinedText( TID_GAME_COUPLERING_ERR03 );
return FALSE;
}




What is wrong in this code? Couple Ring did not work (
 
Skunsa are you by any chance using the Virtuos V19 source?
If you are you could try replacing
Code:
g_DPCoreClient.SendTeleportPlayer( m_idPlayer, idCouple );

with

Code:
pUser->REPLACE( g_uIdofMulti, ((CUser*)this)->GetWorld()->GetID(),  ((CUser*)this)->GetPos(), REPLACE_FORCE,  ((CUser*)this)->GetLayer() );
 
Skunsa are you by any chance using the Virtuos V19 source?
If you are you could try replacing
Code:
g_DPCoreClient.SendTeleportPlayer( m_idPlayer, idCouple );

with

Code:
pUser->REPLACE( g_uIdofMulti, ((CUser*)this)->GetWorld()->GetID(),  ((CUser*)this)->GetPos(), REPLACE_FORCE,  ((CUser*)this)->GetLayer() );


Thank you so much! Your method helped
 
Back