mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-15 16:16:11 +00:00
optimize class spell
This commit is contained in:
@@ -63,10 +63,10 @@ bool CastSpellAction::Execute(Event event)
|
||||
bool CastSpellAction::isPossible()
|
||||
{
|
||||
if (botAI->IsInVehicle() && !botAI->IsInVehicle(false, false, true)) {
|
||||
// if (!sPlayerbotAIConfig->logInGroupOnly || bot->GetGroup()) {
|
||||
// LOG_DEBUG("playerbots", "Can cast spell failed. Vehicle. - bot name: {}",
|
||||
// bot->GetName());
|
||||
// }
|
||||
if (!sPlayerbotAIConfig->logInGroupOnly || (bot->GetGroup() && botAI->HasRealPlayerMaster())) {
|
||||
LOG_DEBUG("playerbots", "Can cast spell failed. Vehicle. - bot name: {}",
|
||||
bot->GetName());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -75,10 +75,10 @@ bool CastSpellAction::isPossible()
|
||||
|
||||
if (spell == "mount" && bot->IsInCombat())
|
||||
{
|
||||
// if (!sPlayerbotAIConfig->logInGroupOnly || bot->GetGroup()) {
|
||||
// LOG_DEBUG("playerbots", "Can cast spell failed. Mount. - bot name: {}",
|
||||
// bot->GetName());
|
||||
// }
|
||||
if (!sPlayerbotAIConfig->logInGroupOnly || (bot->GetGroup() && botAI->HasRealPlayerMaster())) {
|
||||
LOG_DEBUG("playerbots", "Can cast spell failed. Mount. - bot name: {}",
|
||||
bot->GetName());
|
||||
}
|
||||
bot->Dismount();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ class CastDebuffSpellOnAttackerAction : public CastDebuffSpellAction
|
||||
// ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
};
|
||||
|
||||
class CastDebuffSpellOnMeleeAttackerAction : public CastAuraSpellAction
|
||||
class CastDebuffSpellOnMeleeAttackerAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDebuffSpellOnMeleeAttackerAction(PlayerbotAI* botAI, std::string const spell, bool isOwner = true) : CastAuraSpellAction(botAI, spell, isOwner) { }
|
||||
CastDebuffSpellOnMeleeAttackerAction(PlayerbotAI* botAI, std::string const spell, bool isOwner = true, float needLifeTime = 8.0f) : CastDebuffSpellAction(botAI, spell, isOwner, needLifeTime) { }
|
||||
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
std::string const getName() override { return spell + " on attacker"; }
|
||||
|
||||
Reference in New Issue
Block a user