Chat channel does not display

02/01/2020 18:12 siono01#1
Please help me to see where the code is missing or wrong, thanks

Chat box, send new messages, only normal channels, normally show what you say, other channels do not show anything I say

[Only registered and activated users can see links. Click Here To Register...]

Shouting in code
Quote:
void CDPClient::OnShout( CAr & ar )
{
static \
CHAR lpszPlayer[MAX_PLAYER], lpString[260];

OBJID objid;
u_long idPlayer;
ar >> objid;
ar >> idPlayer;
ar.ReadString( lpszPlayer, MAX_PLAYER );
ar.ReadString( lpString, 260 );
DWORD dwColor = 0xffff99cc;
#if __VER >= 12 // __LORD
ar >> dwColor;
#endif // __LORD

CMover* pMover = prj.GetMover( objid );

#ifdef __YS_CHATTING_BLOCKING_SYSTEM
if( pMover && pMover->IsPlayer() == TRUE )
{
set< CString >::iterator BlockedUserIterator = prj.m_setBlockedUserID.find( lpszPlayer );
if( BlockedUserIterator != prj.m_setBlockedUserID.end() )
return;
}
#endif // __YS_CHATTING_BLOCKING_SYSTEM

// 富窍绰局啊 辨靛哪诡 甘俊辑 捞具扁甫 沁促搁...八荤秦辑...公矫茄促..-_-
if( IsValidObj( pMover ) && pMover->GetWorld() && pMover->GetWorld()->GetID() == WI_WORLD_GUILDWAR )
{
if( pMover->IsMode(GCWAR_RENDER_SKIP_MODE) )
return;
}

if( g_Option.m_bShout )
{
CString str;
//Shout
#ifdef __NEW_RICH_TEXT
if( idPlayer == 0 ) //Monster shout
str.Format("%s", TEXTTYPE_SHOUT, lpString );
else
str.Format("#-%02d %s[ID;#aB{char=%08X}%u#aE]:%s", TEXTTYPE_SHOUT , lpszPlayer, idPlayer, idPlayer, lpString );
#else //__NEW_RICH_TEXT
str.Format( "[%s]: %s", lpszPlayer, lpString );
#endif //__NEW_RICH_TEXT
//str.Format( "[%s] %s", lpszPlayer, lpString );
g_WndMng.PutString( str, NULL, dwColor, CHATSTY_SHOUT );

if( g_pPlayer && g_pPlayer->m_dwAuthorization >= AUTH_GAMEMASTER )
FILEOUT( "CHAT.LOG", (LPCSTR)str );

if( IsValidObj( pMover ) )
{
if( strlen( lpString ) )
g_DialogMsg.AddMessage( pMover, lpString, 0xfffffff, CHAT_SHOUT );
}
}
}

Common channel code. It ’s just that what this channel says can be displayed normally

Quote:
void CDPClient::OnChat( OBJID objid, CAr & ar )
{
ar.ReadString( szBuf, 1024 );
CMover* pMover = prj.GetMover( objid );
if( IsValidObj( pMover ) )
{
#ifdef __YS_CHATTING_BLOCKING_SYSTEM
if( pMover && pMover->IsPlayer() == TRUE )
{
set< CString >::iterator BlockedUserIterator = prj.m_setBlockedUserID.find( pMover->GetName( TRUE ) );
if( BlockedUserIterator != prj.m_setBlockedUserID.end() )
return;
}
#endif // __YS_CHATTING_BLOCKING_SYSTEM
// 富窍绰局啊 辨靛哪诡 甘俊辑 捞具扁甫 沁促搁...八荤秦辑...公矫茄促..-_-
if( IsValidObj( pMover ) && pMover->GetWorld() && pMover->GetWorld()->GetID() == WI_WORLD_GUILDWAR )
{
if( pMover->IsMode(GCWAR_RENDER_SKIP_MODE) )
return;
}
if( strlen( szBuf ) && ( szBuf[ 0 ] == '/' || szBuf[ 0 ] == '!' ) )
g_DialogMsg.AddMessage( pMover, szBuf );
else
{
int nTextId = -1;
if (pMover->IsPlayer())
{
//sprintf( szChat, "%s : %s", pMover->GetName( TRUE ), szBuf );
//ordinary
#ifdef __NEW_RICH_TEXT
sprintf( szChat, "#-%02d %s[ID;#aB{char=%08X}%u#aE]:%s", TEXTTYPE_CHAT, pMover->GetName( TRUE ), pMover->m_idPlayer, pMover->m_idPlayer, szBuf );
str.Format("#-%02d %s[ID;#aB{char=%08X}%u#aE]:%s", TEXTTYPE_PARTY, lpName, idPlayer, idPlayer, lpString);
#else //__NEW_RICH_TEXT
sprintf( szChat, "%s[%d]: %s", pMover->GetName( TRUE ),pMover->m_idPlayer, szBuf );
#endif //__NEW_RICH_TEXT
g_WndMng.PutString( (LPCTSTR)szChat, pMover, 0xffffffff, CHATSTY_GENERAL );
}else {
g_WndMng.PutString((LPCTSTR)szBuf, pMover, 0xffffffff, CHATSTY_GENERAL);
}
}
}
}
02/04/2020 04:27 siono01#2
Does anyone tell me what went wrong
02/05/2020 00:58 Ecrypter#3
try to define back some code you remove like this // and read the error so maybe you mess a thing .,
02/05/2020 04:18 siono01#4
Quote:
Originally Posted by Ecrypter View Post
try to define back some code you remove like this // and read the error so maybe you mess a thing .,
Yes, the original work is normal. I transplanted a system in the chat model, and then there was a non-display error.
02/05/2020 07:01 Ecrypter#5
Quote:
Originally Posted by siono01 View Post
Yes, the original work is normal. I transplanted a system in the chat model, and then there was a non-display error.
then you need more time to explore the code. other code may not define in the feature but its function the system you added.., this feature i think from china source release last year, correct me if i am wrong., i'd never see the full system as of this time since im busy of my daily work and with my family, no time for flyff management. but im still updated here in this forum, trying to help the people's in need.
02/05/2020 08:54 siono01#6
Quote:
Originally Posted by Ecrypter View Post
then you need more time to explore the code. other code may not define in the feature but its function the system you added.., this feature i think from china source release last year, correct me if i am wrong., i'd never see the full system as of this time since im busy of my daily work and with my family, no time for flyff management. but im still updated here in this forum, trying to help the people's in need.
Yes, it is the code obtained in the Chinese version. I think there should be some other code. I have n’t checked it.