Skip to content

Commit 9081319

Browse files
authored
fix: (Day) Fix so enemies can cast friendly spells on eachother (AscensionGameDev#2124)
1 parent 3294cee commit 9081319

File tree

1 file changed

+6
-1
lines changed
  • Intersect.Server.Core/Entities

1 file changed

+6
-1
lines changed

Intersect.Server.Core/Entities/Npc.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,12 @@ public override bool IsAllyOf(Entity otherEntity)
13401340
switch (otherEntity)
13411341
{
13421342
case Npc otherNpc:
1343-
return Base == otherNpc.Base;
1343+
if (!Base.NpcVsNpcEnabled && !otherNpc.Base.NpcVsNpcEnabled)
1344+
{
1345+
return true;
1346+
}
1347+
1348+
return !otherNpc.CanNpcCombat(this);
13441349
case Player otherPlayer:
13451350
var conditionLists = Base.PlayerFriendConditions;
13461351
if ((conditionLists?.Count ?? 0) == 0)

0 commit comments

Comments
 (0)