Core/Spells: Restored totem category check
Revert "Core/Totems: In cata totem items are no longer needed"
This reverts commit 45e0cae7be
(cherry picked from commit ea9eccae8596d440c372b0d9709d4def4b46e648)
Conflicts:
src/server/game/Entities/Item/ItemPrototype.h
This commit is contained in:
1 parent
8aa7c1995b
commit
6cc38ad7d2
4 files changed
+50
-2
No files matched your search
@@ -6034,8 +6034,28 @@ SpellCastResult Spell::CheckItems()
|
||||
else
|
||||
totems -= 1;
|
||||
}
|
||||
|
||||
if (totems != 0)
|
||||
return SPELL_FAILED_TOTEMS;
|
||||
|
||||
// Check items for TotemCategory (items presence in inventory)
|
||||
uint32 totemCategory = 2;
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
if (m_spellInfo->TotemCategory[i] != 0)
|
||||
{
|
||||
if (player->HasItemTotemCategory(m_spellInfo->TotemCategory[i]))
|
||||
{
|
||||
totemCategory -= 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
totemCategory -= 1;
|
||||
}
|
||||
|
||||
if (totemCategory != 0)
|
||||
return SPELL_FAILED_TOTEM_CATEGORY;
|
||||
}
|
||||
|
||||
// special checks for spell effects
|
||||
|
||||
Reference in new issue
Block a user