コード例 #1
0
        internal static void SafelySendGumpTo(Mobile mobile, bool admin)
        {
            NewsGump gump;

            s_Mutex.WaitOne();
            try
            {
                int length = s_ArchiveFilenameCache.Length >= kMaximumArchives
                                        ? kMaximumArchives : s_ArchiveFilenameCache.Length;

                // Get the caches copied onto the stack of the gump thread.
                gump = new NewsGump(mobile, s_MotdCache, s_ArchiveFilenameCache, length, admin);
            }
            finally
            {
                s_Mutex.ReleaseMutex();
            }

            gump.DrawGump(mobile, admin);
            mobile.SendGump(gump);
            ((Account)(((PlayerMobile)mobile).Account)).SetTag("motd", "false");
        }
コード例 #2
0
ファイル: motd.cs プロジェクト: greeduomacro/cov-shard-svn-1
		internal static void SafelySendGumpTo( Mobile mobile, bool admin )
		{
			NewsGump gump;

			s_Mutex.WaitOne();
			try
			{
				int length = s_ArchiveFilenameCache.Length >= kMaximumArchives
					? kMaximumArchives : s_ArchiveFilenameCache.Length;

				// Get the caches copied onto the stack of the gump thread.
				gump = new NewsGump( mobile, s_MotdCache, s_ArchiveFilenameCache, length, admin );
			}
			finally
			{
				s_Mutex.ReleaseMutex();
			}
			
			gump.DrawGump( mobile, admin );
			mobile.SendGump( gump );
			((Account)(((PlayerMobile)mobile).Account)).SetTag( "motd", "false" );
		}