Beispiel #1
0
		public static void CreateNews(string message, eRealm realm, eNewsType type, bool sendMessage)
		{
			if (sendMessage)
			{
				foreach (GameClient client in WorldMgr.GetAllClients())
				{
					if (client.Player == null)
						continue;
					if ((client.Account.PrivLevel != 1 || realm == eRealm.None) || client.Player.Realm == realm)
					{
						client.Out.SendMessage(message, eChatType.CT_System, eChatLoc.CL_SystemWindow);
					}
				}
			}

			if (ServerProperties.Properties.RECORD_NEWS)
			{
				DBNews news = new DBNews();
				news.Type = (byte)type;
				news.Realm = (byte)realm;
				news.Text = message;
				GameServer.Database.AddObject(news);
				GameEventMgr.Notify(DatabaseEvent.NewsCreated, new NewsEventArgs(news));
			}
		}
Beispiel #2
0
		/// <summary>
		/// Constructs a new event argument class for the
		/// news events 
		/// </summary>
		/// <param name="account"></param>
		public NewsEventArgs(DBNews news)
		{
			m_news = news;
		}