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

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

public ChangeTargetHp_cmcr ( Systems Target, int slot, bool delete, bool UpdatePacket ) : void
Target Systems
slot int
delete bool
UpdatePacket bool
Результат void
        public void ChangeTargetHp_cmcr(Systems Target, int slot, bool delete, bool UpdatePacket)
        {
            try
            {
                if (!delete)
                {
                    if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["cmcr"] != 0)
                    {
                        int amount = Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["cmcr"];
                        Target.Character.Action.Buff.UpdatedStats[slot].Mp = amount;
                        Target.Character.Stat.Mp -= Target.Character.Action.Buff.UpdatedStats[slot].Mp;
                        Target.Character.Stat.SecondMP -= Target.Character.Action.Buff.UpdatedStats[slot].Mp;

                    }
                }

                else
                {
                    if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["cmcr"] != 0)
                    {
                        Target.Character.Stat.Mp += Target.Character.Action.Buff.UpdatedStats[slot].Mp;
                        Target.Character.Stat.SecondMP += Target.Character.Action.Buff.UpdatedStats[slot].Mp;
                        Target.Character.Action.Buff.UpdatedStats[slot].Mp = 0;
                    }
                }
                if (UpdatePacket) Target.client.Send(Packet.PlayerStat(Target.Character));
            }
            catch (Exception ex)
            {
                Systems.Debugger.Write(ex);
            }
        }
Systems