<commit_before>﻿using L2dotNET.GameService.Model.Player;
using L2dotNET.GameService.Model.Stats;
using L2dotNET.GameService.Network.Serverpackets;
using L2dotNET.GameService.World;

namespace L2dotNET.GameService.Model.Skills2.Effects
{
    class i_p_attack : TEffect
    {
        public i_p_attack()
        {
            type = TEffectType.i_p_attack;
        }

        private int power;
        private int unk1;
        private int unk2;
        private int unk3;

        public override void build(string str)
        {
            string[] v = str.Split(' ');
            power = int.Parse(v[1]);
            unk1 = int.Parse(v[2]);
            unk2 = int.Parse(v[2]);
            unk3 = int.Parse(v[2]);
        }

        public override TEffectResult onStart(L2Character caster, L2Character target)
        {
            if (!(target != null))
                return nothing;

            L2Character tar = (L2Character)target;
            double shieldDef = Formulas.checkShieldDef(caster, tar);
            double damage = Formulas.getPhysSkillHitDamage(caster, tar, power);

            caster.sendPacket(new SystemMessage(SystemMessage.SystemMessageId.C1_HAS_GIVEN_C2_DAMAGE_OF_S3).AddPlayerName(caster.Name).AddString(tar.Name).AddNumber(damage));
            if (tar is L2Player)
                tar.sendPacket(new SystemMessage(SystemMessage.SystemMessageId.C1_HAS_RECEIVED_S3_DAMAGE_FROM_C2).AddPlayerName(tar.Name).AddPlayerName(caster.Name).AddNumber(damage));

            tar.reduceHp(caster, damage);

            return nothing;
        }
    }
}<commit_msg>Fixed wrong typo !(target != null) -> (target == null)<commit_after>﻿using L2dotNET.GameService.Model.Player;
using L2dotNET.GameService.Model.Stats;
using L2dotNET.GameService.Network.Serverpackets;
using L2dotNET.GameService.World;

namespace L2dotNET.GameService.Model.Skills2.Effects
{
    class i_p_attack : TEffect
    {
        public i_p_attack()
        {
            type = TEffectType.i_p_attack;
        }

        private int power;
        private int unk1;
        private int unk2;
        private int unk3;

        public override void build(string str)
        {
            string[] v = str.Split(' ');
            power = int.Parse(v[1]);
            unk1 = int.Parse(v[2]);
            unk2 = int.Parse(v[2]);
            unk3 = int.Parse(v[2]);
        }

        public override TEffectResult onStart(L2Character caster, L2Character target)
        {
            if (target == null)
                return nothing;

            L2Character tar = (L2Character)target;
            double shieldDef = Formulas.checkShieldDef(caster, tar);
            double damage = Formulas.getPhysSkillHitDamage(caster, tar, power);

            caster.sendPacket(new SystemMessage(SystemMessage.SystemMessageId.C1_HAS_GIVEN_C2_DAMAGE_OF_S3).AddPlayerName(caster.Name).AddString(tar.Name).AddNumber(damage));
            if (tar is L2Player)
                tar.sendPacket(new SystemMessage(SystemMessage.SystemMessageId.C1_HAS_RECEIVED_S3_DAMAGE_FROM_C2).AddPlayerName(tar.Name).AddPlayerName(caster.Name).AddNumber(damage));

            tar.reduceHp(caster, damage);

            return nothing;
        }
    }
}
{'fraction_non_alphanumeric': 0.09975062344139651, 'fraction_numerical': 0.01683291770573566, 'mean_word_length': 2.4029692470837754, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '826543', 'n_tokens_mistral': 1021, 'n_tokens_neox': 981, 'n_words': 168}