mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user