Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2023-08-07 23:58:57 +08:00
40 changed files with 515 additions and 232 deletions

View File

@@ -2492,13 +2492,22 @@ float Pet::GetNativeObjectScale() const
scale = creatureFamily->minScale + float(GetLevel() - creatureFamily->minScaleLevel) / creatureFamily->maxScaleLevel * (creatureFamily->maxScale - creatureFamily->minScale);
if (CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId()))
{
if (displayInfo->scale > 1.f && GetCreatureTemplate()->IsExotic())
{
// Exotic pets have a scale of 1
scale = 1.0f;
}
else
{
scale *= displayInfo->scale;
}
}
return scale;
}
return Guardian::GetNativeObjectScale();
// Fallback value if the conditions are not met
return 1.0f;
}
std::string Pet::GenerateActionBarData() const

View File

@@ -14660,6 +14660,8 @@ void Unit::TauntApply(Unit* taunter)
return;
SetInFront(taunter);
SetGuidValue(UNIT_FIELD_TARGET, taunter->GetGUID());
if (creature->IsAIEnabled)
creature->AI()->AttackStart(taunter);
@@ -14698,6 +14700,7 @@ void Unit::TauntFadeOut(Unit* taunter)
if (target && target != taunter)
{
SetGuidValue(UNIT_FIELD_TARGET, target->GetGUID());
SetInFront(target);
if (creature->IsAIEnabled)
creature->AI()->AttackStart(target);