From 228e79ac874cb681a19909838542908907c844fa Mon Sep 17 00:00:00 2001 From: Bobblybook Date: Wed, 17 Jul 2024 01:10:52 +1000 Subject: [PATCH 1/4] 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 +} From 6e48585f76f50b529eb26adb3bdd052e70b0320f Mon Sep 17 00:00:00 2001 From: Bobblybook Date: Wed, 17 Jul 2024 01:12:15 +1000 Subject: [PATCH 2/4] Fix endless earthliving-> flametongue buff loop --- src/strategy/shaman/HealShamanStrategy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strategy/shaman/HealShamanStrategy.cpp b/src/strategy/shaman/HealShamanStrategy.cpp index d451e55b..250fb6eb 100644 --- a/src/strategy/shaman/HealShamanStrategy.cpp +++ b/src/strategy/shaman/HealShamanStrategy.cpp @@ -19,7 +19,7 @@ class HealShamanStrategyActionNodeFactory : public NamedObjectFactory Date: Wed, 17 Jul 2024 01:41:24 +1000 Subject: [PATCH 3/4] Update ShamanTriggers.cpp Accept all offhand weapon types --- src/strategy/shaman/ShamanTriggers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strategy/shaman/ShamanTriggers.cpp b/src/strategy/shaman/ShamanTriggers.cpp index 3579ba22..12c0e499 100644 --- a/src/strategy/shaman/ShamanTriggers.cpp +++ b/src/strategy/shaman/ShamanTriggers.cpp @@ -42,7 +42,7 @@ bool MainHandWeaponNoImbueTrigger::IsActive() { bool OffHandWeaponNoImbueTrigger::IsActive() { Item* const itemForSpell = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); - if (!itemForSpell || itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT) || itemForSpell->GetTemplate()->InventoryType != INVTYPE_WEAPONOFFHAND) + if (!itemForSpell || itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT) || itemForSpell->GetTemplate()->InventoryType != INVTYPE_WEAPON) return false; return true; } From aaaa53b96f42e9f4c62009dbe8c5dc96b57dcd97 Mon Sep 17 00:00:00 2001 From: Bobblybook Date: Wed, 17 Jul 2024 19:00:20 +1000 Subject: [PATCH 4/4] Correct alternative actions for weapon buffs --- src/strategy/shaman/GenericShamanStrategy.cpp | 6 +++--- src/strategy/shaman/HealShamanStrategy.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/strategy/shaman/GenericShamanStrategy.cpp b/src/strategy/shaman/GenericShamanStrategy.cpp index 96a31cbf..eb4958fd 100644 --- a/src/strategy/shaman/GenericShamanStrategy.cpp +++ b/src/strategy/shaman/GenericShamanStrategy.cpp @@ -35,7 +35,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory