fix: Fixes NPC summon IsEnemy check against other mobs (#2041)

This commit is contained in:
Kamron Batman 2024-12-31 13:38:58 -08:00 committed by GitHub
parent b6e31217a2
commit 867dd6eb78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1358,7 +1358,19 @@ namespace Server.Mobiles
return true;
}
return m_Team != c.m_Team || (_summoned || m_Controlled) != (c._summoned || c.m_Controlled);
if (m_Team != c.Team)
{
return true;
}
var targetControlled = c._summoned || c.m_Controlled;
if (_summoned || m_Controlled)
{
return targetControlled || c.IsEnemy(GetMaster());
}
return targetControlled && IsEnemy(c.GetMaster());
}
public override string ApplyNameSuffix(string suffix)