Exemplo n.º 1
0
        public void UpdateAnnounces(long Tick)
        {
            if (NextAnnounce <= Tick)
            {
                TimedAnnounce Announce = WorldMgr.GetNextAnnounce(ref CurrentAnnounce, ZoneId);
                if (Announce == null)
                {
                    NextAnnounce = Tick + 30000;
                }
                else
                {
                    foreach (Player Plr in _Players)
                    {
                        if (Plr == null)
                        {
                            continue;
                        }

                        if (Announce.Realm == 0 || (byte)Plr.Realm == Announce.Realm)
                        {
                            Plr.SendMessage(0, Announce.SenderName, Announce.Message, (SystemData.ChatLogFilters)Announce.Type);
                        }
                    }

                    NextAnnounce = Tick + Announce.NextTime;
                }
            }
        }