public virtual void InvalidateBattleRegion() { if (Deserializing) { return; } if (_BattleRegion != null) { if (_BattleRegion.Map == Map && _BattleRegion.Area.GetBoundsHashCode() == Options.Locations.BattleBounds.GetBoundsHashCode()) { return; } _BattleRegion.Unregister(); } if (Options.Locations.BattleFixedPoint == Point3D.Zero) { _BattleRegion = null; return; } _BattleRegion = _BattleRegion != null?_BattleRegion.Clone(this) : RegionExtUtility.Create <PvPBattleRegion>(this); if (_BattleRegion == null) { return; } _BattleRegion.GoLocation = Options.Locations.BattleFixedPoint; _BattleRegion.Register(); }
public virtual void InvalidateBattleRegion() { if (Deserializing) { return; } if (_BattleRegion != null) { if (_BattleRegion.Map == Map && _BattleRegion.Area.GetBoundsHashCode() == Options.Locations.BattleBounds.GetBoundsHashCode()) { return; } _BattleRegion.Unregister(); } if (Options.Locations.BattleFixedPoint == Point3D.Zero) { _BattleRegion = null; return; } _BattleRegion = _BattleRegion != null ? _BattleRegion.Clone(this) : RegionExtUtility.Create<PvPBattleRegion>(this); if (_BattleRegion == null) { return; } _BattleRegion.GoLocation = Options.Locations.BattleFixedPoint; _BattleRegion.Register(); }