Skip to content

Commit 758aa9c

Browse files
authored
Implement "EnableDoodadSets" for phaseableMO
Also fix "CreateModel" by defining the Go type before CreateModel try to use it
1 parent a435d8a commit 758aa9c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/server/game/Entities/GameObject/GameObject.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,9 +1076,9 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
10761076

10771077
SetDisplayId(goInfo->displayId);
10781078

1079-
CreateModel();
10801079
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
10811080
SetGoType(GameobjectTypes(goInfo->type));
1081+
CreateModel();
10821082
m_prevGoState = goState;
10831083
SetGoState(goState);
10841084
SetGoArtKit(artKit);
@@ -1147,6 +1147,12 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
11471147
case GAMEOBJECT_TYPE_PHASEABLE_MO:
11481148
RemoveFlag(GameObjectFlags(0xF00));
11491149
SetFlag(GameObjectFlags((m_goInfo->phaseableMO.AreaNameSet & 0xF) << 8));
1150+
1151+
if (GetGOInfo()->phaseableMO.DoodadSetA)
1152+
SetUpdateFieldValue(m_values.ModifyValue(&GameObject::m_gameObjectData).ModifyValue(&UF::GameObjectData::EnableDoodadSets, 0), static_cast<int32>(GetGOInfo()->phaseableMO.DoodadSetA));
1153+
1154+
if (GetGOInfo()->phaseableMO.DoodadSetB)
1155+
SetUpdateFieldValue(m_values.ModifyValue(&GameObject::m_gameObjectData).ModifyValue(&UF::GameObjectData::EnableDoodadSets, 1), static_cast<int32>(GetGOInfo()->phaseableMO.DoodadSetB));
11501156
break;
11511157
case GAMEOBJECT_TYPE_CAPTURE_POINT:
11521158
SetUpdateFieldValue(m_values.ModifyValue(&GameObject::m_gameObjectData).ModifyValue(&UF::GameObjectData::SpellVisualID), m_goInfo->capturePoint.SpellVisual1);

0 commit comments

Comments
 (0)