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)); } }
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)); } }