Channel Cancel checks for Channeled AOE DPS Spells

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.
This commit is contained in:
ThePenguinMan96
2025-07-28 01:35:56 -07:00
parent eef2e8c1ef
commit e40c2b21f2
22 changed files with 241 additions and 25 deletions

View File

@@ -12,6 +12,7 @@
#include "Playerbots.h"
#include "ServerFacade.h"
#include "SharedDefines.h"
#include "Player.h"
bool KillCommandTrigger::IsActive()
{
@@ -139,3 +140,31 @@ bool SerpentStingOnAttackerTrigger::IsActive()
!botAI->HasAura("viper sting", target, false, true);
return BuffTrigger::IsActive();
}
const std::set<uint32> VolleyChannelCheckTrigger::VOLLEY_SPELL_IDS = {
1510, // Volley Rank 1
14294, // Volley Rank 2
14295, // Volley Rank 3
27022, // Volley Rank 4
58431, // Volley Rank 5
58434 // Volley Rank 6
};
bool VolleyChannelCheckTrigger::IsActive()
{
Player* bot = botAI->GetBot();
// Check if the bot is channeling a spell
if (Spell* spell = bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
{
// Only trigger if the spell being channeled is Volley
if (VOLLEY_SPELL_IDS.count(spell->m_spellInfo->Id))
{
uint8 attackerCount = AI_VALUE(uint8, "attacker count");
return attackerCount < minEnemies;
}
}
// Not channeling Volley
return false;
}