private void DoAllEffectsOnTarget(TargetInfo target)
    {
        if (target == null || target.Processed)
        {
            return;
        }

        target.Processed = true;                               // Target checked in apply effects procedure

        // Get mask of effects for target
        int mask = target.EffectMask;

        Unit unit = Caster.Character.Id == target.TargetId ? Caster : ArenaManager.FindUnit(target.TargetId);

        if (!unit)
        {
            return;
        }

        if (unit.IsAlive() != target.Alive)
        {
            return;
        }

        // Get original caster (if exist) and calculate damage/healing from him data
        Unit caster = OriginalCaster != null ? OriginalCaster : Caster;

        // Skip if m_originalCaster not avaiable
        if (caster == null)
        {
            return;
        }

        SpellMissInfo missInfo = target.MissCondition;

        // Need init unitTarget by default unit (can changed in code on reflect)
        // Or on missInfo != SPELL_MISS_NONE unitTarget undefined (but need in trigger subsystem)
        UnitTarget = unit;

        // Reset damage/healing counter
        Damage  = target.Damage;
        Healing = -target.Damage;

        SpellAura = null; // Set aura to null for every target-make sure that pointer is not used for unit without aura applied

        Unit spellHitTarget = null;

        if (missInfo == SpellMissInfo.NONE)                     // In case spell hit target, do all effect on that target
        {
            spellHitTarget = unit;
        }
        else if (missInfo == SpellMissInfo.REFLECT)             // In case spell reflect from target, do all effect on caster (if hit)
        {
            if (target.ReflectResult == SpellMissInfo.NONE)     // If reflected spell hit caster -> do all effect on him
            {
                spellHitTarget = Caster;
            }
        }

        if (spellHitTarget)
        {
            SpellMissInfo missInfo2 = DoSpellHitOnUnit(spellHitTarget, mask);

            if (missInfo2 != SpellMissInfo.NONE)
            {
                Damage         = 0;
                spellHitTarget = null;
            }
        }

        // All calculated do it!
        // Do healing and triggers
        if (Healing > 0)
        {
            bool crit      = target.Crit;
            int  addhealth = Healing;
            //if (crit)
            //    addhealth = caster->SpellCriticalHealingBonus(SpellInfo, addhealth, NULL);

            //int32 gain = caster->HealBySpell(unitTarget, m_spellInfo, addhealth, crit);
            //Healing = gain;
        }
        // Do damage and triggers
        else if (Damage > 0)
        {
            // Fill base damage struct (unitTarget - is real spell target)
            SpellDamage damageInfo = new SpellDamage(caster, UnitTarget, SpellInfo.Id, SpellSchoolMask, CastId);

            // Add bonuses and fill damageInfo struct
            caster.CalculateSpellDamageTaken(damageInfo, Damage, SpellInfo, target.Crit);
            //caster.DealDamageMods(damageInfo.Target, damageInfo.damage, &damageInfo.absorb);

            Damage = damageInfo.Damage;

            caster.DealSpellDamage(damageInfo);
        }
        // Passive spell hits/misses or active spells only misses (only triggers)
        else
        {
            // Fill base damage struct (unitTarget - is real spell target)

            /*SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask);
             * procEx |= createProcExtendMask(&damageInfo, missInfo);
             * // Do triggers for unit (reflect triggers passed on hit phase for correct drop charge)
             * if (canEffectTrigger && missInfo != SPELL_MISS_REFLECT)
             *  caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo, m_triggeredByAuraSpell);*/
        }

        if (spellHitTarget)
        {
            // Needs to be called after dealing damage/healing to not remove breaking on damage auras
            //DoTriggersOnSpellHit(spellHitTarget, mask);

            //CallScriptAfterHitHandlers();
        }
    }