Misc fixes
This commit is contained in:
@@ -31,6 +31,7 @@ namespace Game.Entities
|
||||
m_areaTriggerData = new AreaTriggerFieldData();
|
||||
|
||||
_spline = new();
|
||||
_stationaryPosition = new();
|
||||
}
|
||||
|
||||
public override void AddToWorld()
|
||||
@@ -261,9 +262,9 @@ namespace Game.Entities
|
||||
|
||||
SpellInfo spellInfo = null;
|
||||
SpellCastVisual spellVisual = default;
|
||||
if (spawnData.SpellForVisuals != 0)
|
||||
if (spawnData.SpellForVisuals.HasValue)
|
||||
{
|
||||
spellInfo = Global.SpellMgr.GetSpellInfo((uint)spawnData.SpellForVisuals, Difficulty.None);
|
||||
spellInfo = Global.SpellMgr.GetSpellInfo(spawnData.SpellForVisuals.Value, Difficulty.None);
|
||||
if (spellInfo != null)
|
||||
spellVisual.SpellXSpellVisualID = spellInfo.GetSpellXSpellVisualId();
|
||||
}
|
||||
|
||||
@@ -1909,7 +1909,7 @@ namespace Game.Entities
|
||||
public virtual float GetNativeObjectScale() { return 1.0f; }
|
||||
|
||||
public float GetDisplayScale() { return m_unitData.DisplayScale; }
|
||||
|
||||
|
||||
public uint GetDisplayId() { return m_unitData.DisplayID; }
|
||||
|
||||
public virtual void SetDisplayId(uint displayId, bool setNative = false)
|
||||
@@ -2088,7 +2088,17 @@ namespace Game.Entities
|
||||
return IsCharmed() ? GetCharmerGUID() : GetOwnerGUID();
|
||||
}
|
||||
|
||||
Player GetControllingPlayer()
|
||||
public Unit GetDemonCreator()
|
||||
{
|
||||
return Global.ObjAccessor.GetUnit(this, GetDemonCreatorGUID());
|
||||
}
|
||||
|
||||
public Player GetDemonCreatorPlayer()
|
||||
{
|
||||
return Global.ObjAccessor.GetPlayer(this, GetDemonCreatorGUID());
|
||||
}
|
||||
|
||||
public Player GetControllingPlayer()
|
||||
{
|
||||
ObjectGuid guid = GetCharmerOrOwnerGUID();
|
||||
if (!guid.IsEmpty())
|
||||
|
||||
Reference in New Issue
Block a user