mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Hello everyone, I liked the channel cancel I did on mage recently, where they cancel blizzard if there is only 1 enemy left. I decided to do the same for the following classes: Druid: Hurricane Hunter: Volley Priest: Mind Sear Warlock: Rain of Fire I moved the "ChannelCancel" action to it's own file, so other classes could benefit from it. I removed it from the mageactions.
19 lines
507 B
C++
19 lines
507 B
C++
/*
|
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
|
* and/or modify it under version 2 of the License, or (at your option), any later version.
|
|
*/
|
|
|
|
#include "CancelChannelAction.h"
|
|
#include "Player.h"
|
|
#include "PlayerbotAI.h"
|
|
|
|
bool CancelChannelAction::Execute(Event event)
|
|
{
|
|
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
|
|
{
|
|
bot->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|