Ejemplo n.º 1
0
        protected override void OnPrepareBegin()
        {
            base.OnPrepareBegin();
            var time = RealmLocalizer.FormatTimeSecondsMinutes(PreparationTimeMillis / 1000);

            Characters.SendSystemMessage(DefaultAddonLocalizer.Instance.GetTranslations(AddonMsgKey.ABOnPrepare), time);
        }
Ejemplo n.º 2
0
        protected override void OnPrepareBegin()
        {
            base.OnPrepareBegin();

            var time = RealmLocalizer.FormatTimeSecondsMinutes(PreparationTimeMillis / 1000);

            Characters.SendSystemMessage("The battle for Alterac Valley begins in {0}.", time);
        }
Ejemplo n.º 3
0
        protected override void OnPrepareHalftime()
        {
            base.OnPrepareHalftime();

            string time = RealmLocalizer.FormatTimeSecondsMinutes(PreparationTimeMillis / 2000);

            Characters.SendSystemMessage(DefaultAddonLocalizer.Instance.GetTranslations(AddonMsgKey.WSOnPrepareHalfTime), time);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Begins the capturing process. A base will turn if not taken back
        /// </summary>
        /// <param name="chr"></param>
        public void BeginCapture(Character chr)
        {
            Capturer = chr;

            CaptureTimer.Start(CapturePointConversionDelayMillis, 0);
            SpawnContested();

            ABSounds sound;

            if (_side == BattlegroundSide.End)
            {
                sound = ABSounds.NodeContested;
                Instance.WorldStates.SetInt32(showIconNeutral, 0);
            }
            else if (_side == BattlegroundSide.Alliance)
            {
                sound = ABSounds.NodeAssaultedHorde;
            }
            else
            {
                sound = ABSounds.NodeAssaultedAlliance;
            }

            if (chr.Battlegrounds.Team.Side == BattlegroundSide.Alliance)
            {
                State = BaseState.ContestedAlliance;
                Instance.WorldStates.SetInt32(showIconAllianceContested, 1);
                Instance.WorldStates.SetInt32(showIconHordeControlled, 0);
            }
            else
            {
                State = BaseState.ContestedHorde;
                Instance.WorldStates.SetInt32(showIconHordeContested, 1);
                Instance.WorldStates.SetInt32(showIconAllianceControlled, 0);
            }

            var time = RealmLocalizer.FormatTimeSecondsMinutes(CapturePointConversionDelayMillis / 1000);

            foreach (Character character in Instance.Characters)
            {
                character.SendSystemMessage(DefaultAddonLocalizer.Instance.Translate(character.Locale, AddonMsgKey.ABBaseClaimed, chr.Name, Names[(int)character.Locale], chr.Battlegrounds.Team.Side, time));
            }

            MiscHandler.SendPlaySoundToMap(Instance, (uint)sound);

            var evt = BaseChallenged;

            if (evt != null)
            {
                evt(chr);
            }
        }