Core/Objects: Removed type casts before accessing WorldObject::m_Events that became unneccessary after moving it from Unit to WorldObject
Port From (https://github.com/TrinityCore/TrinityCore/commit/bc8874f30597a996eb30b7b278bcc71b2f082f10)
This commit is contained in:
@@ -321,9 +321,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (msTime != 0)
|
||||
{
|
||||
ForcedUnsummonDelayEvent pEvent = new(this);
|
||||
|
||||
m_Events.AddEvent(pEvent, m_Events.CalculateTime(TimeSpan.FromMilliseconds(msTime)));
|
||||
m_Events.AddEventAtOffset(new ForcedDespawnDelayEvent(this), TimeSpan.FromMilliseconds(msTime));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1215,21 +1213,6 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public class ForcedUnsummonDelayEvent : BasicEvent
|
||||
{
|
||||
public ForcedUnsummonDelayEvent(TempSummon owner)
|
||||
{
|
||||
m_owner = owner;
|
||||
}
|
||||
public override bool Execute(ulong e_time, uint p_time)
|
||||
{
|
||||
m_owner.UnSummon();
|
||||
return true;
|
||||
}
|
||||
|
||||
TempSummon m_owner;
|
||||
}
|
||||
|
||||
public class TempSummonData
|
||||
{
|
||||
public uint entry; // Entry of summoned creature
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (msTime != 0)
|
||||
{
|
||||
m_Events.AddEvent(new ForcedUnsummonDelayEvent(this), m_Events.CalculateTime(TimeSpan.FromMilliseconds(msTime)));
|
||||
m_Events.AddEventAtOffset(new ForcedDespawnDelayEvent(this), TimeSpan.FromMilliseconds(msTime));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user