[6846] Fixed some more typos. Added post check for assistance conditions into event execute.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2008-11-24 03:03:30 +01:00
parent 359d4d7dd3
commit 64fd2dc881
5 changed files with 40 additions and 31 deletions

View file

@ -721,32 +721,15 @@ namespace MaNGOS
if(u == i_funit)
return false;
// we don't need help from zombies :)
if( !u->isAlive() )
return false;
// skip fighting creature
if( u->isInCombat() )
return false;
// only from same creature faction
if(u->getFaction() != i_funit->getFaction() )
return false;
// only free creature
if( u->GetCharmerOrOwnerGUID() )
if ( !u->CanAssistTo(i_funit, i_enemy) )
return false;
// too far
if( !i_funit->IsWithinDistInMap(u, i_range) )
return false;
// skip non hostile to caster enemy creatures
if( !u->IsHostileTo(i_enemy) )
return false;
// only if see assisted creature
if(!u->IsWithinLOSInMap(i_funit) )
if( !i_funit->IsWithinLOSInMap(u) )
return false;
return true;