mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
This commit is contained in:
@@ -17,37 +17,30 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "ByteBuffer.h"
|
||||
#include "ReactorAI.h"
|
||||
#include "Errors.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "CreatureAIImpl.h"
|
||||
|
||||
#define REACTOR_VISIBLE_RANGE (26.46f)
|
||||
|
||||
int
|
||||
ReactorAI::Permissible(const Creature *creature)
|
||||
{
|
||||
if( creature->isCivilian() || creature->IsNeutralToAll() )
|
||||
return PERMIT_BASE_REACTIVE;
|
||||
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
void
|
||||
ReactorAI::MoveInLineOfSight(Unit *)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ReactorAI::UpdateAI(const uint32 /*time_diff*/)
|
||||
{
|
||||
// update i_victimGuid if m_creature->getVictim() !=0 and changed
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( m_creature->isAttackReady() )
|
||||
{
|
||||
if( m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
|
||||
Reference in New Issue
Block a user