|
The player exist in the game otherwise you will get the message player doesn't exist.
This is the functextcmd.cpp
ON_TEXTCMDFUNC( TextCmd_Summon, "summon", "su", "¼Òȯ", "¼Òȯ", TCM_SERVER, AUTH_GAMEMASTER , "À¯Àú¼Òȯ" )
BOOL TextCmd_Summon( CScanner& scanner )
{
#ifdef __WORLDSERVER
TCHAR lpszPlayer[32];
scanner.GetToken();
CUser* pUser = (CUser*)scanner.dwValue;
if( strcmp( pUser->GetName(), scanner.Token) )
{
#if __VER >= 11 // __SYS_PLAYER_DATA
u_long idPlayer = CPlayerDataCenter::GetInstance()->GetPlayerId( scanner.token );
#else // __SYS_PLAYER_DATA
u_long idPlayer = prj.GetPlayerID( scanner.Token );
#endif // __SYS_PLAYER_DATA
if( idPlayer > 0 ){
strcpy( lpszPlayer, scanner.Token );
#ifdef __LAYER_1015
g_DPCoreClient.SendSummonPlayer( pUser->m_idPlayer, pUser->GetWorld()->GetID(), pUser->GetPos(), idPlayer, pUser->GetLayer() );
#else // __LAYER_1015
g_DPCoreClient.SendSummonPlayer( pUser->m_idPlayer, pUser->GetWorld()->GetID(), pUser->GetPos(), idPlayer );
#endif // __LAYER_1015
}
else {
// scanner.Token¶ó´Â À̸§À» °¡Áø »ç¿ëÀÚ´Â ÀÌ °ÔÀÓ¿¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.
pUser->AddReturnSay( 3, scanner.Token );
}
}
else
{
pUser->AddReturnSay( 2, " " ); // ÀÚ±â Àڽſ¡°Ô ¸í·ÉÇß´Ù.
}
#endif // __WORLDSERVER
return TRUE;
}
|