Scripts/ICC: little bit of cleanup in Valithria after the "recent" changes

Port From (https://github.com/TrinityCore/TrinityCore/commit/d7571e5d1f3b4cd5672a6344d96c782d7c83ea88)
This commit is contained in:
hondacrx
2022-01-05 23:58:58 -05:00
parent be2a51486e
commit 93389f32e2
2 changed files with 11 additions and 3 deletions
+2 -3
View File
@@ -79,11 +79,10 @@ namespace Game.AI
return;
}
var playerList = map.GetPlayers();
if (playerList.Empty())
if (!map.HavePlayers())
return;
foreach (var player in playerList)
foreach (var player in map.GetPlayers())
{
if (player != null)
{
+9
View File
@@ -80,6 +80,15 @@ namespace Game.Combat
}
}
public bool HasPvECombatWithPlayers()
{
foreach (var reference in _pveRefs)
if (reference.Value.GetOther(_owner).IsPlayer())
return true;
return false;
}
public bool HasPvPCombat()
{
foreach (var pair in _pvpRefs)