From 228e79ac874cb681a19909838542908907c844fa Mon Sep 17 00:00:00 2001 From: Bobblybook Date: Wed, 17 Jul 2024 01:10:52 +1000 Subject: [PATCH] Add weapon check for OH --- src/strategy/shaman/ShamanTriggers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/strategy/shaman/ShamanTriggers.cpp b/src/strategy/shaman/ShamanTriggers.cpp index d0651378..3579ba22 100644 --- a/src/strategy/shaman/ShamanTriggers.cpp +++ b/src/strategy/shaman/ShamanTriggers.cpp @@ -34,15 +34,15 @@ bool ShamanWeaponTrigger::IsActive() */ bool MainHandWeaponNoImbueTrigger::IsActive() { - Item* const itemForSpell = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND ); + 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)) + Item* const itemForSpell = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + if (!itemForSpell || itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT) || itemForSpell->GetTemplate()->InventoryType != INVTYPE_WEAPONOFFHAND) return false; return true; } @@ -106,4 +106,4 @@ bool NoAirTotemTrigger::IsActive() { return !AI_VALUE2(bool, "has totem", "wrath of air totem") && !AI_VALUE2(bool, "has totem", "windfury totem"); -} \ No newline at end of file +}