Core/GameObjects: Set GO_FLAG_MAP_OBJECT for gameobjects that use a WMO model
This commit is contained in:
@@ -177,7 +177,7 @@ namespace Game.Collision
|
|||||||
|
|
||||||
public void enableCollision(bool enable) { _collisionEnabled = enable; }
|
public void enableCollision(bool enable) { _collisionEnabled = enable; }
|
||||||
bool isCollisionEnabled() { return _collisionEnabled; }
|
bool isCollisionEnabled() { return _collisionEnabled; }
|
||||||
bool isMapObject() { return isWmo; }
|
public bool isMapObject() { return isWmo; }
|
||||||
|
|
||||||
public static void LoadGameObjectModelList()
|
public static void LoadGameObjectModelList()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -266,6 +266,9 @@ namespace Game.Entities
|
|||||||
SetDisplayId(goInfo.displayId);
|
SetDisplayId(goInfo.displayId);
|
||||||
|
|
||||||
m_model = CreateModel();
|
m_model = CreateModel();
|
||||||
|
if (m_model != null && m_model.isMapObject())
|
||||||
|
SetFlag(GameObjectFields.Flags, GameObjectFlags.MapObject);
|
||||||
|
|
||||||
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
|
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
|
||||||
SetGoType(goInfo.type);
|
SetGoType(goInfo.type);
|
||||||
m_prevGoState = goState;
|
m_prevGoState = goState;
|
||||||
@@ -2360,6 +2363,8 @@ namespace Game.Entities
|
|||||||
m_model = CreateModel();
|
m_model = CreateModel();
|
||||||
if (m_model != null)
|
if (m_model != null)
|
||||||
GetMap().InsertGameObjectModel(m_model);
|
GetMap().InsertGameObjectModel(m_model);
|
||||||
|
|
||||||
|
ApplyModFlag(GameObjectFields.Flags, GameObjectFlags.MapObject, m_model != null && m_model.isMapObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
Player GetLootRecipient()
|
Player GetLootRecipient()
|
||||||
|
|||||||
Reference in New Issue
Block a user