Add WorldEffectID to Gameobject
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -1030,6 +1030,7 @@ namespace Game.Entities
|
||||
public uint flags;
|
||||
public uint mingold;
|
||||
public uint maxgold;
|
||||
public uint WorldEffectID;
|
||||
}
|
||||
|
||||
public class GameObjectLocale
|
||||
@@ -1044,6 +1045,7 @@ namespace Game.Entities
|
||||
public Quaternion ParentRotation;
|
||||
public InvisibilityType invisibilityType;
|
||||
public uint invisibilityValue;
|
||||
public uint WorldEffectID;
|
||||
}
|
||||
|
||||
public class GameObjectData
|
||||
|
||||
@@ -325,7 +325,7 @@ namespace Game.Entities
|
||||
bool AnimKitCreate = flags.HasAnyFlag(UpdateFlag.AnimKits);
|
||||
bool Rotation = flags.HasAnyFlag(UpdateFlag.Rotation);
|
||||
bool HasAreaTrigger = flags.HasAnyFlag(UpdateFlag.Areatrigger);
|
||||
bool HasGameObject = false;
|
||||
bool HasGameObject = flags.HasAnyFlag(UpdateFlag.Gameobject);
|
||||
bool ThisIsYou = flags.HasAnyFlag(UpdateFlag.Self);
|
||||
bool SmoothPhasing = false;
|
||||
bool SceneObjCreate = false;
|
||||
@@ -653,14 +653,20 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
//if (HasGameObject)
|
||||
//{
|
||||
// *data << uint32(WorldEffectID);
|
||||
if (HasGameObject)
|
||||
{
|
||||
bool bit8 = false;
|
||||
uint Int1 = 0;
|
||||
|
||||
// data.WriteBit(bit8);
|
||||
// if (bit8)
|
||||
// *data << uint32(Int1);
|
||||
//}
|
||||
GameObject gameObject = ToGameObject();
|
||||
|
||||
data.WriteUInt32(gameObject.GetWorldEffectID());
|
||||
|
||||
data.WriteBit(bit8);
|
||||
data.FlushBits();
|
||||
if (bit8)
|
||||
data.WriteUInt32(Int1);
|
||||
}
|
||||
|
||||
//if (SmoothPhasing)
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user