diff --git a/Projectiles/Magic/EternityCrystal.cs b/Projectiles/Magic/EternityCrystal.cs index 66ed354b6c..69a3aeabac 100644 --- a/Projectiles/Magic/EternityCrystal.cs +++ b/Projectiles/Magic/EternityCrystal.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { + Player player = Main.player[projectile.owner]; if (projectile.localAI[1] >= Main.projectile.Length || projectile.localAI[0] < 0) { DeathDust(); @@ -91,7 +92,7 @@ namespace CalamityMod.Projectiles.Magic if (projectile.Hitbox.Intersects(Main.npc[(int)projectile.ai[0]].Hitbox)) { int damage = (int)(Eternity.ExplosionDamage * player.MagicDamage() * Main.rand.NextFloat(0.9f, 1.1f)); - Main.player[projectile.owner].addDPS(damage); + player.addDPS(damage); Main.npc[(int)projectile.ai[0]].StrikeNPC(damage, 0f, 0, false); Vector2 randomCirclePointVector = Vector2.One.RotatedBy(projectile.rotation); float lerpStart = Main.rand.Next(12, 17); diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs index 2052612e43..1124328839 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Magic } public override void AI() { + Player player = Main.player[projectile.owner]; if (projectile.ai[0] >= Main.npc.Length || projectile.ai[0] < 0) { DeathDust();