diff options
author | Sovak <Sovak007@gmail.com> | 2012-08-14 00:17:06 +0200 |
---|---|---|
committer | Sovak <Sovak007@gmail.com> | 2012-08-14 00:17:06 +0200 |
commit | 45e0cae7beedd84a6e71cf99d356e836476c1e4a (patch) | |
tree | 78ca098b65221f2313c0fd308ed822616be4fbc6 | |
parent | 292cbbf06878c8eaf4ec5144f818dccf5c1c6a7d (diff) |
Core/Totems: In cata totem items are no longer needed
Signed-off-by: Sovak <Sovak007@gmail.com>
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 25 | ||||
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 20 |
2 files changed, 1 insertions, 44 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 267d3dc6f7c..188fdb5e9f4 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -10499,31 +10499,6 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item 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 = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i); - if (pItem && IsTotemCategoryCompatiableWith(pItem->GetTemplate()->TotemCategory, TotemCategory)) - return true; - } - - for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i) - { - if (Bag* pBag = GetBagByPos(i)) - { - for (uint32 j = 0; j < pBag->GetBagSize(); ++j) - { - pItem = GetUseableItemByPos(i, j); - if (pItem && IsTotemCategoryCompatiableWith(pItem->GetTemplate()->TotemCategory, TotemCategory)) - return true; - } - } - } - return false; -} - InventoryResult Player::CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const { Item* pItem2 = GetItemByPos(bag, slot); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 01a2802f48a..54d9387d0c1 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5991,25 +5991,7 @@ SpellCastResult Spell::CheckItems() totems -= 1; } if (totems != 0) - return SPELL_FAILED_TOTEMS; //0x7C - - // Check items for TotemCategory (items presence in inventory) - uint32 TotemCategory = 2; - for (int i= 0; i < 2; ++i) - { - if (m_spellInfo->TotemCategory[i] != 0) - { - if (p_caster->HasItemTotemCategory(m_spellInfo->TotemCategory[i])) - { - TotemCategory -= 1; - continue; - } - } - else - TotemCategory -= 1; - } - if (TotemCategory != 0) - return SPELL_FAILED_TOTEM_CATEGORY; //0x7B + return SPELL_FAILED_TOTEMS; } // special checks for spell effects |