DB/Creatures: Port master model system

Fixes incorrect displayid for creatures, due to probability
This commit is contained in:
funjoker committed 2023-09-15 23:52:51 +02:00
1 parent eb5cbdf948
commit df32b341a5
43 files changed
+65170 -262

No files matched your search

+3 -4
View File
@@ -189,8 +189,7 @@ bool Pet::LoadPetData(Player* owner, uint32 petEntry, uint32 petnumber, bool cur
m_charmInfo->SetPetNumber(petId, IsPermanentPetFor(owner));
SetDisplayId(playerPetData->DisplayId);
SetNativeDisplayId(playerPetData->DisplayId);
SetDisplayId(playerPetData->DisplayId, true);
uint32 petlevel = playerPetData->Petlevel;
SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
SetName(playerPetData->Name);
@@ -1962,9 +1961,9 @@ float Pet::GetNativeObjectScale() const
return Guardian::GetNativeObjectScale();
}
void Pet::SetDisplayId(uint32 modelId)
void Pet::SetDisplayId(uint32 modelId, bool setNative /*= false*/)
{
Guardian::SetDisplayId(modelId);
Guardian::SetDisplayId(modelId, setNative);
if (!isControlled())
return;