bool TrainerSpeech( cUOSocket *socket, P_CHAR pPlayer, P_CHAR pTrainer, const QString& comm )
bool TrainerSpeech( cUOSocket *socket, P_CHAR pPlayer, P_NPC pTrainer, const QString& comm )
bool TrainerSpeech( cUOSocket *socket, P_CHAR pPlayer, P_CHAR pTrainer, const QString& comm ) {/*	if( pPlayer->dist( pTrainer ) > 3 || !pTrainer->isHuman() )		return false;	if( !comm.contains( "TRAIN" ) && !comm.contains( "TEACH" ) && !comm.contains( "LEARN" ) )		return false;	if( !pTrainer->cantrain() )	{		pTrainer->talk( tr( "I am sorry, but I have nothing to teach thee" ) );		return true;	}	INT32 i, skill = -1;		// this is to prevent errors when a player says "train <skill>" then don't pay the npc	pPlayer->setTrainer( INVALID_SERIAL ); 	for( i = 0; i < ALLSKILLS; ++i )		if( comm.contains( Skills->getSkillName( i ), false ) )		{			skill = i;			break;		}	if( skill != -1 )	{		if( pTrainer->skillValue( skill ) <= 10 || !pTrainer->cantrain() )		{			pTrainer->talk( "I am sorry but I cannot train thee in that skill." );			return true;		}		QString skillName = Skills->getSkillName( skill );		skillName = skillName.lower();		QString message = tr( "Thou wishest to learn of %1" ).arg( skillName );		// This should be configureable		if( pPlayer->skillValue(skill) >= 250 )			message.append( tr( " I can teach thee no more than thou already knowest!" ) );		else		{			UINT32 sum = pPlayer->getSkillSum();			// The user knows too much			if( sum >= SrvParams->skillcap() * 10 )				message.append( tr( " I can teach thee no more. Thou already knowest too much!" ) );			else			{				int delta = pTrainer->getTeachingDelta( pPlayer, skill, sum );				int perc = ( pPlayer->skillValue( skill ) + delta ) / 10;								message.append( tr( " Very well I, can train thee up to the level of %i percent for %i gold. Pay for less and I shall teach thee less." ).arg( perc ).arg( delta ) );				pPlayer->setTrainer( pTrainer->serial() );				pTrainer->setTrainingplayerin( skill );			}		}		pTrainer->talk( message );		return true;	}	// Didn't ask to be trained in a specific skill	pTrainer->setTrainingplayerin( 0xFF );	QStringList skillList;	for( i = 0; i < ALLSKILLS; ++i )	{		if( pTrainer->skillValue( i ) >= 10 && pPlayer->skillValue( i ) < 250 )		{			QString skillName = Skills->getSkillName( i );			skillList.push_back( skillName );		}	}	// skills and a trainer ?	if( skillList.count() > 0 ) 		pTrainer->talk( tr( "I can teach thee the following skills: %1." ).arg( skillList.join( ", " ) ) );	else		pTrainer->talk( tr( "I am sorry, but I have nothing to teach thee" ) );*/	return false;}