Core/Spells: Updated spell shapeshift form flags enum

This commit is contained in:
Shauren authored and Ovahlord committed 2021-03-24 13:16:17 +01:00
1 parent 2caca9e55c
commit 45df49c826
4 files changed
+29 -4

No files matched your search

+3 -3
View File
@@ -1664,14 +1664,14 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
TC_LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
return SPELL_CAST_OK;
}
actAsShifted = !(shapeInfo->Flags & 1); // shapeshift acts as normal form for spells
actAsShifted = !shapeInfo->GetFlags().HasFlag(SpellShapeshiftFormFlags::Stance);
}
if (actAsShifted)
{
if (HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFT)) // not while shapeshifted
if (HasAttribute(SPELL_ATTR0_NOT_SHAPESHIFT) || (shapeInfo && shapeInfo->GetFlags().HasFlag(SpellShapeshiftFormFlags::CanOnlyCastShapeshiftSpells))) // not while shapeshifted
return SPELL_FAILED_NOT_SHAPESHIFT;
else if (Stances != UI64LIT(0)) // needs other shapeshift
else if (Stances != 0) // needs other shapeshift
return SPELL_FAILED_ONLY_SHAPESHIFT;
}
else