mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix shaman enchant inv type
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "ShamanTriggers.h"
|
#include "ShamanTriggers.h"
|
||||||
|
|
||||||
|
#include "ItemTemplate.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -46,8 +47,12 @@ bool MainHandWeaponNoImbueTrigger::IsActive()
|
|||||||
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->GetTemplate()->InventoryType != INVTYPE_WEAPON)
|
return false;
|
||||||
|
uint32 invType = itemForSpell->GetTemplate()->InventoryType;
|
||||||
|
bool allowedType = (invType == INVTYPE_WEAPON) || (invType == INVTYPE_WEAPONOFFHAND);
|
||||||
|
if (itemForSpell->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT) ||
|
||||||
|
!allowedType)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user