Skip to content

Commit

Permalink
Merge pull request liyunfan1223#349 from Bobblybook/master
Browse files Browse the repository at this point in the history
Shaman weapon buff fixes
  • Loading branch information
liyunfan1223 authored Jul 17, 2024
2 parents 4ff7a7e + aaaa53b commit ba884f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/strategy/shaman/GenericShamanStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
{
return new ActionNode ("flametongue weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr),
/*A*/ NextAction::array(0, new NextAction("rockbiter weapon"), nullptr),
/*C*/ nullptr);
}

static ActionNode* frostbrand_weapon([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("frostbrand weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("frostbrand weapon"), nullptr),
/*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr),
/*C*/ nullptr);
}

static ActionNode* windfury_weapon([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("windfury weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("windfury weapon"), nullptr),
/*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr),
/*C*/ nullptr);
}

Expand Down
8 changes: 4 additions & 4 deletions src/strategy/shaman/ShamanTriggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_WEAPON)
return false;
return true;
}
Expand Down Expand Up @@ -106,4 +106,4 @@ bool NoAirTotemTrigger::IsActive()
{
return !AI_VALUE2(bool, "has totem", "wrath of air totem") &&
!AI_VALUE2(bool, "has totem", "windfury totem");
}
}

0 comments on commit ba884f2

Please sign in to comment.