fix(Core/Spells): only include the targets size for some GroundEffects (#23478)

This commit is contained in:
Tereneckla
2025-10-31 14:09:38 +00:00
committed by GitHub
parent 4c5c930f4c
commit 675135e19b
10 changed files with 27 additions and 24 deletions
@@ -566,7 +566,7 @@ Player* ScriptedAI::SelectTargetFromPlayerList(float maxdist, uint32 excludeAura
std::vector<Player*> tList;
for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
{
if (!me->IsWithinDistInMap(itr->GetSource(), maxdist, true, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
if (!me->IsWithinDistInMap(itr->GetSource(), maxdist, true, false, false) || !itr->GetSource()->IsAlive() || itr->GetSource()->IsGameMaster())
continue;
if (excludeAura && itr->GetSource()->HasAura(excludeAura))
continue;
@@ -218,10 +218,10 @@ bool npc_escortAI::IsPlayerOrGroupInRange()
{
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != nullptr; groupRef = groupRef->next())
if (Player* member = groupRef->GetSource())
if (me->IsWithinDistInMap(member, GetMaxPlayerDistance(), true, false))
if (me->IsWithinDistInMap(member, GetMaxPlayerDistance(), true, false, false))
return true;
}
else if (me->IsWithinDistInMap(player, GetMaxPlayerDistance(), true, false))
else if (me->IsWithinDistInMap(player, GetMaxPlayerDistance(), true, false, false))
return true;
}
@@ -202,7 +202,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
{
Player* member = groupRef->GetSource();
if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE, true, false))
if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE, true, false, false))
{
bIsMaxRangeExceeded = false;
break;
@@ -211,7 +211,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
}
else
{
if (me->IsWithinDistInMap(player, MAX_PLAYER_DISTANCE, true, false))
if (me->IsWithinDistInMap(player, MAX_PLAYER_DISTANCE, true, false, false))
bIsMaxRangeExceeded = false;
}
}