diff --git a/src/modules/PlayerbotV2/Api/ClassicSupplies.cpp b/src/modules/PlayerbotV2/Api/ClassicSupplies.cpp index 19dfe95363..ca9ee44f0d 100644 --- a/src/modules/PlayerbotV2/Api/ClassicSupplies.cpp +++ b/src/modules/PlayerbotV2/Api/ClassicSupplies.cpp @@ -147,6 +147,8 @@ constexpr RaidConsumable kCasterKit[] = { }; constexpr RaidConsumable kHealerKit[] = { { 13511, false, 5, true }, { 20007, false, 5 }, { 13931, true, 20 }, + // Stocked, never drunk by the pre-pull picker: Brilliant Mana Oil goes on the main hand by idle:classic_weapon (PickPoison). + { 20748, false, 5, false, true }, // Brilliant Mana Oil: +12 mana every 5 s, +25 healing on the weapon { 13457, false, 5, false, true }, // Greater Fire Protection Potion: drunk in the fight where the boss data orders it (Ragnaros, Geddon, Onyxia, Firemaw, Vaelastrasz) { 13459, false, 5, false, true }, // Greater Shadow Protection Potion: BWL Shadow Flame (Ebonroc, Flamegor, Nefarian) { 13458, false, 5, false, true }, // Greater Nature Protection Potion: AQ40 Huhuran's Poison Bolt Volley diff --git a/src/modules/PlayerbotV2/Bot/ClassicUpkeep.cpp b/src/modules/PlayerbotV2/Bot/ClassicUpkeep.cpp index 38328b7b02..2a99cf331c 100644 --- a/src/modules/PlayerbotV2/Bot/ClassicUpkeep.cpp +++ b/src/modules/PlayerbotV2/Bot/ClassicUpkeep.cpp @@ -721,6 +721,22 @@ CastPick PickBlessing(BotSnapshotView const& s, GroupSnapshotView const& g, bool return {}; } +// A healer's weapon oil: Brilliant Mana Oil (+12 mana every 5 s, +25 healing, 30 minutes) on the main hand, as every raid healer ran it. +// Stocked through the healer raid kit (ClassicSupplies.cpp kHealerKit). 12 mana per 5 s is about 720 mana in a 5-minute boss fight, a tenth +// of a raid healer's pool; Nefarian 11-14: ten healers at 18% mana when he landed, none of them with an oil. +constexpr uint32 BRILLIANT_MANA_OIL = 20748; +constexpr uint32 BRILLIANT_MANA_OIL_SPELL = 25123; // the item's spell, the source of the temporary enchant (2629) + +// A healer whose main hand takes the mana oil: it has one in the bags, or the oil is on the weapon now. A Restoration shaman then puts no +// imbue on it (a Rockbiter or Flametongue Weapon heals nothing and would replace the oil). +static bool HealerOilsWeapon(BotSnapshotView const& s) +{ + if (!IsHealerSpec(s.cls(), uint16(s.spec()))) + return false; + WeaponUpkeep const& mh = s.classic_upkeep().main_hand; + return !mh.guid.IsEmpty() && (s.item_count(BRILLIANT_MANA_OIL) > 0 || s.weapon_enchant_from(mh, BRILLIANT_MANA_OIL_SPELL)); +} + CastPick PickImbue(BotSnapshotView const& s, bool in_combat) { if (s.cls() != CLASS_SHAMAN || s.is_mounted()) @@ -728,6 +744,8 @@ CastPick PickImbue(BotSnapshotView const& s, bool in_combat) WeaponUpkeep const& mh = s.classic_upkeep().main_hand; if (mh.guid.IsEmpty()) return {}; + if (ShamanIsCaster(s.spec()) && HealerOilsWeapon(s)) + return {}; static constexpr uint32 kMelee[] = { WINDFURY_WEAPON, FLAMETONGUE_WEAPON, ROCKBITER_WEAPON }; static constexpr uint32 kCaster[] = { FLAMETONGUE_WEAPON, ROCKBITER_WEAPON }; std::span const order = ShamanIsCaster(s.spec()) ? std::span(kCaster) : std::span(kMelee); @@ -769,6 +787,13 @@ static bool IsDamageCaster(BotSnapshotView const& s) ItemPick PickPoison(BotSnapshotView const& s) { + if (HealerOilsWeapon(s) && !s.is_mounted()) + { + WeaponUpkeep const& mh = s.classic_upkeep().main_hand; + if (s.item_count(BRILLIANT_MANA_OIL) > 0 && (!mh.temp_enchant || mh.temp_remaining.count() < 60'000)) + return { BRILLIANT_MANA_OIL, mh.guid }; + return {}; + } if (IsDamageCaster(s) && !s.is_mounted()) { WeaponUpkeep const& mh = s.classic_upkeep().main_hand; diff --git a/tests/game/ClassicRaidConsumables.cpp b/tests/game/ClassicRaidConsumables.cpp index 8ed9cbc26e..2ecc0d2939 100644 --- a/tests/game/ClassicRaidConsumables.cpp +++ b/tests/game/ClassicRaidConsumables.cpp @@ -158,6 +158,9 @@ TEST_CASE("a combat potion is stocked but never used before the pull", "[classic // The caster kit also stocks what is used outside the pre-pull picker: the weapon oil (idle:classic_weapon), the mana potion and the runes (fight rule). if (role == RaidConsumableRole::Caster) expected.insert({ 20749, 13444, 12662, 20520 }); + // The healer kit stocks its weapon oil, Brilliant Mana Oil (idle:classic_weapon); its potions and runes come from the supply families. + if (role == RaidConsumableRole::Healer) + expected.insert(20748); CHECK(combat == expected); } }