mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-07 04:37:48 +00:00
attacker checker & strategy init
This commit is contained in:
@@ -79,7 +79,7 @@ uint8 AiFactory::GetPlayerSpecTab(Player* bot)
|
|||||||
tab = 1;
|
tab = 1;
|
||||||
break;
|
break;
|
||||||
case CLASS_PALADIN:
|
case CLASS_PALADIN:
|
||||||
tab = 0;
|
tab = 2;
|
||||||
break;
|
break;
|
||||||
case CLASS_PRIEST:
|
case CLASS_PRIEST:
|
||||||
tab = 1;
|
tab = 1;
|
||||||
@@ -366,7 +366,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
|||||||
switch (player->getClass()) {
|
switch (player->getClass()) {
|
||||||
case CLASS_PRIEST: {
|
case CLASS_PRIEST: {
|
||||||
if (tab != PRIEST_TAB_SHADOW) {
|
if (tab != PRIEST_TAB_SHADOW) {
|
||||||
engine->addStrategies("dps", "shadow debuff", "shadow aoe", nullptr);
|
engine->addStrategies("holy", "shadow debuff", "shadow aoe", nullptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ bool AttackersValue::IsPossibleTarget(Unit* attacker, Player* bot, float range)
|
|||||||
!attacker->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION) &&
|
!attacker->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION) &&
|
||||||
// !(attacker->GetGUID().IsPet() && enemy) &&
|
// !(attacker->GetGUID().IsPet() && enemy) &&
|
||||||
!(attacker->GetCreatureType() == CREATURE_TYPE_CRITTER && !attacker->IsInCombat()) && !(sPlayerbotAIConfig->IsInPvpProhibitedZone(attacker->GetAreaId()) &&
|
!(attacker->GetCreatureType() == CREATURE_TYPE_CRITTER && !attacker->IsInCombat()) && !(sPlayerbotAIConfig->IsInPvpProhibitedZone(attacker->GetAreaId()) &&
|
||||||
|
!attacker->HasUnitFlag(UNIT_FLAG_IMMUNE_TO_PC) && !attacker->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE) &&
|
||||||
bot->CanSeeOrDetect(attacker) &&
|
bot->CanSeeOrDetect(attacker) &&
|
||||||
(attacker->GetGUID().IsPlayer() || attacker->GetGUID().IsPet())) && (!c || (!c->IsInEvadeMode() && ((!isMemberBotGroup && botAI->HasStrategy("attack tagged", BOT_STATE_NON_COMBAT)) ||
|
(attacker->GetGUID().IsPlayer() || attacker->GetGUID().IsPet())) && (!c || (!c->IsInEvadeMode() && ((!isMemberBotGroup && botAI->HasStrategy("attack tagged", BOT_STATE_NON_COMBAT)) ||
|
||||||
leaderHasThreat || (!c->hasLootRecipient() && (!c->GetVictim() || (c->GetVictim() && ((!c->GetVictim()->IsPlayer() || bot->IsInSameGroupWith(c->GetVictim()->ToPlayer())) ||
|
leaderHasThreat || (!c->hasLootRecipient() && (!c->GetVictim() || (c->GetVictim() && ((!c->GetVictim()->IsPlayer() || bot->IsInSameGroupWith(c->GetVictim()->ToPlayer())) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user