Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        protected override void OnDeleted()
        {
            if (BattleWell != null)
            {
                BattleWell.Delete();
                BattleWell = null;
            }

            base.OnDeleted();
        }