mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-17 18:55:41 +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:
@@ -142,13 +142,3 @@ bool CastBlinkBackAction::Execute(Event event)
|
||||
bot->SetOrientation(bot->GetAngle(target) + M_PI);
|
||||
return CastSpellAction::Execute(event);
|
||||
}
|
||||
|
||||
bool CancelChannelAction::Execute(Event event)
|
||||
{
|
||||
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
|
||||
{
|
||||
bot->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -404,12 +404,4 @@ public:
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
class CancelChannelAction : public Action
|
||||
{
|
||||
public:
|
||||
CancelChannelAction(PlayerbotAI* botAI) : Action(botAI, "cancel channel") {}
|
||||
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -237,7 +237,6 @@ public:
|
||||
creators["use mana citrine"] = &MageAiObjectContextInternal::use_mana_citrine;
|
||||
creators["use mana jade"] = &MageAiObjectContextInternal::use_mana_jade;
|
||||
creators["use mana agate"] = &MageAiObjectContextInternal::use_mana_agate;
|
||||
creators["cancel channel"] = &MageAiObjectContextInternal::cancel_channel;
|
||||
creators["mana shield"] = &MageAiObjectContextInternal::mana_shield;
|
||||
}
|
||||
|
||||
@@ -299,7 +298,6 @@ private:
|
||||
static Action* use_mana_citrine(PlayerbotAI* botAI) { return new UseManaCitrineAction(botAI); }
|
||||
static Action* use_mana_jade(PlayerbotAI* botAI) { return new UseManaJadeAction(botAI); }
|
||||
static Action* use_mana_agate(PlayerbotAI* botAI) { return new UseManaAgateAction(botAI); }
|
||||
static Action* cancel_channel(PlayerbotAI* botAI) { return new CancelChannelAction(botAI); }
|
||||
static Action* mana_shield(PlayerbotAI* botAI) { return new CastManaShieldAction(botAI); }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user