Core/Creatures: Implemented automatic detection of trigger models, their order in creature_template no longer matters

(cherry picked from commit c488fb219ab080031488593a0b86ac785a7d2cae)
This commit is contained in:
Shauren committed 2015-12-11 23:51:04 +01:00
1 parent 0170b79ae9
commit f72795240a
6 files changed
+72 -21

No files matched your search

+1 -15
View File
@@ -17791,22 +17791,8 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
}
if (cinfo->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER)
{
if (target->IsGameMaster())
{
if (cinfo->Modelid1)
displayId = cinfo->Modelid1; // Modelid1 is a visible model for gms
else
displayId = 17519; // world visible trigger's model
}
else
{
if (cinfo->Modelid2)
displayId = cinfo->Modelid2; // Modelid2 is an invisible model for players
else
displayId = 11686; // world invisible trigger's model
}
}
displayId = cinfo->GetFirstVisibleModel();
}
fieldBuffer << uint32(displayId);