Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-12-31 17:18:40 +08:00
102 changed files with 2247 additions and 409 deletions

View File

@@ -5695,6 +5695,29 @@ uint32 Unit::GetAuraCount(uint32 spellId) const
return count;
}
bool Unit::HasAuras(SearchMethod sm, std::vector<uint32>& spellIds) const
{
if (sm == SearchMethod::MatchAll)
{
for (auto const& spellId : spellIds)
if (!HasAura(spellId))
return false;
return true;
}
else if (sm == SearchMethod::MatchAny)
{
for (auto const& spellId : spellIds)
if (HasAura(spellId))
return true;
return false;
}
else
{
LOG_ERROR("entities.unit", "Unit::HasAuras using non-supported SearchMethod {}", sm);
return false;
}
}
bool Unit::HasAura(uint32 spellId, ObjectGuid casterGUID, ObjectGuid itemCasterGUID, uint8 reqEffMask) const
{
if (GetAuraApplication(spellId, casterGUID, itemCasterGUID, reqEffMask))
@@ -21307,7 +21330,7 @@ bool Unit::IsInDisallowedMountForm() const
return true;
}
if (!(shapeshift->flags1 & 0x1))
if (!(shapeshift->flags1 & SHAPESHIFT_FLAG_STANCE))
{
return true;
}