mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 02:10:28 +00:00
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:
@@ -6,6 +6,8 @@
|
||||
#include "WarlockTriggers.h"
|
||||
#include "GenericTriggers.h"
|
||||
#include "Playerbots.h"
|
||||
#include "PlayerbotAI.h"
|
||||
#include "Player.h"
|
||||
|
||||
static const uint32 SOUL_SHARD_ITEM_ID = 6265;
|
||||
|
||||
@@ -228,3 +230,32 @@ bool WrongPetTrigger::IsActive()
|
||||
// Step 6: If we get here, the bot doesn't know the spell required to support the active pet strategy
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::set<uint32> RainOfFireChannelCheckTrigger::RAIN_OF_FIRE_SPELL_IDS = {
|
||||
5740, // Rain of Fire Rank 1
|
||||
6219, // Rain of Fire Rank 2
|
||||
11677, // Rain of Fire Rank 3
|
||||
11678, // Rain of Fire Rank 4
|
||||
27212, // Rain of Fire Rank 5
|
||||
47819, // Rain of Fire Rank 6
|
||||
47820 // Rain of Fire Rank 7
|
||||
};
|
||||
|
||||
bool RainOfFireChannelCheckTrigger::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 Rain of Fire
|
||||
if (RAIN_OF_FIRE_SPELL_IDS.count(spell->m_spellInfo->Id))
|
||||
{
|
||||
uint8 attackerCount = AI_VALUE(uint8, "attacker count");
|
||||
return attackerCount < minEnemies;
|
||||
}
|
||||
}
|
||||
|
||||
// Not channeling Rain of Fire
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user