fix(Core/Pets): Corret Pet size for normal and exotics & bigger pets (#16910)
* fix(Core/Pet) Pet size fixed * Update Pet.cpp * Update Pet.cpp
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);
|
scale = creatureFamily->minScale + float(GetLevel() - creatureFamily->minScaleLevel) / creatureFamily->maxScaleLevel * (creatureFamily->maxScale - creatureFamily->minScale);
|
||||||
|
|
||||||
if (CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId()))
|
if (CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId()))
|
||||||
|
{
|
||||||
if (displayInfo->scale > 1.f && GetCreatureTemplate()->IsExotic())
|
if (displayInfo->scale > 1.f && GetCreatureTemplate()->IsExotic())
|
||||||
|
{
|
||||||
|
// Exotic pets have a scale of 1
|
||||||
|
scale = 1.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
scale *= displayInfo->scale;
|
scale *= displayInfo->scale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return scale;
|
return scale;
|
||||||
}
|
}
|
||||||
|
// Fallback value if the conditions are not met
|
||||||
return Guardian::GetNativeObjectScale();
|
return 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Pet::GenerateActionBarData() const
|
std::string Pet::GenerateActionBarData() const
|
||||||
|
|||||||
Reference in New Issue
Block a user