diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 72fd65d37..b43f71323 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -9659,30 +9659,6 @@ InventoryResult Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Ite return EQUIP_ERR_OK; } -bool Player::HasItemTotemCategory(uint32 TotemCategory) const -{ - Item* pItem; - for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i) - { - pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); - if (pItem && IsTotemCategoryCompatiableWith(pItem->GetProto()->TotemCategory, TotemCategory)) - return true; - } - for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i) - { - if (Bag* pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0, i)) - { - for (uint32 j = 0; j < pBag->GetBagSize(); ++j) - { - pItem = GetItemByPos(i, j); - if (pItem && IsTotemCategoryCompatiableWith(pItem->GetProto()->TotemCategory, TotemCategory)) - return true; - } - } - } - return false; -} - InventoryResult Player::_CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemPrototype const* pProto, uint32& count, bool swap, Item* pSrcItem) const { Item* pItem2 = GetItemByPos(bag, slot); diff --git a/src/game/Player.h b/src/game/Player.h index 8fd37d8c9..3b490f216 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1235,7 +1235,6 @@ class MANGOS_DLL_SPEC Player : public Unit InventoryResult CanUnequipItem(uint16 src, bool swap) const; InventoryResult CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, Item* pItem, bool swap, bool not_loading = true) const; InventoryResult CanUseItem(Item* pItem, bool direct_action = true) const; - bool HasItemTotemCategory(uint32 TotemCategory) const; InventoryResult CanUseItem(ItemPrototype const* pItem) const; InventoryResult CanUseAmmo(uint32 item) const; Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId = 0); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index d86a9f513..6f7ed67ca 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -6926,25 +6926,6 @@ SpellCastResult Spell::CheckItems() if (totems != 0) return SPELL_FAILED_TOTEMS; - - // Check items for TotemCategory (items presence in inventory) - uint32 TotemCategory = MAX_SPELL_TOTEM_CATEGORIES; - for(int i= 0; i < MAX_SPELL_TOTEM_CATEGORIES; ++i) - { - if (spellTotems->TotemCategory[i] != 0) - { - if (p_caster->HasItemTotemCategory(spellTotems->TotemCategory[i])) - { - TotemCategory -= 1; - continue; - } - } - else - TotemCategory -= 1; - } - - if (TotemCategory != 0) - return SPELL_FAILED_TOTEM_CATEGORY; } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f97440b2d..f3eef94ea 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12161" + #define REVISION_NR "12162" #endif // __REVISION_NR_H__