you should add this to each UpdateAI
```cpp
if (me->HasUnitState(UNIT_STATE_CASTING))
    return;
```