diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
index f568da80b49..98b0afdefc9 100755
--- a/src/server/game/AI/CreatureAIImpl.h
+++ b/src/server/game/AI/CreatureAIImpl.h
@@ -604,6 +604,7 @@ inline void UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered)
inline void UnitAI::DoCastVictim(uint32 spellId, bool triggered)
{
+ // Why don't we check for casting unit_state and existing target as we do in DoCast(.. ?
me->CastSpell(me->getVictim(), spellId, triggered);
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index 096ee695bcf..6d27d251579 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -114,15 +114,7 @@ void ScriptedAI::UpdateAI(uint32 const /*diff*/)
if (!UpdateVictim())
return;
- if (me->isAttackReady())
- {
- //If we are within range melee the target
- if (me->IsWithinMeleeRange(me->getVictim()))
- {
- me->AttackerStateUpdate(me->getVictim());
- me->resetAttackTimer();
- }
- }
+ DoMeleeAttackIfReady();
}
void ScriptedAI::DoStartMovement(Unit* victim, float distance, float angle)
diff --git a/src/server/shared/Dynamic/TypeContainerFunctionsPtr.h b/src/server/shared/Dynamic/TypeContainerFunctionsPtr.h
deleted file mode 100755
index 2c065d96d4a..00000000000
--- a/src/server/shared/Dynamic/TypeContainerFunctionsPtr.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2008-2012 TrinityCore
- * Copyright (C) 2005-2009 MaNGOS
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef TYPECONTAINER_FUNCTIONS_PTR_H
-#define TYPECONTAINER_FUNCTIONS_PTR_H
-
-/*
- * Here you'll find a list of helper functions to make
- * the TypeContainer usefull. Without it, its hard
- * to access or mutate the container.
- */
-
-#include "Platform/Define.h"
-#include "Utilities/TypeList.h"
-#include