feat(Core/Scripting): Add new hook OnUnitSetShapeshiftForm (#21235)

This commit is contained in:
iThorgrim
2025-02-04 07:41:29 +01:00
committed by GitHub
parent 02a903b16f
commit 054018232c
5 changed files with 15 additions and 4 deletions

View File

@@ -21324,6 +21324,12 @@ bool Unit::CanRestoreMana(SpellInfo const* spellInfo) const
return false;
}
void Unit::SetShapeshiftForm(ShapeshiftForm form)
{
SetByteValue(UNIT_FIELD_BYTES_2, 3, form);
sScriptMgr->OnUnitSetShapeshiftForm((Unit*)this, form);
}
bool Unit::IsInDisallowedMountForm() const
{
if (SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(getTransForm()))