Skip to content

Commit

Permalink
NPCBots: Correct Druid Innervate mana pct threshold. Correct Paladin …
Browse files Browse the repository at this point in the history
…Holy Shield conditions. Fix Rogue trying to use Kidney Shot on targets immune to stun effects
  • Loading branch information
trickerer committed Dec 16, 2024
1 parent 8a931bd commit 219dc43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/server/game/AI/NpcBots/bot_druid_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2930,7 +2930,7 @@ class druid_bot : public CreatureScript
}
}

uint8 mpct = (unit->GetMaxPower(POWER_MANA) - unit->GetPower(POWER_MANA) > me->GetCreateMana() * 2) ? 30 : 3;
uint8 mpct = (unit->GetMaxPower(POWER_MANA) - unit->GetPower(POWER_MANA) > me->GetCreateMana() * 2) ? 15 : 3;
if (GetManaPCT(unit) >= mpct)
return false;

Expand Down
3 changes: 2 additions & 1 deletion src/server/game/AI/NpcBots/bot_paladin_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,8 @@ class paladin_bot : public CreatureScript
}

//Holy shield
if (IsSpellReady(HOLY_SHIELD_1, diff) && HasRole(BOT_ROLE_DPS) && CanBlock() && !me->getAttackers().empty() &&
if (IsSpellReady(HOLY_SHIELD_1, diff) && HasRole(BOT_ROLE_DPS) && CanBlock() && !me->getAttackers().empty() && GetManaPCT(me) > 25 &&
(GetManaPCT(me) > 80 || me->getAttackers().size() > 3 || ((*me->getAttackers().cbegin())->IsCreature() && (*me->getAttackers().cbegin())->ToCreature()->isWorldBoss())) &&
!me->HasAuraTypeWithMiscvalue(SPELL_AURA_SCHOOL_IMMUNITY, 127))
{
if (doCast(me, GetSpell(HOLY_SHIELD_1)))
Expand Down
3 changes: 1 addition & 2 deletions src/server/game/AI/NpcBots/bot_rogue_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,7 @@ class rogue_bot : public CreatureScript
{
//Kidney Shot
if (GetSpell(KIDNEY_SHOT_1) && !stealthed && stunDivider < DIMINISHING_LEVEL_4 &&
Rand() < 80 && !CCed(mytar) &&
!IsImmunedToMySpellEffect(mytar, sSpellMgr->GetSpellInfo(KIDNEY_SHOT_1), EFFECT_0) &&
Rand() < 80 && !CCed(mytar) && !mytar->IsImmunedToSpell(sSpellMgr->GetSpellInfo(KIDNEY_SHOT_1), me) &&
((comboPoints >= 4 && stunDivider < DIMINISHING_LEVEL_3 &&
(mytar->GetHealth() > me->GetMaxHealth() / 2 || mytar->GetTypeId() == TYPEID_PLAYER)) ||
mytar->IsNonMeleeSpellCast(false,false,true)) &&
Expand Down

0 comments on commit 219dc43

Please sign in to comment.