Exemplo n.º 1
0
        /// <summary>
        ///     Constructor
        /// </summary>
        /// <param name="objective"></param>
        /// <param name="tier"></param>
        public BattlefieldObjective(RegionMgr region, BattleFront_Objective objective)
        {
            Id       = objective.Entry;
            Name     = objective.Name;
            ZoneId   = objective.ZoneId;
            RegionId = objective.RegionId;
            Tier     = (byte)region.GetTier();
            State    = StateFlags.Unsecure;

            _x            = (uint)objective.X;
            _y            = (uint)objective.Y;
            _z            = (ushort)objective.Z;
            _o            = (ushort)objective.O;
            _tokdiscovery = objective.TokDiscovered;
            _tokunlocked  = objective.TokUnlocked;

            Heading         = _o;
            WorldPosition.X = (int)_x;
            WorldPosition.Y = (int)_y;
            WorldPosition.Z = _z;

            CommsEngine   = new ApocCommunications();
            RewardManager = new RVRRewardManager();
            fsm           = new CampaignObjectiveStateMachine(this).fsm;
            fsm.Initialize(CampaignObjectiveStateMachine.ProcessState.Neutral);
            if (objective.Guards != null)
            {
                foreach (BattleFront_Guard Guard in objective.Guards)
                {
                    Guards.Add(new FlagGuard(this, region, objective.ZoneId, Guard.OrderId, Guard.DestroId, Guard.X, Guard.Y, Guard.Z, Guard.O));
                }
            }
            _captureProgress = 20000;
            CaptureDuration  = 10;
            EvtInterface.AddEvent(CheckTimers, 1000, 0);
            BuffId = 0;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor to assist in isolation testing.
 /// </summary>
 public BattlefieldObjective()
 {
     CommsEngine   = new ApocCommunications();
     RewardManager = new RVRRewardManager();
 }