AFKMud
AFKMud copied to clipboard
Tells list "someone" when on overland map
There is a bug that when a player is sending a tell to someone that is on the overland map it will list the sender as "someone". From in code comments it appears this was a bug with channels as well at some point and was fixed differently. I was not able to apply the same fix but instead changed the act functions to printf's instead and this seems to work.
This code replaces the portion between MOBtrigger = false; and MOBtrigger = true; in CMDF( do_tell )
// Changed "act" functions to printf's to avoid "someone" bug on overland maps -Khonsu 12-APR-2024
// act( AT_TELL, "You tell $N '$t'", ch, argument.c_str( ), victim, TO_CHAR );
ch->printf("%sYou tell %s '%s'&d\r\n", ch->color_str(AT_TELL), victim->name, argument.c_str( ));
update_tellhistory( victim, ch, argument, true );
position = victim->position;
victim->position = POS_STANDING;
if( speaking != -1 && ( !ch->isnpc( ) || ch->speaking ) )
{
int speakswell = UMIN( knows_language( victim, ch->speaking, ch ), knows_language( ch, ch->speaking, victim ) );
if( speakswell < 85 )
{
victim->printf("%s%s tells you '%s'&d\r\n", ch->color_str(AT_TELL), ch->name, translate( speakswell, argument, lang_names[speaking] ).c_str( ));
update_tellhistory( victim, ch, translate( speakswell, argument, lang_names[speaking] ), false );
}
else
{
victim->printf("%s%s tells you '%s'&d\r\n", ch->color_str(AT_TELL), ch->name, argument.c_str( ));
update_tellhistory( victim, ch, argument, false );
}
}
else
{
victim->printf("%s%s tells you '%s'&d\r\n", ch->color_str(AT_TELL), ch->name, argument.c_str( ));
update_tellhistory( victim, ch, argument, false );
}