From fe25ce4fa3ce306beebc4c95b22cd14052a92566 Mon Sep 17 00:00:00 2001 From: QAston Date: Sat, 17 Sep 2011 00:56:59 +0200 Subject: Core/AI: Replace many Unit::IsHostileTo with Unit::IsValidAttackTarget or Creature::canCreatureAttack. --- .../scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp | 2 +- src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/scripts/Northrend') diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp index 7500abf3307..2e0e0661cf7 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp @@ -184,7 +184,7 @@ public: if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) != IN_PROGRESS || !bOnGround) return; - if (!me->getVictim() && who->isTargetableForAttack() && me->IsHostileTo(who) && who->isInAccessiblePlaceFor(me)) + if (!me->getVictim() && me->canCreatureAttack(who)) { float attackRadius = me->GetAttackDistance(who); if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who)) diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index e5343e65711..ab6eae9a241 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -128,7 +128,7 @@ public: if (!who) return; - if (Phase == IDLE && who->isTargetableForAttack() && me->IsHostileTo(who) && me->IsWithinDistInMap(who, 40)) + if (Phase == IDLE && me->IsValidAttackTarget(who) && me->IsWithinDistInMap(who, 40)) { Phase = INTRO; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); -- cgit v1.2.3