fix(Core/GameObjects): Creating gameobject's model requires set go state. (#5188)

This commit is contained in:
UltraNix
2021-04-13 19:42:43 +02:00
committed by GitHub
parent 92668be4f3
commit c860b4422c
2 changed files with 8 additions and 4 deletions

View File

@@ -0,0 +1,3 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1617863055133088000');
UPDATE `gameobject` SET `phaseMask`=1|2|16|32|64|128 WHERE `id` BETWEEN 192028 AND 192033;

View File

@@ -298,15 +298,16 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa
// set name for logs usage, doesn't affect anything ingame
SetName(goinfo->name);
SetDisplayId(goinfo->displayId);
if (!m_model)
m_model = GameObjectModel::Create(*this);
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
SetGoType(GameobjectTypes(goinfo->type));
SetGoState(go_state);
SetGoArtKit(artKit);
SetDisplayId(goinfo->displayId);
if (!m_model)
m_model = GameObjectModel::Create(*this);
switch (goinfo->type)
{
case GAMEOBJECT_TYPE_FISHINGHOLE: