From 85e724d88a78078bbacb35e51cb41c5a92ca6769 Mon Sep 17 00:00:00 2001 From: WinDanesz <31292708+WinDanesz@users.noreply.github.com> Date: Wed, 28 Jun 2023 19:14:53 +0200 Subject: [PATCH] fix: Allied spell casters of a player (owned by the player as an IEntityOwnable creature) now have their spells affect the player too where applicable. Previously spells like Group Heal casted by the NPC was not affecting the owner. --- .../java/electroblob/wizardry/util/AllyDesignationSystem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/electroblob/wizardry/util/AllyDesignationSystem.java b/src/main/java/electroblob/wizardry/util/AllyDesignationSystem.java index c5079bcc..9c78abaa 100644 --- a/src/main/java/electroblob/wizardry/util/AllyDesignationSystem.java +++ b/src/main/java/electroblob/wizardry/util/AllyDesignationSystem.java @@ -201,7 +201,7 @@ public final class AllyDesignationSystem { // Owned entities inherit their owner's allies if(allyOf instanceof IEntityOwnable){ Entity owner = ((IEntityOwnable)allyOf).getOwner(); - if(owner instanceof EntityLivingBase && isAllied((EntityLivingBase)owner, possibleAlly)) return true; + if(owner instanceof EntityLivingBase && (owner == possibleAlly || isAllied((EntityLivingBase)owner, possibleAlly))) return true; } if(allyOf instanceof EntityPlayer && possibleAlly instanceof EntityPlayer