mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[12162] totem items are no longer needed. Thanks Sovak
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
55ebf1b64f
commit
2bb6130e42
4 changed files with 1 additions and 45 deletions
|
|
@ -9659,30 +9659,6 @@ InventoryResult Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Ite
|
||||||
return EQUIP_ERR_OK;
|
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
|
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);
|
Item* pItem2 = GetItemByPos(bag, slot);
|
||||||
|
|
|
||||||
|
|
@ -1235,7 +1235,6 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
InventoryResult CanUnequipItem(uint16 src, bool swap) const;
|
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 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;
|
InventoryResult CanUseItem(Item* pItem, bool direct_action = true) const;
|
||||||
bool HasItemTotemCategory(uint32 TotemCategory) const;
|
|
||||||
InventoryResult CanUseItem(ItemPrototype const* pItem) const;
|
InventoryResult CanUseItem(ItemPrototype const* pItem) const;
|
||||||
InventoryResult CanUseAmmo(uint32 item) const;
|
InventoryResult CanUseAmmo(uint32 item) const;
|
||||||
Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId = 0);
|
Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId = 0);
|
||||||
|
|
|
||||||
|
|
@ -6926,25 +6926,6 @@ SpellCastResult Spell::CheckItems()
|
||||||
|
|
||||||
if (totems != 0)
|
if (totems != 0)
|
||||||
return SPELL_FAILED_TOTEMS;
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12161"
|
#define REVISION_NR "12162"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue