Skip to content

Commit

Permalink
Fix when trying to swap targets HP and MP and when target MPs defense…
Browse files Browse the repository at this point in the history
… transform MP damaging in MP healing (#949)
  • Loading branch information
lucas-tardivo authored and jcsnider committed Mar 29, 2022
1 parent 666ed2e commit 38753eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Intersect.Server/Entities/Entity.cs
Expand Up @@ -1700,6 +1700,7 @@ public virtual void TryAttack(Entity target)
{
var originalBaseDamage = baseDamage;
var damagingAttack = baseDamage > 0;
var secondaryDamagingAttack = secondaryDamage > 0;
if (enemy == null)
{
return;
Expand Down Expand Up @@ -1808,7 +1809,7 @@ public virtual void TryAttack(Entity target)
secondaryDamage, damageType, scalingStat, scaling, critMultiplier, this, enemy
);

if (secondaryDamage < 0 && damagingAttack)
if (secondaryDamage < 0 && secondaryDamagingAttack)
{
secondaryDamage = 0;
}
Expand Down

0 comments on commit 38753eb

Please sign in to comment.