private static void SetAllTags( Mobile from, bool toTrue )
{
if ( kAlwaysShowMotdOnLogin ) // No need to tag if we are always showing
return;
string boolValue = toTrue.ToString();
Account account;
foreach ( Mobile mobile in World.Mobiles.Values )
{
if ( null == mobile || !( mobile is PlayerMobile ) )
continue;
if( null == ( account = (Account)from.Account ) )
continue;
account.SetTag( "motd", boolValue );
}
from.SendMessage( kLabelColor, "All players" + ( true == toTrue ? " will " : " will not ") + "see the MOTD Message at next login." );
}
private static void SetAllTags( Mobile from, bool toTrue )
{
if ( kAlwaysShowMotdOnLogin ) // No need to tag if we are always showing
return;
string boolValue = toTrue.ToString();
foreach (Account account in Accounts.GetAccounts())
{
account.SetTag( "motd", boolValue );
}
from.SendMessage( kLabelColor, "All players" + ( true == toTrue ? " will " : " will not ") + "see the MOTD Message at next login." );
}
Lord_Greywolf;784329 said:actualy the only line you had to change was thios one:
account.SetTag( "motd", boolValue );
to
account = (Account)mobile.Account;
account.SetTag( "motd", boolValue );