mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
refactor(Core/Unit): Add naming for all ShapeshiftFlags (#20989)
This commit is contained in:
@@ -5832,7 +5832,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (effInfo->ApplyAuraName == SPELL_AURA_MOD_SHAPESHIFT)
|
||||
{
|
||||
SpellShapeshiftFormEntry const* shapeShiftEntry = sSpellShapeshiftFormStore.LookupEntry(effInfo->MiscValue);
|
||||
if (shapeShiftEntry && (shapeShiftEntry->flags1 & 1) == 0) // unk flag
|
||||
if (shapeShiftEntry && (shapeShiftEntry->flags1 & SHAPESHIFT_FLAG_STANCE) == 0)
|
||||
checkMask |= VEHICLE_SEAT_FLAG_UNCONTROLLED;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user