Fix/rewrite Shaman weapon buff checking (incl. dual wield support)

Replace the self-weapon shaman imbues with buff checking similar to rogue poisons. Includes support for buffing offhand for enhancement DW shamans.
This commit is contained in:
Bobblybook
2024-07-14 14:09:55 +10:00
parent 84abdcc81f
commit a1fe7e5d24
7 changed files with 48 additions and 9 deletions

View File

@@ -5,6 +5,7 @@
#include "ShamanTriggers.h"
#include "Playerbots.h"
/*
std::vector<std::string> ShamanWeaponTrigger::spells;
bool ShamanWeaponTrigger::IsActive()
@@ -30,6 +31,21 @@ bool ShamanWeaponTrigger::IsActive()
return false;
}
*/
bool MainHandWeaponNoImbueTrigger::IsActive() {
Item* const itemForSpell = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND );
if (!itemForSpell || itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
return false;
return true;
}
bool OffHandWeaponNoImbueTrigger::IsActive() {
Item* const itemForSpell = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND );
if (!itemForSpell || itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
return false;
return true;
}
bool ShockTrigger::IsActive()
{