public virtual void InvalidateBattleWell() { if (State == PvPBattleState.Internal || BattleWellLoc.Internal || BattleWellLoc.Zero) { if (BattleWell != null) { BattleWell.Delete(); BattleWell = null; } return; } if (BattleWell == null || BattleWell.Deleted) { BattleWell = new BattleWell(this); if (!BattleWellLoc.MoveToWorld(BattleWell)) { BattleWell.MoveToWorld(BattleWellLoc, BattleWellLoc); } } if (BattleWell.Battle == null) { BattleWell.Battle = this; } }
protected override void OnDeleted() { if (BattleWell != null) { BattleWell.Delete(); BattleWell = null; } base.OnDeleted(); }