diff options
| author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-13 01:25:56 +0100 |
|---|---|---|
| committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-13 01:25:56 +0100 |
| commit | b08ea19affc7818af33a0af5cbf03eae7de362a5 (patch) | |
| tree | 08454bd226548e1fabb348126c7ed77bad7916f7 /src/server/game/AI | |
| parent | 7fbd6d33dd9546fffe81aa241463af005b3dd7d1 (diff) | |
| parent | abe4b656c8775c2fe25649e83c135510442dc2b8 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Diffstat (limited to 'src/server/game/AI')
| -rw-r--r-- | src/server/game/AI/CoreAI/UnitAI.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index a3cb57b3332..09ba2cc19b1 100644 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -172,7 +172,9 @@ void UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered) void UnitAI::DoCastVictim(uint32 spellId, bool triggered) { - // Why don't we check for casting unit_state and existing target as we do in DoCast(.. ? + if (!me->getVictim() || (me->HasUnitState(UNIT_STATE_CASTING) && !triggered)) + return; + me->CastSpell(me->getVictim(), spellId, triggered); } |
