*Ahn'Khalet: Partial Herald Volazj script, by Tartalo

*Check for null pointers in SelectTargetHelper, thanks to Spp
*Remove rank aura from last battle (possibly there due to crash), by Spp

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-20 19:07:53 -07:00
parent 6c90f1f89a
commit 771341992f
6 changed files with 57 additions and 29 deletions

View File

@@ -83,10 +83,10 @@ bool UnitAI::DoSpellAttackIfReady(uint32 spell)
inline bool SelectTargetHelper(const Unit * me, const Unit * target, const bool &playerOnly, const float &dist, const int32 &aura)
{
if(playerOnly && target->GetTypeId() != TYPEID_PLAYER)
if(playerOnly && (!target || target->GetTypeId() != TYPEID_PLAYER))
return false;
if(dist && !me->IsWithinCombatRange(target, dist))
if(dist && (!me || !target || !me->IsWithinCombatRange(target, dist)))
return false;
if(aura)