Ejemplo n.º 1
0
        public SpAttackResult(Creature creature, int skillId, AttackResult atk)
        {
            Creature = creature;
            Target = atk.Target;

            SkillId = skillId;

            AttackUid = atk.AttackUid;
            AttackType = atk.AttackType.GetHashCode();
            Damage = atk.Damage;

            VisualEffect = atk.VisualEffect;

            if (VisualEffect != null)
                AttackType |= 1 << 24;
        }
Ejemplo n.º 2
0
        public override void Release()
        {
            if (ObserversList != null)
                ObserversList.Clear();
            ObserversList = null;

            VisiblePlayers = null;
            VisibleNpcs = null;
            VisibleItems = null;
            VisibleGathers = null;

            if (Ai != null)
                Ai.Release();
            Ai = null;

            if (_lifeStats != null)
                _lifeStats.Release();
            _lifeStats = null;

            GameStats = null;

            Position = null;
            BindPoint = null;
            Instance = null;

            Target = null;

            if (VisualEffect != null)
                VisualEffect.Release();
            VisualEffect = null;

            if (Effects != null)
                for (int i = 0; i < Effects.Count; i++)
                    Effects[i].Release();
            Effects = null;
            EffectsLock = null;

            base.Release();
        }