refactor(Core/Unit): Add naming for all ShapeshiftFlags (#20989)

This commit is contained in:
Jelle Meeus
2024-12-22 08:56:54 +01:00
committed by GitHub
parent dc79f26e04
commit f011cbb602
4 changed files with 25 additions and 4 deletions

View File

@@ -1457,7 +1457,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift {}", form);
return SPELL_CAST_OK;
}
actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells
actAsShifted = !(shapeInfo->flags1 & SHAPESHIFT_FLAG_STANCE); // shapeshift acts as normal form for spells
}
if (actAsShifted)
@@ -1477,7 +1477,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
// Check if stance disables cast of not-stance spells
// Example: cannot cast any other spells in zombie or ghoul form
/// @todo: Find a way to disable use of these spells clientside
if (shapeInfo && shapeInfo->flags1 & 0x400)
if (shapeInfo && (shapeInfo->flags1 & SHAPESHIFT_FLAG_CAN_ONLY_CAST_SHAPESHIFT_SPELLS))
{
if (!(stanceMask & Stances))
return SPELL_FAILED_ONLY_SHAPESHIFT;