예제 #1
0
파일: ZoneMgr.cs 프로젝트: wardev1/WarEmu-1
        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;
                }
            }
        }