mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Class spell] Aoe threat check
This commit is contained in:
@@ -82,7 +82,7 @@ bool SummonAction::Execute(Event event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (master->GetSession()->GetSecurity() >= SEC_PLAYER) {
|
if (master->GetSession()->GetSecurity() >= SEC_PLAYER) {
|
||||||
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({});
|
// botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({});
|
||||||
return Teleport(master, bot);
|
return Teleport(master, bot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -234,8 +234,6 @@ class CastDeathAndDecayAction : public CastSpellAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CastDeathAndDecayAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death and decay") { }
|
CastDeathAndDecayAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death and decay") { }
|
||||||
|
|
||||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastHornOfWinterAction : public CastSpellAction
|
class CastHornOfWinterAction : public CastSpellAction
|
||||||
|
|||||||
@@ -203,12 +203,14 @@ class CastDragonsBreathAction : public CastSpellAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CastDragonsBreathAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "dragon's breath") { }
|
CastDragonsBreathAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "dragon's breath") { }
|
||||||
|
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastBlastWaveAction : public CastSpellAction
|
class CastBlastWaveAction : public CastSpellAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CastBlastWaveAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "blast wave") { }
|
CastBlastWaveAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "blast wave") { }
|
||||||
|
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastInvisibilityAction : public CastBuffSpellAction
|
class CastInvisibilityAction : public CastBuffSpellAction
|
||||||
|
|||||||
@@ -161,5 +161,6 @@ class CastMindSearAction : public CastSpellAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CastMindSearAction(PlayerbotAI* ai) : CastSpellAction(ai, "mind sear") {}
|
CastMindSearAction(PlayerbotAI* ai) : CastSpellAction(ai, "mind sear") {}
|
||||||
|
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -323,6 +323,7 @@ class CastChainLightningAction : public CastSpellAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CastChainLightningAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "chain lightning") { }
|
CastChainLightningAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "chain lightning") { }
|
||||||
|
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastLightningBoltAction : public CastSpellAction
|
class CastLightningBoltAction : public CastSpellAction
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ bool PartyMemberToHeal::Check(Unit* player)
|
|||||||
{
|
{
|
||||||
// return player && player != bot && player->GetMapId() == bot->GetMapId() && player->IsInWorld() &&
|
// return player && player != bot && player->GetMapId() == bot->GetMapId() && player->IsInWorld() &&
|
||||||
// sServerFacade->GetDistance2d(bot, player) < (player->IsPlayer() && botAI->IsTank((Player*)player) ? 50.0f : 40.0f);
|
// sServerFacade->GetDistance2d(bot, player) < (player->IsPlayer() && botAI->IsTank((Player*)player) ? 50.0f : 40.0f);
|
||||||
return player->GetMapId() == bot->GetMapId() &&
|
return player->GetMapId() == bot->GetMapId() && !player->IsCharmed() &&
|
||||||
bot->GetDistance2d(player) < sPlayerbotAIConfig->healDistance * 2 &&
|
bot->GetDistance2d(player) < sPlayerbotAIConfig->healDistance * 2 &&
|
||||||
bot->IsWithinLOS(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
bot->IsWithinLOS(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ class CastCorruptionAction : public CastDebuffSpellAction
|
|||||||
bool isUseful() override {
|
bool isUseful() override {
|
||||||
return CastDebuffSpellAction::isUseful() && !botAI->HasAura("seed of corruption", GetTarget(), false, true) ;
|
return CastDebuffSpellAction::isUseful() && !botAI->HasAura("seed of corruption", GetTarget(), false, true) ;
|
||||||
}
|
}
|
||||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastCorruptionOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
class CastCorruptionOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||||
@@ -80,7 +79,6 @@ class CastCorruptionOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
|||||||
bool isUseful() override {
|
bool isUseful() override {
|
||||||
return CastDebuffSpellOnAttackerAction::isUseful() && !botAI->HasAura("seed of corruption", GetTarget(), false, true) ;
|
return CastDebuffSpellOnAttackerAction::isUseful() && !botAI->HasAura("seed of corruption", GetTarget(), false, true) ;
|
||||||
}
|
}
|
||||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastCurseOfAgonyOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
class CastCurseOfAgonyOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||||
@@ -153,6 +151,7 @@ class CastSeedOfCorruptionAction : public CastDebuffSpellAction
|
|||||||
bool isUseful() override {
|
bool isUseful() override {
|
||||||
return CastDebuffSpellAction::isUseful() && !botAI->HasAura("corruption", GetTarget(), false, true) ;
|
return CastDebuffSpellAction::isUseful() && !botAI->HasAura("corruption", GetTarget(), false, true) ;
|
||||||
}
|
}
|
||||||
|
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastSeedOfCorruptionOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
class CastSeedOfCorruptionOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||||
@@ -162,6 +161,7 @@ class CastSeedOfCorruptionOnAttackerAction : public CastDebuffSpellOnAttackerAct
|
|||||||
bool isUseful() override {
|
bool isUseful() override {
|
||||||
return CastDebuffSpellOnAttackerAction::isUseful() && !botAI->HasAura("corruption", GetTarget(), false, true) ;
|
return CastDebuffSpellOnAttackerAction::isUseful() && !botAI->HasAura("corruption", GetTarget(), false, true) ;
|
||||||
}
|
}
|
||||||
|
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CastRainOfFireAction : public CastSpellAction
|
class CastRainOfFireAction : public CastSpellAction
|
||||||
|
|||||||
Reference in New Issue
Block a user