Merge pull request #349 from Bobblybook/master

Shaman weapon buff fixes
This commit is contained in:
Yunfan Li
2024-07-17 21:23:23 +08:00
committed by GitHub
2 changed files with 7 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
{ {
return new ActionNode ("flametongue weapon", return new ActionNode ("flametongue weapon",
/*P*/ nullptr, /*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr), /*A*/ NextAction::array(0, new NextAction("rockbiter weapon"), nullptr),
/*C*/ nullptr); /*C*/ nullptr);
} }
@@ -43,7 +43,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
{ {
return new ActionNode ("frostbrand weapon", return new ActionNode ("frostbrand weapon",
/*P*/ nullptr, /*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("frostbrand weapon"), nullptr), /*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr),
/*C*/ nullptr); /*C*/ nullptr);
} }
@@ -51,7 +51,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
{ {
return new ActionNode ("windfury weapon", return new ActionNode ("windfury weapon",
/*P*/ nullptr, /*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("windfury weapon"), nullptr), /*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr),
/*C*/ nullptr); /*C*/ nullptr);
} }

View File

@@ -34,15 +34,15 @@ bool ShamanWeaponTrigger::IsActive()
*/ */
bool MainHandWeaponNoImbueTrigger::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)) if (!itemForSpell || itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
return false; return false;
return true; return true;
} }
bool OffHandWeaponNoImbueTrigger::IsActive() { bool OffHandWeaponNoImbueTrigger::IsActive() {
Item* const itemForSpell = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND ); Item* const itemForSpell = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
if (!itemForSpell || itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT)) if (!itemForSpell || itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT) || itemForSpell->GetTemplate()->InventoryType != INVTYPE_WEAPON)
return false; return false;
return true; return true;
} }
@@ -106,4 +106,4 @@ bool NoAirTotemTrigger::IsActive()
{ {
return !AI_VALUE2(bool, "has totem", "wrath of air totem") && return !AI_VALUE2(bool, "has totem", "wrath of air totem") &&
!AI_VALUE2(bool, "has totem", "windfury totem"); !AI_VALUE2(bool, "has totem", "windfury totem");
} }