/// <summary> /// Invoked when the objective is locked, spawning the portal to warcamp. /// </summary> internal void ObjectiveLocked() { if (_objectivePortal != null) { return; } if (!Load()) // Useful when database has been updated at runtime { return; } if (_objectivePortal == null && _region.GetTier() < 2) { _objectivePortal = new PortalToWarcamp(_objectivePortalData, _orderPortalData, _destroPortalData); _region.AddObject(_objectivePortal, _objectivePortalData.ZoneId); } if (_orderPortal != null) { _orderPortal.Dispose(); _destroPortal.Dispose(); _orderPortal = null; _destroPortal = null; } }
/// <summary> /// Invoked when the objective is locked, initializing the portals in warcamps. /// They will be spawned depending on flag state. /// </summary> internal void ObjectiveUnlocked() { if (!Load()) // Useful when database has been updated at runtime { return; } if (_objectivePortal != null) { _region.RemoveObject(_objectivePortal); _objectivePortal = null; } if (_orderPortal == null) { _orderPortal = new PortalToObjective(_orderPortalData, _objectivePortalData, _objective.Name); _destroPortal = new PortalToObjective(_destroPortalData, _objectivePortalData, _objective.Name); } int i = 0; }