DarkEmu_GameServer.Systems.ChangeDefPower_defp C# (CSharp) Метод

ChangeDefPower_defp() публичный Метод

public ChangeDefPower_defp ( Systems Target, int slot, bool delete, bool UpdatePacket ) : void
Target Systems
slot int
delete bool
UpdatePacket bool
Результат void
        public void ChangeDefPower_defp(Systems Target, int slot, bool delete, bool UpdatePacket)
        {
            try
            {
                int amount;
                if (!delete)
                {
                    if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["defp"] != 0)
                    {
                        amount = Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["defp"];
                        Target.Character.Action.Buff.UpdatedStats[slot].PhyDef = amount;
                        Target.Character.Stat.PhyDef += Target.Character.Action.Buff.UpdatedStats[slot].PhyDef;
                    }
                    if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties2["defp"] != 0)
                    {
                        amount = Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties2["defp"];
                        Target.Character.Action.Buff.UpdatedStats[slot].MagDef = amount;
                        Target.Character.Stat.MagDef += Target.Character.Action.Buff.UpdatedStats[slot].MagDef;
                    }
                    if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties3["defp"] != 0)
                    {
                        //nemtudjuk
                    }
                }
                else
                {
                    if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["defp"] != 0)
                    {
                        Target.Character.Stat.PhyDef -= Target.Character.Action.Buff.UpdatedStats[slot].PhyDef;
                        Target.Character.Action.Buff.UpdatedStats[slot].PhyDef = 0;
                    }
                    if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties2["defp"] != 0)
                    {
                        Target.Character.Stat.MagDef -= Target.Character.Action.Buff.UpdatedStats[slot].MagDef;
                        Target.Character.Action.Buff.UpdatedStats[slot].MagDef = 0;
                    }
                    if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties3["defp"] != 0)
                    {
                        //nemtudjuk
                    }
                }

                if (UpdatePacket) Target.client.Send(Packet.PlayerStat(Target.Character));
            }
            catch (Exception ex)
            {
                Systems.Debugger.Write(ex);
            }
        }
Systems