internal void OnRemoveFromBattle() { this.InternalOnRemoveFromBattle(); if (this._script != null) { this._script.Call(Script.S_ON_ENTITY_REMOVED_FROM_BATTLE); this._script.Dispose(); this._script = null; } this.RemoveAllAIEvaluator(); this.markToDestroy = false; this._data = null; SyncEventHelper.DespawnEntity(this.rid); }