本文整理汇总了C++中P_PLAYER::log方法的典型用法代码示例。如果您正苦于以下问题:C++ P_PLAYER::log方法的具体用法?C++ P_PLAYER::log怎么用?C++ P_PLAYER::log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类P_PLAYER
的用法示例。
在下文中一共展示了P_PLAYER::log方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: talking
void Speech::talking( P_PLAYER pChar, const QString& lang, const QString& speech, QValueVector<Q_UINT16>& keywords, Q_UINT16 color, Q_UINT16 font, Q_UINT8 type ) // PC speech
{
// handle things like renaming or describing an item
if ( !pChar->socket() )
return;
cUOSocket* socket = pChar->socket();
if ( InputSpeech( socket, pChar, speech ) )
return;
// Squelched
if (pChar->isSquelched()) {
socket->clilocMessage(500168); // You cannot say anything, you have been squelched.
return;
}
// log
pChar->log( LOG_SPEECH, tr( "Saying '%1' (%2, 0x%3).\n" ).arg( speech ).arg( font ).arg( color, 0, 16 ) );
pChar->unhide();
// Check for Bogus Color
if ( !isNormalColor( color ) )
color = 0x2;
if ( type == 0 )
pChar->setSaycolor( color );
else if ( type == 2 )
pChar->setEmoteColor( color );
if ( pChar->onTalk( type, color, font, speech, lang ) )
return;
if ( ( type == 0x09 ) && ( pChar->mayBroadcast() ) )
{
pChar->talk( speech, color, type );
return;
}
pChar->talk( speech, color, type );
QString speechUpr = speech.upper();
if ( response( socket, pChar, speech, keywords ) )
return; // Vendor responded already
// this makes it so npcs do not respond to isDead people - HEALERS ??
if ( pChar->isDead() )
return;
// 0x0007 -> Speech-id for "Guards"
for ( QValueVector<Q_UINT16>::const_iterator iter = keywords.begin(); iter != keywords.end(); ++iter )
{
Q_UINT16 keyword = *iter;
if ( keyword == 0x07 )
pChar->callGuards();
}
/* P_CHAR pc = NULL; ???
P_CHAR pNpc = NULL;
RegionIterator4Chars ri( pChar->pos() );
for( ri.Begin(); !ri.atEnd(); ri++ )
{
pc = ri.GetData();
if (!pc->isSameAs( pChar )
&& pc->isNpc()
&& pc->dist( pChar ) <= 2)
{
pNpc = pc;
break;
}
}
*/
}