public void ChangeAtk_dru(Systems Target, int slot, bool delete,bool UpdatePacket)
{
try
{
if (!delete)
{
int amount;
if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["dru"] != 0) // phy attack %inc
{
amount = Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["dru"];
Target.Character.Action.Buff.UpdatedStats[slot].MinPhyAttack = (Target.Character.Stat.MinPhyAttack / 100) * (amount);
Target.Character.Action.Buff.UpdatedStats[slot].MaxPhyAttack = (Target.Character.Stat.MaxPhyAttack / 100) * (amount);
Target.Character.Stat.MinPhyAttack += Target.Character.Action.Buff.UpdatedStats[slot].MinPhyAttack;
Target.Character.Stat.MaxPhyAttack += Target.Character.Action.Buff.UpdatedStats[slot].MaxPhyAttack;
}
if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties2["dru"] != 0) // mag attack %inc
{
amount = Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties2["dru"];
Target.Character.Action.Buff.UpdatedStats[slot].MinMagAttack = (Target.Character.Stat.MinMagAttack / 100) * (amount);
Target.Character.Action.Buff.UpdatedStats[slot].MaxMagAttack = (Target.Character.Stat.MaxMagAttack / 100) * (amount);
Target.Character.Stat.MinMagAttack += Target.Character.Action.Buff.UpdatedStats[slot].MinMagAttack;
Target.Character.Stat.MaxMagAttack += Target.Character.Action.Buff.UpdatedStats[slot].MaxMagAttack;
}
}
else
{
if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties1["dru"] != 0) // phy attack %inc
{
Target.Character.Stat.MinPhyAttack -= Target.Character.Action.Buff.UpdatedStats[slot].MinPhyAttack;
Target.Character.Stat.MaxPhyAttack -= Target.Character.Action.Buff.UpdatedStats[slot].MaxPhyAttack;
Target.Character.Action.Buff.UpdatedStats[slot].MinPhyAttack = 0;
Target.Character.Action.Buff.UpdatedStats[slot].MaxPhyAttack = 0;
}
if (Data.SkillBase[Target.Character.Action.Buff.SkillID[slot]].Properties2["dru"] != 0) // mag attack %inc
{
Target.Character.Stat.MinMagAttack -= Target.Character.Action.Buff.UpdatedStats[slot].MinMagAttack;
Target.Character.Stat.MaxMagAttack -= Target.Character.Action.Buff.UpdatedStats[slot].MaxMagAttack;
Target.Character.Action.Buff.UpdatedStats[slot].MinMagAttack = 0;
Target.Character.Action.Buff.UpdatedStats[slot].MaxMagAttack = 0;
}
}
if (UpdatePacket) Target.client.Send(Packet.PlayerStat(Target.Character));
}
catch (Exception ex)
{
Systems.Debugger.Write(ex);
}
}