Add WorldEffectID to Gameobject

This commit is contained in:
hondacrx
2017-11-05 17:40:57 -05:00
parent f81a877ad3
commit b8fe68ec8b
8 changed files with 78 additions and 22 deletions
@@ -228,6 +228,12 @@ namespace Game.Entities
{
SetUInt32Value(GameObjectFields.Faction, m_goTemplateAddon.faction);
SetUInt32Value(GameObjectFields.Flags, m_goTemplateAddon.flags);
if (m_goTemplateAddon.WorldEffectID)
{
m_updateFlag |= UpdateFlag.Gameobject;
SetWorldEffectID(m_goTemplateAddon.WorldEffectID);
}
}
SetEntry(goinfo.entry);
@@ -318,6 +324,12 @@ namespace Game.Entities
m_invisibility.AddValue(gameObjectAddon.invisibilityType, gameObjectAddon.invisibilityValue);
}
if (gameObjectAddon != null && gameObjectAddon.WorldEffectID)
{
m_updateFlag |= UpdateFlag.Gameobject;
SetWorldEffectID(gameObjectAddon.WorldEffectID);
}
LastUsedScriptID = GetGoInfo().ScriptId;
AIM_Initialize();
@@ -2498,6 +2510,9 @@ namespace Game.Entities
public override ushort GetAIAnimKitId() { return _animKitId; }
public uint GetWorldEffectID() { return _worldEffectID; }
public void SetWorldEffectID(uint worldEffectID) { _worldEffectID = worldEffectID; }
public GameObjectTemplate GetGoInfo() { return m_goInfo; }
public GameObjectTemplateAddon GetTemplateAddon() { return m_goTemplateAddon; }
GameObjectData GetGoData() { return m_goData; }
@@ -2663,6 +2678,7 @@ namespace Game.Entities
GameObjectAI m_AI;
ushort _animKitId;
uint _worldEffectID;
GameObjectState m_prevGoState; // What state to set whenever resetting