mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user